Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerModulePanel.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 __qSlicerModulePanel_h
22 #define __qSlicerModulePanel_h
23 
24 // CTK includes
25 #include <ctkPimpl.h>
26 
27 // Slicer includes
29 
30 #include "qSlicerBaseQTGUIExport.h"
31 
32 class qSlicerModulePanelPrivate;
33 
34 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerModulePanel
36 {
37  Q_OBJECT
38 
48  Q_PROPERTY(bool helpAndAcknowledgmentVisible READ isHelpAndAcknowledgmentVisible WRITE setHelpAndAcknowledgmentVisible)
49 
50 public:
52  qSlicerModulePanel(QWidget* parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
53  ~qSlicerModulePanel() override;
54 
57  void setHelpAndAcknowledgmentVisible(bool value);
58 
61  bool isHelpAndAcknowledgmentVisible()const;
62 
63  void removeAllModules() override;
64  qSlicerAbstractCoreModule* currentModule()const;
65  QString currentModuleName()const;
66 
67  bool eventFilter(QObject* watchedModule, QEvent* event) override;
68  QSize minimumSizeHint()const override;
69 
70 public slots:
71  void setModule(const QString& moduleName);
72 
73 protected:
74  void addModule(qSlicerAbstractCoreModule* module) override;
75  void removeModule(qSlicerAbstractCoreModule* module) override;
76  void setModule(qSlicerAbstractCoreModule* module);
77 
78 protected:
79  QScopedPointer<qSlicerModulePanelPrivate> d_ptr;
80 
81 private:
82  Q_DECLARE_PRIVATE(qSlicerModulePanel);
83  Q_DISABLE_COPY(qSlicerModulePanel);
84 };
85 
86 #endif
void removeModule(const QString &moduleName)
virtual void removeAllModules()=0
qSlicerAbstractCoreModule is the base class of any module in Slicer.
void addModule(const QString &moduleName)
QScopedPointer< qSlicerModulePanelPrivate > d_ptr
qSlicerAbstractModulePanel Superclass