From: ouv Date: Wed, 12 Nov 2008 16:29:12 +0000 (+0000) Subject: Dump Python extension X-Git-Tag: TG_DumpPython_Extension_2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4b98cf563f0053c0db52d5d953c6606e4a0b5176;p=modules%2Fgui.git Dump Python extension --- diff --git a/src/SalomeApp/SalomeApp_DataObject.cxx b/src/SalomeApp/SalomeApp_DataObject.cxx index c1a292ddc..f1da75c33 100644 --- a/src/SalomeApp/SalomeApp_DataObject.cxx +++ b/src/SalomeApp/SalomeApp_DataObject.cxx @@ -448,18 +448,29 @@ QString SalomeApp_DataObject::value( const _PTR(SObject)& obj ) const QString aStrings = QString( str.c_str() ); //Special case to show NoteBook variables in the "Value" column of the OB - QStringList aStringList = aStrings.split(":"); - if(aStringList.size() > 0) { - int i = 0; - for (;i( root() ) ) + { + if ( SalomeApp_Study* aStudy = dynamic_cast( aRoot->study() ) ) + { + _PTR(Study) studyDS( aStudy->studyDS() ); + + QStringList aStringList = aStrings.split(":"); + if ( !aStringList.isEmpty() ) + { + for ( int i = 0, n = aStringList.size(); i < n; i++ ) + { + QString aStr = aStringList[i]; + if ( studyDS->IsVariable( aStr.toStdString() ) ) + val.append( aStr + ", " ); + } + + if ( !val.isEmpty() ) + val.remove( val.length() - 2, 2 ); + } + else + val = aStrings; } - if(!val.isEmpty()) - val.remove(val.length()-2,2); } - else - val = aStrings; } else if ( obj->FindAttribute( attr, "AttributeInteger" ) ) { diff --git a/src/SalomeApp/SalomeApp_DoubleSpinBox.cxx b/src/SalomeApp/SalomeApp_DoubleSpinBox.cxx index 86503d452..8049824d3 100644 --- a/src/SalomeApp/SalomeApp_DoubleSpinBox.cxx +++ b/src/SalomeApp/SalomeApp_DoubleSpinBox.cxx @@ -112,6 +112,9 @@ void SalomeApp_DoubleSpinBox::connectSignalsAndSlots() connect( this, SIGNAL( editingFinished() ), this, SLOT( onEditingFinished() ) ); + connect( this, SIGNAL( valueChanged( const QString& ) ), + this, SLOT( onTextChanged( const QString& ) ) ); + connect( lineEdit(), SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) ); } @@ -124,7 +127,7 @@ void SalomeApp_DoubleSpinBox::onEditingFinished() if( myTextValue.isNull() ) myTextValue = text(); - lineEdit()->setText( myTextValue ); + setText( myTextValue ); } /*! @@ -196,7 +199,7 @@ bool SalomeApp_DoubleSpinBox::isValid( QString& msg, bool toCorrect ) else if( aState == Invalid ) msg += tr( "ERR_INVALID_VALUE" ) + "\n"; - lineEdit()->setText( myCorrectValue ); + setText( myCorrectValue ); } return false; } diff --git a/src/SalomeApp/SalomeApp_IntSpinBox.cxx b/src/SalomeApp/SalomeApp_IntSpinBox.cxx index c3014e6e0..8bcb370c3 100644 --- a/src/SalomeApp/SalomeApp_IntSpinBox.cxx +++ b/src/SalomeApp/SalomeApp_IntSpinBox.cxx @@ -82,6 +82,9 @@ void SalomeApp_IntSpinBox::connectSignalsAndSlots() connect( this, SIGNAL( editingFinished() ), this, SLOT( onEditingFinished() ) ); + connect( this, SIGNAL( valueChanged( const QString& ) ), + this, SLOT( onTextChanged( const QString& ) ) ); + connect( lineEdit(), SIGNAL( textChanged( const QString& ) ), this, SLOT( onTextChanged( const QString& ) ) ); } @@ -94,7 +97,7 @@ void SalomeApp_IntSpinBox::onEditingFinished() if( myTextValue.isNull() ) myTextValue = text(); - lineEdit()->setText( myTextValue ); + setText( myTextValue ); } /*! @@ -166,7 +169,7 @@ bool SalomeApp_IntSpinBox::isValid( QString& msg, bool toCorrect ) else if( aState == Invalid ) msg += tr( "ERR_INVALID_VALUE" ) + "\n"; - lineEdit()->setText( myCorrectValue ); + setText( myCorrectValue ); } return false; } diff --git a/src/SalomeApp/SalomeApp_NoteBookDlg.cxx b/src/SalomeApp/SalomeApp_NoteBookDlg.cxx index c2ffe980d..cec076b0c 100644 --- a/src/SalomeApp/SalomeApp_NoteBookDlg.cxx +++ b/src/SalomeApp/SalomeApp_NoteBookDlg.cxx @@ -55,8 +55,9 @@ using namespace std; * Purpose : Constructor */ //============================================================================ -NoteBook_TableRow::NoteBook_TableRow(QWidget* parent): +NoteBook_TableRow::NoteBook_TableRow(int index, QWidget* parent): QWidget(parent), + myIndex(index), myRowHeader(new QTableWidgetItem()), myVariableName(new QTableWidgetItem()), myVariableValue(new QTableWidgetItem()), @@ -296,8 +297,7 @@ bool NoteBook_TableRow::IsIntegerValue(const QString theValue, int* theResult) //============================================================================ NoteBook_Table::NoteBook_Table(QWidget * parent) :QTableWidget(parent), - isProcessItemChangedSignal(false), - myIncorrectItem(NULL) + isProcessItemChangedSignal(false) { setColumnCount(2); setSelectionMode(QAbstractItemView::SingleSelection); @@ -334,6 +334,29 @@ NoteBook_Table::NoteBook_Table(QWidget * parent) //============================================================================ NoteBook_Table::~NoteBook_Table(){} +//============================================================================ +/*! Function : getUniqueIndex + * Purpose : Get a unique index for the new row + */ +//============================================================================ +int NoteBook_Table::getUniqueIndex() const +{ + int anIndex = 0; + if( !myRows.isEmpty() ) + if( NoteBook_TableRow* aRow = myRows.last() ) + anIndex = aRow->GetIndex(); + + int aMaxRemovedRow = 0; + for( QListIterator anIter( myRemovedRows ); anIter.hasNext(); ) + { + int aRemovedRow = anIter.next(); + aMaxRemovedRow = qMax( aRemovedRow, aMaxRemovedRow ); + } + + anIndex = qMax( anIndex, aMaxRemovedRow ) + 1; + return anIndex; +} + //============================================================================ /*! Function : Init * Purpose : Add variables in the table from theStudy @@ -343,18 +366,18 @@ void NoteBook_Table::Init(_PTR(Study) theStudy) { //Add all variables into the table vector aVariables = theStudy->GetVariableNames(); - for(int iVar = 0; iVar < aVariables.size() ; iVar++ ) { - NoteBook_TableRow* aRow = new NoteBook_TableRow(this); - aRow->SetName(QString(aVariables[iVar].c_str())); - aRow->SetValue( Variable2String(aVariables[iVar],theStudy) ); - aRow->SetNameEditable(false); - aRow->AddToTable(this); - myRows.append(aRow); + for(int iVar = 0; iVar < aVariables.size(); iVar++ ) { + AddRow(QString(aVariables[iVar].c_str()), + Variable2String(aVariables[iVar],theStudy)); } //Add empty row AddEmptyRow(); isProcessItemChangedSignal = true; + + ResetMaps(); + + myStudy = theStudy; } //============================================================================ @@ -377,62 +400,52 @@ QString NoteBook_Table::Variable2String(const string& theVarName, } //============================================================================ -/*! Function : SetIncorrectItem - * Purpose : +/*! Function : IsValid + * Purpose : Check validity of the table data */ //============================================================================ -void NoteBook_Table::SetIncorrectItem(QTableWidgetItem* theItem) +bool NoteBook_Table::IsValid() const { - if(!theItem) - return; - - myIncorrectItem = theItem; - isProcessItemChangedSignal = false; - NoteBook_TableRow* except = GetRowByItem(myIncorrectItem); + int aNumRows = myRows.count(); + if( aNumRows == 0 ) + return true; - for (int i = 0; i < myRows.size(); i++) { - myRows[i]->setNameEditable(false); - myRows[i]->setValueEditable(false); - } - if(except) { - if(column(theItem) == NAME_COLUMN ) - except->setNameEditable(true); - else if(column(theItem) == VALUE_COLUMN) - except->setValueEditable(true); - } - isProcessItemChangedSignal = true; - emit incorrectItemAdded(); + bool aLastRowIsEmpty = myRows[ aNumRows - 1 ]->GetName().isEmpty() && + myRows[ aNumRows - 1 ]->GetValue().isEmpty(); + + for( int i = 0, n = aLastRowIsEmpty ? aNumRows - 1 : aNumRows; i < n; i++ ) + if( !myRows[i]->CheckName() || !IsUniqueName( myRows[i] ) || !myRows[i]->CheckValue() ) + return false; + + return true; } //============================================================================ -/*! Function : RemoveIncorrectItem - * Purpose : +/*! Function : AddRow + * Purpose : Add a row into the table */ //============================================================================ -void NoteBook_Table::RemoveIncorrectItem() +void NoteBook_Table::AddRow(const QString& theName, const QString& theValue) { - if(!myIncorrectItem) - return; - - isProcessItemChangedSignal = false; - for (int i = 0; i < myRows.size(); i++) { - myRows[i]->setNameEditable(true); - myRows[i]->setValueEditable(true); - } + int anIndex = getUniqueIndex(); + NoteBook_TableRow* aRow = new NoteBook_TableRow(anIndex, this); + aRow->SetName(theName); + aRow->SetValue(theValue); + aRow->AddToTable(this); + myRows.append(aRow); - myIncorrectItem = NULL; - isProcessItemChangedSignal = true; - emit incorrectItemRemoved(); + myVariableMap.insert( anIndex, NoteBoox_Variable( theName, theValue ) ); } +//============================================================================ +/*! Function : AddEmptyRow + * Purpose : Add an empty row into the end of the table + */ +//============================================================================ void NoteBook_Table::AddEmptyRow() { - isProcessItemChangedSignal = false; - NoteBook_TableRow* aRow = new NoteBook_TableRow(); - aRow->SetName(QString()); - aRow->SetValue(QString()); - aRow->AddToTable(this); - myRows.append(aRow); + isProcessItemChangedSignal = false; + AddRow(); isProcessItemChangedSignal = true; } @@ -472,46 +485,70 @@ void NoteBook_Table::onItemChanged(QTableWidgetItem* theItem) NoteBook_TableRow* aRow = GetRowByItem(theItem); if(aRow) { int aCurrentColumn = column(theItem); - bool IsVariableComplited = false; - + bool IsCorrect = true, IsVariableComplited = false; + QString aMsg; + + if(aCurrentColumn == NAME_COLUMN) { + int anIndex = aRow->GetIndex(); + if( myVariableMap.contains( anIndex ) ) + { + const NoteBoox_Variable& aVariable = myVariableMap[ anIndex ]; + if( myStudy->IsVariableUsed( string( aVariable.Name.toLatin1().constData() ) ) ) + { + if( QMessageBox::warning( parentWidget(), tr( "WARNING" ), + tr( "RENAME_VARIABLE_IS_USED" ).arg( aVariable.Name ), + QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No ) + { + bool isBlocked = blockSignals( true ); + aRow->SetName( aVariable.Name ); + blockSignals( isBlocked ); + return; + } + } + } + } + //Case then varible name changed. if(aCurrentColumn == NAME_COLUMN) { - bool isVarNameCorrect = aRow->CheckName(); - if(!isVarNameCorrect) { - SUIT_MessageBox::warning((QWidget*)parent(), - tr( "WARNING" ), - tr( "VARNAME_INCORRECT" ).arg(aRow->GetName())); - SetIncorrectItem(theItem); - return; - } - if(!IsUniqueName(aRow)){ - SUIT_MessageBox::warning((QWidget*)parent(), - tr( "WARNING" ), - tr( "VARNAME_EXISTS" ).arg(aRow->GetName())); - SetIncorrectItem(theItem); - return; - } - IsVariableComplited = isVarNameCorrect & aRow->CheckValue(); + if(!aRow->CheckName()) { + IsCorrect = false; + aMsg = tr( "VARNAME_INCORRECT" ).arg(aRow->GetName()); + } + else if(!IsUniqueName(aRow)) { + IsCorrect = false; + aMsg = tr( "VARNAME_EXISTS" ).arg(aRow->GetName()); + } + else + IsVariableComplited = aRow->CheckValue(); } //Case then varible value changed. else if(aCurrentColumn == VALUE_COLUMN){ - bool isVarValueCorrect = aRow->CheckValue(); - if(!isVarValueCorrect) { - SUIT_MessageBox::warning((QWidget*)parent(), - tr( "WARNING" ), - tr( "VARVALUE_INCORRECT" ).arg(aRow->GetValue())); - SetIncorrectItem(theItem); - return; - } - IsVariableComplited = isVarValueCorrect & aRow->CheckName(); + if(!aRow->CheckValue()) { + IsCorrect = false; + aMsg = tr( "VARVALUE_INCORRECT" ).arg(aRow->GetName()); + } + else + IsVariableComplited = aRow->CheckName() && IsUniqueName(aRow); } - - if(myIncorrectItem) - RemoveIncorrectItem(); - - if(IsVariableComplited && IsLastRow(aRow)) - AddEmptyRow(); + + if(!IsCorrect && !aMsg.isEmpty()) + SUIT_MessageBox::warning( parentWidget(), tr( "WARNING" ), aMsg ); + + bool isBlocked = blockSignals( true ); + theItem->setForeground( QBrush( IsCorrect ? Qt::black : Qt::red ) ); + blockSignals( isBlocked ); + + int anIndex = aRow->GetIndex(); + if( myVariableMap.contains( anIndex ) ) + { + NoteBoox_Variable& aVariable = myVariableMap[ anIndex ]; + aVariable.Name = aRow->GetName(); + aVariable.Value = aRow->GetValue(); + } + + if(IsCorrect && IsVariableComplited && IsLastRow(aRow)) + AddEmptyRow(); } } } @@ -576,13 +613,26 @@ void NoteBook_Table::RemoveSelected() } else { int nRow = row(aSelectedItems[i]); + + if( myStudy->IsVariableUsed( string( aRow->GetName().toLatin1().constData() ) ) ) + { + if( QMessageBox::warning( parentWidget(), tr( "WARNING" ), + tr( "REMOVE_VARIABLE_IS_USED" ).arg( aRow->GetName() ), + QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No ) + { + isProcessItemChangedSignal = true; + return; + } + } + + int index = aRow->GetIndex(); + myRemovedRows.append( index ); + if( myVariableMap.contains( index ) ) + myVariableMap.remove( index ); + removeRow(nRow); myRows.removeAt(nRow); } - if(aRow->GetVariableItem() == myIncorrectItem || - aRow->GetNameItem() == myIncorrectItem ) { - RemoveIncorrectItem(); - } } } isProcessItemChangedSignal = true; @@ -618,6 +668,17 @@ QList NoteBook_Table::GetRows() const return myRows; } +//============================================================================ +/*! Function : ResetMaps + * Purpose : Reset variable maps + */ +//============================================================================ +void NoteBook_Table::ResetMaps() +{ + myVariableMapRef = myVariableMap; + myRemovedRows.clear(); +} + /////////////////////////////////////////////////////////////////////////// // SalomeApp_NoteBookDlg class // /////////////////////////////////////////////////////////////////////////// @@ -677,12 +738,10 @@ SalomeApp_NoteBookDlg::SalomeApp_NoteBookDlg(QWidget * parent, _PTR(Study) theSt connect( myOkBtn, SIGNAL(clicked()), this, SLOT(onOK()) ); connect( myApplyBtn, SIGNAL(clicked()), this, SLOT(onApply()) ); + connect( myCancelBtn, SIGNAL(clicked()), this, SLOT(onCancel()) ); connect( myUpdateStudyBtn, SIGNAL(clicked()), this, SLOT(onUpdateStudy()) ); - connect( myCancelBtn, SIGNAL(clicked()), this, SLOT(reject()) ); connect( myRemoveButton, SIGNAL(clicked()), this, SLOT(onRemove())); - connect( myTable, SIGNAL(incorrectItemAdded()), this, SLOT(onIncorrectItemAdded())); - connect( myTable, SIGNAL(incorrectItemRemoved()), this, SLOT(onIncorrectItemRemoved())); connect( myTable, SIGNAL(selectionChanged(bool)),this, SLOT(onTableSelectionChanged(bool))); myTable->Init(myStudy); @@ -697,28 +756,6 @@ SalomeApp_NoteBookDlg::SalomeApp_NoteBookDlg(QWidget * parent, _PTR(Study) theSt SalomeApp_NoteBookDlg::~SalomeApp_NoteBookDlg(){} -//============================================================================ -/*! Function : onIncorrectItemAdded - * Purpose : [slot] - */ -//============================================================================ -void SalomeApp_NoteBookDlg::onIncorrectItemAdded() -{ - myOkBtn->setEnabled(false); - myApplyBtn->setEnabled(false); -} - -//============================================================================ -/*! Function : onIncorrectItemRemoved - * Purpose : [slot] - */ -//============================================================================ -void SalomeApp_NoteBookDlg::onIncorrectItemRemoved() -{ - myOkBtn->setEnabled(true); - myApplyBtn->setEnabled(true); -} - //============================================================================ /*! Function : onTableSelectionChanged * Purpose : [slot] @@ -726,7 +763,7 @@ void SalomeApp_NoteBookDlg::onIncorrectItemRemoved() //============================================================================ void SalomeApp_NoteBookDlg::onTableSelectionChanged(bool flag) { - myRemoveButton->setEnabled(flag); + //myRemoveButton->setEnabled(flag); } //============================================================================ @@ -757,30 +794,76 @@ void SalomeApp_NoteBookDlg::onOK() //============================================================================ void SalomeApp_NoteBookDlg::onApply() { - QList aRows = myTable->GetRows(); + if( !myTable->IsValid() ) + { + SUIT_MessageBox::warning( this, tr( "WARNING" ), tr( "INCORRECT_DATA" ) ); + return; + } + double aDVal; int anIVal; bool aBVal; - int i = 0; - myTable->SetProcessItemChangedSignalFlag(false); - - for(;iGetValue(),&anIVal) ) - myStudy->SetInteger(string(aRows[i]->GetName().toLatin1().constData()),anIVal); - else if( NoteBook_TableRow::IsRealValue(aRows[i]->GetValue(),&aDVal) ) - myStudy->SetReal(string(aRows[i]->GetName().toLatin1().constData()),aDVal); - - else if( NoteBook_TableRow::IsBooleanValue(aRows[i]->GetValue(),&aBVal) ) - myStudy->SetBoolean(string(aRows[i]->GetName().toLatin1().constData()),aBVal); + const QList& aRemovedRows = myTable->GetRemovedRows(); + const VariableMap& aVariableMap = myTable->GetVariableMap(); + const VariableMap& aVariableMapRef = myTable->GetVariableMapRef(); + + for( QListIterator anIter( aRemovedRows ); anIter.hasNext(); ) + { + int anIndex = anIter.next(); + if( aVariableMapRef.contains( anIndex ) ) + { + QString aNameRef = aVariableMapRef[ anIndex ].Name; + myStudy->RemoveVariable( string( aNameRef.toLatin1().constData() ) ); + } + } + + VariableMap::const_iterator it = aVariableMap.constBegin(), itEnd = aVariableMap.constEnd(); + for( ; it != itEnd; ++it ) + { + int anIndex = it.key(); + const NoteBoox_Variable& aVariable = it.value(); + QString aName = aVariable.Name; + QString aValue = aVariable.Value; + + if( !aName.isEmpty() && !aValue.isEmpty() ) + { + if( aVariableMapRef.contains( anIndex ) ) + { + const NoteBoox_Variable& aVariableRef = aVariableMapRef[ anIndex ]; + QString aNameRef = aVariableRef.Name; + QString aValueRef = aVariableRef.Value; + + if( !aNameRef.isEmpty() && !aValueRef.isEmpty() && aNameRef != aName ) + { + myStudy->RenameVariable( string( aNameRef.toLatin1().constData() ), + string( aName.toLatin1().constData() ) ); + } + } + + if( NoteBook_TableRow::IsIntegerValue(aValue,&anIVal) ) + myStudy->SetInteger(string(aName.toLatin1().constData()),anIVal); - if( aRows[i]->IsNameEditable()) - aRows[i]->SetNameEditable(false); + else if( NoteBook_TableRow::IsRealValue(aValue,&aDVal) ) + myStudy->SetReal(string(aName.toLatin1().constData()),aDVal); + + else if( NoteBook_TableRow::IsBooleanValue(aValue,&aBVal) ) + myStudy->SetBoolean(string(aName.toLatin1().constData()),aBVal); + } } - myTable->SetProcessItemChangedSignalFlag(true); + + myTable->ResetMaps(); } +//============================================================================ +/*! Function : onCancel + * Purpose : [slot] + */ +//============================================================================ +void SalomeApp_NoteBookDlg::onCancel() +{ + reject(); +} //============================================================================ /*! Function : onUpdateStudy diff --git a/src/SalomeApp/SalomeApp_NoteBookDlg.h b/src/SalomeApp/SalomeApp_NoteBookDlg.h index 8dc19261e..a1f81b8d7 100644 --- a/src/SalomeApp/SalomeApp_NoteBookDlg.h +++ b/src/SalomeApp/SalomeApp_NoteBookDlg.h @@ -36,11 +36,27 @@ class QWidget; class QPushButton; class QTableWidgetItem; +struct NoteBoox_Variable +{ + NoteBoox_Variable() {} + NoteBoox_Variable( const QString& theName, const QString& theValue ) + { + Name = theName; + Value = theValue; + } + QString Name; + QString Value; +}; + +typedef QMap< int, NoteBoox_Variable > VariableMap; + class SALOMEAPP_EXPORT NoteBook_TableRow : public QWidget { public: - NoteBook_TableRow(QWidget* parent=0); + NoteBook_TableRow(int, QWidget* parent=0); virtual ~NoteBook_TableRow(); + + int GetIndex() const { return myIndex; } void SetNameEditable(bool enable); bool IsNameEditable(); @@ -67,11 +83,11 @@ class SALOMEAPP_EXPORT NoteBook_TableRow : public QWidget static bool IsBooleanValue(const QString theValue, bool* theResult = 0); private: + int myIndex; QTableWidgetItem* myRowHeader; QTableWidgetItem* myVariableName; QTableWidgetItem* myVariableValue; bool isNameEditable; - }; class SALOMEAPP_EXPORT NoteBook_Table : public QTableWidget @@ -84,35 +100,47 @@ class SALOMEAPP_EXPORT NoteBook_Table : public QTableWidget void Init(_PTR(Study) theStudy); static QString Variable2String(const std::string& theVarName, _PTR(Study) theStudy); + + bool IsValid() const; + + void AddRow( const QString& theName = QString::null, const QString& theValue = QString::null ); void AddEmptyRow(); NoteBook_TableRow* GetRowByItem(const QTableWidgetItem* theItem) const; bool IsLastRow(const NoteBook_TableRow* aRow) const; void RemoveSelected(); - void SetIncorrectItem(QTableWidgetItem* theItem); - void RemoveIncorrectItem(); - void SetProcessItemChangedSignalFlag(const bool enable); bool GetProcessItemChangedSignalFlag()const; bool IsUniqueName(const NoteBook_TableRow* theRow) const; QList GetRows() const; - + + const QList& GetRemovedRows() const { return myRemovedRows; } + const VariableMap& GetVariableMap() const { return myVariableMap; } + const VariableMap& GetVariableMapRef() const { return myVariableMapRef; } + + void ResetMaps(); + public slots: void onItemChanged(QTableWidgetItem* theItem); void onItemSelectionChanged(); + private: + int getUniqueIndex() const; signals: - void incorrectItemAdded(); - void incorrectItemRemoved(); void selectionChanged(bool); private: bool isProcessItemChangedSignal; - QTableWidgetItem* myIncorrectItem; QList myRows; + + QList myRemovedRows; + VariableMap myVariableMapRef; + VariableMap myVariableMap; + + _PTR(Study) myStudy; }; class SALOMEAPP_EXPORT SalomeApp_NoteBookDlg : public QDialog @@ -125,10 +153,9 @@ class SALOMEAPP_EXPORT SalomeApp_NoteBookDlg : public QDialog public slots: void onOK(); void onApply(); + void onCancel(); void onUpdateStudy(); void onRemove(); - void onIncorrectItemAdded(); - void onIncorrectItemRemoved(); void onTableSelectionChanged(bool flag); private: @@ -140,7 +167,6 @@ class SALOMEAPP_EXPORT SalomeApp_NoteBookDlg : public QDialog QPushButton* myCancelBtn; _PTR(Study) myStudy; - }; #endif //SALOMEAPP_NOTEBOOKDLG_H diff --git a/src/SalomeApp/resources/SalomeApp_msg_en.ts b/src/SalomeApp/resources/SalomeApp_msg_en.ts index 968bb5a74..0d4a5e644 100644 --- a/src/SalomeApp/resources/SalomeApp_msg_en.ts +++ b/src/SalomeApp/resources/SalomeApp_msg_en.ts @@ -350,6 +350,16 @@ Do you want to reload it ? NoteBook_Table + + REMOVE_VARIABLE_IS_USED + Variable with name "%1" is used in the study. +Do you really want to remove it? + + + RENAME_VARIABLE_IS_USED + Variable with name "%1" is used in the study. +Do you really want to rename it? + VARNAME_COLUMN Variable Name @@ -385,5 +395,10 @@ Do you want to reload it ? BUT_REMOVE Remove + + INCORRECT_DATA + At least one variable has been defined incorrectly. +Please edit its parameters or remove it from table. +