macrosToolbar = new QToolBar("Macros Toolbars", mainWindow)
<< pqSetName("MacrosToolbar");
- manager->addWidgetForRunMacros(macrosToolbar);
+ manager->addWidgetForRunMacros(macrosToolbar);
+
+ commonToolbar = new QToolBar("Common", mainWindow) << pqSetName("Common");
+ commonToolbar->layout()->setSpacing(0);
+
+ dataToolbar = new QToolBar("DataAnalysis", mainWindow) << pqSetName("DataAnalysis");
+ dataToolbar->layout()->setSpacing(0);
addToolbars(mainWindow);
}
{
QCoreApplication::processEvents();
mainAction->setChecked(!show);
+ mainAction->setVisible(show);
mainAction->trigger();
vcrAction->setChecked(!show);
+ vcrAction->setVisible(show);
vcrAction->trigger();
timeAction->setChecked(!show);
+ timeAction->setVisible(show);
timeAction->trigger();
colorAction->setChecked(!show);
+ colorAction->setVisible(show);
colorAction->trigger();
reprAction->setChecked(!show);
+ reprAction->setVisible(show);
reprAction->trigger();
cameraAction->setChecked(!show);
+ cameraAction->setVisible(show);
cameraAction->trigger();
axesAction->setChecked(!show);
+ axesAction->setVisible(show);
axesAction->trigger();
macrosAction->setChecked(!show);
+ macrosAction->setVisible(show);
macrosAction->trigger();
+ commonAction->setChecked(!show);
+ commonAction->setVisible(show);
+ commonAction->trigger();
+ dataAction->setChecked(!show);
+ dataAction->setVisible(show);
+ dataAction->trigger();
}
void PVViewer_GUIElements::addToolbars(SUIT_Desktop* desk)
desk->addToolBar(Qt::TopToolBarArea, cameraToolbar);
desk->addToolBar(Qt::TopToolBarArea, axesToolbar);
desk->addToolBar(Qt::TopToolBarArea, macrosToolbar);
+ desk->addToolBar(Qt::TopToolBarArea, commonToolbar);
+ desk->addToolBar(Qt::TopToolBarArea, dataToolbar);
mainAction = mainToolBar->toggleViewAction();
vcrAction = vcrToolbar->toggleViewAction();
cameraAction = cameraToolbar->toggleViewAction();
axesAction = axesToolbar->toggleViewAction();
macrosAction = macrosToolbar->toggleViewAction();
+ commonAction = commonToolbar->toggleViewAction();
+ dataAction = dataToolbar->toggleViewAction();
}
void PVViewer_GUIElements::onEmulateApply()
if (propertiesPanel)
propertiesPanel->apply();
}
+
+QList<QToolBar*> PVViewer_GUIElements::getToolbars()
+{
+ QList<QToolBar*> l;
+ l << mainToolBar << vcrToolbar << timeToolbar << colorToolbar
+ << reprToolbar << cameraToolbar << axesToolbar << macrosToolbar
+ << commonToolbar << dataToolbar;
+ return l;
+}
#include "PVViewer.h"
#include <QObject>
+#include <QList>
class pqPropertiesPanel;
class pqPipelineBrowserWidget;
pqPropertiesPanel * getPropertiesPanel() { return propertiesPanel; }
pqPipelineBrowserWidget * getPipelineBrowserWidget() { return pipelineBrowserWidget; }
- QMenu * getFiltersMenu() { return filtersMenu; }
- QMenu * getSourcesMenu() { return sourcesMenu; }
- QMenu * getMacrosMenu() { return macrosMenu; }
+ QMenu* getFiltersMenu() { return filtersMenu; }
+ QMenu* getSourcesMenu() { return sourcesMenu; }
+ QMenu* getMacrosMenu() { return macrosMenu; }
- pqVCRToolbar * getVCRToolbar() { return vcrToolbar; }
- pqAnimationTimeToolbar * getTimeToolbar() { return timeToolbar; }
+ pqVCRToolbar* getVCRToolbar() { return vcrToolbar; }
+ pqAnimationTimeToolbar* getTimeToolbar() { return timeToolbar; }
void myBuildToolbars(SUIT_Desktop* desk);
void addToolbars(SUIT_Desktop* desk);
void setToolBarVisible(bool show);
+ QList<QToolBar*> getToolbars();
public slots:
void onEmulateApply(); // better use the slot from PVViewer_ViewManager if you want to trigger "Apply"
PVViewer_GUIElements(SUIT_Desktop* desk);
virtual ~PVViewer_GUIElements() {}
- static PVViewer_GUIElements * theInstance;
+ static PVViewer_GUIElements* theInstance;
// Widgets
- pqPropertiesPanel * propertiesPanel;
- pqPipelineBrowserWidget * pipelineBrowserWidget;
+ pqPropertiesPanel* propertiesPanel;
+ pqPipelineBrowserWidget* pipelineBrowserWidget;
// Dummy QMenus receiving ParaView's reaction for automatic add when new sources are added
- QMenu * sourcesMenu;
- QMenu * filtersMenu;
- QMenu * macrosMenu;
+ QMenu* sourcesMenu;
+ QMenu* filtersMenu;
+ QMenu* macrosMenu;
// Toolbars also need to be instanciated early:
QToolBar* mainToolBar;
pqVCRToolbar* vcrToolbar;
- pqAnimationTimeToolbar * timeToolbar;
+ pqAnimationTimeToolbar* timeToolbar;
QToolBar* colorToolbar;
QToolBar* reprToolbar;
QToolBar* cameraToolbar;
QToolBar* axesToolbar;
QToolBar* macrosToolbar;
+ QToolBar* commonToolbar;
+ QToolBar* dataToolbar;
public:
- QAction * mainAction;
- QAction * vcrAction;
- QAction * timeAction;
- QAction * colorAction;
- QAction * reprAction;
- QAction * cameraAction;
- QAction * axesAction;
- QAction * macrosAction;
+ QAction* mainAction;
+ QAction* vcrAction;
+ QAction* timeAction;
+ QAction* colorAction;
+ QAction* reprAction;
+ QAction* cameraAction;
+ QAction* axesAction;
+ QAction* macrosAction;
+ QAction* commonAction;
+ QAction* dataAction;
};
#endif /* PVVIEWERGUIELEMENTS_H_ */