Slicer 5.6
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
31class ctkMenuComboBox;
32class qSlicerModuleSelectorToolBarPrivate;
36
43class Q_SLICER_BASE_QTGUI_EXPORT qSlicerModuleSelectorToolBar: public QToolBar
44{
45 Q_OBJECT
46public:
47 typedef QToolBar Superclass;
48 Q_PROPERTY(QString selectedModule READ selectedModule WRITE selectModule NOTIFY moduleSelected)
49
50
53 qSlicerModuleSelectorToolBar(const QString& title, QWidget* parent = nullptr);
54 qSlicerModuleSelectorToolBar(QWidget* parent = nullptr);
56
58 Q_INVOKABLE qSlicerModulesMenu* modulesMenu()const;
59
62 Q_INVOKABLE ctkMenuComboBox* modulesMenuComboBox() const;
63
65 QString selectedModule() const;
66
67public slots:
69 void setModuleManager(qSlicerModuleManager* moduleManager);
70
72 void selectModule(const QString& moduleName);
73
74 void selectNextModule();
75 void selectPreviousModule();
76
77 void showModuleFinder();
78
79signals:
83 void moduleSelected(const QString& name);
84
85protected slots:
86 void moduleRemoved(const QString& moduleName);
87
88 void onModuleSelected(const QString& name);
89 void actionSelected(QAction* action);
90
91protected:
92 QScopedPointer<qSlicerModuleSelectorToolBarPrivate> d_ptr;
93
94private:
95 Q_DECLARE_PRIVATE(qSlicerModuleSelectorToolBar);
96 Q_DISABLE_COPY(qSlicerModuleSelectorToolBar);
97};
98
99#endif
qSlicerAbstractCoreModule is the base class of any module in Slicer.