diff options
Diffstat (limited to 'src/library/proxytrackmodel.h')
-rw-r--r-- | src/library/proxytrackmodel.h | 57 |
1 files changed, 27 insertions, 30 deletions
diff --git a/src/library/proxytrackmodel.h b/src/library/proxytrackmodel.h index b2c5fa76e6..716a568092 100644 --- a/src/library/proxytrackmodel.h +++ b/src/library/proxytrackmodel.h @@ -1,8 +1,5 @@ -// proxytrackmodel.h -// Created 10/22/2009 by RJ Ryan (rryan@mit.edu) - -#ifndef PROXYTRACKMODEL_H -#define PROXYTRACKMODEL_H +#ifndef MIXXX_PROXYTRACKMODEL_H +#define MIXXX_PROXYTRACKMODEL_H #include <QSortFilterProxyModel> #include <QAbstractItemModel> @@ -22,30 +19,30 @@ class ProxyTrackModel : public QSortFilterProxyModel, public TrackModel { // composes. If bHandleSearches is true, then search signals will not be // delivered to pTrackModel -- instead the ProxyTrackModel will do its own // filtering. - ProxyTrackModel(QAbstractItemModel* pTrackModel, bool bHandleSearches=true); - virtual ~ProxyTrackModel(); - - virtual TrackPointer getTrack(const QModelIndex& index) const; - virtual QString getTrackLocation(const QModelIndex& index) const; - virtual TrackId getTrackId(const QModelIndex& index) const; - virtual const QLinkedList<int> getTrackRows(TrackId trackId) const; - virtual void search(const QString& searchText,const QString& extraFilter=QString()); - virtual const QString currentSearch() const; - virtual bool isColumnInternal(int column); - virtual bool isColumnHiddenByDefault(int column); - virtual void removeTracks(const QModelIndexList& indices); - virtual void moveTrack(const QModelIndex& sourceIndex, - const QModelIndex& destIndex); - void deleteTracks(const QModelIndexList& indices); - virtual QAbstractItemDelegate* delegateForColumn(const int i, QObject* pParent); - virtual TrackModel::CapabilitiesFlags getCapabilities() const; - - bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const; - - virtual QString getModelSetting(QString name); - virtual bool setModelSetting(QString name, QVariant value); - - void sort(int column, Qt::SortOrder order = Qt::AscendingOrder); + explicit ProxyTrackModel(QAbstractItemModel* pTrackModel, bool bHandleSearches = true); + ~ProxyTrackModel() override; + + // Inherited from TrackModel + CapabilitiesFlags getCapabilities() const final; + TrackPointer getTrack(const QModelIndex& index) const final; + QString getTrackLocation(const QModelIndex& index) const final; + TrackId getTrackId(const QModelIndex& index) const final; + const QLinkedList<int> getTrackRows(TrackId trackId) const final; + void search(const QString& searchText,const QString& extraFilter = QString()) final; + const QString currentSearch() const final; + bool isColumnInternal(int column) final; + bool isColumnHiddenByDefault(int column) final; + void removeTracks(const QModelIndexList& indices) final; + void moveTrack(const QModelIndex& sourceIndex, const QModelIndex& destIndex) final; + QAbstractItemDelegate* delegateForColumn(const int i, QObject* pParent) final; + QString getModelSetting(QString name) final; + bool setModelSetting(QString name, QVariant value) final; + + // Inherited from QSortFilterProxyModel + bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const final; + + // Inherited from QAbstractItemModel + void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) final; private: TrackModel* m_pTrackModel; @@ -53,4 +50,4 @@ class ProxyTrackModel : public QSortFilterProxyModel, public TrackModel { bool m_bHandleSearches; }; -#endif /* PROXYTRACKMODEL_H */ +#endif // MIXXX_PROXYTRACKMODEL_H |