X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_Workshop.h;h=cddb72f72d5c2eb242fd5784a0ee25e626a06f94;hb=64fc7e4fdd63997ec7a502b233ef5f88186d5bbb;hp=510ee796d5d9e8863a007aaecc7460b37880379a;hpb=8c61cbe058ed744affb3ae76379c8f3ce1d1cdf2;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Workshop.h b/src/XGUI/XGUI_Workshop.h index 510ee796d..cddb72f72 100644 --- a/src/XGUI/XGUI_Workshop.h +++ b/src/XGUI/XGUI_Workshop.h @@ -92,6 +92,12 @@ Q_OBJECT return myOperationMgr; } + //! ! Returns error manager. + XGUI_ErrorMgr* errorMgr() const + { + return myErrorMgr; + } + //! ! Returns an actions manager XGUI_ActionsMgr* actionsMgr() const { @@ -214,7 +220,7 @@ Q_OBJECT * - operation aborted successfully * - there is no active operation */ - bool isActiveOperationAborted(); + bool abortAllOperations(); //! Delete features. Delete the referenced features. There can be a question with a list of referenced //! objects. @@ -235,6 +241,10 @@ Q_OBJECT /// \param theUpdateViewer a boolean flag to update viewer immediately void deactivateActiveObject(const ObjectPtr& theObject, const bool theUpdateViewer); + /// Returns true if the action of the feature is created to contain Accept/Cancel button + /// \param theFeature a feature + bool isFeatureOfNested(const FeaturePtr& theFeature); + signals: /// Emitted when selection happens in Salome viewer void salomeViewerSelection(); @@ -258,10 +268,6 @@ signals: /// Update of commands status void updateCommandStatus(); - // Update enable state of accept all button. It is enabled if the the parent operation is - // valid and there are modifications in sesstion(undo can be performed). - void updateCompositeActionState(); - /// update history list (undo/redo commands) void updateHistory(); @@ -308,9 +314,10 @@ signals: void closeDocument(); protected: - /// Find the nested features and set them into the operation + /// Sets the granted operations for the parameter operation. Firtsly, it finds the nested features + /// and set them into the operation. Secondly, it asks the module about ids of granted operations. /// \param theOperation an operation - void setNestedFeatures(ModuleBase_Operation* theOperation); + void setGrantedFeatures(ModuleBase_Operation* theOperation); /// Update the property panel content by the XML description of the operation and set the panel /// into the operation @@ -360,6 +367,19 @@ private: /// Set waiting cursor void onStartWaiting(); + /// Called by Ok button clicked in the property panel. Asks the error manager whether + /// the operation can be commited and do it if it returns true. + void onAcceptActionClicked(); + + /// Listens the corresponded signal from operation manager and send it with the Ok + /// action to operation manager. + /// \param theEnabled an enabled state for the action + //void onValidationStateChanged(bool theEnabled); + + //connect(myOperationMgr, SIGNAL(validationStateChanged(bool)), + // aOkAct, SLOT(setEnabled(bool))); + + private: /// Init menu void initMenu();