\return menu item ID or -1 if menu item could not be added
*/
int CAM_Module::createMenu( const QString& subMenu, const int menu,
- const int id, const int group, const int idx )
+ const int id, const int group, const int idx, QMenu * menuObj )
{
if ( !menuMgr() )
return -1;
- return menuMgr()->insert( subMenu, menu, group, id, idx );
+ return menuMgr()->insert( subMenu, menu, group, id, idx, menuObj );
}
/*!
int createTool( QAction*, const int, const int = -1, const int = -1 );
int createTool( QAction*, const QString&, const int = -1, const int = -1 );
- int createMenu( const QString&, const int, const int = -1, const int = -1, const int = -1 );
+ int createMenu( const QString&, const int, const int = -1, const int = -1, const int = -1,QMenu * = 0);
int createMenu( const QString&, const QString&, const int = -1, const int = -1, const int = -1 );
int createMenu( const int, const int, const int = -1, const int = -1 );
int createMenu( const int, const QString&, const int = -1, const int = -1 );
new pqDefaultViewBehavior(this); // shows a 3D view as soon as a server connection is made
new pqAlwaysConnectedBehavior(this); // client always connected to a server
- new pqAutoLoadPluginXMLBehavior(this); // auto load plugins
new pqVerifyRequiredPluginBehavior(this);
new pqPluginSettingsBehavior(this);
new pqFixPathsInStateFilesBehavior(this);
new pqSpreadSheetVisibilityBehavior(this);
new pqPipelineContextMenuBehavior(this);
new pqUndoRedoBehavior(this);
+ new pqAutoLoadPluginXMLBehavior(this); // auto load plugins GUI stuff
new pqPluginDockWidgetsBehavior(desk);
new pqPluginActionGroupBehavior(desk);
new pqPersistentMainWindowStateBehavior(desk);
pipelineBrowserWidget = new pqPipelineBrowserWidget(desk);
pipelineBrowserWidget->hide();
-// sourcesMenu = new QMenu(desk);
-// pqParaViewMenuBuilders::buildSourcesMenu(*sourcesMenu, desk);
-// filtersMenu = new QPVMenu(desk);
-// pqParaViewMenuBuilders::buildFiltersMenu(*filtersMenu, desk);
-// macrosMenu = new QMenu(desk);
-// pqParaViewMenuBuilders::buildMacrosMenu(*macrosMenu);
+ sourcesMenu = new QMenu(0);
+ pqParaViewMenuBuilders::buildSourcesMenu(*sourcesMenu, desk);
+ filtersMenu = new QMenu(0);
+ pqParaViewMenuBuilders::buildFiltersMenu(*filtersMenu, desk);
+ macrosMenu = new QMenu(0);
+ pqParaViewMenuBuilders::buildMacrosMenu(*macrosMenu);
}
PVViewer_GUIElements * PVViewer_GUIElements::GetInstance(SUIT_Desktop* desk)
pqPropertiesPanel * getPropertiesPanel() { return propertiesPanel; }
pqPipelineBrowserWidget * getPipelineBrowserWidget() { return pipelineBrowserWidget; }
- // Update the sources menu from what was built in private member 'sourcesMenu'
-// void updateSourcesMenu(QMenu *);
-// void updateFiltersMenu(QMenu *);
-// void updateMacrosMenu(QMenu *);
+ QMenu * getFiltersMenu() { return filtersMenu; }
+ QMenu * getSourcesMenu() { return sourcesMenu; }
+ QMenu * getMacrosMenu() { return macrosMenu; }
+
public slots:
void onEmulateApply(); // better use the slot from PVViewer_ViewManager if you want to trigger "Apply"
\param idx menu index inside the menu group
\return action ID
*/
-int QtxActionMenuMgr::insert( const QString& title, const int pId, const int group, const int id, const int idx )
+int QtxActionMenuMgr::insert( const QString& title, const int pId, const int group,
+ const int id, const int idx, QMenu* _menu)
{
MenuNode* pNode = pId == -1 ? myRoot : find( pId );
if ( !pNode )
int gid = (id == -1 || eNode ) ? generateId() : id;
- QMenu* menu = new QMenu( 0 );
+ QMenu* menu;
+ if (_menu)
+ menu = _menu;
+ else
+ menu = new QMenu( 0 );
QAction* ma = menu->menuAction();
ma->setText( title );
int insert( const QString&, const QString&, const int, const int = -1, const int = -1 );
int insert( const QString&, const QStringList&, const int, const int = -1, const int = -1 );
- virtual int insert( const QString&, const int, const int, const int = -1, const int = -1 );
+ virtual int insert( const QString&, const int, const int, const int = -1, const int = -1 , QMenu* = 0);
int append( const int, const int, const int );
int append( QAction*, const int, const int );