Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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 : public qMRMLWidget
40{
41 Q_OBJECT
42 QVTK_OBJECT
43
44public:
46 explicit qMRMLColorLegendDisplayNodeWidget(QWidget* parent = 0);
48
49public slots:
50 void setMRMLScene(vtkMRMLScene*) override;
58
60
61 void onTitleTextChanged(const QString&);
62
63 void onLabelFormatChanged(const QString&);
64
67
68protected slots:
71
73 void onLabelTextButtonClicked(QAbstractButton*);
76
77protected:
78 QScopedPointer<qMRMLColorLegendDisplayNodeWidgetPrivate> d_ptr;
79
80private:
81 Q_DECLARE_PRIVATE(qMRMLColorLegendDisplayNodeWidget);
83};
84
85#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.