Salome HOME
Update copyrights
[modules/shaper.git] / src / XGUI / XGUI_Workshop.h
old mode 100755 (executable)
new mode 100644 (file)
index 7af135f..ea1ecf0
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 //
 // You should have received a copy of the GNU Lesser General Public
 // License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
 #ifndef XGUI_WORKSHOP_H
@@ -36,6 +35,7 @@
 #include <QObject>
 #include <QKeySequence>
 #include <QMap>
+#include <QTemporaryDir>
 
 #ifndef HAVE_SALOME
 class AppElements_Command;
@@ -233,11 +233,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
@@ -318,7 +318,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
@@ -395,6 +397,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);
 
@@ -466,6 +471,9 @@ private:
   /// compute preview.
   void onPreviewActionClicked();
 
+  /// Called on help button clicked in the property panel.
+  void onHelpActionClicked();
+
  private:
   /// Init menu
   void initMenu();
@@ -502,6 +510,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
@@ -525,10 +536,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