QTfrontend/hats.h
changeset 2948 3f21a9dc93d0
parent 1239 4901abe4c3b0
child 3236 4ab3917d7d44
equal deleted inserted replaced
2947:803b277e4894 2948:3f21a9dc93d0
    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