Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
qMRMLCheckableNodeComboBox.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 __qMRMLCheckableNodeComboBox_h
22#define __qMRMLCheckableNodeComboBox_h
23
24// qMRML includes
25#include "qMRMLNodeComboBox.h"
26
27class qMRMLCheckableNodeComboBoxPrivate;
28
34class QMRML_WIDGETS_EXPORT qMRMLCheckableNodeComboBox
35 : public qMRMLNodeComboBox
36{
37 Q_OBJECT
38public:
41
44 explicit qMRMLCheckableNodeComboBox(QWidget* parent = nullptr);
46
50
54
57 Q_INVOKABLE bool allChecked()const;
58
61 Q_INVOKABLE bool noneChecked()const;
62
66 Q_INVOKABLE Qt::CheckState checkState(vtkMRMLNode* node)const;
67 Q_INVOKABLE void setCheckState(vtkMRMLNode* node, Qt::CheckState check);
68
71 Q_INVOKABLE void setUserCheckable(vtkMRMLNode* node, bool userCheckable);
72
73public slots:
75 inline void check(vtkMRMLNode* node);
76
78 inline void uncheck(vtkMRMLNode* node);
79
80signals:
83
84private:
85 Q_DECLARE_PRIVATE(qMRMLCheckableNodeComboBox);
86 Q_DISABLE_COPY(qMRMLCheckableNodeComboBox);
87};
88
89//-----------------------------------------------------------------------------
91{
92 this->setCheckState(node, Qt::Checked);
93}
94
95//-----------------------------------------------------------------------------
97{
98 this->setCheckState(node, Qt::Unchecked);
99}
100
101#endif
Q_INVOKABLE void setUserCheckable(vtkMRMLNode *node, bool userCheckable)
void uncheck(vtkMRMLNode *node)
Set the check state of the node to Qt::Unchecked.
void check(vtkMRMLNode *node)
Set the check state of the node to Qt::Checked.
void checkedNodesChanged()
Signal fired anytime a node is checked or unchecked.
Q_INVOKABLE bool noneChecked() const
Q_INVOKABLE bool allChecked() const
qMRMLCheckableNodeComboBox(QWidget *parent=nullptr)
Q_INVOKABLE void setCheckState(vtkMRMLNode *node, Qt::CheckState check)
qMRMLNodeComboBox Superclass
Superclass typedef.
Q_INVOKABLE Qt::CheckState checkState(vtkMRMLNode *node) const
Q_INVOKABLE QList< vtkMRMLNode * > uncheckedNodes() const
Q_INVOKABLE QList< vtkMRMLNode * > checkedNodes() const
~qMRMLCheckableNodeComboBox() override
qMRMLNodeComboBox(QWidget *parent=nullptr)
Abstract Superclass for all specific types of MRML nodes.