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
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
36class Q_SLICER_MODULE_TABLES_WIDGETS_EXPORT
38{
39 Q_OBJECT
42
43public:
45 qSlicerTableColumnPropertiesWidget(QWidget *parent=nullptr);
47
49 Q_INVOKABLE vtkMRMLTableNode* mrmlTableNode()const;
50
51 Q_INVOKABLE QStringList mrmlTableColumnNames();
52
54 Q_INVOKABLE void setSelectionFromMRMLTableView(qMRMLTableView* tableView);
55
56 Q_INVOKABLE bool columnNameVisible() const;
57 Q_INVOKABLE bool confirmTypeChange() const;
58
59 Q_INVOKABLE void setColumnProperty(QString propertyName, QString propertyValue);
60 Q_INVOKABLE QString columnProperty(QString propertyName) const;
61
62public slots:
63
64 void setMRMLScene(vtkMRMLScene* scene) override;
65
68 void setMRMLTableNode(vtkMRMLNode* tableNode);
69
70 void setMRMLTableColumnName(const QString& selectedColumn);
71 void setMRMLTableColumnNames(const QStringList& selectedColumns);
72
75
79
80protected slots:
81
84
85 void onDataTypeChanged(const QString&);
86
87 void onPropertyChanged(const QString&);
88
91
94
95signals:
96
100
101protected:
102 QScopedPointer<qSlicerTableColumnPropertiesWidgetPrivate> d_ptr;
103
104 virtual void setup();
105
106private:
107 Q_DECLARE_PRIVATE(qSlicerTableColumnPropertiesWidget);
109
110};
111
112#endif
Spreadsheet view for table nodes. Allow view/edit of a vtkMRMLTableNode.
qSlicerTableColumnPropertiesWidget(QWidget *parent=nullptr)
QScopedPointer< qSlicerTableColumnPropertiesWidgetPrivate > d_ptr
Q_INVOKABLE vtkMRMLTableNode * mrmlTableNode() const
Get the table node the columns are edited of.
Q_INVOKABLE QString columnProperty(QString propertyName) const
Q_INVOKABLE QStringList mrmlTableColumnNames()
void setMRMLScene(vtkMRMLScene *scene) override
void onDataTypeChanged(const QString &)
void onPropertyChanged(const QString &)
void setColumnNameVisible(bool)
Show table name row.
void tableViewSelectionChanged()
Called when selection is changed in the associated table view.
Q_INVOKABLE void setSelectionFromMRMLTableView(qMRMLTableView *tableView)
Get the selected table node and column from the specified tableView widget.
void setMRMLTableColumnNames(const QStringList &selectedColumns)
Q_INVOKABLE void setColumnProperty(QString propertyName, QString propertyValue)
void updateWidget()
Update the GUI to reflect the currently selected table node.
void setMRMLTableColumnName(const QString &selectedColumn)
void setMRMLTableNode(vtkMRMLTableNode *tableNode)
qSlicerWidget(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
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.