X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_Workshop.h;h=982758244fa3eecb338fcb879d0e8d3b037573fc;hb=20afea6c885668f6901e7ae42ee19c7b8fb40ac4;hp=7495365b43824d14eb09af3ea719752d016a1df4;hpb=dc7d4d86b58b81684abc9b5a2be8ec30f210c2da;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_Workshop.h b/src/XGUI/XGUI_Workshop.h old mode 100755 new mode 100644 index 7495365b4..982758244 --- a/src/XGUI/XGUI_Workshop.h +++ b/src/XGUI/XGUI_Workshop.h @@ -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 @@ -12,10 +12,9 @@ // // 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 +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef XGUI_WORKSHOP_H @@ -25,6 +24,7 @@ #include #include +#include #include #include @@ -36,6 +36,7 @@ #include #include #include +#include #ifndef HAVE_SALOME class AppElements_Command; @@ -63,6 +64,7 @@ class XGUI_SelectionActivate; class XGUI_SelectionMgr; class XGUI_ViewerProxy; class XGUI_WorkshopListener; +class XGUI_InspectionPanel; class ModuleBase_IModule; class ModuleBase_IViewer; @@ -130,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; } @@ -229,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 @@ -283,6 +288,8 @@ Q_OBJECT const std::string& theGroup, bool theUpdateViewer); + void synchronizeResultTree(const ResultBodyPtr& theRes, bool theUpdateViewer); + #endif /// Update the property panel content by the XML description of the operation and set the panel /// into the operation @@ -314,7 +321,14 @@ 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(); + + void deactivateCurrentSelector(); + + /// The method updates a Color Scale object in the viewer + void updateColorScaleVisibility(); signals: /// Emitted when selection happens in Salome viewer @@ -391,15 +405,15 @@ 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); /// Apply the current transparency value if preview in transparency dialog is switched on void onTransparencyValueChanged(); - /// Switch on/off preview of transparency change - void onPreviewStateChanged(); - protected: /// Sets the granted operations for the parameter operation. Firstly, it finds the nested features /// and set them into the operation. Secondly, it asks the module about ids of granted operations. @@ -462,6 +476,12 @@ private: /// compute preview. void onPreviewActionClicked(); + /// Called on help button clicked in the property panel. + void onHelpActionClicked(); + + //! The slot is called only once on resizing of Object Browser + void onDockSizeChanged(); + private: /// Init menu void initMenu(); @@ -480,15 +500,11 @@ 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(); /// Extends undo/redo toolbutton's with history menu - /// \param theObject - in the OpenParts it is a QToolButton by itself, + /// \param theObject - in the CADBuilder it is a QToolButton by itself, /// in salome mode - QAction that creates a button. /// \param theSignal - void "updateUndoHistory" or "updateRedoHistory" SIGNAL; /// \param theSlot - onUndo(int) or onRedo(int) SLOT @@ -502,6 +518,13 @@ private: /// \param theTimes number of applies the given action void processUndoRedo(const ModuleBase_ActionType theActionType, int theTimes); + /// Clear content of temporary directory + void clearTemporaryDir(); + + /// Set current point of view normal to selected planar face + /// \param toInvert invert the normal vector + void setNormalView(bool toInvert = false); + private: #ifndef HAVE_SALOME AppElements_MainWindow* myMainWindow; ///< desktop window @@ -525,9 +548,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