20 #ifndef XGUI_WORKSHOP_H
21 #define XGUI_WORKSHOP_H
25 #include <ModelAPI_Document.h>
26 #include <ModelAPI_Feature.h>
27 #include <ModelAPI_ResultBody.h>
29 #include <ModuleBase_ActionInfo.h>
30 #include <ModuleBase_ActionType.h>
31 #include <ModuleBase_Definitions.h>
33 #include <SelectMgr_ListOfFilter.hxx>
37 #include <QKeySequence>
39 #include <QTemporaryDir>
42 class AppElements_Command;
43 class AppElements_MainWindow;
44 class AppElements_Workbench;
62 class XGUI_SalomeViewer;
92 void startApplication();
95 void activateModule();
98 void deactivateModule();
102 AppElements_MainWindow*
mainWindow()
const {
return myMainWindow; }
105 AppElements_Workbench* addWorkbench(
const QString& theName);
157 void salomeViewerSelectionChanged();
168 QMainWindow* desktop()
const;
174 virtual bool prepareForDisplay(
const std::set<ObjectPtr>& theObjects)
const;
177 void deleteObjects();
186 bool canMoveFeature();
189 void moveObjects(
const bool theSplit);
192 void recoverFeature();
197 bool canBeShaded(
const ObjectPtr& theObject)
const;
202 bool canChangeProperty(
const QString& theActionName)
const;
207 void changeColor(
const QObjectPtrList& theObjects);
212 void changeAutoColor(
const QObjectPtrList& theObjects);
217 void changeDeflection(
const QObjectPtrList& theObjects);
222 void changeTransparency(
const QObjectPtrList& theObjects);
226 void changeIsoLines(
const QObjectPtrList& theObjects);
229 void showObjects(
const QObjectPtrList& theList,
bool isVisible);
232 void showOnlyObjects(
const QObjectPtrList& theList);
237 void setDisplayMode(
const QObjectPtrList& theList,
int theMode);
240 void toggleEdgesDirection(
const QObjectPtrList& theList);
243 void toggleBringToFront(
const QObjectPtrList& theList);
247 void setViewerSelectionMode(
int theMode);
250 void activateObjectsSelection(
const QObjectPtrList& theList);
264 void saveDocument(
const QString& theName, std::list<std::string>& theFileNames);
270 bool abortAllOperations();
280 bool deleteFeatures(
const QObjectPtrList& theFeatures);
286 void deactivateActiveObject(
const ObjectPtr& theObject,
const bool theUpdateViewer);
290 bool isFeatureOfNested(
const FeaturePtr& theFeature);
294 void setStatusBarMessage(
const QString& theMessage);
298 void synchronizeViewer();
304 void synchronizeGroupInViewer(
const DocumentPtr& theDoc,
305 bool theUpdateViewer);
307 void synchronizeResultTree(
const ResultBodyPtr& theRes,
bool theUpdateViewer);
317 void connectToPropertyPanel(
const bool isToConnect);
324 void highlightResults(
const QObjectPtrList& theObjects);
328 void highlightFeature(
const QObjectPtrList& theObjects);
343 void openFile(
const QString& theDirectory);
345 void updateAutoComputeState();
347 void deactivateCurrentSelector();
350 void updateColorScaleVisibility();
353 void updateGroupsText();
355 void showHelpPage(
const QString& thePage)
const;
375 void updateCommandStatus();
378 void updateHistory();
387 void onUndo(
int times = 1);
390 void onRedo(
int times = 1);
394 void onWidgetStateChanged(
int thePreviousState);
398 void onValuesChanged();
401 void onWidgetObjectUpdated();
410 void showObjectBrowser();
413 void hideObjectBrowser();
416 void closeDocument();
428 void onImportShape();
431 void onImportImage();
437 void onExportShape();
444 void onPreferences();
451 void onTrihedronVisibilityChanged(
bool theState);
454 void onTransparencyValueChanged();
465 void displayDocumentResults(DocumentPtr theDoc);
468 void displayGroupResults(DocumentPtr theDoc, std::string theGroup);
471 void insertFeatureFolder();
474 void insertToFolder(
bool isBefore);
477 void moveOutFolder(
bool isBefore);
501 void onContextMenuCommand(
const QString& theId,
bool isChecked);
504 void onStartWaiting();
508 void onAcceptActionClicked();
512 void onAcceptPlusActionClicked();
516 void onPreviewActionClicked();
519 void onHelpActionClicked()
const;
522 void onDockSizeChanged();
529 void registerValidators()
const;
543 void createDockWidgets();
550 void addHistoryMenu(
QObject* theObject,
const char* theSignal,
const char* theSlot);
553 QList<ActionInfo> processHistoryList(
const std::list<std::string>&)
const;
558 void processUndoRedo(
const ModuleBase_ActionType theActionType,
int theTimes);
561 void clearTemporaryDir();
565 void setNormalView(
bool toInvert =
false);
569 AppElements_MainWindow* myMainWindow;
590 QString myCurrentFile;
591 QIntList myViewerSelMode;
594 QTemporaryDir myTmpDir;
Class that reads data model definition XML for further processing in the XGUI_DataModel.
Definition: Config_DataModelReader.h:36
Interface to a module.
Definition: ModuleBase_IModule.h:70
A Base object for definition of connector object to Salome Viewer.
Definition: ModuleBase_IViewer.h:47
Base class for all operations.
Definition: ModuleBase_Operation.h:53
class XGUI_ActionsMgrA class for management of actions (features) activation/deactivation
Definition: XGUI_ActionsMgr.h:45
Interface of providing only one active control for workshop.
Definition: XGUI_ActiveControlMgr.h:38
Displayer.
Definition: XGUI_Displayer.h:172
A class of dialog to show error message.
Definition: XGUI_ErrorDialog.h:34
Class of Errors manager object.
Definition: XGUI_ErrorMgr.h:42
A Hide Faces panel for making it possible to hide faces in the 3D view.
Definition: XGUI_FacesPanel.h:73
A class which represents an inspection panel: to show content of currently selected objects.
Definition: XGUI_InspectionPanel.h:55
Implementation of IWorkshop interface which provides access to Workshop services at module level.
Definition: XGUI_ModuleConnector.h:35
Object browser window object.
Definition: XGUI_ObjectsBrowser.h:149
Operation manager.
Definition: XGUI_OperationMgr.h:49
Realization of Property panel object.
Definition: XGUI_PropertyPanel.h:61
An interface which provides a connection of XGUI functionality with functionality of SALOME module in...
Definition: XGUI_SalomeConnector.h:40
A class which implements activation/deactivate selection modes and using selection filters.
Definition: XGUI_SelectionActivate.h:41
Selection manager.
Definition: XGUI_SelectionMgr.h:46
Proxy class which repersents or AppElements_Viewer or Salome Viewer dependently on current launching ...
Definition: XGUI_ViewerProxy.h:49
Class which process the events from the event loop.
Definition: XGUI_WorkshopListener.h:47
Class which defines a configuration of the application (Workshop) and launches it.
Definition: XGUI_Workshop.h:82
const Config_DataModelReader * dataModelXMLReader() const
Returns Data Model XML reader which contains information about Data structure configuration.
Definition: XGUI_Workshop.h:332
void salomeViewerSelection()
Emitted when selection happens in Salome viewer.
AppElements_MainWindow * mainWindow() const
Returns main window (Desktop) of the application.
Definition: XGUI_Workshop.h:102
void updateRedoHistory(const QList< ActionInfo > &)
Signal to update Redo history list.
bool isSalomeMode() const
Returns true if the application works as SALOME module.
Definition: XGUI_Workshop.h:151
XGUI_ContextMenuMgr * contextMenuMgr() const
Returns context menu manager object.
Definition: XGUI_Workshop.h:142
XGUI_ObjectsBrowser * objectBrowser() const
Returns Object browser.
Definition: XGUI_Workshop.h:154
void applicationStarted()
the application is started
QString currentDataFile() const
Returns current file.
Definition: XGUI_Workshop.h:256
static QString MOVE_TO_END_SPLIT_COMMAND
A constant string used for "Move to end and split" command definition It is used for specific process...
Definition: XGUI_Workshop.h:339
void setCurrentDataFile(const QString &theDir)
Returns current file.
Definition: XGUI_Workshop.h:259
XGUI_SelectionMgr * selector() const
Returns selection manager object.
Definition: XGUI_Workshop.h:109
XGUI_InspectionPanel * inspectionPanel() const
Returns property panel widget.
Definition: XGUI_Workshop.h:136
static QString MOVE_TO_END_COMMAND
A constant string used for "Move to end" command definition It is used for specific processing of Und...
Definition: XGUI_Workshop.h:336
XGUI_ViewerProxy * viewer() const
Returns viewer which unifies access as to Salome viewer as to standalone viewer.
Definition: XGUI_Workshop.h:160
XGUI_ActiveControlMgr * activeControlMgr() const
Returns an active control manager.
Definition: XGUI_Workshop.h:127
XGUI_ModuleConnector * moduleConnector() const
Returns the module connector.
Definition: XGUI_Workshop.h:164
XGUI_ErrorMgr * errorMgr() const
Returns error manager.
Definition: XGUI_Workshop.h:121
QIntList viewerSelectionModes() const
Returns defailt selection mode in 3d viewer.
Definition: XGUI_Workshop.h:320
XGUI_OperationMgr * operationMgr() const
Returns operation manager.
Definition: XGUI_Workshop.h:118
XGUI_SelectionActivate * selectionActivate() const
Returns selection activating object.
Definition: XGUI_Workshop.h:112
XGUI_SalomeConnector * salomeConnector() const
Returns an object which provides interface to Salome Module (LightApp_Module)
Definition: XGUI_Workshop.h:145
XGUI_MenuMgr * menuMgr() const
Returns an actions manager.
Definition: XGUI_Workshop.h:130
void updateUndoHistory(const QList< ActionInfo > &)
Signal to update Undo history list.
XGUI_ActionsMgr * actionsMgr() const
Returns an actions manager.
Definition: XGUI_Workshop.h:124
XGUI_PropertyPanel * propertyPanel() const
Returns property panel widget.
Definition: XGUI_Workshop.h:133
XGUI_FacesPanel * facesPanel() const
Returns panel for hide object faces.
Definition: XGUI_Workshop.h:139
XGUI_Displayer * displayer() const
Returns displayer.
Definition: XGUI_Workshop.h:115
ModuleBase_IModule * module() const
Returns current module.
Definition: XGUI_Workshop.h:253
void commandStatusUpdated()
the signal about the workshop actions states are updated.