X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fabstractitemview.h;h=fe2c8d002740f234d8d5618652f50c4f64f766d2;hb=694f9bfbf7f1af19108461c7e00d133e55082bce;hp=1ddcd440c5ca5f9e51d1041547039ff865e305d5;hpb=61c8d84d1c849373e0f115dc748ed45cff95287d;p=quassel.git diff --git a/src/uisupport/abstractitemview.h b/src/uisupport/abstractitemview.h index 1ddcd440..fe2c8d00 100644 --- a/src/uisupport/abstractitemview.h +++ b/src/uisupport/abstractitemview.h @@ -29,33 +29,35 @@ #include #include -class AbstractItemView : public QWidget { - Q_OBJECT +class AbstractItemView : public QWidget +{ + Q_OBJECT public: - AbstractItemView(QWidget *parent = 0); + AbstractItemView(QWidget *parent = 0); - inline QAbstractItemModel *model() { return _model; } - void setModel(QAbstractItemModel *model); + inline QAbstractItemModel *model() { return _model; } + void setModel(QAbstractItemModel *model); - inline QItemSelectionModel *selectionModel() const { return _selectionModel; } - void setSelectionModel(QItemSelectionModel *selectionModel); + inline QItemSelectionModel *selectionModel() const { return _selectionModel; } + void setSelectionModel(QItemSelectionModel *selectionModel); - inline QModelIndex currentIndex() const { return _selectionModel->currentIndex(); } + inline QModelIndex currentIndex() const { return _selectionModel->currentIndex(); } protected slots: - virtual void closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint) {}; - virtual void commitData(QWidget *) {}; - virtual void currentChanged(const QModelIndex &, const QModelIndex &) {}; - virtual void dataChanged(const QModelIndex &, const QModelIndex &) {}; - virtual void editorDestroyed(QObject *) {}; - virtual void rowsAboutToBeRemoved(const QModelIndex &, int, int) {}; - virtual void rowsInserted(const QModelIndex &, int, int) {}; - virtual void selectionChanged(const QItemSelection &, const QItemSelection &) {}; + virtual void closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint) {}; + virtual void commitData(QWidget *) {}; + virtual void currentChanged(const QModelIndex &, const QModelIndex &) {}; + virtual void dataChanged(const QModelIndex &, const QModelIndex &) {}; + virtual void editorDestroyed(QObject *) {}; + virtual void rowsAboutToBeRemoved(const QModelIndex &, int, int) {}; + virtual void rowsInserted(const QModelIndex &, int, int) {}; + virtual void selectionChanged(const QItemSelection &, const QItemSelection &) {}; protected: - QPointer _model; - QPointer _selectionModel; + QPointer _model; + QPointer _selectionModel; }; + #endif // ABSTRACTITEMVIEW_H