1 #ifndef XGUI_SALOMECONNECTOR_H
2 #define XGUI_SALOMECONNECTOR_H
6 #include <AIS_InteractiveContext.hxx>
12 * An interface which provides a connection of XGUI functionality
13 * with functionality of SALOME module interface.
15 class XGUI_EXPORT XGUI_SalomeConnector
18 //! Creates a feature (command) in SALOME desktop
19 //! \param theWBName - a workbench name
20 //! \param theId - an id of the feature
21 //! \param theTitle - a menu item string
22 //! \param theTip - a tooltip string (help)
23 //! \param theIcon - icon
24 //! \param isCheckable - is checkable or not
25 //! \param reciever - QObject which will react on the command call
26 //! \param member - a method of receiver which will be called on the command
27 //! \param theKeys - hot keys
28 virtual void addFeature(const QString& theWBName,
30 const QString& theTitle,
31 const QString& theTip,
36 const QKeySequence& theKeys) = 0;
38 //! Creates a command in Edit menu of SALOME desktop
39 //! \param theId - an id of the feature
40 //! \param theTitle - a menu item string
41 //! \param theTip - a tooltip string (help)
42 //! \param theIcon - icon
43 //! \param isCheckable - is checkable or not
44 //! \param reciever - QObject which will react on the command call
45 //! \param member - a method of receiver which will be called on the command
46 //! \param theKeys - hot keys
47 virtual void addEditCommand(const QString& theId,
48 const QString& theTitle,
49 const QString& theTip,
54 const QKeySequence& theKeys) = 0;
56 //! Insert separator into Edit menu of SALOME desktop
57 virtual void addEditMenuSeparator() = 0;
59 //! Returns desktop window of SALOME
60 virtual QMainWindow* desktop() const = 0;
62 //! Returns command string Id by QAction instance
63 virtual QString commandId(const QAction* theCmd) const = 0;
65 //! Returns QAction instance by command string Id
66 virtual QAction* command(const QString& theId) const = 0;
68 //! Returns AIS_InteractiveContext from current OCCViewer
69 virtual Handle(AIS_InteractiveContext) AISContext() const = 0;