Version: 8.3.0
YACS::HMI::SuitWrapper Class Reference

viewer QGraphicsScene: deriver SUIT_ViewModel comme QxGraph_Viewer More...

#include <SuitWrapper.hxx>

Collaboration diagram for YACS::HMI::SuitWrapper:

Public Member Functions

 SuitWrapper (QObject *wrapped)
 
virtual ~SuitWrapper ()
 
QWidgetgetNewWindow (QGraphicsScene *scene)
 
int AssociateViewToWindow (QGraphicsView *gView, QWidget *viewWindow)
 
int activeStudyId ()
 
QDockWidget * objectBrowser ()
 
QAction * createAction (const int id, const QString &toolTip, const QIcon &icon, const QString &menu, const QString &status, const int shortCut, QObject *parent=0, bool checkable=false, QObject *receiver=0, const char *member=0)
 
int createMenu (const QString &subMenu, const int parentMenuId, const int menuId=-1, const int groupId=-1, const int index=-1)
 
int createMenu (const QString &subMenu, const QString &parentMenu, const int menuId=-1, const int groupId=-1, const int index=-1)
 
int createMenu (const int actionId, const int menuId, const int groupId=-1, const int index=-1)
 
int createMenu (const int actionId, const QString &menu, const int groupId=-1, const int index=-1)
 
int createMenu (QAction *action, const int menuId, const int actionId=-1, const int groupId=-1, const int index=-1)
 
int createMenu (QAction *action, const QString &menu, const int actionId=-1, const int groupId=-1, const int index=-1)
 
int createTool (const QString &title, const QString &name=QString())
 
int createTool (const int actionId, const int toolbarId, const int index=-1)
 
int createTool (const int actionId, const QString &toolbar, const int index=-1)
 
int createTool (QAction *action, const int toolbarId, const int actionId=-1, const int index=-1)
 
int createTool (QAction *action, const QString &toolbar, const int actionId=-1, const int index=-1)
 
void setMenuShown (QAction *act, bool show)
 
void setToolShown (QAction *act, bool show)
 
void createNewSchema (const QString &schemaName, QWidget *viewWindow)
 
bool renameSchema (const QString &oldName, const QString &newName, QWidget *viewWindow)
 
bool deleteSchema (QWidget *viewWindow)
 
void createNewRun (const QString &schemaName, const QString &runName, QWidget *refWindow, QWidget *viewWindow)
 
QStringList getQuickDirList ()
 
virtual void onHelpContextModule (const QString &, const QString &, const QString &=QString())
 

Static Public Member Functions

static QAction * separator ()
 

Protected Attributes

QObject_wrapped
 

Detailed Description

viewer QGraphicsScene: deriver SUIT_ViewModel comme QxGraph_Viewer

wrapping for SalomeApp_Module

Definition at line 42 of file SuitWrapper.hxx.

Constructor & Destructor Documentation

SuitWrapper::SuitWrapper ( QObject wrapped)

Definition at line 49 of file SuitWrapper.cxx.

49  : _wrapped(wrapped)
50 {
51 }
SuitWrapper::~SuitWrapper ( )
virtual

Definition at line 53 of file SuitWrapper.cxx.

54 {
55 }

Member Function Documentation

int SuitWrapper::activeStudyId ( )

Definition at line 118 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::activeStudyId().

119 {
120  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
121  return module->activeStudyId();
122 }
int SuitWrapper::AssociateViewToWindow ( QGraphicsView gView,
QWidget viewWindow 
)

return studyId used in context delete when study is closed.

Definition at line 66 of file SuitWrapper.cxx.

References _wrapped, SalomeWrap_Module::AssociateViewToWindow(), and YASSERT.

67 {
68  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
69  QxScene_ViewWindow *svw = dynamic_cast<QxScene_ViewWindow*>(viewWindow);
70  YASSERT(svw);
71  int studyId = module->AssociateViewToWindow(gView, svw);
72  WrapGraphicsView* wgv = dynamic_cast<WrapGraphicsView*>(gView);
73  YASSERT(wgv);
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()));
80 
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()));
87 
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()));
94 
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()));
101 
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()));
108 
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()));
115  return studyId;
116 }
QAction * SuitWrapper::createAction ( const int  id,
const QString &  toolTip,
const QIcon &  icon,
const QString &  menu,
const QString &  status,
const int  shortCut,
QObject parent = 0,
bool  checkable = false,
QObject receiver = 0,
const char *  member = 0 
)

Definition at line 130 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::wCreateAction().

140 {
141  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
142  return module->wCreateAction(id, toolTip, icon, menu, status, shortCut,
143  parent, checkable, receiver, member);
144 }
int SuitWrapper::createMenu ( const QString &  subMenu,
const int  parentMenuId,
const int  menuId = -1,
const int  groupId = -1,
const int  index = -1 
)

Definition at line 146 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::wCreateMenu().

151 {
152  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
153  return module->wCreateMenu(subMenu, parentMenuId, menuId, groupId, index);
154 }
int SuitWrapper::createMenu ( const QString &  subMenu,
const QString &  parentMenu,
const int  menuId = -1,
const int  groupId = -1,
const int  index = -1 
)

Definition at line 156 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::wCreateMenu().

161 {
162  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
163  return module->wCreateMenu(subMenu, parentMenu, menuId, groupId, index);
164 }
int SuitWrapper::createMenu ( const int  actionId,
const int  menuId,
const int  groupId = -1,
const int  index = -1 
)

Definition at line 166 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::wCreateMenu().

170 {
171  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
172  return module->wCreateMenu(actionId, menuId, groupId, index);
173 }
int SuitWrapper::createMenu ( const int  actionId,
const QString &  menu,
const int  groupId = -1,
const int  index = -1 
)

