QTfrontend/model/roomslistmodel.h
author unc0rr
Thu, 23 Feb 2012 00:46:03 +0400
changeset 6732 c906dc78091f
child 6733 5abbc345a82f
permissions -rw-r--r--
Start switching to rooms list model. To be continued.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6732
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
     1
#ifndef ROOMSLISTMODEL_H
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
     2
#define ROOMSLISTMODEL_H
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
     3
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
     4
#include <QAbstractTableModel>
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
     5
#include <QStringList>
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
     6
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
     7
class RoomsListModel : public QAbstractTableModel
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
     8
{
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
     9
    Q_OBJECT
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    10
public:
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    11
    explicit RoomsListModel(QObject *parent = 0);
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    12
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    13
    QVariant headerData(int section, Qt::Orientation orientation, int role) const;
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    14
    int rowCount(const QModelIndex & parent) const;
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    15
    int columnCount(const QModelIndex & parent) const;
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    16
    QVariant data(const QModelIndex &index, int role) const;
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    17
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    18
private:
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    19
    QList<QStringList> m_data;
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    20
    QStringList m_headerData;
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    21
};
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    22
c906dc78091f Start switching to rooms list model. To be continued.
unc0rr
parents:
diff changeset
    23
#endif // ROOMSLISTMODEL_H