35 #ifndef vtkQtTreeView_h
36 #define vtkQtTreeView_h
39 #include "vtkViewsQtModule.h"
45 class QAbstractItemDelegate;
46 class QAbstractItemView;
55 class QItemSelectionModel;
62 void expanded(
const QModelIndex&);
63 void collapsed(
const QModelIndex&);
64 void updatePreviewWidget(
const QModelIndex&);
82 void SetShowHeaders(
bool);
87 void SetAlternatingRowColors(
bool);
92 void SetEnableDragDrop(
bool);
97 void SetShowRootNode(
bool);
102 void HideColumn(
int i);
107 void ShowColumn(
int i);
112 void HideAllButFirstColumn();
117 void SetFilterColumn(
int i);
122 #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
123 void SetFilterRegExp(
const QRegularExpression& pattern);
125 void SetFilterRegExp(
const QRegExp& pattern);
131 void SetFilterTreeLevel(
int level);
136 void Collapse(
const QModelIndex&
index);
146 void Expand(
const QModelIndex&
index);
158 void ExpandToDepth(
int depth);
163 void ResizeColumnToContents(
int column);
168 void SetUseColumnView(
int state);
178 void SetItemDelegate(QAbstractItemDelegate* delegate);
184 void SetColorArrayName(
const char*
name);
185 const char* GetColorArrayName();
192 void SetColorByArray(
bool vis);
193 bool GetColorByArray();
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;
virtual void ApplyViewTheme(vtkViewTheme *vtkNotUsed(theme))
Apply a theme to the view.
Adapts a tree to a Qt item model.
vtkTypeUInt32 vtkMTimeType
virtual void Update()
Update the view.
virtual QWidget * GetWidget()=0
Get the main container of this view (a QWidget).
virtual void AddRepresentationInternal(vtkDataRepresentation *vtkNotUsed(rep))
Subclass "hooks" for notifying subclasses of vtkView when representations are added or removed...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Sets theme colors for a graphical view.
a simple class to control print indentation
The superclass for all representations.
apply colors to a data set.
Superclass for Qt widget-based views.
virtual void RemoveRepresentationInternal(vtkDataRepresentation *vtkNotUsed(rep))
Meant for use by subclasses and vtkRepresentation subclasses.
A VTK view based on a Qt tree view.