34 #ifndef vtkQtTreeView_h
35 #define vtkQtTreeView_h
44 class QAbstractItemDelegate;
45 class QAbstractItemView;
46 class QFilterTreeProxyModel;
54 class QItemSelectionModel;
61 void expanded(
const QModelIndex&);
62 void collapsed(
const QModelIndex&);
63 void updatePreviewWidget(
const QModelIndex&);
76 void SetShowHeaders(
bool);
79 void SetAlternatingRowColors(
bool);
82 void SetEnableDragDrop(
bool);
85 void SetShowRootNode(
bool);
88 void HideColumn(
int i);
91 void ShowColumn(
int i);
94 void HideAllButFirstColumn();
97 void SetFilterColumn(
int i);
100 void SetFilterRegExp(
const QRegExp& pattern);
103 void SetFilterTreeLevel(
int level);
106 void Collapse(
const QModelIndex &
index );
112 void Expand (
const QModelIndex &
index );
119 void ExpandToDepth (
int depth );
122 void ResizeColumnToContents (
int column );
125 void SetUseColumnView(
int state);
131 void SetItemDelegate(QAbstractItemDelegate* delegate);
135 void SetColorArrayName(
const char*
name);
136 const char* GetColorArrayName();
141 void SetColorByArray(
bool vis);
142 bool GetColorByArray();
143 vtkBooleanMacro(ColorByArray,
bool);
156 void slotQtSelectionChanged(
const QItemSelection&,
const QItemSelection&);
159 void SetVTKSelection();
160 unsigned long CurrentSelectionMTime;
161 unsigned long LastInputMTime;
163 vtkSetStringMacro(ColorArrayNameInternal);
164 vtkGetStringMacro(ColorArrayNameInternal);
166 QPointer<QTreeView> TreeView;
167 QPointer<QColumnView> ColumnView;
168 QPointer<QWidget> Widget;
169 QPointer<QVBoxLayout> Layout;
170 QPointer<QItemSelectionModel> SelectionModel;
171 QList<int> HiddenColumns;
173 QAbstractItemView* View;
174 char* ColorArrayNameInternal;
175 QFilterTreeProxyModel* TreeFilter;
virtual void ApplyViewTheme(vtkViewTheme *vtkNotUsed(theme))
Adapts a tree to a Qt item model.
virtual QWidget * GetWidget()=0
#define VTKVIEWSQT_EXPORT
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.