From 8d20d502c8e82edc968cd2144fa13e764bc51bc6 Mon Sep 17 00:00:00 2001 From: rnv Date: Fri, 25 Mar 2011 10:11:38 +0000 Subject: [PATCH] Implementation of the "16566: EDF PAL 514: Implement system of units (milimeters, meters, inch...)" issue. --- doc/salome/gui/images/studyproperties.png | Bin 9255 -> 9515 bytes .../gui/input/study_management_chapter.doc | 13 +- .../SalomeApp_StudyPropertiesDlg.cxx | 451 ++++++++---------- src/SalomeApp/SalomeApp_StudyPropertiesDlg.h | 50 +- src/SalomeApp/resources/SalomeApp_msg_en.ts | 18 +- 5 files changed, 235 insertions(+), 297 deletions(-) diff --git a/doc/salome/gui/images/studyproperties.png b/doc/salome/gui/images/studyproperties.png index e4f9f3d6e20b885f38b6cbafe7dee87b752049bc..c86d0bc041b2e12b27b999662f44ecd0ba4b7842 100755 GIT binary patch literal 9515 zcmd^lXH-*L*KPs=8U#eaAk||#F!+F0`$NTHvasPZ{z{t+do^#DL*R!5E*PQ!_sj(psL>K}B zfq1T5zH|cw0>fDUdpUtSxvy3dfR84*okcMJPBR55UefPV*Apf!&85iSaVdemn~QS#Lc1;JRUdP*(~IAIcg(0 zqp$r!p*$P%TB<<0ELAKG+LM;`5te>%cn0>Q3Ef7eHP)o3J0mr-3w2j3$r#g`dfu&P zQ)_(YJfUZ)zI8M4TC&_nX=11Ni%FMX_%UM|sYDRej!YL0Fgq)o zU>n^1zP7Um4dFU=SZAa!vCbnBKYs&CLaiy7Ik$t+cur%<(z4Iq|iOw zsJr~5d>y9e)J!kkI!T(`QtLJU6V;G4+L9Q6^V4+^SWG`RvJLJT|MVEU(SKSzap%Xh z-pabK)=^S+lVjFaHld4bj_g|Lqj#o`Mo3E&G>@rgH<^f|CSjXhp#@U}?eAPG{c;he zEo)!2P;0F%T1QT+7p!MzrZCk4aipYel=S>)r%J9%y~3E~fEmKOWK}91*~eg1jMe!w z3u-UBHVMIfT`Pu{tErPdbi##V>{6)lhgvzUP0h{E^;yq4#CMc8XQIbXs*9u2?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__Ee3> zZVLhid7W%`#4^f9S2L=J+l%xFO|b4rk>S8!@}|Ih1?z5kevGusbU(?gIZ9t`w z40F)Y&`45cdNSP$Lg2rVviApn>FJbj@TuQ%G@agw65nTW5jLp%mWZ^qO7{Y%WdUA~ zRFdxmZG${cOI>{~KDfkqWgs0B2d5oh;^M|^Jfm=SaEPA#6aWY2A3IN_8hWI@k%B8O zFBvWXbX)`?1imrylfA5{_I|Fw>f{!m`?h}l-ZDAM1NOj~4{~mb{4-uVVtuF=??fX3 zGYyj{@(&3?+{ETy{JpI)Lpr{El+6HO5{{0JU3D?cQSxG`VSnsnRaA5WKp;Ji_Q7R3 ziq0(ii8UAA%*?O#)_@#b)HY2>o(t#{(8@fN^X6-I1m!=KX0&1yUKdfudR<{mqV( zK}6167Z}=z1s^d53T$xIW`D+zn+XD^<}$Vr-t0_~kEi|n5MBYnu_i?R&5jq^h4)0| zsEiC{Qnw#pVQNEQXefi567^KcZ*j(F-`pRA-LcqQ{O$1z322H;HE1f<1$+Srdiq3B KrdZlI@IL@NAbI`( diff --git a/doc/salome/gui/input/study_management_chapter.doc b/doc/salome/gui/input/study_management_chapter.doc index b1d88af2c..71f3ed5e2 100644 --- a/doc/salome/gui/input/study_management_chapter.doc +++ b/doc/salome/gui/input/study_management_chapter.doc @@ -91,18 +91,19 @@ To confirm your choice click \b Open. \image html studyproperties.png

    -
  • \b Author - allows to change the name of the study author
  • -
  • \b Created - gives the date and time of Study creation
  • +
  • \b Author - allows to change the name of the study author.
  • +
  • Creation date - gives the date and time of Study creation.
  • \b Locked - allows to lock the study for modifications. -Just click on this field and choose \b Yes item. In this case your study will be locked for any modifications +In case if \b Locked checkbox is checked your study will be locked for any modifications for all users. Next time you try to edit it, you will see the following warning message: \image html lockedstudy.png
  • -
  • \b Modified - allows to see if any modifications have been +
  • Modified/Not Modified - allows to see if any modifications have been introduced into study since its last save.
  • +
  • Length units - allows to change the units of the study.
  • +
  • \b Comment - allows to change the comment of the study.
  • \b Modifications - allows to view the list of changes made in the study. -In this dialog box click on the \b Modifications field and scroll it -down. Each record contains the date and time of the +Each record contains the date and time of the modification and the name of the user, who has introduced it.
