4 #include <QtCore/QtCore>
12 TileModel(int pixmapSide
, QString tileLabel
, int index
);
13 TileModel(const QPixmap
&pixmap
, QString tileLabel
, int index
);
15 int getPixmapSide() const { return pixmapSide
; };
16 QPixmap
getPixmap() const { return pixmap
; };
17 QString
getTileLabel() const { return tileLabel
; };
18 int getIndex() const { return index
; };
29 class tiles_model
: public QAbstractListModel
34 tiles_model(QObject
*parent
= 0);
36 Qt::ItemFlags
flags(const QModelIndex
&index
) const;
37 QVariant
data(const QModelIndex
&index
, int role
= Qt::DisplayRole
) const;
38 bool removeRows(int row
, int count
, const QModelIndex
&parent
);
39 int rowCount(const QModelIndex
&parent
) const;
41 void sort ( int column
= 0, Qt::SortOrder order
= Qt::AscendingOrder
);
43 void addTile(const TileModel
&tile
);
45 void removeAllTiles();
48 QList
<TileModel
> tiles
;