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
qMRMLColorListView.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 developed by Julien Finet, Kitware Inc. and Csaba Pinter, EBATINCA, S.L.
17 and was partially funded by NIH grant 3P41RR013218-12S1 and
18 by Murat Maga (Seattle Children’s Research Institute).
19
20==============================================================================*/
21
22#ifndef __qMRMLColorListView_h
23#define __qMRMLColorListView_h
24
25// Qt includes
26#include <QListView>
27
28// Colors includes
29#include "qSlicerColorsModuleWidgetsExport.h"
30
31class QSortFilterProxyModel;
32class qMRMLColorListViewPrivate;
33class qMRMLColorModel;
36class vtkMRMLNode;
37
38class Q_SLICER_MODULE_COLORS_WIDGETS_EXPORT qMRMLColorListView : public QListView
39{
40 Q_OBJECT
42public:
43 qMRMLColorListView(QWidget *parent=nullptr);
45
49
51
52public slots:
55 void setMRMLColorNode(vtkMRMLNode* colorNode);
56
58
59signals:
62 void colorSelected(int index);
63 void colorSelected(const QColor& color);
64 void colorSelected(const QString& name);
65
66protected slots:
67 void currentChanged(const QModelIndex&, const QModelIndex&) override;
68
69protected:
70 QScopedPointer<qMRMLColorListViewPrivate> d_ptr;
71
72private:
73 Q_DECLARE_PRIVATE(qMRMLColorListView);
74 Q_DISABLE_COPY(qMRMLColorListView);
75};
76
77#endif
bool showOnlyNamedColors() const
void colorSelected(const QString &name)
~qMRMLColorListView() override
qMRMLColorModel * colorModel() const
void setMRMLColorNode(vtkMRMLNode *colorNode)
Utility function to simply connect signals/slots with Qt Designer.
void currentChanged(const QModelIndex &, const QModelIndex &) override
qMRMLSortFilterColorProxyModel * sortFilterProxyModel() const
vtkMRMLColorNode * mrmlColorNode() const
void setShowOnlyNamedColors(bool)
qMRMLColorListView(QWidget *parent=nullptr)
void colorSelected(int index)
QScopedPointer< qMRMLColorListViewPrivate > d_ptr
void setMRMLColorNode(vtkMRMLColorNode *colorNode)
void colorSelected(const QColor &color)
Abstract MRML node to represent color information.
Abstract Superclass for all specific types of MRML nodes.