22 #ifndef TREEVIEWCOMBOBOX_H
23 #define TREEVIEWCOMBOBOX_H
30 #include <tulip/tulipconf.h>
34 class TLP_QT_SCOPE DeferredUpdateTreeView :
public QTreeView {
40 DeferredUpdateTreeView(QWidget *parent = 0);
42 ~DeferredUpdateTreeView();
46 void dataChanged(
const QModelIndex & topLeft,
const QModelIndex & bottomRight);
48 void callDataChanged();
50 void rowsAboutToBeRemoved(
const QModelIndex & parent,
int start,
int end);
52 void rowsInserted(
const QModelIndex & parent,
int start,
int end);
56 void cancelUpdates(
const QModelIndex &parent);
58 QMap<QPair<QModelIndex, QModelIndex>, QTimer *> _updateTimers;
62 class TLP_QT_SCOPE TreeViewComboBox :
public QComboBox {
68 QModelIndex _lastIndex;
71 explicit TreeViewComboBox(QWidget *parent = NULL);
73 void setModel(QAbstractItemModel * model);
75 virtual void showPopup();
76 virtual void hidePopup();
78 QModelIndex selectedIndex()
const;
80 bool eventFilter(QObject*, QEvent*);
84 void selectIndex(
const QModelIndex&);
85 void rowsRemoved(
const QModelIndex&,
int,
int);
86 void currentIndexChanged();
90 void currentItemChanged();
94 #endif // TREEVIEWCOMBOBOX_H