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
qMRMLColorLegendDisplayNodeWidget.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==============================================================================*/
17
18#ifndef __qMRMLColorLegendDisplayNodeWidget_h
19#define __qMRMLColorLegendDisplayNodeWidget_h
20
21// Slicer includes
22#include <qMRMLWidget.h>
23
24// Qt includes
25#include <QWidget>
26
27// CTK includes
28#include <ctkPimpl.h>
29#include <ctkVTKObject.h>
30
31// Colors Widgets includes
32#include "qSlicerColorsModuleWidgetsExport.h"
33
34class vtkMRMLNode;
36class qMRMLColorLegendDisplayNodeWidgetPrivate;
37class QAbstractButton;
38
39class Q_SLICER_MODULE_COLORS_WIDGETS_EXPORT qMRMLColorLegendDisplayNodeWidget
40 : public qMRMLWidget
41{
42 Q_OBJECT
43 QVTK_OBJECT
44
45public:
47 explicit qMRMLColorLegendDisplayNodeWidget(QWidget *parent=0);
49
50public slots:
51 void setMRMLScene(vtkMRMLScene*) override;
59
61
62 void onTitleTextChanged(const QString&);
63
64 void onLabelFormatChanged(const QString&);
65
68
69protected slots:
72
74 void onLabelTextButtonClicked(QAbstractButton*);
77
78
79protected:
80 QScopedPointer<qMRMLColorLegendDisplayNodeWidgetPrivate> d_ptr;
81
82private:
83 Q_DECLARE_PRIVATE(qMRMLColorLegendDisplayNodeWidget);
85};
86
87#endif
vtkMRMLColorLegendDisplayNode * mrmlColorLegendDisplayNode()
Get color legend display node.
void onColorLegendOrientationButtonClicked(QAbstractButton *)
void onLabelTextButtonClicked(QAbstractButton *)
void updateWidgetFromMRML()
Update widget GUI from color legend parameters node.
void onTitleTextChanged(const QString &)
void onLabelFormatChanged(const QString &)
void setMRMLColorLegendDisplayNode(vtkMRMLNode *node)
Utility function to be connected with generic signals.
QScopedPointer< qMRMLColorLegendDisplayNodeWidgetPrivate > d_ptr
void setMRMLColorLegendDisplayNode(vtkMRMLColorLegendDisplayNode *node)
qMRMLColorLegendDisplayNodeWidget(QWidget *parent=0)
void setMRMLScene(vtkMRMLScene *) override
qMRMLWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Class describing how to display a color legend.
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.