-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+// Copyright (C) 2014-2017 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
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// 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
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
#ifndef XGUI_WORKSHOP_H
#define XGUI_WORKSHOP_H
Q_OBJECT
public:
/// Constructor
- /// \param theConnector a Salome connector object.
+ /// \param theConnector a Salome connector object.
/// Used only if the workshop is launched in Salome environment
XGUI_Workshop(XGUI_SalomeConnector* theConnector = 0);
virtual ~XGUI_Workshop();
void deleteObjects();
//! Searches for selected features unused in other (not selected) features. If one or several
- //! selected features are found, a warning message proposes to delete them. It contains
+ //! selected features are found, a warning message proposes to delete them. It contains
//! the list of features to be deleted.
void cleanHistory();
bool canBeShaded(const ObjectPtr& theObject) const;
//! Returns true if there is at least one selected body/construction/group result
+ //! \param theActionName text of the checked action
//! \return boolean value
- bool canChangeColor() const;
+ bool canChangeProperty(const QString& theActionName) const;
- //! Change color of the features if it is possible
+ //! Change color of the results if it is possible
//! The operation is available for construction, body and group results
//! theObjects a list of selected objects
void changeColor(const QObjectPtrList& theObjects);
+ //! Change deflection of the results if it is possible
+ //! The operation is available for construction, body and group results
+ //! theObjects a list of selected objects
+ void changeDeflection(const QObjectPtrList& theObjects);
+
+ //! Change transparency of the results if it is possible
+ //! The operation is available for construction, body and group results
+ //! theObjects a list of selected objects
+ void changeTransparency(const QObjectPtrList& theObjects);
+
//! Show the given features in 3d Viewer
void showObjects(const QObjectPtrList& theList, bool isVisible);
*/
bool abortAllOperations();
+ /// Updates workshop state according to the started operation, e.g. visualizes the property panel
+ /// and connect to it.
+ /// \param theOpertion a started operation
+ void operationStarted(ModuleBase_Operation* theOperation);
+
+
//! Delete features. Delete the referenced features. There can be a question with a list of
//! referenced objects.
//! \param theFeatures a list of objects to be deleted
/// Has to be called in order to display objects with visibility status = true
void synchronizeViewer();
- /// Has to be called in order to display objects from a cpecifed group with visibility status = true
+ /// Has to be called in order to display objects from a specifed group
+ /// with visibility status = true
/// \param theDoc the document for objects synchronisation
/// \param theGroup the group name
/// \param theUpdateViewer update viewer flag
- void synchronizeGroupInViewer(const DocumentPtr& theDoc, const std::string& theGroup, bool theUpdateViewer);
+ void synchronizeGroupInViewer(const DocumentPtr& theDoc,
+ const std::string& theGroup,
+ bool theUpdateViewer);
/// Update the property panel content by the XML description of the operation and set the panel
/// into the operation
/// \param theOperation an operation
- void setPropertyPanel(ModuleBase_Operation* theOperation);
+ void fillPropertyPanel(ModuleBase_Operation* theOperation);
/// Connects or disconnects to the value changed signal of the property panel widgets
/// \param isToConnect a boolean value whether connect or disconnect
/// features found in the given list
void highlightFeature(const QObjectPtrList& theObjects);
- /// Returns Data Model XML reader which contains information about
+ /// Returns Data Model XML reader which contains information about
/// Data structure configuration
const Config_DataModelReader* dataModelXMLReader() const { return myDataModelXMLReader; }
/// It is used for specific processing of Undo/Redo for this command.
static QString MOVE_TO_END_COMMAND;
+ //! Closes all in the current session and load the directory
+ //! \param theDirectory a path to directory
+ void openDirectory(const QString& theDirectory);
+
signals:
/// Emitted when selection happens in Salome viewer
void salomeViewerSelection();
/// 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
/// Display results from a group
void displayGroupResults(DocumentPtr theDoc, std::string theGroup);
+ /// Insert folder object before currently selected feature
+ void insertFeatureFolder();
+
+ /// Insert an object to a folder above or below
+ void insertToFolder(bool isBefore);
+
+ /// Insert an object to a folder above or below
+ void moveOutFolder(bool isBefore);
+
private 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.
/// \param theOpertion a started operation
- void onOperationStarted(ModuleBase_Operation* theOperation);
+ // void onOperationStarted(ModuleBase_Operation* theOperation);
/// SLOT, that is called after the operation is resumed. Update workshop state according to
/// the started operation, e.g. visualizes the property panel and connect to it.