Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkCmdLineModuleMenuComboBox.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) University College London (UCL).
6 All rights reserved.
7 
8 This software is distributed WITHOUT ANY WARRANTY; without
9 even the implied warranty of MERCHANTABILITY or FITNESS FOR
10 A PARTICULAR PURPOSE.
11 
12 See LICENSE.txt or http://www.mitk.org for details.
13 
14 ===================================================================*/
15 
16 #ifndef QMITKCMDLINEMODULEMENUCOMBOBOX_H
17 #define QMITKCMDLINEMODULEMENUCOMBOBOX_H
18 
19 #include <QObject>
20 #include <QList>
21 #include <QHash>
22 #include <ctkMenuComboBox.h>
23 #include <ctkCmdLineModuleManager.h>
24 
33 class QmitkCmdLineModuleMenuComboBox : public ctkMenuComboBox {
34 
35  Q_OBJECT
36 
37 public:
38 
39  QmitkCmdLineModuleMenuComboBox(QWidget* parent = nullptr);
41 
47  void SetManager(ctkCmdLineModuleManager* manager);
48 
52  ctkCmdLineModuleManager* GetManager() const;
53 
54 private slots:
55 
56  void OnModuleRegistered(const ctkCmdLineModuleReference&);
57  void OnModuleUnRegistered(const ctkCmdLineModuleReference&);
58 
59 private:
60 
61  void RebuildMenu();
62  void AddName(QList< QHash<QString, QMenu*>* >& listOfHashMaps, const int& depth, const QString& name, QMenu* menu);
63 
64  ctkCmdLineModuleManager* m_ModuleManager;
65 };
66 
67 #endif // QMITKCMDLINEMODULEMENUCOMBOBOX_H
void SetManager(ctkCmdLineModuleManager *manager)
Inject the module manager, so that this widget can still easily be used via widget promotion in Qt De...
QmitkCmdLineModuleMenuComboBox(QWidget *parent=nullptr)
The custom viewer plugin implements simple viewer functionality presented in a customized look and feel It was developed to demonstrate extensibility and customizability of the blueberry application framework As an example for the GUI customization capabilities provided by the BlueBerry application the custom viewer plugin was developed It features simple viewer functionality presented in a customized look and feel The custom viewer consists of two i e a viewer perspective and a DICOM perspective As part of the viewer an instance of QmitkDataManagerView allows for data selection Visualization of the selected data is then performed by a simple render window view According data can either be directly loaded from file or be imported as DICOM data DICOM import functionality is accessible from the DICOM perspective incorporating the QmitkDicomExternalDataWidget The customization of Qt Stylesheets is used to give the application a non native look and feel This is further emphasized by a Tab Widget like unification of the perspectives with the according perspective bar In addition to an absence of menu
ctkCmdLineModuleManager * GetManager() const
Returns the ctkCmdLineModuleManager.
Subclass of ctkMenuComboBox to listen to ctkCmdLineModuleManager moduleRegistered and moduleUnregiste...