Salome HOME
Issue #1952: Start Step id from 1
[modules/shaper.git] / src / XGUI / XGUI_ErrorMgr.h
index 7295a52a4fd0f4b4e9561112feb5d84e3ae8ee37..3a320c4b0e807877a5c53b532230a6a78f504ca8 100644 (file)
@@ -44,20 +44,22 @@ public:
   /// \param theFeature a feature
   void updateAcceptAllAction(const FeaturePtr& theFeature);
 
-public slots:
-  /// Reimplemented from ModuleBase_ErrorMgr::onValidationStateChanged().
-  //virtual void onValidationStateChanged();
+  /// Returns true if the apply is enabled for the current feature
+  bool isApplyEnabled() const;
 
 protected slots:
   /// Reimplemented from ModuleBase_ErrorMgr::onWidgetChanged().
   virtual void onWidgetChanged();
 
 private:
-  /// It disables the action if the error message is not empty
+  /// Stores initial values of accept/accept all tool/status tip to internal containers
+  void storeInitialActionValues();
+
+  /// It disables the propety panel Accept action if the error message is not empty
   /// The message is set to the header tool tip.
   /// \param theAction an action to be changed
   /// \param theError an error state
-  void updateActionState(QAction* theAction, const QString& theError);
+  void updateAcceptActionState(const QString& theError);
 
   /// It updates the tool tip of the widget controls according to the widget error
   /// \param theWidget a widget
@@ -75,6 +77,10 @@ private:
   ModuleBase_IWorkshop* myWorkshop; /// workshop
   QDialog* myErrorDialog; /// contains the error message
   QLabel* myErrorLabel; /// contains an error information
+  QString myAcceptToolTip; /// cached tool tip value for enabled Accept action
+  QString myAcceptAllToolTip; /// cached tool tip value for enabled AcceptAll action
+  QString myAcceptStatusTip; /// cached status tip value for enabled Accept action
+  QString myAcceptAllStatusTip; /// cached status tip value for enabled AcceptAll action
 };
 
 #endif // XGUI_ErrorMgr_H
\ No newline at end of file