Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
qMRMLSimpleColorTableView.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 Csaba Pinter, EBATINCA, S.L.
17 and was funded by by Murat Maga (Seattle Children's Research Institute).
18
19==============================================================================*/
20
21#ifndef __qMRMLSimpleColorTableView_h
22#define __qMRMLSimpleColorTableView_h
23
24// Qt includes
25#include <QTableView>
26
27// Colors includes
28#include "qSlicerTerminologiesModuleWidgetsExport.h"
29
31class qMRMLSimpleColorTableViewPrivate;
32class qMRMLColorModel;
34class vtkMRMLNode;
35
39class Q_SLICER_MODULE_TERMINOLOGIES_WIDGETS_EXPORT qMRMLSimpleColorTableView : public QTableView
40{
41 Q_OBJECT
42public:
43 qMRMLSimpleColorTableView(QWidget* parent = nullptr);
45
46 Q_INVOKABLE vtkMRMLColorNode* mrmlColorNode() const;
47 Q_INVOKABLE qMRMLColorModel* colorModel() const;
49
50 Q_INVOKABLE int selectedColorIndex() const;
51
52public slots:
55 void setMRMLColorNode(vtkMRMLNode* colorNode);
58 bool selectColorByIndex(int colorIndex);
59
60protected:
61 QScopedPointer<qMRMLSimpleColorTableViewPrivate> d_ptr;
62
63private:
64 Q_DECLARE_PRIVATE(qMRMLSimpleColorTableView);
65 Q_DISABLE_COPY(qMRMLSimpleColorTableView);
66};
67
68#endif
Q_INVOKABLE vtkMRMLColorNode * mrmlColorNode() const
void setMRMLColorNode(vtkMRMLNode *colorNode)
Utility function to simply connect signals/slots with Qt Designer.
Q_INVOKABLE int selectedColorIndex() const
QScopedPointer< qMRMLSimpleColorTableViewPrivate > d_ptr
Q_INVOKABLE qMRMLSortFilterColorProxyModel * sortFilterProxyModel() const
qMRMLSimpleColorTableView(QWidget *parent=nullptr)
~qMRMLSimpleColorTableView() override
void setMRMLColorNode(vtkMRMLColorNode *colorNode)
Q_INVOKABLE qMRMLColorModel * colorModel() const
bool selectColorByIndex(int colorIndex)
Abstract MRML node to represent color information.
Abstract Superclass for all specific types of MRML nodes.