23 #ifndef KDSME_VIEW_ABSTRACTSCENE_H
24 #define KDSME_VIEW_ABSTRACTSCENE_H
26 #include "kdsme_view_export.h"
31 class QAbstractItemModel;
33 class QItemSelectionModel;
41 Q_PROPERTY(QAbstractItemModel* model READ model WRITE setModel NOTIFY modelChanged)
42 Q_PROPERTY(QQuickItem* instantiator READ instantiator WRITE setInstantiator NOTIFY instantiatorChanged)
43 Q_PROPERTY(ViewState viewState READ viewState NOTIFY stateChanged FINAL)
50 Q_DECLARE_FLAGS(EditTriggers, EditTrigger)
61 virtual void setModel(QAbstractItemModel *model);
62 QAbstractItemModel *model()
const;
64 virtual void setSelectionModel(QItemSelectionModel *selectionModel);
65 QItemSelectionModel *selectionModel()
const;
67 QQuickItem* instantiator()
const;
68 void setInstantiator(QQuickItem* instantiator);
70 void setEditTriggers(EditTriggers triggers);
71 EditTriggers editTriggers()
const;
73 QObject* itemForIndex(
const QModelIndex& index)
const;
75 ViewState viewState()
const;
77 QModelIndex currentIndex()
const;
80 void setCurrentIndex(
const QModelIndex& index);
83 virtual void selectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected);
84 virtual void currentChanged(
const QModelIndex& current,
const QModelIndex& previous);
86 virtual void rowsInserted(
const QModelIndex& parent,
int start,
int end);
87 virtual void rowsAboutToBeRemoved(
const QModelIndex& parent,
int start,
int end);
93 virtual void layoutChanged();
95 void setViewState(ViewState state);
98 void modelChanged(QAbstractItemModel* model);
99 void stateChanged(ViewState state);
100 void instantiatorChanged(QObject* instantiator);
104 QScopedPointer<Private> d;
110 Q_DECLARE_METATYPE(
KDSME::AbstractScene::ViewState)
112 #endif // ABSTRACTVIEW_H
Definition: abstractscene.h:38
Definition: abstractexporter.h:33