From: spo Date: Mon, 27 Jul 2015 10:56:41 +0000 (+0300) Subject: Make ModuleBase_ModelWidget::restoreValue() non-virtual and create virtual ModuleBase... X-Git-Tag: V_1.4.0_beta4~436 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9a7ff0679f4cd8c203f53a2187d47a008bbd11c6;p=modules%2Fshaper.git Make ModuleBase_ModelWidget::restoreValue() non-virtual and create virtual ModuleBase_ModelWidget::restoreValueCustom(). Also ModuleBase_ModelWidget::restoreValue() emits signals beforeValuesRestored() and afterValuesRestored(). --- diff --git a/src/ModuleBase/ModuleBase_ModelWidget.cpp b/src/ModuleBase/ModuleBase_ModelWidget.cpp index 057b2936c..63d8095fc 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.cpp +++ b/src/ModuleBase/ModuleBase_ModelWidget.cpp @@ -139,6 +139,15 @@ bool ModuleBase_ModelWidget::storeValue() return isDone; } +bool ModuleBase_ModelWidget::restoreValue() +{ + emit beforeValuesRestored(); + bool isDone = restoreValueCustom(); + emit afterValuesRestored(); + + return isDone; +} + void ModuleBase_ModelWidget::updateObject(ObjectPtr theObj) { Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_UPDATED)); diff --git a/src/ModuleBase/ModuleBase_ModelWidget.h b/src/ModuleBase/ModuleBase_ModelWidget.h index 031c5dd42..cad3f174c 100644 --- a/src/ModuleBase/ModuleBase_ModelWidget.h +++ b/src/ModuleBase/ModuleBase_ModelWidget.h @@ -90,8 +90,9 @@ Q_OBJECT return false; } - /// Restore value from attribute data to the widget's control - virtual bool restoreValue() = 0; + /// Restore value from attribute data to the widget's control. Emits signals before and after store + /// \return True in success + bool restoreValue(); /// Set focus to the first control of the current widget. The focus policy of the control is checked. /// If the widget has the NonFocus focus policy, it is skipped. @@ -164,6 +165,11 @@ signals: /// The signal about widget values are to be changed void afterValuesChanged(); + /// The signal about widget values are to be restored + void beforeValuesRestored(); + /// The signal about widget values are to be restored + void afterValuesRestored(); + /// The signal about key release on the control, that corresponds to the attribute /// \param theEvent key release event void keyReleased(QKeyEvent* theEvent); @@ -176,7 +182,7 @@ signals: /// \param theWidget the model base widget void focusOutWidget(ModuleBase_ModelWidget* theWidget); - protected: +protected: /// Sets default value of widget. Normally, widget should fetch this value /// from the xml. However, some widgets derived widgets could define it void setDefaultValue(const std::string& theValue); @@ -195,6 +201,9 @@ signals: /// \return True in success virtual bool storeValueCustom() const = 0; + /// Restore value from attribute data to the widget's control + virtual bool restoreValueCustom() = 0; + /// The method called when widget is activated virtual void activateCustom() {}; diff --git a/src/ModuleBase/ModuleBase_PagedContainer.cpp b/src/ModuleBase/ModuleBase_PagedContainer.cpp index b4e8b5690..c4c3623cc 100644 --- a/src/ModuleBase/ModuleBase_PagedContainer.cpp +++ b/src/ModuleBase/ModuleBase_PagedContainer.cpp @@ -69,7 +69,7 @@ void ModuleBase_PagedContainer::enableFocusProcessing() myIsFocusOnCurrentPage = true; } -bool ModuleBase_PagedContainer::restoreValue() +bool ModuleBase_PagedContainer::restoreValueCustom() { // A rare case when plugin was not loaded. if(!myFeature) diff --git a/src/ModuleBase/ModuleBase_PagedContainer.h b/src/ModuleBase/ModuleBase_PagedContainer.h index d0677d3c0..74bf703c2 100644 --- a/src/ModuleBase/ModuleBase_PagedContainer.h +++ b/src/ModuleBase/ModuleBase_PagedContainer.h @@ -28,7 +28,6 @@ class MODULEBASE_EXPORT ModuleBase_PagedContainer : public ModuleBase_ModelWidge virtual bool focusTo(); virtual void setHighlighted(bool isHighlighted); virtual void enableFocusProcessing(); - virtual bool restoreValue(); protected: virtual int currentPageIndex() const = 0; @@ -36,6 +35,7 @@ class MODULEBASE_EXPORT ModuleBase_PagedContainer : public ModuleBase_ModelWidge // ModuleBase_ModelWidget virtual void activateCustom(); virtual bool storeValueCustom() const; + virtual bool restoreValueCustom(); protected slots: void onPageChanged(); diff --git a/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp b/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp index 854a93a48..f260939e5 100644 --- a/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetBoolValue.cpp @@ -54,7 +54,7 @@ bool ModuleBase_WidgetBoolValue::storeValueCustom() const return true; } -bool ModuleBase_WidgetBoolValue::restoreValue() +bool ModuleBase_WidgetBoolValue::restoreValueCustom() { DataPtr aData = myFeature->data(); std::shared_ptr aRef = aData->boolean(attributeID()); diff --git a/src/ModuleBase/ModuleBase_WidgetBoolValue.h b/src/ModuleBase/ModuleBase_WidgetBoolValue.h index 1c13e0458..b100c4ffe 100644 --- a/src/ModuleBase/ModuleBase_WidgetBoolValue.h +++ b/src/ModuleBase/ModuleBase_WidgetBoolValue.h @@ -31,8 +31,6 @@ Q_OBJECT virtual ~ModuleBase_WidgetBoolValue(); - virtual bool restoreValue(); - virtual QList getControls() const; virtual void setHighlighted(bool isHighlighted); @@ -42,6 +40,8 @@ protected: /// \return True in success virtual bool storeValueCustom() const; + virtual bool restoreValueCustom(); + private: /// The check box QCheckBox* myCheckBox; diff --git a/src/ModuleBase/ModuleBase_WidgetChoice.cpp b/src/ModuleBase/ModuleBase_WidgetChoice.cpp index 83537b71d..3bb748f63 100644 --- a/src/ModuleBase/ModuleBase_WidgetChoice.cpp +++ b/src/ModuleBase/ModuleBase_WidgetChoice.cpp @@ -55,7 +55,7 @@ bool ModuleBase_WidgetChoice::storeValueCustom() const return true; } -bool ModuleBase_WidgetChoice::restoreValue() +bool ModuleBase_WidgetChoice::restoreValueCustom() { DataPtr aData = myFeature->data(); std::shared_ptr aIntAttr = aData->integer(attributeID()); diff --git a/src/ModuleBase/ModuleBase_WidgetChoice.h b/src/ModuleBase/ModuleBase_WidgetChoice.h index 412821d2c..72f6df4cd 100644 --- a/src/ModuleBase/ModuleBase_WidgetChoice.h +++ b/src/ModuleBase/ModuleBase_WidgetChoice.h @@ -39,8 +39,6 @@ Q_OBJECT virtual ~ModuleBase_WidgetChoice(); - virtual bool restoreValue(); - virtual bool focusTo(); /// Returns list of widget controls @@ -52,6 +50,8 @@ protected: /// \return True in success virtual bool storeValueCustom() const; + virtual bool restoreValueCustom(); + private slots: /// Slot called on combo box index change void onCurrentIndexChanged(int theIndex); diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp index 82a8800b3..a576ad31b 100644 --- a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp @@ -104,7 +104,7 @@ bool ModuleBase_WidgetDoubleValue::reset() // if the double value can not be found by the default value, do nothing if (isOk) { ModuleBase_Tools::setSpinValue(mySpinBox, aDefValue); - storeValueCustom(); + storeValue(); aDone = true; } } @@ -130,7 +130,7 @@ bool ModuleBase_WidgetDoubleValue::storeValueCustom() const return true; } -bool ModuleBase_WidgetDoubleValue::restoreValue() +bool ModuleBase_WidgetDoubleValue::restoreValueCustom() { DataPtr aData = myFeature->data(); AttributeDoublePtr aRef = aData->real(attributeID()); diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.h b/src/ModuleBase/ModuleBase_WidgetDoubleValue.h index 186ae90a3..81052981c 100644 --- a/src/ModuleBase/ModuleBase_WidgetDoubleValue.h +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.h @@ -40,10 +40,6 @@ Q_OBJECT /// Fills the widget with default values virtual bool reset(); - //! Read value of corresponded attribute from data model to the input control - // \return True in success - virtual bool restoreValue(); - /// Returns list of widget controls /// \return a control list virtual QList getControls() const; @@ -58,6 +54,10 @@ protected: /// \return True in success virtual bool storeValueCustom() const; + //! Read value of corresponded attribute from data model to the input control + // \return True in success + virtual bool restoreValueCustom(); + protected: /// Label of the widget QLabel* myLabel; diff --git a/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp b/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp index 346b324c8..20d8c8298 100644 --- a/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp +++ b/src/ModuleBase/ModuleBase_WidgetExprEditor.cpp @@ -202,7 +202,7 @@ bool ModuleBase_WidgetExprEditor::storeValueCustom() const return true; } -bool ModuleBase_WidgetExprEditor::restoreValue() +bool ModuleBase_WidgetExprEditor::restoreValueCustom() { // A rare case when plugin was not loaded. if(!myFeature) diff --git a/src/ModuleBase/ModuleBase_WidgetExprEditor.h b/src/ModuleBase/ModuleBase_WidgetExprEditor.h index b234364f7..54262288e 100644 --- a/src/ModuleBase/ModuleBase_WidgetExprEditor.h +++ b/src/ModuleBase/ModuleBase_WidgetExprEditor.h @@ -65,8 +65,6 @@ class MODULEBASE_EXPORT ModuleBase_WidgetExprEditor : public ModuleBase_ModelWid const std::string& theParentId); virtual ~ModuleBase_WidgetExprEditor(); - virtual bool restoreValue(); - virtual QList getControls() const; public slots: @@ -78,6 +76,8 @@ protected: /// \return True in success virtual bool storeValueCustom() const; + virtual bool restoreValueCustom(); + private: /// A line edit control QLabel* myResultLabel; diff --git a/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp b/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp index ee47d10c9..a18f05939 100644 --- a/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetFileSelector.cpp @@ -79,7 +79,7 @@ bool ModuleBase_WidgetFileSelector::storeValueCustom() const return true; } -bool ModuleBase_WidgetFileSelector::restoreValue() +bool ModuleBase_WidgetFileSelector::restoreValueCustom() { // A rare case when plugin was not loaded. if (!myFeature) diff --git a/src/ModuleBase/ModuleBase_WidgetFileSelector.h b/src/ModuleBase/ModuleBase_WidgetFileSelector.h index 8b5987fa0..e1f402b03 100644 --- a/src/ModuleBase/ModuleBase_WidgetFileSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetFileSelector.h @@ -50,8 +50,6 @@ class MODULEBASE_EXPORT ModuleBase_WidgetFileSelector : public ModuleBase_ModelW const std::string& theParentId); virtual ~ModuleBase_WidgetFileSelector(); - virtual bool restoreValue(); - virtual QList getControls() const; /// Returns true if a file on the current path in the line edit @@ -70,6 +68,8 @@ protected: /// \return True in success virtual bool storeValueCustom() const; + virtual bool restoreValueCustom(); + protected: /// Converts format to filter string static QString formatToFilter(const QString & theFormat); diff --git a/src/ModuleBase/ModuleBase_WidgetIntValue.cpp b/src/ModuleBase/ModuleBase_WidgetIntValue.cpp index 45f3e7d94..6778b372c 100644 --- a/src/ModuleBase/ModuleBase_WidgetIntValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetIntValue.cpp @@ -122,7 +122,7 @@ bool ModuleBase_WidgetIntValue::storeValueCustom() const return true; } -bool ModuleBase_WidgetIntValue::restoreValue() +bool ModuleBase_WidgetIntValue::restoreValueCustom() { DataPtr aData = myFeature->data(); AttributeIntegerPtr aRef = aData->integer(attributeID()); diff --git a/src/ModuleBase/ModuleBase_WidgetIntValue.h b/src/ModuleBase/ModuleBase_WidgetIntValue.h index aa7958b9b..255e71603 100644 --- a/src/ModuleBase/ModuleBase_WidgetIntValue.h +++ b/src/ModuleBase/ModuleBase_WidgetIntValue.h @@ -40,10 +40,6 @@ Q_OBJECT /// Fills the widget with default values virtual bool reset(); - //! Read value of corresponded attribute from data model to the input control - // \return True in success - virtual bool restoreValue(); - /// Returns list of widget controls /// \return a control list virtual QList getControls() const; @@ -54,6 +50,10 @@ protected: /// \return True in success virtual bool storeValueCustom() const; + //! Read value of corresponded attribute from data model to the input control + // \return True in success + virtual bool restoreValueCustom(); + protected: /// Label of the widget QLabel* myLabel; diff --git a/src/ModuleBase/ModuleBase_WidgetLabel.h b/src/ModuleBase/ModuleBase_WidgetLabel.h index 62fb2d2e8..9f74e614b 100644 --- a/src/ModuleBase/ModuleBase_WidgetLabel.h +++ b/src/ModuleBase/ModuleBase_WidgetLabel.h @@ -33,7 +33,7 @@ Q_OBJECT /// It returns false because this is an info widget virtual bool canSetValue() const { return false; }; - virtual bool restoreValue() + virtual bool restoreValueCustom() { return true; } diff --git a/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp b/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp index 1f1dbd534..f2f5034b8 100644 --- a/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp +++ b/src/ModuleBase/ModuleBase_WidgetLineEdit.cpp @@ -64,7 +64,7 @@ bool ModuleBase_WidgetLineEdit::storeValueCustom() const return true; } -bool ModuleBase_WidgetLineEdit::restoreValue() +bool ModuleBase_WidgetLineEdit::restoreValueCustom() { // A rare case when plugin was not loaded. if(!myFeature) diff --git a/src/ModuleBase/ModuleBase_WidgetLineEdit.h b/src/ModuleBase/ModuleBase_WidgetLineEdit.h index 067185cdd..624bdf917 100644 --- a/src/ModuleBase/ModuleBase_WidgetLineEdit.h +++ b/src/ModuleBase/ModuleBase_WidgetLineEdit.h @@ -38,8 +38,6 @@ class MODULEBASE_EXPORT ModuleBase_WidgetLineEdit : public ModuleBase_ModelWidge const std::string& theParentId); virtual ~ModuleBase_WidgetLineEdit(); - virtual bool restoreValue(); - virtual QList getControls() const; public slots: @@ -51,6 +49,8 @@ protected: /// \return True in success virtual bool storeValueCustom() const; + virtual bool restoreValueCustom(); + private: /// A line edit control QLineEdit* myLineEdit; diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp index a0e85e14c..faaaebdba 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.cpp @@ -124,7 +124,7 @@ bool ModuleBase_WidgetMultiSelector::storeValueCustom() const } //******************************************************************** -bool ModuleBase_WidgetMultiSelector::restoreValue() +bool ModuleBase_WidgetMultiSelector::restoreValueCustom() { // A rare case when plugin was not loaded. if(!myFeature) diff --git a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h index 11f9023a4..693572f4e 100644 --- a/src/ModuleBase/ModuleBase_WidgetMultiSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetMultiSelector.h @@ -63,8 +63,6 @@ class MODULEBASE_EXPORT ModuleBase_WidgetMultiSelector : public ModuleBase_Widge const std::string& theParentId); virtual ~ModuleBase_WidgetMultiSelector(); - virtual bool restoreValue(); - /// Returns list of widget controls /// \return a control list virtual QList getControls() const; @@ -96,6 +94,8 @@ protected: /// \return True in success virtual bool storeValueCustom() const; + virtual bool restoreValueCustom(); + /// Creates a backup of the current values of the attribute /// It should be realized in the specific widget because of different /// parameters of the current attribute diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index a69708094..6d47be32c 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -163,7 +163,7 @@ void ModuleBase_WidgetShapeSelector::clearAttribute() } //******************************************************************** -bool ModuleBase_WidgetShapeSelector::restoreValue() +bool ModuleBase_WidgetShapeSelector::restoreValueCustom() { bool isBlocked = this->blockSignals(true); updateSelectionName(); diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.h b/src/ModuleBase/ModuleBase_WidgetShapeSelector.h index 7cb2427d2..650d5b1e1 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.h +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.h @@ -70,8 +70,6 @@ Q_OBJECT virtual ~ModuleBase_WidgetShapeSelector(); - virtual bool restoreValue(); - /// Returns list of widget controls /// \return a control list virtual QList getControls() const; @@ -81,6 +79,8 @@ Q_OBJECT /// \return True in success virtual bool storeValueCustom() const; + virtual bool restoreValueCustom(); + /// Creates a backup of the current values of the attribute /// It should be realized in the specific widget because of different /// parameters of the current attribute diff --git a/src/PartSet/PartSet_WidgetFileSelector.cpp b/src/PartSet/PartSet_WidgetFileSelector.cpp index 4f4f9531d..117a8c866 100644 --- a/src/PartSet/PartSet_WidgetFileSelector.cpp +++ b/src/PartSet/PartSet_WidgetFileSelector.cpp @@ -20,7 +20,7 @@ PartSet_WidgetFileSelector::PartSet_WidgetFileSelector(QWidget* theParent, { } -bool PartSet_WidgetFileSelector::restoreValue() +bool PartSet_WidgetFileSelector::restoreValueCustom() { // A rare case when plugin was not loaded. if (!myFeature) @@ -30,7 +30,7 @@ bool PartSet_WidgetFileSelector::restoreValue() AttributeStringPtr aStringAttr = aData->string("export_file_format"); mySelectedFilter = formatToFilter(shortFormatToFullFormat(QString::fromStdString(aStringAttr->value()))); - return ModuleBase_WidgetFileSelector::restoreValue(); + return ModuleBase_WidgetFileSelector::restoreValueCustom(); } bool PartSet_WidgetFileSelector::storeValueCustom() const diff --git a/src/PartSet/PartSet_WidgetFileSelector.h b/src/PartSet/PartSet_WidgetFileSelector.h index 9c5030909..70207a0cd 100644 --- a/src/PartSet/PartSet_WidgetFileSelector.h +++ b/src/PartSet/PartSet_WidgetFileSelector.h @@ -37,13 +37,13 @@ public: virtual ~PartSet_WidgetFileSelector() {} - /// Reimplemented from ModuleBase_WidgetFileSelector::restoreValue() - virtual bool restoreValue(); - protected: /// Reimplemented from ModuleBase_WidgetFileSelector::storeValueCustom() virtual bool storeValueCustom() const; + /// Reimplemented from ModuleBase_WidgetFileSelector::restoreValue() + virtual bool restoreValueCustom(); + /// Returns a full format string for the short format QString shortFormatToFullFormat( const QString & theShortFormat ) const; diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index 7bbb8545b..fe147f51a 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -180,7 +180,7 @@ bool PartSet_WidgetPoint2D::storeValueCustom() const return true; } -bool PartSet_WidgetPoint2D::restoreValue() +bool PartSet_WidgetPoint2D::restoreValueCustom() { std::shared_ptr aData = myFeature->data(); std::shared_ptr aPoint = std::dynamic_pointer_cast( diff --git a/src/PartSet/PartSet_WidgetPoint2d.h b/src/PartSet/PartSet_WidgetPoint2d.h index d42bd44fb..d8b235c9c 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.h +++ b/src/PartSet/PartSet_WidgetPoint2d.h @@ -59,8 +59,6 @@ Q_OBJECT virtual bool setSelection(QList& theValues, const bool theToValidate); - virtual bool restoreValue(); - /// Returns list of widget controls /// \return a control list virtual QList getControls() const; @@ -109,6 +107,8 @@ protected: /// \return True in success virtual bool storeValueCustom() const; + virtual bool restoreValueCustom(); + /// The methiod called when widget is activated virtual void activateCustom(); diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index 7f08fe33e..3579f6e93 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -69,7 +69,7 @@ QList PartSet_WidgetSketchCreator::getControls() const return aControls; } -bool PartSet_WidgetSketchCreator::restoreValue() +bool PartSet_WidgetSketchCreator::restoreValueCustom() { CompositeFeaturePtr aCompFeature = std::dynamic_pointer_cast(myFeature); diff --git a/src/PartSet/PartSet_WidgetSketchCreator.h b/src/PartSet/PartSet_WidgetSketchCreator.h index d90e4d7ce..adb5a92be 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.h +++ b/src/PartSet/PartSet_WidgetSketchCreator.h @@ -29,8 +29,6 @@ Q_OBJECT virtual ~PartSet_WidgetSketchCreator(); - virtual bool restoreValue(); - /// Returns list of widget controls /// \return a control list virtual QList getControls() const; @@ -45,6 +43,8 @@ protected: /// \return True in success virtual bool storeValueCustom() const; + virtual bool restoreValueCustom(); + /// The methiod called when widget is activated virtual void activateCustom(); diff --git a/src/PartSet/PartSet_WidgetSketchLabel.h b/src/PartSet/PartSet_WidgetSketchLabel.h index beaff58be..2bc8d85d6 100644 --- a/src/PartSet/PartSet_WidgetSketchLabel.h +++ b/src/PartSet/PartSet_WidgetSketchLabel.h @@ -56,11 +56,6 @@ Q_OBJECT virtual bool setSelection(QList& theValues, const bool theToValidate); - virtual bool restoreValue() - { - return true; - } - /// Returns list of widget controls /// \return a control list virtual QList getControls() const; @@ -107,6 +102,11 @@ protected: return true; } + virtual bool restoreValueCustom() + { + return true; + } + /// The methiod called when widget is activated virtual void activateCustom();