19 #ifndef vtkQtTreeView_h
20 #define vtkQtTreeView_h
23 #include "vtkViewsQtModule.h"
29 class QAbstractItemDelegate;
30 class QAbstractItemView;
35 class QItemSelectionModel;
38 VTK_ABI_NAMESPACE_BEGIN
48 void expanded(
const QModelIndex&);
49 void collapsed(
const QModelIndex&);
50 void updatePreviewWidget(
const QModelIndex&);
68 void SetShowHeaders(
bool);
73 void SetAlternatingRowColors(
bool);
78 void SetEnableDragDrop(
bool);
83 void SetShowRootNode(
bool);
88 void HideColumn(
int i);
93 void ShowColumn(
int i);
98 void HideAllButFirstColumn();
103 void SetFilterColumn(
int i);
108 #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0))
109 void SetFilterRegExp(
const QRegularExpression& pattern);
111 void SetFilterRegExp(
const QRegExp& pattern);
117 void SetFilterTreeLevel(
int level);
122 void Collapse(
const QModelIndex&
index);
132 void Expand(
const QModelIndex&
index);
144 void ExpandToDepth(
int depth);
149 void ResizeColumnToContents(
int column);
154 void SetUseColumnView(
int state);
164 void SetItemDelegate(QAbstractItemDelegate* delegate);
170 void SetColorArrayName(
const char*
name);
171 const char* GetColorArrayName();
178 void SetColorByArray(
bool vis);
179 bool GetColorByArray();
180 vtkBooleanMacro(ColorByArray,
bool);
193 void slotQtSelectionChanged(
const QItemSelection&,
const QItemSelection&);
196 void SetVTKSelection();
200 vtkSetStringMacro(ColorArrayNameInternal);
201 vtkGetStringMacro(ColorArrayNameInternal);
203 QPointer<QTreeView> TreeView;
204 QPointer<QColumnView> ColumnView;
205 QPointer<QWidget> Widget;
206 QPointer<QVBoxLayout> Layout;
207 QPointer<QItemSelectionModel> SelectionModel;
208 QList<int> HiddenColumns;
210 QAbstractItemView* View;
211 char* ColorArrayNameInternal;
220 VTK_ABI_NAMESPACE_END
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.