Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerUnitsSettingsPanel.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 Johan Andruejol, Kitware Inc.
17  and was partially funded by NIH grant 3P41RR013218-12S1
18 
19 ==============================================================================*/
20 
21 #ifndef __qSlicerUnitsSettingsPanel_h
22 #define __qSlicerUnitsSettingsPanel_h
23 
24 // Qt includes
25 #include <QString>
26 #include <QStringList>
27 
28 // CTK includes
29 #include <ctkVTKObject.h>
30 #include <ctkSettingsPanel.h>
31 
32 // Slicer includes
33 class vtkMRMLNode;
34 
35 // Units includes
36 #include "qSlicerUnitsModuleExport.h"
37 class qSlicerUnitsSettingsPanelPrivate;
39 
40 class Q_SLICER_QTMODULES_UNITS_EXPORT qSlicerUnitsSettingsPanel
41  : public ctkSettingsPanel
42 {
43  Q_OBJECT
44  QVTK_OBJECT
45  Q_PROPERTY(QStringList quantities READ quantities WRITE setQuantities NOTIFY quantitiesChanged)
46 public:
47 
49  typedef ctkSettingsPanel Superclass;
50 
52  qSlicerUnitsSettingsPanel(QWidget* parent = 0);
53 
55  virtual ~qSlicerUnitsSettingsPanel();
56 
59  void setUnitsLogic(vtkSlicerUnitsLogic* logic);
60 
63  QStringList quantities();
64 
65 signals:
66  void quantitiesChanged(const QStringList&);
67 
68 protected slots:
69  void onUnitsLogicModified();
70  void setQuantities(const QStringList& quantities);
71  void updateFromSelectionNode();
72  void showAll(bool showAll);
73 
74 protected:
75  QScopedPointer<qSlicerUnitsSettingsPanelPrivate> d_ptr;
76 
77 private:
78  Q_DECLARE_PRIVATE(qSlicerUnitsSettingsPanel);
79  Q_DISABLE_COPY(qSlicerUnitsSettingsPanel);
80 };
81 
82 #endif
ctkSettingsPanel Superclass
Superclass typedef.
Slicer logic for unit manipulation.
QScopedPointer< qSlicerUnitsSettingsPanelPrivate > d_ptr
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138