Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / XGUI / XGUI_Workshop.h
index 8267dff5a813cd7f160502354d3eebd85537d359..2955efab2dd7d3508166edb3b76fb3755e548dc0 100755 (executable)
 #include <ModuleBase_ActionType.h>
 #include <ModuleBase_Definitions.h>
 
+#include <SelectMgr_ListOfFilter.hxx>
+
 #include <QIcon>
 #include <QObject>
 #include <QKeySequence>
 #include <QMap>
+#include <QTemporaryDir>
 
 #ifndef HAVE_SALOME
 class AppElements_Command;
@@ -57,9 +60,11 @@ class XGUI_OperationMgr;
 class XGUI_PropertyPanel;
 class XGUI_SalomeConnector;
 class XGUI_SalomeViewer;
+class XGUI_SelectionActivate;
 class XGUI_SelectionMgr;
 class XGUI_ViewerProxy;
 class XGUI_WorkshopListener;
+class XGUI_InspectionPanel;
 
 class ModuleBase_IModule;
 class ModuleBase_IViewer;
@@ -103,6 +108,9 @@ Q_OBJECT
   /// Returns selection manager object
   XGUI_SelectionMgr* selector() const { return mySelector; }
 
+  /// Returns selection activating object
+  XGUI_SelectionActivate* selectionActivate() const { return mySelectionActivate; }
+
   /// Returns displayer
   XGUI_Displayer* displayer() const { return myDisplayer; }
 
@@ -124,6 +132,9 @@ Q_OBJECT
   /// Returns property panel widget
   XGUI_PropertyPanel* propertyPanel() const { return myPropertyPanel; }
 
+  /// Returns property panel widget
+  XGUI_InspectionPanel* inspectionPanel() const { return myInspectionPanel; }
+
   /// Returns panel for hide object faces
   XGUI_FacesPanel* facesPanel() const { return myFacesPanel; }
 
@@ -223,11 +234,11 @@ Q_OBJECT
   /// Returns current module
   ModuleBase_IModule* module() const { return myModule; }
 
-  /// Returns current directory which contains data files
-  QString currentDataDir() const { return myCurrentDir; }
+  /// Returns current file
+  QString currentDataFile() const { return myCurrentFile; }
 
-  /// Returns current directory which contains data files
-  void setCurrentDataDir(const QString& theDir) { myCurrentDir = theDir; }
+  /// Returns current file
+  void setCurrentDataFile(const QString& theDir) { myCurrentFile = theDir; }
 
   /// Save the current document into a directory
   /// \param theName - path to the directory
@@ -308,7 +319,9 @@ Q_OBJECT
 
   /// Closes all in the current session and load the directory
   /// \param theDirectory a path to directory
-  void openDirectory(const QString& theDirectory);
+  void openFile(const QString& theDirectory);
+
+  void updateAutoComputeState();
 
 signals:
   /// Emitted when selection happens in Salome viewer
@@ -385,6 +398,9 @@ signals:
   void onPreferences();
 #endif
 
+  /// A slot calleon toggle of auto-compute button
+  void onAutoApply();
+
   /// Activates/deactivates the trihedron in the viewer AIS context
   void onTrihedronVisibilityChanged(bool theState);
 
@@ -448,10 +464,17 @@ private:
   /// the operation can be committed and do it if it returns true.
   void onAcceptActionClicked();
 
+  /// Called by OkPlus button clicked in the property panel. Asks the error manager whether
+  /// the operation can be committed and do it if it returns true.
+  void onAcceptPlusActionClicked();
+
   /// Called by Preview button clicked in the property panel. Sends signal to model to
   /// compute preview.
   void onPreviewActionClicked();
 
+  /// Called on help button clicked in the property panel.
+  void onHelpActionClicked();
+
  private:
   /// Init menu
   void initMenu();
@@ -470,10 +493,6 @@ private:
   /// \param theParent a parent of widget
   QDockWidget* createObjectBrowser(QWidget* theParent);
 
-  /// Create property panel widget
-  /// \param theParent a parent of widget
-  QDockWidget* createPropertyPanel(QWidget* theParent);
-
   // Creates Dock widgets: Object browser and Property panel
   void createDockWidgets();
 
@@ -492,6 +511,9 @@ private:
   /// \param theTimes number of applies the given action
   void processUndoRedo(const ModuleBase_ActionType theActionType, int theTimes);
 
+  /// Clear content of temporary directory
+  void clearTemporaryDir();
+
 private:
 #ifndef HAVE_SALOME
   AppElements_MainWindow* myMainWindow; ///< desktop window
@@ -503,6 +525,7 @@ private:
   XGUI_PropertyPanel* myPropertyPanel; ///< container of feature attributes widgets
   XGUI_FacesPanel* myFacesPanel; ///< panel for hide object faces
   XGUI_SelectionMgr* mySelector; ///< handler of selection processing
+  XGUI_SelectionActivate* mySelectionActivate; /// manager of selection activating
   XGUI_Displayer* myDisplayer; ///< handler of objects display
   XGUI_OperationMgr* myOperationMgr;  ///< manager to manipulate through the operations
   XGUI_ActionsMgr* myActionsMgr; ///< manager of workshop actions
@@ -514,9 +537,11 @@ private:
   XGUI_ContextMenuMgr* myContextMenuMgr; ///< manager of context menu build
   XGUI_ModuleConnector* myModuleConnector; ///< implementation of ModuleBase_IWorkshop
   XGUI_WorkshopListener* myEventsListener; ///< processing of events
-  QString myCurrentDir; ///< cached the last open directory
+  QString myCurrentFile; ///< cached the last open directory
   QIntList myViewerSelMode; ///< selection modes set in the viewer
   Config_DataModelReader* myDataModelXMLReader; ///< XML reader of data model
+  XGUI_InspectionPanel* myInspectionPanel; ///< container of feature attributes widgets
+  QTemporaryDir myTmpDir; ///< a direcory for uncompressed files
 };
 
 #endif