Salome HOME
Implementation of the Feature Validator
[modules/shaper.git] / src / XGUI / XGUI_Workshop.h
index 870e23f19cae1f771a24c0e166a5566024902049..f80b8cf7d30e4fe82e656c3aa0ae067b0a5248f3 100644 (file)
@@ -5,6 +5,8 @@
 #include "XGUI_Constants.h"
 #include <Events_Listener.h>
 #include <ModuleBase_Definitions.h>
+#include <ModelAPI_ResultPart.h>
+#include <ModelAPI_Document.h>
 
 #include <QObject>
 #include <QMap>
@@ -37,7 +39,8 @@ class Config_PointerMessage;
 class QWidget;
 class QDockWidget;
 
-class Model_ObjectUpdatedMessage;
+class ModelAPI_ObjectUpdatedMessage;
+class ModelAPI_ObjectDeletedMessage;
 class QAction;
 
 /**\class XGUI_Workshop
@@ -110,13 +113,13 @@ public:
 
   //! Activates or deactivates a part
   //! If PartPtr is Null pointer then PartSet will be activated
-  void activatePart(FeaturePtr theFeature);
+  void activatePart(ResultPartPtr theFeature);
 
   //! Delete features
-  void deleteFeatures(QFeatureList theList);
+  void deleteObjects(const QList<ObjectPtr>& theList);
 
   //! Show the given features in 3d Viewer
-  void showFeatures(QFeatureList theList, bool isVisible);
+  void showObjects(const QList<ObjectPtr>& theList, bool isVisible);
 
   ModuleBase_IModule* module() const { return myModule; }
 
@@ -135,6 +138,7 @@ public slots:
   void onExit();
   void onUndo();
   void onRedo();
+  void onPreferences();
 
   void showPropertyPanel();
   void hidePropertyPanel();
@@ -142,7 +146,7 @@ public slots:
   void hideObjectBrowser();
 
   void onFeatureTriggered();
-  void changeCurrentDocument(FeaturePtr thePart);
+  void changeCurrentDocument(ObjectPtr theObj);
 
   void activateLastPart();
 
@@ -152,12 +156,19 @@ protected:
   void connectWithOperation(ModuleBase_Operation* theOperation);
   void saveDocument(QString theName);
 
-  void onFeatureUpdatedMsg(const Model_ObjectUpdatedMessage* theMsg);
-  void onFeatureCreatedMsg(const Model_ObjectUpdatedMessage* theMsg);
-  void onFeatureRedisplayMsg(const Model_ObjectUpdatedMessage* theMsg);
+  void onFeatureUpdatedMsg(const ModelAPI_ObjectUpdatedMessage* theMsg);
+  void onFeatureCreatedMsg(const ModelAPI_ObjectUpdatedMessage* theMsg);
+  void onFeatureRedisplayMsg(const ModelAPI_ObjectUpdatedMessage* theMsg);
+  void onObjectDeletedMsg(const ModelAPI_ObjectDeletedMessage* theMsg);
+
+  void validateOperation(const QString& theOperationId);
 
   QList<QAction*> getModuleCommands() const;
 
+  void displayAllResults();
+  void displayDocumentResults(DocumentPtr theDoc);
+  void displayGroupResults(DocumentPtr theDoc, std::string theGroup);
+
 protected slots:
   /// SLOT, that is called after the operation is started. Update workshop state according to
   /// the started operation, e.g. visualizes the property panel and connect to it.
@@ -171,9 +182,14 @@ protected slots:
 
   void onWidgetValuesChanged();
 
+  void onStartWaiting();
+
 private:
   void initMenu();
 
+  void registerValidators() const;
+
+
   ModuleBase_IModule* loadModule(const QString& theModule);
   bool activateModule();
 
@@ -199,7 +215,6 @@ private:
 
   QString myCurrentDir;
   static QMap<QString, QString> myIcons;
-
 };
 
 #endif