Definition at line 175 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::wCreateMenu().

179 {
180  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
181  return module->wCreateMenu(actionId, menu, groupId, index);
182 }
int SuitWrapper::createMenu ( QAction *  action,
const int  menuId,
const int  actionId = -1,
const int  groupId = -1,
const int  index = -1 
)

Definition at line 184 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::wCreateMenu().

189 {
190  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
191  return module->wCreateMenu(action, menuId, actionId, groupId, index);
192 }
int SuitWrapper::createMenu ( QAction *  action,
const QString &  menu,
const int  actionId = -1,
const int  groupId = -1,
const int  index = -1 
)

Definition at line 194 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::wCreateMenu().

199 {
200  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
201  return module->wCreateMenu(action, menu, actionId, groupId, index);
202 }
void SuitWrapper::createNewRun ( const QString &  schemaName,
const QString &  runName,
QWidget refWindow,
QWidget viewWindow 
)

Definition at line 282 of file SuitWrapper.cxx.

References _wrapped, SalomeWrap_DataModel::createNewRun(), and SalomeWrap_Module::getDataModel().

286 {
287  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
288  module->getDataModel()->createNewRun(schemaName, runName, refWindow, viewWindow);
289 }
void SuitWrapper::createNewSchema ( const QString &  schemaName,
QWidget viewWindow 
)

Definition at line 261 of file SuitWrapper.cxx.

References _wrapped, SalomeWrap_DataModel::createNewSchema(), and SalomeWrap_Module::getDataModel().

263 {
264  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
265  module->getDataModel()->createNewSchema(schemaName, viewWindow);
266 }
int SuitWrapper::createTool ( const QString &  title,
const QString &  name = QString() 
)

Definition at line 204 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::wCreateTool().

205 {
206  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
207  return module->wCreateTool(title, name);
208 }
int SuitWrapper::createTool ( const int  actionId,
const int  toolbarId,
const int  index = -1 
)

Definition at line 210 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::wCreateTool().

213 {
214  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
215  return module->wCreateTool(actionId, toolbarId, index);
216 }
int SuitWrapper::createTool ( const int  actionId,
const QString &  toolbar,
const int  index = -1 
)

Definition at line 218 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::wCreateTool().

221 {
222  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
223  return module->wCreateTool(actionId, toolbar, index);
224 }
int SuitWrapper::createTool ( QAction *  action,
const int  toolbarId,
const int  actionId = -1,
const int  index = -1 
)

Definition at line 226 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::wCreateTool().

230 {
231  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
232  return module->wCreateTool(action, toolbarId, actionId, index);
233 }
int SuitWrapper::createTool ( QAction *  action,
const QString &  toolbar,
const int  actionId = -1,
const int  index = -1 
)

Definition at line 235 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::wCreateTool().

239 {
240  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
241  return module->wCreateTool(action, toolbar, actionId, index);
242 }
bool SuitWrapper::deleteSchema ( QWidget viewWindow)

Definition at line 276 of file SuitWrapper.cxx.

References _wrapped, SalomeWrap_DataModel::deleteSchema(), and SalomeWrap_Module::getDataModel().

277 {
278  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
279  return module->getDataModel()->deleteSchema(viewWindow);
280 }
QWidget * SuitWrapper::getNewWindow ( QGraphicsScene scene)

Definition at line 57 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::getNewWindow().

58 {
59  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
60  return module->getNewWindow(scene);
61 }
QStringList SuitWrapper::getQuickDirList ( )

Definition at line 291 of file SuitWrapper.cxx.

292 {
293  QStringList dirList;
294  SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
295  if ( resMgr )
296  dirList = resMgr->stringValue( "FileDlg", "QuickDirList" ).split( ';', QString::SkipEmptyParts );
297  return dirList;
298 }
QDockWidget * SuitWrapper::objectBrowser ( )

Definition at line 124 of file SuitWrapper.cxx.

References _wrapped, and SalomeWrap_Module::objectBrowser().

125 {
126  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
127  return module->objectBrowser();
128 }
void SuitWrapper::onHelpContextModule ( const QString &  theComponentName,
const QString &  theFileName,
const QString &  theContext = QString() 
)
virtual

Definition at line 300 of file SuitWrapper.cxx.

References gui.Appli::app.

301 {
302  LightApp_Application* app = (LightApp_Application*)( SUIT_Session::session()->activeApplication() );
303  if(app)
304  app->onHelpContextModule( theComponentName, theFileName, theContext );
305 }
bool SuitWrapper::renameSchema ( const QString &  oldName,
const QString &  newName,
QWidget viewWindow 
)

Definition at line 268 of file SuitWrapper.cxx.

References _wrapped, SalomeWrap_Module::getDataModel(), and SalomeWrap_DataModel::renameSchema().

271 {
272  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
273  return module->getDataModel()->renameSchema(oldName, newName, viewWindow);
274 }
QAction * SuitWrapper::separator ( )
static

Definition at line 244 of file SuitWrapper.cxx.

References SalomeWrap_Module::wSeparator().

245 {
247 }
void SuitWrapper::setMenuShown ( QAction *  act,
bool  show 
)

Definition at line 249 of file SuitWrapper.cxx.

References _wrapped.

250 {
251  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
252  module->setMenuShown(act, show);
253 }
void SuitWrapper::setToolShown ( QAction *  act,
bool  show 
)

Definition at line 255 of file SuitWrapper.cxx.

References _wrapped.

256 {
257  SalomeWrap_Module* module = dynamic_cast<SalomeWrap_Module*>(_wrapped);
258  module->setToolShown(act, show);
259 }

Member Data Documentation


The documentation for this class was generated from the following files: