#pragma once /** * @RDE_HEADER@ * Proxy Model for hiding empty tracks and sorting tracks by name plus having the "Markers" track always at the top * $Id: $ * $HeadURL: $ * $Author: $ * * Created by Mike Lennart Wille, SLTE, 2022-06-22 */ #include class QModelIndex; namespace Timeline { class TimelineModel; class TimelineProxyModel : public QSortFilterProxyModel { Q_OBJECT public: TimelineProxyModel(); bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const override; //virtual bool filterAcceptsColumn(int source_column, const QModelIndex &source_parent) const; bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override; void toggleShowAllRows(); private: mutable TimelineModel *m_modelCachedPointer { nullptr }; bool m_forceShowAllRows { false }; }; } // namespace Timeline