diff --git a/src/SalomeApp/SalomeApp_StudyPropertiesDlg.cxx b/src/SalomeApp/SalomeApp_StudyPropertiesDlg.cxx index 32e612e6e..9180ea122 100644 --- a/src/SalomeApp/SalomeApp_StudyPropertiesDlg.cxx +++ b/src/SalomeApp/SalomeApp_StudyPropertiesDlg.cxx @@ -22,12 +22,11 @@ // SALOME SalomeApp // File : SalomeApp_StudyPropertiesDlg.cxx -// Author : Sergey ANIKIN +// Author : Roman NIKOLAEV // Module : SALOME // $Header$ // #include "SalomeApp_StudyPropertiesDlg.h" -#include "SalomeApp_ListView.h" #include "SalomeApp_Study.h" #include "SUIT_Session.h" @@ -41,109 +40,30 @@ // QT Includes #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include -using namespace std; - +#include + #define DEFAULT_MARGIN 11 -#define DEFAULT_SPACING 6 +#define DEFAULT_SPACING 6 #define SPACER_SIZE 5 #define MIN_LIST_WIDTH 300 #define MIN_LIST_HEIGHT 150 -class SalomeApp_PropItem : public SalomeApp_ListViewItem -{ -public: - /*! constructor */ - SalomeApp_PropItem(SalomeApp_ListView* parent, - const QString theName, - const bool theEditable, - const int theUserType) : - SalomeApp_ListViewItem( parent, QStringList(theName), theEditable ) - { - setUserType(theUserType); - } - /*! constructor */ - SalomeApp_PropItem(SalomeApp_ListView* parent, - SalomeApp_ListViewItem* after, - const QString theName, - const bool theEditable, - const int theUserType) : - SalomeApp_ListViewItem( parent, after, theName, theEditable ) - { - setUserType(theUserType); - } - /*! fills widget with initial values (list or single value)*/ - void fillWidgetWithValues( SalomeApp_EntityEdit* theWidget ) - { - QStringList list; - switch(getUserType()) { - //case SalomeApp_StudyPropertiesDlg::prpModeId: - // { - // list << SalomeApp_StudyPropertiesDlg::tr("PRP_MODE_FROM_SCRATCH") << - // SalomeApp_StudyPropertiesDlg::tr("PRP_MODE_FROM_COPYFROM"); - // theWidget->insertList(list); - // break; - // } - case SalomeApp_StudyPropertiesDlg::prpLockedId: - { - list << SalomeApp_StudyPropertiesDlg::tr( "PRP_NO" ) << SalomeApp_StudyPropertiesDlg::tr( "PRP_YES" ); - theWidget->insertList(list, getValue() == SalomeApp_StudyPropertiesDlg::tr( "PRP_NO" ) ? 0 : 1 ); - break; - } - case SalomeApp_StudyPropertiesDlg::prpModificationsId: - { - SalomeApp_Study* study = - dynamic_cast( SUIT_Session::session()->activeApplication()->activeStudy() ); - if (study) { - _PTR(Study) studyDoc = study->studyDS(); - _PTR(AttributeStudyProperties) propAttr; - if ( studyDoc ) { - propAttr = studyDoc->GetProperties(); - if ( propAttr ) { - std::vector aUsers; - std::vector aMins, aHours, aDays, aMonths, aYears; - propAttr->GetModificationsList(aUsers, aMins, aHours, aDays, aMonths, aYears, false); - int aCnt = aUsers.size(); - for ( int i = 0; i < aCnt; i++ ) { - QString val; - val.sprintf("%2.2d/%2.2d/%2d %2.2d:%2.2d", - aDays [i], - aMonths[i], - aYears [i], - aHours [i], - aMins [i]); - val = val + " : " + QString( aUsers[i].c_str() ); - list.prepend(val); - } - theWidget->setDuplicatesEnabled(true); - theWidget->insertList(list); - } - } - } - break; - } - default: - { - SalomeApp_ListViewItem::fillWidgetWithValues(theWidget); - break; - } - } - } - /*! finishes editing of entity */ - virtual UpdateType finishEditing( SalomeApp_EntityEdit* theWidget ) { - if ( getUserType() == SalomeApp_StudyPropertiesDlg::prpModificationsId ) - return utCancel; - else - return SalomeApp_ListViewItem::finishEditing(theWidget); - } -}; /*!Constructor. Initialize study properties dialog.*/ SalomeApp_StudyPropertiesDlg::SalomeApp_StudyPropertiesDlg(QWidget* parent) - : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ), - myChanged( false ) + : QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ), + myIsChanged(false) { - setObjectName( "" ); setModal( TRUE ); setWindowTitle(tr("TLT_STUDY_PROPERTIES")); @@ -151,39 +71,83 @@ SalomeApp_StudyPropertiesDlg::SalomeApp_StudyPropertiesDlg(QWidget* parent) setWindowFlags( windowFlags() & ~Qt::WindowContextHelpButtonHint ); - QGridLayout* mainLayout = new QGridLayout(this); - mainLayout->setMargin(DEFAULT_MARGIN); - mainLayout->setSpacing(DEFAULT_SPACING); - - myPropList = new SalomeApp_ListView(this); - myPropList->setColumnCount(2); - QStringList aLabels; - aLabels << "" << ""; - myPropList->setHeaderLabels( aLabels ); - myPropList->enableEditing(TRUE); - myPropList->setMinimumSize(MIN_LIST_WIDTH, MIN_LIST_HEIGHT); - mainLayout->addWidget(myPropList, 0, 0, 1, 3); - - myOKBtn = new QPushButton(tr("BUT_OK"), this); - mainLayout->addWidget(myOKBtn, 1, 0); - - myCancelBtn = new QPushButton(tr("BUT_CANCEL"), this); - mainLayout->addWidget(myCancelBtn, 1, 2); - - QSpacerItem* spacer1 = - new QSpacerItem(SPACER_SIZE, SPACER_SIZE, QSizePolicy::Expanding, QSizePolicy::Minimum); - mainLayout->addItem(spacer1, 1, 1); - // Display study properties SalomeApp_Study* study = dynamic_cast( SUIT_Session::session()->activeApplication()->activeStudy() ); if (study) myStudyDoc = study->studyDS(); + //Author + QLabel* authorLbl = new QLabel(tr("PRP_AUTHOR"),this); + myAuthor = new QLineEdit(this); + + //Creation date + QLabel* dateLbl = new QLabel(tr("PRP_DATE"),this); + myDate = new QLabel(this); + + //Locked flag + myLocked = new QCheckBox(tr("PRP_LOCKED"), this); + + //Modification flag + myModification = new QLabel(this); + + //Units + QLabel* unitsLbl = new QLabel(tr("PRP_UNITS"),this); + myUnits = new QComboBox(this); + + //Comment + QLabel* commentLabel = new QLabel(tr("PRP_COMMENT"),this); + myComment = new QTextEdit(this); + myComment->setMaximumHeight(80); + + //Modifications + QLabel* modificationsLabel = new QLabel(tr("PRP_MODIFICATIONS"),this); + myModifications = new QTreeWidget(this); + myModifications->setRootIsDecorated(false); + myModifications->setUniformRowHeights(true); + myModifications->setAllColumnsShowFocus(true); + myModifications->setColumnCount(2); + myModifications->setMaximumHeight(80); + QStringList columnNames; + columnNames.append(tr("PRP_AUTHOR")); + columnNames.append(tr("PRP_DATE_MODIF")); + + QTreeWidgetItem * headerItem = new QTreeWidgetItem(columnNames); + myModifications->setHeaderItem ( headerItem ); + + QFrame* buttonFrame = new QFrame(this); + + QHBoxLayout* horizontalLayout = new QHBoxLayout(buttonFrame); + + myOkButton = new QPushButton(tr("BUT_OK"), buttonFrame); + myCancelButton = new QPushButton(tr("BUT_CANCEL"), buttonFrame); + + horizontalLayout->addWidget(myOkButton); + horizontalLayout->addItem( new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum) ); + horizontalLayout->addWidget(myCancelButton); + + QGridLayout* gridLayout = new QGridLayout(this); + gridLayout->setMargin(DEFAULT_MARGIN); + gridLayout->setSpacing(DEFAULT_SPACING); + gridLayout->addWidget(authorLbl, 0, 0, 1, 1); + gridLayout->addWidget(myAuthor, 0, 1, 1, 1); + gridLayout->addWidget(dateLbl, 1, 0, 1, 1); + gridLayout->addWidget(myDate, 1, 1, 1, 1); + gridLayout->addWidget(myLocked, 2, 0, 1, 1); + gridLayout->addWidget(myModification, 2, 1, 1, 1); + gridLayout->addWidget(unitsLbl, 3, 0, 1, 1); + gridLayout->addWidget(myUnits, 3, 1, 1, 1); + gridLayout->addItem(new QSpacerItem(/*72*/0, 0/*20*/, QSizePolicy::Expanding, QSizePolicy::Minimum), 3, 2, 1, 1); + gridLayout->addWidget(commentLabel, 4, 0, 1, 1); + gridLayout->addWidget(myComment, 4, 1, 1, 2); + gridLayout->addWidget(modificationsLabel, 5, 0, 1, 1); + gridLayout->addWidget(myModifications, 5, 1, 1, 2); + gridLayout->addWidget(buttonFrame, 6, 0, 1, 3); + + connect(myOkButton, SIGNAL(clicked()), this, SLOT(clickOnOk())); + connect(myCancelButton, SIGNAL(clicked()), this, SLOT(reject())); + initData(); - - connect(myOKBtn, SIGNAL(clicked()), this, SLOT(onOK())); - connect(myCancelBtn, SIGNAL(clicked()), this, SLOT(reject())); } /*! @@ -203,172 +167,133 @@ void SalomeApp_StudyPropertiesDlg::initData() if (hasData) propAttr = myStudyDoc->GetProperties(); hasData = hasData && propAttr; - - // Study author's name - SalomeApp_PropItem* item = new SalomeApp_PropItem(myPropList, tr("PRP_AUTHOR")+":", true, prpAuthorId); - if (hasData) - item->setValue(propAttr->GetUserName().c_str()); - - // Date of creation - item = new SalomeApp_PropItem(myPropList, item, tr("PRP_DATE")+":", false, prpDateId); + if (hasData) { + //Creator and creation date + myAuthor->setText(propAttr->GetUserName().c_str()); int minutes, hours, day, month, year; if (propAttr->GetCreationDate(minutes, hours, day, month, year)) { QString strDate; strDate.sprintf("%2.2d/%2.2d/%2d %2.2d:%2.2d", day, month, year, hours, minutes); - item->setValue(strDate); + myDate->setText(strDate); + } + + //Is Locked? + myLocked->setChecked(propAttr->IsLocked()); + + //Is Modified? + bool isModified = false; + SalomeApp_Study* study = dynamic_cast + (SUIT_Session::session()->activeApplication()->activeStudy()); + if (study) { + isModified = study->isModified(); + if (hasData) { + if (propAttr->IsModified() != isModified) { + propAttr->SetModified((int)isModified); + } + } } - } - // Creation mode -// item = new SalomeApp_PropItem(myPropList, item, tr("PRP_MODE")+":", true, prpModeId); -// item->setEditingType( SalomeApp_EntityEdit::etComboBox); -// if (hasData) item->setValue(propAttr->GetCreationMode()); + QString modif = propAttr->IsModified() ? tr( "PRP_MODIFIED" ) : tr( "PRP_NOT_MODIFIED" ); + myModification->setText(modif); + + //Units + QStringList theList; + theList <<""<<"mm"<<"cm"<<"m"<<"km"<<"inch"; + myUnits->insertItems(0,theList); - // Locked or not - item = new SalomeApp_PropItem(myPropList, item, tr("PRP_LOCKED")+":", true, prpLockedId); - item->setEditingType( SalomeApp_EntityEdit::etComboBox); - if ( hasData ) - item->setValue( tr( propAttr->IsLocked() ? "PRP_YES" : "PRP_NO" ) ); + QString anUnit = propAttr->GetUnits().c_str(); - // Saved or not - item = new SalomeApp_PropItem(myPropList, item, tr("PRP_MODIFIED")+":", false, prpSavedId); - bool isModified = false; - SalomeApp_Study* study = dynamic_cast - (SUIT_Session::session()->activeApplication()->activeStudy()); - if (study) { - isModified = study->isModified(); - if (hasData) { - if (propAttr->IsModified() != isModified) { - propAttr->SetModified((int)isModified); + int aFound = -1; + for (int i = 0; i < myUnits->count(); i++) { + if ( myUnits->itemText(i) == anUnit ) { + aFound = i; + break; } } - } - if (hasData) { - if (propAttr->IsModified()) - item->setValue( tr( "PRP_YES" ) ); - else - item->setValue( tr( "PRP_NO" ) ); - } - - // Modifications list - item = new SalomeApp_PropItem(myPropList, item, tr("PRP_MODIFICATIONS")+":", true, prpModificationsId); - item->setEditingType( SalomeApp_EntityEdit::etComboBox); - if (hasData) { + + if (aFound >= 0) { + myUnits->setCurrentIndex(aFound); + } + + //Comments + myComment->setPlainText(propAttr->GetComment().c_str()); + + //Modifications std::vector aUsers; - std::vector aMins, aHours, aDays, aMonths, aYears; + std::vector aMins, aHours, aDays, aMonths, aYears; propAttr->GetModificationsList(aUsers, aMins, aHours, aDays, aMonths, aYears, false); - int aLast = aUsers.size()-1; - if (aLast >= 0) { - QString val; - val.sprintf("%2.2d/%2.2d/%2d %2.2d:%2.2d", - aDays [aLast], - aMonths[aLast], - aYears [aLast], - aHours [aLast], - aMins [aLast]); - val = val + " : " + QString(aUsers[aUsers.size()-1].c_str()); - item->setValue(val); - } + int aCnt = aUsers.size(); + for ( int i = 0; i < aCnt; i++ ) { + QString date; + date.sprintf("%2.2d/%2.2d/%2d %2.2d:%2.2d", + aDays [i], + aMonths[i], + aYears [i], + aHours [i], + aMins [i]); + QStringList aList; + aList.append(aUsers[i].c_str()); + aList.append(date); + QTreeWidgetItem* item = new QTreeWidgetItem(aList); + myModifications->addTopLevelItem(item); + } } - - myOKBtn->setEnabled(hasData); -} - -/*! - accept data. Return true. -*/ -bool SalomeApp_StudyPropertiesDlg::acceptData() -{ - return TRUE; + adjustSize(); } /*! Fill properties attributes. */ -void SalomeApp_StudyPropertiesDlg::onOK() +void SalomeApp_StudyPropertiesDlg::clickOnOk() { - myPropList->accept(); - - if (acceptData()) { - _PTR(AttributeStudyProperties) propAttr = myStudyDoc->GetProperties(); - //myChanged = propChanged(); - if ( propAttr /*&& myChanged*/ ) { - QTreeWidgetItemIterator it( myPropList ); - // iterate through all items of the listview - while (*it) { - SalomeApp_PropItem* item = (SalomeApp_PropItem*)(*it); - switch (item->getUserType()) { - case prpAuthorId: - if (QString(propAttr->GetUserName().c_str()) != item->getValue().trimmed()) { - if (!propAttr->IsLocked()) { - propAttr->SetUserName(item->getValue().trimmed().toStdString()); - myChanged = true; - } else { - SUIT_MessageBox::warning(SUIT_Session::session()->activeApplication()->desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr("WRN_STUDY_LOCKED") ); - } - } - break; - //case prpModeId: - // propAttr->SetCreationMode(item->getValue().trimmed().latin1()); - // break; - case prpLockedId: - { - bool bLocked = item->getValue().compare(tr("PRP_YES")) == 0; - if (propAttr->IsLocked() != bLocked) { - propAttr->SetLocked(bLocked); - myChanged = true; - } - } - break; - default: - break; - } - ++it; + _PTR(AttributeStudyProperties) propAttr = myStudyDoc->GetProperties(); + //Firstly, store locked flag + if(propAttr) { + bool bLocked = myLocked->isChecked(); + if (propAttr->IsLocked() != bLocked) { + propAttr->SetLocked(bLocked); + myIsChanged = true; + } + + bool needWarning = false; + + //Author + if (QString(propAttr->GetUserName().c_str()) != myAuthor->text().trimmed()) { + if(!propAttr->IsLocked()) { + propAttr->SetUserName(myAuthor->text().trimmed().toStdString()); + myIsChanged = true; + } else { + needWarning = true; } } - accept(); - } -} - -/*! - Check is properties changed? -*/ -bool SalomeApp_StudyPropertiesDlg::propChanged() -{ - _PTR(AttributeStudyProperties) propAttr = myStudyDoc->GetProperties(); - if (propAttr) { - QTreeWidgetItemIterator it (myPropList); - // iterate through all items of the listview - while (*it) { - SalomeApp_PropItem* item = (SalomeApp_PropItem*)(*it); - switch (item->getUserType()) { - case prpAuthorId: - if ( QString( propAttr->GetUserName().c_str() ) != item->getValue().trimmed() ) { - return true; - } - break; - //case prpModeId: - // if ( QString( propAttr->GetCreationMode().c_str() ) != item->getValue().trimmed() ) { - // return true; - // } - // break; - case prpLockedId: - { - bool bLocked = item->getValue().compare( tr( "PRP_YES" ) ) == 0; - if ( propAttr->IsLocked() != bLocked ) { - return true; - } - break; - } - default: - break; + //Unit + if (QString(propAttr->GetUnits().c_str()) != myUnits->currentText()) { + if(!propAttr->IsLocked()) { + propAttr->SetUnits(myUnits->currentText().toStdString()); + myIsChanged = true; + } else { + needWarning = true; } - ++it; } + + //Comment + if (QString(propAttr->GetComment().c_str()) != myComment->toPlainText()) { + if(!propAttr->IsLocked()) { + propAttr->SetComment(myComment->toPlainText().toStdString()); + myIsChanged = true; + } else { + needWarning = true; + } + } + + if(needWarning) { + SUIT_MessageBox::warning(SUIT_Session::session()->activeApplication()->desktop(), + QObject::tr("WRN_WARNING"), + QObject::tr("WRN_STUDY_LOCKED") ); + } + + accept(); } - return false; } diff --git a/src/SalomeApp/SalomeApp_StudyPropertiesDlg.h b/src/SalomeApp/SalomeApp_StudyPropertiesDlg.h index 217d1af3f..f1da51aa7 100644 --- a/src/SalomeApp/SalomeApp_StudyPropertiesDlg.h +++ b/src/SalomeApp/SalomeApp_StudyPropertiesDlg.h @@ -21,7 +21,7 @@ // // File : SalomeApp_StudyPropertiesDlg.h -// Author : Sergey ANIKIN +// Author : Roman NIKOLAEV // Module : SALOME // #ifndef SALOMEAPP_STUDY_PROPERTIES_DLG_H @@ -36,45 +36,41 @@ #include -class SalomeApp_ListView; +class QLineEdit; +class QLabel; +class QCheckBox; +class QComboBox; +class QTextEdit; +class QTreeWidget; class QPushButton; class SALOMEAPP_EXPORT SalomeApp_StudyPropertiesDlg : public QDialog { Q_OBJECT - -public: - enum { - prpAuthorId, - prpModeId, - prpDateId, - prpSavedId, - prpLockedId, - prpModificationsId, - prpLastId - }; - public: SalomeApp_StudyPropertiesDlg( QWidget* parent = 0 ); ~SalomeApp_StudyPropertiesDlg(); - bool isChanged() { return myChanged; } - + bool isChanged() { return myIsChanged; } + public slots: - void onOK(); - + void clickOnOk(); + private: - void initData(); - bool acceptData(); - bool propChanged(); + void initData(); private: - SalomeApp_ListView* myPropList; - QPushButton* myOKBtn; - QPushButton* myCancelBtn; - bool myChanged; - - _PTR(Study) myStudyDoc; + _PTR(Study) myStudyDoc; + bool myIsChanged; + QLineEdit* myAuthor; + QLabel* myDate; + QCheckBox* myLocked; + QLabel* myModification; + QComboBox* myUnits; + QTextEdit* myComment; + QTreeWidget* myModifications; + QPushButton* myOkButton; + QPushButton* myCancelButton; }; #endif // SALOMEAPP_STUDY_PROPERTIES_DLG_H diff --git a/src/SalomeApp/resources/SalomeApp_msg_en.ts b/src/SalomeApp/resources/SalomeApp_msg_en.ts index e7d8d8d40..6281d174c 100644 --- a/src/SalomeApp/resources/SalomeApp_msg_en.ts +++ b/src/SalomeApp/resources/SalomeApp_msg_en.ts @@ -347,6 +347,18 @@ Do you want to reload it ? PRP_MODIFICATIONS Modifications + + PRP_DATE_MODIF + Date + + + PRP_UNITS + Length units + + + PRP_COMMENT + Comment + PRP_NO No @@ -359,9 +371,13 @@ Do you want to reload it ? PRP_MODIFIED Modified + + PRP_NOT_MODIFIED + Not modified + PRP_DATE - Created + Creation date PRP_MODE -- 2.39.2