Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
qSlicerTableColumnPropertiesWidget.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4 Queen's University, Kingston, ON, Canada. All Rights Reserved.
5
6 See COPYRIGHT.txt
7 or http://www.slicer.org/copyright/copyright.txt for details.
8
9 Unless required by applicable law or agreed to in writing, software
10 distributed under the License is distributed on an "AS IS" BASIS,
11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 See the License for the specific language governing permissions and
13 limitations under the License.
14
15 This file was originally developed by Matthew Holden, PerkLab, Queen's University
16 and was supported through the Applied Cancer Research Unit program of Cancer Care
17 Ontario with funds provided by the Ontario Ministry of Health and Long-Term Care
18
19==============================================================================*/
20
21#ifndef __qSlicerTableColumnPropertiesWidget_h
22#define __qSlicerTableColumnPropertiesWidget_h
23
24// Qt includes
25#include "qSlicerWidget.h"
26
27#include "qMRMLUtils.h"
28
29// Tables Widgets includes
30#include "qSlicerTablesModuleWidgetsExport.h"
31
32class qSlicerTableColumnPropertiesWidgetPrivate;
34class qMRMLTableView;
35
37class Q_SLICER_MODULE_TABLES_WIDGETS_EXPORT
39{
40 Q_OBJECT
41 Q_PROPERTY(bool columnNameVisible READ columnNameVisible WRITE setColumnNameVisible)
42 Q_PROPERTY(bool confirmTypeChange READ confirmTypeChange WRITE setConfirmTypeChange)
43
44public:
46 qSlicerTableColumnPropertiesWidget(QWidget *parent=nullptr);
48
50 Q_INVOKABLE vtkMRMLTableNode* mrmlTableNode()const;
51
52 Q_INVOKABLE QStringList mrmlTableColumnNames();
53
55 Q_INVOKABLE void setSelectionFromMRMLTableView(qMRMLTableView* tableView);
56
57 Q_INVOKABLE bool columnNameVisible() const;
58 Q_INVOKABLE bool confirmTypeChange() const;
59
60 Q_INVOKABLE void setColumnProperty(QString propertyName, QString propertyValue);
61 Q_INVOKABLE QString columnProperty(QString propertyName) const;
62
63public slots:
64
65 void setMRMLScene(vtkMRMLScene* scene) override;
66
67 void setMRMLTableNode(vtkMRMLTableNode* tableNode);
69 void setMRMLTableNode(vtkMRMLNode* tableNode);
70
71 void setMRMLTableColumnName(const QString& selectedColumn);
72 void setMRMLTableColumnNames(const QStringList& selectedColumns);
73
75 void setColumnNameVisible(bool);
76
79 void setConfirmTypeChange(bool);
80
81protected slots:
82
84 void tableViewSelectionChanged();
85
86 void onDataTypeChanged(const QString&);
87
88 void onPropertyChanged(const QString&);
89
90 void onApplyTypeChange();
91 void onCancelTypeChange();
92
94 void updateWidget();
95
96signals:
97
100 void updateFinished();
101
102protected:
103 QScopedPointer<qSlicerTableColumnPropertiesWidgetPrivate> d_ptr;
104
105 virtual void setup();
106
107private:
108 Q_DECLARE_PRIVATE(qSlicerTableColumnPropertiesWidget);
110
111};
112
113#endif
Spreadsheet view for table nodes. Allow view/edit of a vtkMRMLTableNode.
Abstract Superclass for all specific types of MRML nodes.
A set of MRML Nodes that supports serialization and undo/redo.
MRML node to represent a table object.