31 #include <SalomeApp_Module.h>
32 #include <SalomeApp_Application.h>
33 #include "SUIT_Session.h"
34 #include "SUIT_ResourceMgr.h"
36 #include <QxScene_ViewManager.h>
37 #include <QxScene_ViewModel.h>
38 #include <QxScene_ViewWindow.h>
39 #include <QtxActionToolMgr.h>
47 using namespace YACS::HMI;
49 SuitWrapper::SuitWrapper(
QObject* wrapped) : _wrapped(wrapped)
69 QxScene_ViewWindow *svw =
dynamic_cast<QxScene_ViewWindow*
>(viewWindow);
74 QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::FitAllId),
75 SIGNAL(triggered(
bool)),
76 svw, SLOT(onViewFitAll()));
77 QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::FitAllId),
78 SIGNAL(triggered(
bool)),
79 wgv, SLOT(onViewFitAll()));
81 QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::FitRectId),
82 SIGNAL(triggered(
bool)),
83 svw, SLOT(onViewFitArea()));
84 QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::FitRectId),
85 SIGNAL(triggered(
bool)),
86 wgv, SLOT(onViewFitArea()));
88 QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::ZoomId),
89 SIGNAL(triggered(
bool)),
90 svw, SLOT(onViewZoom()));
91 QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::ZoomId),
92 SIGNAL(triggered(
bool)),
93 wgv, SLOT(onViewZoom()));
95 QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::PanId),
96 SIGNAL(triggered(
bool)),
97 svw, SLOT(onViewPan()));
98 QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::PanId),
99 SIGNAL(triggered(
bool)),
100 wgv, SLOT(onViewPan()));
102 QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::GlobalPanId),
103 SIGNAL(triggered(
bool)),
104 svw, SLOT(onViewGlobalPan()));
105 QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::GlobalPanId),
106 SIGNAL(triggered(
bool)),
107 wgv, SLOT(onViewGlobalPan()));
109 QObject::disconnect(svw->toolMgr()->action(QxScene_ViewWindow::ResetId),
110 SIGNAL(triggered(
bool)),
111 svw, SLOT(onViewReset()));
112 QObject::connect(svw->toolMgr()->action(QxScene_ViewWindow::ResetId),
113 SIGNAL(triggered(
bool)),
114 wgv, SLOT(onViewReset()));
131 const QString& toolTip,
134 const QString& status,
142 return module->
wCreateAction(
id, toolTip, icon, menu, status, shortCut,
143 parent, checkable, receiver, member);
147 const int parentMenuId,
153 return module->
wCreateMenu(subMenu, parentMenuId, menuId, groupId, index);
157 const QString& parentMenu,
163 return module->
wCreateMenu(subMenu, parentMenu, menuId, groupId, index);
172 return module->
wCreateMenu(actionId, menuId, groupId, index);
181 return module->
wCreateMenu(actionId, menu, groupId, index);
191 return module->
wCreateMenu(action, menuId, actionId, groupId, index);
201 return module->
wCreateMenu(action, menu, actionId, groupId, index);
215 return module->
wCreateTool(actionId, toolbarId, index);
219 const QString& toolbar,
223 return module->
wCreateTool(actionId, toolbar, index);
232 return module->
wCreateTool(action, toolbarId, actionId, index);
236 const QString& toolbar,
241 return module->
wCreateTool(action, toolbar, actionId, index);
252 module->setMenuShown(act, show);
258 module->setToolShown(act, show);
269 const QString& newName,
283 const QString& runName,
294 SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
296 dirList = resMgr->stringValue(
"FileDlg",
"QuickDirList" ).split(
';', QString::SkipEmptyParts );
302 LightApp_Application*
app = (LightApp_Application*)( SUIT_Session::session()->activeApplication() );
304 app->onHelpContextModule( theComponentName, theFileName, theContext );