23 #include "SHAPER_SHAPERGUI.h"
24 #include "SHAPERGUI_SalomeViewer.h"
26 #include <LightApp_Module.h>
27 #include <XGUI_SalomeConnector.h>
29 #include <ModuleBase_ActionInfo.h>
37 class OCCViewer_Viewer;
58 virtual void initialize(CAM_Application* theApp);
61 virtual void windows(QMap<int, int>& theWndMap)
const;
64 virtual void viewManagers(QStringList& theList)
const;
67 virtual void selectionChanged();
72 const QString& theWorkBenchID,
73 const QString& theWorkBenchName,
74 const QString& theToolBarName,
75 const QString& theActionIdLastToken,
76 const QString& theActionTitle,
77 const QString& theActionToolTip,
78 const QString& theActionStatusTip,
79 const QIcon& theActionIcon,
80 const QKeySequence& theKS,
81 const bool theIsCheckable,
82 const bool theAddSeparator
85 virtual QAction*
addFeature(
const QString& theWBName,
const QString& theTBName,
86 const QString& theIdLastToken,
const QString& theTitle,
87 const QString& theTip,
const QIcon& theIcon,
88 const QKeySequence& theKeys,
89 const bool theIsCheckable ,
const bool theAddSeparator,
90 const QString& theStatusTip );
93 virtual QAction*
addFeature(
const QString& theWBName,
const ActionInfo& theInfo,
const bool theAddSeparator);
101 const QList<QAction*>& theNestedActions);
109 virtual QAction*
addDesktopCommand(
const QString& theId,
const QString& theTitle,
110 const QString& theTip,
const QIcon& theIcon,
111 const QKeySequence& theKeys,
bool isCheckable,
112 const char* theMenuSourceText,
const QString& theSubMenu = QString(),
113 const int theMenuPosition = 10,
114 const int theSuibMenuPosition = -1) Standard_OVERRIDE;
117 const int theMenuPosition = 10);
122 virtual bool addActionInToolbar( QAction* theAction,
const QString& theToolBarTitle );
127 virtual QMainWindow*
desktop()
const;
133 const std::shared_ptr<Config_FeatureMessage>& theMessage);
138 virtual std::shared_ptr<Config_FeatureMessage>
featureInfo(
const QString& theFeatureId);
143 return myProxyViewer;
153 virtual void contextMenuPopup(
const QString& theClient,
QMenu* theMenu, QString& theTitle);
159 virtual void preferencesChanged(
const QString& theSection,
const QString& theParam);
165 virtual void putInfo(
const QString& theInfo,
const int theMSecs = 0);
173 virtual void updateModuleVisibilityState();
182 QIntList getFreeCommands()
const;
186 {
return (myDefaultToolbars.size() == 0)? myToolbars : myDefaultToolbars; }
188 void resetToolbars();
190 void publishToStudy();
192 virtual void updateInfoPanel();
195 void backupDone(QString aName,
int aResult);
205 virtual bool activateModule(SUIT_Study* theStudy);
209 virtual bool deactivateModule(SUIT_Study* theStudy);
214 virtual void onViewManagerAdded(SUIT_ViewManager* theMgr);
218 virtual void onViewManagerRemoved(SUIT_ViewManager* theMgr);
221 void onDefaultPreferences();
224 void onScriptLoaded();
227 void onSaveDocByShaper();
230 void onSaveAsDocByShaper();
236 void onBackupDone(QString aName,
int aResult);
239 void onUpdateCommandStatus();
242 virtual void logShaperGUIEvent();
246 CAM_DataModel* createDataModel();
249 virtual QtxPopupMgr* popupMgr();
252 virtual bool abortAllOperations();
258 void onWhatIs(
bool isToggled);
260 void onEditToolbars();
270 void registerCommandToolbar(
const QString& theToolName,
int theCommandId);
272 int getNextCommandId()
const;
275 void updateToolbars(
const QMap<QString, QIntList>& theNewToolbars);
277 void saveToolbarsConfig();
278 void loadToolbarsConfig();
281 void fillPartSetInfoPanel(QtxInfoPanel* theInfoPanel);
284 void fillPartInfoPanel(QtxInfoPanel* theInfoPanel);
287 void fillSketcherInfoPanel(QtxInfoPanel* theInfoPanel);
290 void addActionsToInfoGroup(QtxInfoPanel* theInfoPanel,
const QString& theGroup,
const QSet<QString>& theActions);
292 void hideInternalWindows();
295 void checkForWaitingBackup();
298 QStringList myNestedActionsList;
310 QMap<QString, std::shared_ptr<Config_FeatureMessage> > myFeaturesInfo;
317 bool myIsEditEnabled;
320 QtxPopupMgr* myPopupMgr;
322 QAction* myWhatIsAction;
324 bool myIsInspectionVisible;
326 bool myIsFacesPanelVisible;
329 QIntList myActionsList;
330 QMap<QString, QIntList> myToolbars;
331 QMap<QString, QIntList> myDefaultToolbars;
332 bool myIsToolbarsModified;
334 std::vector<int> myOldSelectionColor;
335 Handle(Graphic3d_AspectMarker3d) myHighlightPointAspect;
337 double myAxisArrowRate;
340 QTimer* myBackupTimer;
341 std::future<int> myBackupResult;
342 QString myBackupError;
343 QString myBackupFolder;
344 QString myLastBackupFolder;
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
Redefinition of standard OCC selector in order to adapt it to SHAPER needs.
Definition: SHAPERGUI_OCCSelector.h:32
A class for providing access of SHAPERGUI functionality to SALOME viewer functionality.
Definition: SHAPERGUI_SalomeViewer.h:82
An implementation of SALOME connector class for implementation of XGUI functionality as a module of S...
Definition: SHAPERGUI.h:48
QIntList shaperActions() const
Returns list of the module commands.
Definition: SHAPERGUI.h:176
virtual ModuleBase_IViewer * viewer() const
Returns interface to Salome viewer.
Definition: SHAPERGUI.h:141
void setIsOpened(bool theOpened)
Set flag about opened document state.
Definition: SHAPERGUI.h:171
QMap< QString, QIntList > shaperToolbars() const
Returns structure of tool bars.
Definition: SHAPERGUI.h:179
QMap< QString, QIntList > defaultToolbars() const
Returns structure of default tool bars.
Definition: SHAPERGUI.h:185
XGUI_Workshop * workshop() const
Definition: SHAPERGUI.h:168
An interface which provides a connection of XGUI functionality with functionality of SALOME module in...
Definition: XGUI_SalomeConnector.h:40
virtual void setFeatureInfo(const QString &theFeatureId, const std::shared_ptr< Config_FeatureMessage > &theMessage)=0
Stores XML information for the feature kind.
virtual QAction * addFeatureOfNested(const QString &theWBName, const ActionInfo &theInfo, const QList< QAction * > &theNestedActions)=0
Creates a feature (command) in SALOME desktop.
virtual void addDesktopMenuSeparator(const char *theMenuSourceText, const int theMenuPosition=10)=0
Insert separator into Edit menu of SALOME desktop.
virtual bool isFeatureOfNested(const QAction *theAction)=0
Returns true if the feature action is a nested action, in other words, it is created by addFeatureOfN...
virtual QAction * addFeature(const QString &theWBName, const QString &theTBName, const QString &theId, const QString &theTitle, const QString &theTip, const QIcon &theIcon, const QKeySequence &theKeys, bool isCheckable, const bool isAddSeparator, const QString &theStatusTip)=0
Creates a feature (command) in SALOME desktop.
virtual void createFeatureActions()=0
Creates menu/tool bar actions for loaded features stored in the menu manager.
virtual std::shared_ptr< Config_FeatureMessage > featureInfo(const QString &theFeatureId)=0
Returns XML information for the feature kind.
virtual void putInfo(const QString &theInfo, const int theMSecs=0)=0
Shows the given text in status bar as a permanent text \theInfo a string value \theMsecs interval of ...
virtual QAction * addDesktopCommand(const QString &theId, const QString &theTitle, const QString &theTip, const QIcon &theIcon, const QKeySequence &theKeys, bool isCheckable, const char *theMenuSourceText, const QString &theSubMenu=QString(), const int theMenuPosition=10, const int theSuibMenuPosition=-1)=0
Creates a command in Edit menu of SALOME desktop.
virtual void createPreferences()=0
Create preferences.
virtual QList< QAction * > commandList() const =0
Returns list of defined actions (just by SHAPER module)
virtual bool addActionInToolbar(QAction *theAction, const QString &theToolBarTitle)=0
Add an action into tool bar.
virtual QMainWindow * desktop() const =0
Returns desktop window of SALOME.
Class which defines a configuration of the application (Workshop) and launches it.
Definition: XGUI_Workshop.h:83
Definition: ModuleBase_ActionInfo.h:37