QTfrontend/model/hats.h
changeset 6616 f77bb02b669f
parent 6061 15b4b485a1c5
child 6700 e04da46ee43c
equal deleted inserted replaced
6615:65602f1ef0f8 6616:f77bb02b669f
    25 #include <QPair>
    25 #include <QPair>
    26 #include <QIcon>
    26 #include <QIcon>
    27 
    27 
    28 class HatsModel : public QAbstractListModel
    28 class HatsModel : public QAbstractListModel
    29 {
    29 {
    30     Q_OBJECT
    30         Q_OBJECT
    31 
    31 
    32 public:
    32     public:
    33     HatsModel(QObject *parent = 0);
    33         HatsModel(QObject *parent = 0);
    34 
    34 
    35     QVariant headerData(int section, Qt::Orientation orientation, int role) const;
    35         QVariant headerData(int section, Qt::Orientation orientation, int role) const;
    36     int rowCount(const QModelIndex & parent) const;
    36         int rowCount(const QModelIndex & parent) const;
    37     //int columnCount(const QModelIndex & parent) const;
    37         //int columnCount(const QModelIndex & parent) const;
    38 
    38 
    39     QVariant data(const QModelIndex &index, int role) const;
    39         QVariant data(const QModelIndex &index, int role) const;
    40 protected:
    40     protected:
    41     QVector<QPair<QString, QIcon> > hats;
    41         QVector<QPair<QString, QIcon> > hats;
    42 };
    42 };
    43 
    43 
    44 #endif // _HATS_INCLUDED
    44 #endif // _HATS_INCLUDED