34 #ifndef vtkQtTreeView_h
35 #define vtkQtTreeView_h
37 #include "vtkViewsQtModule.h"
38 #include "QVTKWin32Header.h"
45 #include "QFilterTreeProxyModel.h"
47 class QAbstractItemDelegate;
48 class QAbstractItemView;
55 class QItemSelectionModel;
62 void expanded(
const QModelIndex&);
63 void collapsed(
const QModelIndex&);
64 void updatePreviewWidget(
const QModelIndex&);
77 void SetShowHeaders(
bool);
80 void SetAlternatingRowColors(
bool);
83 void SetEnableDragDrop(
bool);
86 void SetShowRootNode(
bool);
89 void HideColumn(
int i);
92 void ShowColumn(
int i);
95 void HideAllButFirstColumn();
98 void SetFilterColumn(
int i);
101 void SetFilterRegExp(
const QRegExp& pattern);
104 void SetFilterTreeLevel(
int level);
107 void Collapse(
const QModelIndex &
index );
113 void Expand (
const QModelIndex &
index );
120 void ExpandToDepth (
int depth );
123 void ResizeColumnToContents (
int column );
126 void SetUseColumnView(
int state);
132 void SetItemDelegate(QAbstractItemDelegate* delegate);
136 void SetColorArrayName(
const char*
name);
137 const char* GetColorArrayName();
142 void SetColorByArray(
bool vis);
143 bool GetColorByArray();
144 vtkBooleanMacro(ColorByArray,
bool);
157 void slotQtSelectionChanged(
const QItemSelection&,
const QItemSelection&);
160 void SetVTKSelection();
161 unsigned long CurrentSelectionMTime;
162 unsigned long LastInputMTime;
164 vtkSetStringMacro(ColorArrayNameInternal);
165 vtkGetStringMacro(ColorArrayNameInternal);
167 QPointer<QTreeView> TreeView;
168 QPointer<QColumnView> ColumnView;
169 QPointer<QWidget> Widget;
170 QPointer<QVBoxLayout> Layout;
171 QPointer<QItemSelectionModel> SelectionModel;
172 QList<int> HiddenColumns;
174 QAbstractItemView* View;
175 char* ColorArrayNameInternal;
176 QFilterTreeProxyModel* TreeFilter;
virtual void ApplyViewTheme(vtkViewTheme *vtkNotUsed(theme))
Adapts a tree to a Qt item model.
virtual QWidget * GetWidget()=0
virtual void AddRepresentationInternal(vtkDataRepresentation *vtkNotUsed(rep))
Sets theme colors for a graphical view.
a simple class to control print indentation
void PrintSelf(ostream &os, vtkIndent indent)
The superclass for all representations.
apply colors to a data set.
Superclass for Qt widget-based views.
virtual void RemoveRepresentationInternal(vtkDataRepresentation *vtkNotUsed(rep))
A VTK view based on a Qt tree view.