~neon/artikulate/master

« back to all changes in this revision

Viewing changes to src/models/phonememodel.h

  • Committer: Andreas Cord-Landwehr
  • Date: 2019-10-06 13:16:30 UTC
  • Revision ID: git-v1:b98d015c9b38565336ded688dca3b324a09acac1
GIT_SILENT: application of coding style

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
class Language;
28
28
class QSignalMapper;
29
29
 
30
 
 
31
30
class PhonemeModel : public QAbstractListModel
32
31
{
33
32
    Q_OBJECT
34
33
    Q_PROPERTY(Language *language READ language WRITE setLanguage NOTIFY languageChanged)
35
34
 
36
35
public:
37
 
    enum courseRoles {
38
 
        TitleRole = Qt::UserRole + 1,
39
 
        IdRole,
40
 
        DataRole
41
 
    };
 
36
    enum courseRoles { TitleRole = Qt::UserRole + 1, IdRole, DataRole };
42
37
 
43
38
    explicit PhonemeModel(QObject *parent = nullptr);
44
39
    /**
45
40
     * Reimplemented from QAbstractListModel::roleNames()
46
41
     */
47
 
    virtual QHash<int,QByteArray> roleNames() const override;
 
42
    virtual QHash<int, QByteArray> roleNames() const override;
48
43
    void setLanguage(Language *language);
49
 
    Language * language() const;
 
44
    Language *language() const;
50
45
    virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
51
46
    virtual int rowCount(const QModelIndex &parent = QModelIndex()) const override;
52
47
    virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;