Gui: [skip ci] show program version a file was created with in project information dialog
This commit is contained in:
@@ -182,6 +182,7 @@ struct DocumentP
|
||||
int iUndoMode;
|
||||
unsigned int UndoMemSize;
|
||||
unsigned int UndoMaxStackSize;
|
||||
std::string programVersion;
|
||||
#ifdef USE_OLD_DAG
|
||||
DependencyList DepList;
|
||||
std::map<DocumentObject*,Vertex> VertexObjectList;
|
||||
@@ -2731,7 +2732,9 @@ void Document::restore (const char *filename,
|
||||
catch (const Base::Exception& e) {
|
||||
Base::Console().Error("Invalid Document.xml: %s\n", e.what());
|
||||
}
|
||||
|
||||
d->partialLoadObjects.clear();
|
||||
d->programVersion = reader.ProgramVersion;
|
||||
|
||||
// Special handling for Gui document, the view representations must already
|
||||
// exist, what is done in Restore().
|
||||
@@ -2886,6 +2889,11 @@ std::string Document::getFullName() const {
|
||||
return myName;
|
||||
}
|
||||
|
||||
const char* Document::getProgramVersion() const
|
||||
{
|
||||
return d->programVersion.c_str();
|
||||
}
|
||||
|
||||
/// Remove all modifications. After this call The document becomes valid again.
|
||||
void Document::purgeTouched()
|
||||
{
|
||||
|
||||
@@ -223,6 +223,8 @@ public:
|
||||
bool isSaved() const;
|
||||
/// Get the document name
|
||||
const char* getName() const;
|
||||
/// Get program version the project file was created with
|
||||
const char* getProgramVersion() const;
|
||||
//@}
|
||||
|
||||
virtual void Save (Base::Writer &writer) const override;
|
||||
|
||||
@@ -105,6 +105,29 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="textLabelProgramVersion">
|
||||
<property name="text">
|
||||
<string>Program version:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLineEdit" name="lineEditProgramVersion">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="textLabelCreator">
|
||||
<property name="text">
|
||||
<string>Created &by:</string>
|
||||
@@ -117,7 +140,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="4" column="1">
|
||||
<widget class="QLineEdit" name="lineEditCreator">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -127,7 +150,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="textLabelCreateDate">
|
||||
<property name="text">
|
||||
<string>Creation &date:</string>
|
||||
@@ -140,7 +163,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="5" column="1">
|
||||
<widget class="QLineEdit" name="lineEditDate">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -153,7 +176,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="textLabelLastMod">
|
||||
<property name="text">
|
||||
<string>&Last modified by:</string>
|
||||
@@ -166,7 +189,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<item row="6" column="1">
|
||||
<widget class="QLineEdit" name="lineEditLastMod">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -176,7 +199,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="textLabelLastModDate">
|
||||
<property name="text">
|
||||
<string>Last &modification date:</string>
|
||||
@@ -189,7 +212,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<item row="7" column="1">
|
||||
<widget class="QLineEdit" name="lineEditLastModDate">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -202,7 +225,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<item row="8" column="0">
|
||||
<widget class="QLabel" name="textLabelCompany">
|
||||
<property name="text">
|
||||
<string>Com&pany:</string>
|
||||
@@ -215,7 +238,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<item row="8" column="1">
|
||||
<widget class="QLineEdit" name="lineEditCompany">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
@@ -225,7 +248,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0">
|
||||
<item row="9" column="0">
|
||||
<widget class="QLabel" name="textLabelLicense">
|
||||
<property name="text">
|
||||
<string>License information:</string>
|
||||
@@ -235,10 +258,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="1">
|
||||
<item row="9" column="1">
|
||||
<widget class="QComboBox" name="comboLicense"/>
|
||||
</item>
|
||||
<item row="9" column="0">
|
||||
<item row="10" column="0">
|
||||
<widget class="QLabel" name="textLabelLicenseURL">
|
||||
<property name="text">
|
||||
<string>License URL</string>
|
||||
@@ -248,7 +271,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="9" column="1">
|
||||
<item row="10" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEditLicenseURL"/>
|
||||
@@ -262,7 +285,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<item row="11" column="0">
|
||||
<widget class="QLabel" name="textLabelComment">
|
||||
<property name="text">
|
||||
<string>Commen&t:</string>
|
||||
@@ -275,10 +298,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="1" rowspan="2">
|
||||
<item row="11" column="1" rowspan="2">
|
||||
<widget class="QTextEdit" name="textEditComment"/>
|
||||
</item>
|
||||
<item row="11" column="0">
|
||||
<item row="12" column="0">
|
||||
<spacer>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
|
||||
@@ -53,6 +53,7 @@ DlgProjectInformationImp::DlgProjectInformationImp(App::Document* doc, QWidget*
|
||||
ui->lineEditName->setText(QString::fromUtf8(doc->Label.getValue()));
|
||||
ui->lineEditPath->setText(QString::fromUtf8(doc->FileName.getValue()));
|
||||
ui->lineEditUuid->setText(QString::fromUtf8(doc->Uid.getValueStr().c_str()));
|
||||
ui->lineEditProgramVersion->setText(QString::fromUtf8(doc->getProgramVersion()));
|
||||
ui->lineEditCreator->setText(QString::fromUtf8(doc->CreatedBy.getValue()));
|
||||
ui->lineEditDate->setText(QString::fromUtf8(doc->CreationDate.getValue()));
|
||||
ui->lineEditLastMod->setText(QString::fromUtf8(doc->LastModifiedBy.getValue()));
|
||||
|
||||
Reference in New Issue
Block a user