Version: 8.3.0
SalomeWrap_Module.hxx
Go to the documentation of this file.
1 // Copyright (C) 2006-2016 CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef _SALOMEWRAP_MODULE_HXX_
21 #define _SALOMEWRAP_MODULE_HXX_
22 
23 #include "SalomeWrapExport.hxx"
24 
25 #include <SalomeApp_Module.h>
26 #include <SALOMEconfig.h>
27 
28 #include <QGraphicsScene>
29 #include <QGraphicsView>
30 #include <QDockWidget>
31 
32 #include <map>
33 
34 class SalomeApp_Application;
35 class QxScene_ViewWindow;
36 
38 
40 {
41  Q_OBJECT
42 
43 public:
44  SalomeWrap_Module(const char* name);
45 
46  QxScene_ViewWindow* getNewWindow(QGraphicsScene *scene);
47 
48  int AssociateViewToWindow(QGraphicsView* gView,
49  QxScene_ViewWindow* viewWindow);
50 
51  int activeStudyId();
52 
53  QDockWidget* objectBrowser();
54 
55  QAction* wCreateAction(const int id,
56  const QString& toolTip,
57  const QIcon& icon,
58  const QString& menu,
59  const QString& status,
60  const int shortCut,
61  QObject* parent =0,
62  bool checkable = false,
63  QObject* receiver =0,
64  const char* member =0);
65 
66  int wCreateMenu(const QString& subMenu,
67  const int parentMenuId,
68  const int menuId = -1,
69  const int groupId = -1,
70  const int index = -1);
71 
72  int wCreateMenu(const QString& subMenu,
73  const QString& parentMenu,
74  const int menuId = -1,
75  const int groupId = -1,
76  const int index = -1);
77 
78  int wCreateMenu(const int actionId,
79  const int menuId,
80  const int groupId = -1,
81  const int index = -1);
82 
83  int wCreateMenu(const int actionId,
84  const QString& menu,
85  const int groupId = -1,
86  const int index = -1);
87 
88  int wCreateMenu(QAction* action,
89  const int menuId,
90  const int actionId = -1,
91  const int groupId = -1,
92  const int index = -1);
93 
94  int wCreateMenu(QAction* action,
95  const QString& menu,
96  const int actionId = -1,
97  const int groupId = -1,
98  const int index = -1);
99 
100  int wCreateTool(const QString& title,
101  const QString& name = QString());
102 
103  int wCreateTool(const int actionId,
104  const int toolbarId,
105  const int index = -1);
106 
107  int wCreateTool(const int actionId,
108  const QString& toolbar,
109  const int index = -1);
110 
111  int wCreateTool(QAction* action,
112  const int toolbarId,
113  const int actionId = -1,
114  const int index = -1);
115 
116  int wCreateTool(QAction* action,
117  const QString& toolbar,
118  const int actionId = -1,
119  const int index = -1);
120 
121  static QAction* wSeparator();
122 
123  SalomeWrap_DataModel* getDataModel();
124 
125 protected:
126  virtual CAM_DataModel* createDataModel();
127 
128  std::map<QGraphicsScene*, QxScene_ViewWindow*> _mapOfViewWindow;
129 
130 };
131 
132 #endif