SHAPER
9.13.0
|
Class which defines a configuration of the application (Workshop) and launches it. More...
Public Slots | |
void | updateCommandStatus () |
Update of commands status. More... | |
void | updateHistory () |
update history list (undo/redo commands) More... | |
bool | onSave () |
Save current document. More... | |
bool | onSaveAs () |
Save current document to a file selected by user. More... | |
void | onUndo (int times=1) |
Undo last command. More... | |
void | onRedo (int times=1) |
Redo previous command. More... | |
void | onWidgetStateChanged (int thePreviousState) |
Validates the operation to change the "Apply" button state. More... | |
void | onValuesChanged () |
Calls activate of the current widget again. More... | |
void | onWidgetObjectUpdated () |
Listens the corresponded signal of model widget and updates Apply button state by feature. More... | |
void | showPanel (QDockWidget *theDockWidget) |
Show dock widget panel. More... | |
void | hidePanel (QDockWidget *theDockWidget) |
Hide dock widget panel. More... | |
void | showObjectBrowser () |
Show object Browser. More... | |
void | hideObjectBrowser () |
Hide object Browser. More... | |
void | closeDocument () |
Close document. More... | |
void | onOpen () |
Open document from file. More... | |
void | onNew () |
Create a new document. More... | |
void | onImportPart () |
Import part structure from a file. More... | |
void | onImportShape () |
Import shape from a file. More... | |
void | onImportImage () |
Import image from a file. More... | |
void | onExportPart () |
Export features to a file. More... | |
void | onExportShape () |
Export a shape to a file. More... | |
void | onExit () |
Exit application. More... | |
void | onPreferences () |
Open preferences dialog box. More... | |
void | onAutoApply () |
A slot calleon toggle of auto-compute button. More... | |
void | onTrihedronVisibilityChanged (bool theState) |
Activates/deactivates the trihedron in the viewer AIS context. More... | |
void | onTransparencyValueChanged () |
Apply the current transparency value if preview in transparency dialog is switched on. More... | |
Signals | |
void | salomeViewerSelection () |
Emitted when selection happens in Salome viewer. More... | |
void | commandStatusUpdated () |
the signal about the workshop actions states are updated. More... | |
void | applicationStarted () |
the application is started More... | |
void | updateUndoHistory (const QList< ActionInfo > &) |
Signal to update Undo history list. More... | |
void | updateRedoHistory (const QList< ActionInfo > &) |
Signal to update Redo history list. More... | |
Public Member Functions | |
XGUI_Workshop (XGUI_SalomeConnector *theConnector=0) | |
Constructor. More... | |
void | startApplication () |
Starting of the application. More... | |
void | activateModule () |
Activates the module controls. Should be called after module creation. More... | |
void | deactivateModule () |
Deactivates the module controls. Should be called after module creation. More... | |
AppElements_MainWindow * | mainWindow () const |
Returns main window (Desktop) of the application. More... | |
AppElements_Workbench * | addWorkbench (const QString &theName) |
Creates and adds a new workbench (menu group) with the given name and returns it. More... | |
XGUI_SelectionMgr * | selector () const |
Returns selection manager object. More... | |
XGUI_SelectionActivate * | selectionActivate () const |
Returns selection activating object. More... | |
XGUI_Displayer * | displayer () const |
Returns displayer. More... | |
XGUI_OperationMgr * | operationMgr () const |
Returns operation manager. More... | |
XGUI_ErrorMgr * | errorMgr () const |
Returns error manager. More... | |
XGUI_ActionsMgr * | actionsMgr () const |
Returns an actions manager. More... | |
XGUI_ActiveControlMgr * | activeControlMgr () const |
Returns an active control manager. More... | |
XGUI_MenuMgr * | menuMgr () const |
Returns an actions manager. More... | |
XGUI_PropertyPanel * | propertyPanel () const |
Returns property panel widget. More... | |
XGUI_InspectionPanel * | inspectionPanel () const |
Returns property panel widget. More... | |
XGUI_FacesPanel * | facesPanel () const |
Returns panel for hide object faces. More... | |
XGUI_ContextMenuMgr * | contextMenuMgr () const |
Returns context menu manager object. More... | |
XGUI_SalomeConnector * | salomeConnector () const |
Returns an object which provides interface to Salome Module (LightApp_Module) More... | |
ModuleBase_IViewer * | salomeViewer () const |
Provides an object which provides interface to Salome Viewer. More... | |
bool | isSalomeMode () const |
Returns true if the application works as SALOME module. More... | |
XGUI_ObjectsBrowser * | objectBrowser () const |
Returns Object browser. More... | |
void | salomeViewerSelectionChanged () |
This method is called by Salome module when selection is changed. More... | |
XGUI_ViewerProxy * | viewer () const |
Returns viewer which unifies access as to Salome viewer as to standalone viewer. More... | |
XGUI_ModuleConnector * | moduleConnector () const |
Returns the module connector. More... | |
QMainWindow * | desktop () const |
Returns a desktop. More... | |
virtual bool | prepareForDisplay (const std::set< ObjectPtr > &theObjects) const |
If faces panel made the object hidden, show message box whether the object should be restored (removed from the panel) and displayed, if answer is No, returns false. More... | |
void | deleteObjects () |
Delete features. More... | |
void | cleanHistory () |
Searches for selected features unused in other (not selected) features. More... | |
bool | canMoveFeature () |
Returns true if the selected feature can be moved to the position after the current feature. More... | |
void | moveObjects (const bool theSplit) |
Move selected features to be after the current feature. More... | |
void | recoverFeature () |
Start a "Recover" feature on the selected one. More... | |
bool | canBeShaded (const ObjectPtr &theObject) const |
Returns true if the object can be shaded. More... | |
bool | canChangeProperty (const QString &theActionName) const |
Returns true if there is at least one selected body/construction/group result. More... | |
void | changeColor (const QObjectPtrList &theObjects) |
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. More... | |
void | changeAutoColor (const QObjectPtrList &theObjects) |
Change Autocolor of the results if it is possible The operation is available for group results theObjects a list of selected objects. More... | |
void | changeDeflection (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. More... | |
void | changeTransparency (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. More... | |
void | changeIsoLines (const QObjectPtrList &theObjects) |
Change number of iso-lines for the given objects theObjects a list of selected objects. More... | |
void | showObjects (const QObjectPtrList &theList, bool isVisible) |
Show the given features in 3d Viewer. More... | |
void | showOnlyObjects (const QObjectPtrList &theList) |
Show the given features in 3d Viewer. More... | |
void | setDisplayMode (const QObjectPtrList &theList, int theMode) |
Set display mode for the given objects. More... | |
void | toggleEdgesDirection (const QObjectPtrList &theList) |
Toggle visualisation of edges direction. More... | |
void | toggleBringToFront (const QObjectPtrList &theList) |
Toggle state of display priority (normal/in front) More... | |
void | setViewerSelectionMode (int theMode) |
Set selection mode in viewer. More... | |
void | activateObjectsSelection (const QObjectPtrList &theList) |
Activates current selection mode for the given list of objects. More... | |
ModuleBase_IModule * | module () const |
Returns current module. More... | |
QString | currentDataFile () const |
Returns current file. More... | |
void | setCurrentDataFile (const QString &theDir) |
Returns current file. More... | |
void | saveDocument (const QString &theName, std::list< std::string > &theFileNames) |
Save the current document into a directory. More... | |
bool | abortAllOperations () |
If there is an active (uncommitted) operation shows a prompt to abort it and performs abortion if user agreed. More... | |
void | operationStarted (ModuleBase_Operation *theOperation) |
Updates workshop state according to the started operation, e.g. More... | |
bool | deleteFeatures (const QObjectPtrList &theFeatures) |
Delete features. More... | |
void | deactivateActiveObject (const ObjectPtr &theObject, const bool theUpdateViewer) |
Deactivates the object, if it is active and the module returns that the activation of selection for the object is not possible currently(the current operation uses it) More... | |
bool | isFeatureOfNested (const FeaturePtr &theFeature) |
Returns true if the action of the feature is created to contain Accept/Cancel button. More... | |
void | setStatusBarMessage (const QString &theMessage) |
Shows the message in the status bar. More... | |
void | fillPropertyPanel (ModuleBase_Operation *theOperation) |
Update the property panel content by the XML description of the operation and set the panel into the operation. More... | |
void | connectToPropertyPanel (const bool isToConnect) |
Connects or disconnects to the value changed signal of the property panel widgets. More... | |
QIntList | viewerSelectionModes () const |
Returns defailt selection mode in 3d viewer. More... | |
void | highlightResults (const QObjectPtrList &theObjects) |
Highlights result objects in Object Browser according to features found in the given list. More... | |
void | highlightFeature (const QObjectPtrList &theObjects) |
Highlights feature objects in Object Browser according to features found in the given list. More... | |
const Config_DataModelReader * | dataModelXMLReader () const |
Returns Data Model XML reader which contains information about Data structure configuration. More... | |
void | openFile (const QString &theDirectory) |
Closes all in the current session and load the directory. More... | |
void | updateAutoComputeState () |
void | deactivateCurrentSelector () |
void | updateColorScaleVisibility () |
The method updates a Color Scale object in the viewer. More... | |
void | updateGroupsText () |
The method updates a Text of Group names in the viewer. More... | |
void | showHelpPage (const QString &thePage) const |
Static Public Attributes | |
static QString | MOVE_TO_END_COMMAND = QObject::tr("Move to the end") |
A constant string used for "Move to end" command definition It is used for specific processing of Undo/Redo for this command. More... | |
static QString | MOVE_TO_END_SPLIT_COMMAND = QObject::tr("Move to the end and split") |
A constant string used for "Move to end and split" command definition It is used for specific processing of Undo/Redo for this command. More... | |
Protected Member Functions | |
void | setGrantedFeatures (ModuleBase_Operation *theOperation) |
Sets the granted operations for the parameter operation. More... | |
Class which defines a configuration of the application (Workshop) and launches it.
XGUI_Workshop::XGUI_Workshop | ( | XGUI_SalomeConnector * | theConnector = 0 | ) |
Constructor.
theConnector | a Salome connector object. Used only if the workshop is launched in Salome environment |
If version of OCCT is 7.4.0 or more then it means that this is version of SALOME older then 9.4.0
void XGUI_Workshop::startApplication | ( | ) |
Starting of the application.
void XGUI_Workshop::activateModule | ( | ) |
Activates the module controls. Should be called after module creation.
void XGUI_Workshop::deactivateModule | ( | ) |
Deactivates the module controls. Should be called after module creation.
|
inline |
Returns main window (Desktop) of the application.
AppElements_Workbench * XGUI_Workshop::addWorkbench | ( | const QString & | theName | ) |
Creates and adds a new workbench (menu group) with the given name and returns it.
|
inline |
Returns selection manager object.
|
inline |
Returns selection activating object.
|
inline |
Returns displayer.
|
inline |
Returns operation manager.
|
inline |
Returns error manager.
|
inline |
Returns an actions manager.
|
inline |
Returns an active control manager.
|
inline |
Returns an actions manager.
|
inline |
Returns property panel widget.
|
inline |
Returns property panel widget.
|
inline |
Returns panel for hide object faces.
|
inline |
Returns context menu manager object.
|
inline |
Returns an object which provides interface to Salome Module (LightApp_Module)
ModuleBase_IViewer * XGUI_Workshop::salomeViewer | ( | ) | const |
Provides an object which provides interface to Salome Viewer.
|
inline |
Returns true if the application works as SALOME module.
|
inline |
Returns Object browser.
void XGUI_Workshop::salomeViewerSelectionChanged | ( | ) |
This method is called by Salome module when selection is changed.
|
inline |
Returns viewer which unifies access as to Salome viewer as to standalone viewer.
|
inline |
Returns the module connector.
QMainWindow * XGUI_Workshop::desktop | ( | ) | const |
Returns a desktop.
|
virtual |
If faces panel made the object hidden, show message box whether the object should be restored (removed from the panel) and displayed, if answer is No, returns false.
theObject | a model object |
void XGUI_Workshop::deleteObjects | ( | ) |
Delete features.
void XGUI_Workshop::cleanHistory | ( | ) |
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 the list of features to be deleted.
bool XGUI_Workshop::canMoveFeature | ( | ) |
Returns true if the selected feature can be moved to the position after the current feature.
void XGUI_Workshop::moveObjects | ( | const bool | theSplit | ) |
Move selected features to be after the current feature.
void XGUI_Workshop::recoverFeature | ( | ) |
Start a "Recover" feature on the selected one.
bool XGUI_Workshop::canBeShaded | ( | const ObjectPtr & | theObject | ) | const |
Returns true if the object can be shaded.
If the object is a compsolid result, the method checks subobjects of the result
bool XGUI_Workshop::canChangeProperty | ( | const QString & | theActionName | ) | const |
Returns true if there is at least one selected body/construction/group result.
theActionName | text of the checked action |
void XGUI_Workshop::changeColor | ( | const QObjectPtrList & | theObjects | ) |
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 XGUI_Workshop::changeAutoColor | ( | const QObjectPtrList & | theObjects | ) |
Change Autocolor of the results if it is possible The operation is available for group results theObjects a list of selected objects.
void XGUI_Workshop::changeDeflection | ( | 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 XGUI_Workshop::changeTransparency | ( | 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 XGUI_Workshop::changeIsoLines | ( | const QObjectPtrList & | theObjects | ) |
Change number of iso-lines for the given objects theObjects a list of selected objects.
void XGUI_Workshop::showObjects | ( | const QObjectPtrList & | theList, |
bool | isVisible | ||
) |
Show the given features in 3d Viewer.
void XGUI_Workshop::showOnlyObjects | ( | const QObjectPtrList & | theList | ) |
Show the given features in 3d Viewer.
void XGUI_Workshop::setDisplayMode | ( | const QObjectPtrList & | theList, |
int | theMode | ||
) |
Set display mode for the given objects.
theList | a list of displayed objects |
theMode | a mode to set (see XGUI_Displayer) |
void XGUI_Workshop::toggleEdgesDirection | ( | const QObjectPtrList & | theList | ) |
Toggle visualisation of edges direction.
void XGUI_Workshop::toggleBringToFront | ( | const QObjectPtrList & | theList | ) |
Toggle state of display priority (normal/in front)
void XGUI_Workshop::setViewerSelectionMode | ( | int | theMode | ) |
Set selection mode in viewer.
If theMode=-1 then activate default mode
theMode | the selection mode (according to TopAbs_ShapeEnum) |
void XGUI_Workshop::activateObjectsSelection | ( | const QObjectPtrList & | theList | ) |
Activates current selection mode for the given list of objects.
|
inline |
Returns current module.
|
inline |
Returns current file.
|
inline |
Returns current file.
void XGUI_Workshop::saveDocument | ( | const QString & | theName, |
std::list< std::string > & | theFileNames | ||
) |
Save the current document into a directory.
theName | - path to the directory |
theFileNames | - returned file names created in this directory |
bool XGUI_Workshop::abortAllOperations | ( | ) |
If there is an active (uncommitted) operation shows a prompt to abort it and performs abortion if user agreed.
Returns true if
void XGUI_Workshop::operationStarted | ( | ModuleBase_Operation * | theOperation | ) |
Updates workshop state according to the started operation, e.g.
visualizes the property panel and connect to it.
theOpertion | a started operation |
< No need for property panel
bool XGUI_Workshop::deleteFeatures | ( | const QObjectPtrList & | theFeatures | ) |
Delete features.
Delete the referenced features. There can be a question with a list of referenced objects.
theFeatures | a list of objects to be deleted |
void XGUI_Workshop::deactivateActiveObject | ( | const ObjectPtr & | theObject, |
const bool | theUpdateViewer | ||
) |
Deactivates the object, if it is active and the module returns that the activation of selection for the object is not possible currently(the current operation uses it)
theObject | an object |
theUpdateViewer | a boolean flag to update viewer immediately |
bool XGUI_Workshop::isFeatureOfNested | ( | const FeaturePtr & | theFeature | ) |
Returns true if the action of the feature is created to contain Accept/Cancel button.
theFeature | a feature |
void XGUI_Workshop::setStatusBarMessage | ( | const QString & | theMessage | ) |
Shows the message in the status bar.
theMessage | a message |
void XGUI_Workshop::fillPropertyPanel | ( | ModuleBase_Operation * | theOperation | ) |
Update the property panel content by the XML description of the operation and set the panel into the operation.
theOperation | an operation |
void XGUI_Workshop::connectToPropertyPanel | ( | const bool | isToConnect | ) |
Connects or disconnects to the value changed signal of the property panel widgets.
isToConnect | a boolean value whether connect or disconnect |
|
inline |
Returns defailt selection mode in 3d viewer.
void XGUI_Workshop::highlightResults | ( | const QObjectPtrList & | theObjects | ) |
Highlights result objects in Object Browser according to features found in the given list.
void XGUI_Workshop::highlightFeature | ( | const QObjectPtrList & | theObjects | ) |
Highlights feature objects in Object Browser according to features found in the given list.
|
inline |
Returns Data Model XML reader which contains information about Data structure configuration.
void XGUI_Workshop::openFile | ( | const QString & | theDirectory | ) |
Closes all in the current session and load the directory.
theDirectory | a path to directory |
void XGUI_Workshop::updateColorScaleVisibility | ( | ) |
The method updates a Color Scale object in the viewer.
void XGUI_Workshop::updateGroupsText | ( | ) |
The method updates a Text of Group names in the viewer.
|
signal |
Emitted when selection happens in Salome viewer.
|
signal |
the signal about the workshop actions states are updated.
|
signal |
the application is started
|
signal |
Signal to update Undo history list.
|
signal |
Signal to update Redo history list.
|
slot |
Update of commands status.
|
slot |
update history list (undo/redo commands)
|
slot |
Save current document.
|
slot |
Save current document to a file selected by user.
|
slot |
Undo last command.
|
slot |
Redo previous command.
|
slot |
Validates the operation to change the "Apply" button state.
thePreviousState | the previous state of the widget |
|
slot |
Calls activate of the current widget again.
It is possible that selection filters are differs in the new state of paged container
|
slot |
Listens the corresponded signal of model widget and updates Apply button state by feature.
|
slot |
Show dock widget panel.
<! Restore ability to close panel from the window's menu
|
slot |
Hide dock widget panel.
<! Do not allow to show empty property panel
|
slot |
Show object Browser.
|
slot |
Hide object Browser.
|
slot |
Close document.
|
slot |
Open document from file.
|
slot |
Create a new document.
|
slot |
Import part structure from a file.
|
slot |
Import shape from a file.
|
slot |
Import image from a file.
|
slot |
Export features to a file.
|
slot |
Export a shape to a file.
|
slot |
Exit application.
|
slot |
Open preferences dialog box.
|
slot |
A slot calleon toggle of auto-compute button.
|
slot |
Activates/deactivates the trihedron in the viewer AIS context.
|
slot |
Apply the current transparency value if preview in transparency dialog is switched on.
|
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.
theOperation | an operation |
|
static |
A constant string used for "Move to end" command definition It is used for specific processing of Undo/Redo for this command.
|
static |
A constant string used for "Move to end and split" command definition It is used for specific processing of Undo/Redo for this command.