35 #ifndef vtkQtTreeView_h 36 #define vtkQtTreeView_h 38 #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 void SetFilterRegExp(
const QRegExp& pattern);
127 void SetFilterTreeLevel(
int level);
132 void Collapse(
const QModelIndex &
index );
142 void Expand (
const QModelIndex &
index );
154 void ExpandToDepth (
int depth );
159 void ResizeColumnToContents (
int column );
164 void SetUseColumnView(
int state);
174 void SetItemDelegate(QAbstractItemDelegate* delegate);
180 void SetColorArrayName(
const char*
name);
181 const char* GetColorArrayName();
188 void SetColorByArray(
bool vis);
189 bool GetColorByArray();
190 vtkBooleanMacro(ColorByArray,
bool);
203 void slotQtSelectionChanged(
const QItemSelection&,
const QItemSelection&);
206 void SetVTKSelection();
210 vtkSetStringMacro(ColorArrayNameInternal);
211 vtkGetStringMacro(ColorArrayNameInternal);
213 QPointer<QTreeView> TreeView;
214 QPointer<QColumnView> ColumnView;
215 QPointer<QWidget> Widget;
216 QPointer<QVBoxLayout> Layout;
217 QPointer<QItemSelectionModel> SelectionModel;
218 QList<int> HiddenColumns;
220 QAbstractItemView* View;
221 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.