Sayonara Player
HistoryEntryModel.h
1 #ifndef HISTORYENTRYMODEL_H
2 #define HISTORYENTRYMODEL_H
3 
4 #include <QObject>
5 #include <QAbstractTableModel>
6 
7 #include "Utils/Pimpl.h"
8 #include "Utils/Session/SessionUtils.h"
9 
11  public QAbstractTableModel
12 {
13  Q_OBJECT
14  PIMPL(HistoryEntryModel)
15 
16  signals:
17  void sigRowsAdded();
18 
19  private:
20  const Session::Entry& entry(int row) const;
21 
22  public:
23  HistoryEntryModel(Session::Timecode timecode, QObject* parent=nullptr);
24  ~HistoryEntryModel() override;
25 
26  // QAbstractItemModel interface
27  public:
28  QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
29  int rowCount(const QModelIndex& parent) const override;
30  int columnCount(const QModelIndex& parent) const override;
31  QVariant data(const QModelIndex& index, int role) const override;
32 
33  Qt::ItemFlags flags(const QModelIndex& index) const override;
34  QMimeData* mimeData(const QModelIndexList& indexes) const override;
35 
36  private slots:
37  void historyChanged(Session::Id id);
38 
39  protected:
40  void languageChanged();
41 };
42 
43 #endif // HISTORYENTRYMODEL_H
HistoryEntryModel
Definition: HistoryEntryModel.h:12
Session::Entry
Definition: SessionUtils.h:16