23 #include <SalomeApp_Application.h>
24 #include <QxScene_ViewManager.h>
25 #include <QxScene_ViewModel.h>
26 #include <QxScene_ViewWindow.h>
27 #include <CAM_DataModel.h>
28 #include <SUIT_Study.h>
30 #include <SUIT_DataBrowser.h>
31 #include <QtxTreeView.h>
32 #include <SUIT_DataObject.h>
52 SUIT_ViewManager *svm = 0;
54 svm = getApp()->getViewManager(QxScene_Viewer::Type(),
true);
56 svm = getApp()->createViewManager(QxScene_Viewer::Type());
57 SUIT_ViewWindow* svw = svm->getActiveView();
58 QxScene_ViewWindow *aView = 0;
60 if (!svw) svw = svm->createViewWindow();
61 if (svw) aView =
dynamic_cast<QxScene_ViewWindow*
>(svw);
62 if (aView) existingScene = aView->getScene();
65 svw = svm->createViewWindow();
66 if (svw) aView =
dynamic_cast<QxScene_ViewWindow*
>(svw);
69 aView->setScene(scene);
75 QxScene_ViewWindow* viewWindow)
77 viewWindow->setSceneView(gView);
78 viewWindow->setCentralWidget(gView);
79 return viewWindow->getViewManager()->study()->id();
84 return getApp()->activeStudy()->id();
91 QWidget* wid = getApp()->objectBrowser()->treeView();
97 QDockWidget* dock = 0;
99 while ( w && !dock ) {
100 dock = ::qobject_cast<QDockWidget*>(
w );
101 w = w->parentWidget();
109 const QString& toolTip,
112 const QString& status,
119 return createAction(
id, toolTip, icon, menu, status, shortCut,
120 parent, checkable, receiver, member);
124 const int parentMenuId,
129 return createMenu(subMenu, parentMenuId, menuId, groupId, index);
133 const QString& parentMenu,
138 return createMenu(subMenu, parentMenu, menuId, groupId, index);
146 return createMenu(actionId, menuId, groupId, index);
154 return createMenu(actionId, menu, groupId, index);
163 return createMenu(action, menuId, actionId, groupId, index);
172 return createMenu(action, menu, actionId, groupId, index);
177 return createTool(title, name);
184 return createTool(actionId, toolbarId, index);
188 const QString& toolbar,
191 return createTool(actionId, toolbar, index);
199 return createTool(action, toolbarId, actionId, index);
203 const QString& toolbar,
207 return createTool(action, toolbar, actionId, index);