35#ifndef vtkQtTreeView_h
36#define vtkQtTreeView_h
39#include "vtkViewsQtModule.h"
45class QAbstractItemDelegate;
46class QAbstractItemView;
55class QItemSelectionModel;
122#if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
194 vtkBooleanMacro(ColorByArray,
bool);
207 void slotQtSelectionChanged(
const QItemSelection&,
const QItemSelection&);
210 void SetVTKSelection();
214 vtkSetStringMacro(ColorArrayNameInternal);
215 vtkGetStringMacro(ColorArrayNameInternal);
217 QPointer<QTreeView> TreeView;
218 QPointer<QColumnView> ColumnView;
219 QPointer<QWidget> Widget;
220 QPointer<QVBoxLayout> Layout;
221 QPointer<QItemSelectionModel> SelectionModel;
222 QList<int> HiddenColumns;
224 QAbstractItemView* View;
225 char* ColorArrayNameInternal;
apply colors to a data set.
The superclass for all representations.
a simple class to control print indentation
Adapts a tree to a Qt item model.
static vtkQtTreeView * New()
void SetFilterTreeLevel(int level)
The column used to filter on.
void SetShowRootNode(bool)
Show the root node of the tree (default is OFF)
void SetColorByArray(bool vis)
Whether to color vertices.
void ApplyViewTheme(vtkViewTheme *theme) override
void SetUseColumnView(int state)
Set whether to use a QColumnView (QTreeView is the default)
void SetFilterRegExp(const QRegularExpression &pattern)
The column used to filter on.
void ExpandToDepth(int depth)
Expands all expandable items to the given depth.
void SetColorArrayName(const char *name)
The array to use for coloring items in view.
void RemoveRepresentationInternal(vtkDataRepresentation *rep) override
void Collapse(const QModelIndex &index)
Collapses the model item specified by the index.
void AddRepresentationInternal(vtkDataRepresentation *rep) override
void SetFilterColumn(int i)
The column used to filter on.
bool GetColorByArray()
Whether to color vertices.
const char * GetColorArrayName()
The array to use for coloring items in view.
void updatePreviewWidget(const QModelIndex &)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void CollapseAll()
Collapses all expanded items.
void HideAllButFirstColumn()
Hide all but the first column in the view.
QWidget * GetWidget() override
Get the main container of this view (a QWidget).
void Expand(const QModelIndex &index)
Expands the model item specified by the index.
~vtkQtTreeView() override
void collapsed(const QModelIndex &)
void SetEnableDragDrop(bool)
Have the view alternate its row colors (default is OFF)
void ResizeColumnToContents(int column)
Resizes the column given to the size of its contents.
void ShowColumn(int i)
Show the column of the given index in the view.
void SetShowHeaders(bool)
Have the view show/hide its column headers (default is ON)
void SetItemDelegate(QAbstractItemDelegate *delegate)
Set item delegate to something custom.
void HideColumn(int i)
Hide the column of the given index from being shown in the view.
void SetAlternatingRowColors(bool)
Have the view alternate its row colors (default is OFF)
void ExpandAll()
Expands all expandable items.
void expanded(const QModelIndex &)
void Update() override
Updates the view.
Hold a reference to a vtkObjectBase instance.
Sets theme colors for a graphical view.
vtkTypeUInt32 vtkMTimeType