Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerModuleSelectorToolBar.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Program: 3D Slicer
4 
5  Copyright (c) Kitware Inc.
6 
7  See COPYRIGHT.txt
8  or http://www.slicer.org/copyright/copyright.txt for details.
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16  This file was originally developed by Julien Finet, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerModuleSelectorToolBar_h
22 #define __qSlicerModuleSelectorToolBar_h
23 
24 // Qt includes
25 #include <QToolBar>
26 
27 // CTK includes
28 #include <ctkPimpl.h>
29 #include "qSlicerBaseQTGUIExport.h"
30 
31 class qSlicerModuleSelectorToolBarPrivate;
33 class qSlicerModulesMenu;
35 
42 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerModuleSelectorToolBar: public QToolBar
43 {
44  Q_OBJECT
45 public:
46  typedef QToolBar Superclass;
47  Q_PROPERTY(QString selectedModule READ selectedModule WRITE selectModule NOTIFY moduleSelected)
48 
49 
50  qSlicerModuleSelectorToolBar(const QString& title, QWidget* parent = 0);
53  qSlicerModuleSelectorToolBar(QWidget* parent = 0);
55 
57  qSlicerModulesMenu* modulesMenu()const;
58 
60  QString selectedModule() const;
61 
62 public slots:
64  void setModuleManager(qSlicerModuleManager* moduleManager);
65 
67  void selectModule(const QString& moduleName);
68 
69  void selectNextModule();
70  void selectPreviousModule();
71 
72 signals:
76  void moduleSelected(const QString& name);
77 
78 protected slots:
79  void moduleRemoved(const QString& moduleName);
80 
81  void onModuleSelected(const QString& name);
82  void actionSelected(QAction* action);
83 
84 protected:
85  QScopedPointer<qSlicerModuleSelectorToolBarPrivate> d_ptr;
86 
87 private:
88  Q_DECLARE_PRIVATE(qSlicerModuleSelectorToolBar);
89  Q_DISABLE_COPY(qSlicerModuleSelectorToolBar);
90 };
91 
92 #endif
QScopedPointer< qSlicerModuleSelectorToolBarPrivate > d_ptr
qSlicerAbstractCoreModule is the base class of any module in Slicer.