X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModuleBase%2FModuleBase_IModule.h;h=acd6b49acef50c0332d35978bfdaf2c63b38693b;hb=39da05659a620750e11c2778a45be6f2dcb17308;hp=ed5ad0456ccfdb95215d5d0ef3bb7de62424e239;hpb=bf2f4cb0bc279c743be57c30ac9feb8b829fef3a;p=modules%2Fshaper.git diff --git a/src/ModuleBase/ModuleBase_IModule.h b/src/ModuleBase/ModuleBase_IModule.h index ed5ad0456..acd6b49ac 100755 --- a/src/ModuleBase/ModuleBase_IModule.h +++ b/src/ModuleBase/ModuleBase_IModule.h @@ -101,6 +101,9 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject return 0; } + /// Returns the active widget, by default it is the property panel active widget + virtual ModuleBase_ModelWidget* activeWidget() const = 0; + /// Returns current workshop ModuleBase_IWorkshop* workshop() const { return myWorkshop; } @@ -188,6 +191,11 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject //! \return string value virtual QString getFeatureError(const FeaturePtr& theFeature); + //! Returns the widget error, get it from the attribute validator and state of the widget + //! If the feature is correct, it returns an empty value + //! \return string value + virtual QString getWidgetError(ModuleBase_ModelWidget* theWidget); + /// Returns list of granted operation indices virtual void grantedOperationIds(ModuleBase_Operation* theOperation, QStringList& theIds) const; @@ -196,6 +204,22 @@ class MODULEBASE_EXPORT ModuleBase_IModule : public QObject /// \param isToConnect a boolean value whether connect or disconnect virtual void connectToPropertyPanel(ModuleBase_ModelWidget* theWidget, const bool isToConnect) {}; + /// Validates the operation to change the "Apply" button state. + /// \param thePreviousState the previous state of the widget + virtual void widgetStateChanged(int thePreviousState) {}; + + /// Returns true if the event is processed. + /// \param thePreviousAttributeID an index of the previous active attribute + virtual bool processEnter(const std::string& thePreviousAttributeID) { return false; }; + + /// Performs some GUI actions after an operation transaction is opened + /// Default realization is empty + virtual void beforeOperationStarted(ModuleBase_Operation* theOperation) {}; + + /// Performs some GUI actions before an operation transaction is stopped + /// Default realization is empty + virtual void beforeOperationStopped(ModuleBase_Operation* theOperation) {}; + signals: /// Signal which is emitted when operation is launched void operationLaunched();