Linux multi-monitor fullscreen support
[ryzomcore.git] / nel / tools / 3d / tile_edit_qt / tiles_model.h
blobde093fe094f3badd6cdac22fee29519d2dd5ea26
1 #ifndef TILESMODEL_H
2 #define TILESMODEL_H
4 #include <QtCore/QtCore>
5 #include <QtGui/QtGui>
7 class TileModel
10 public:
11 TileModel();
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; };
20 private:
21 int pixmapSide;
22 QPixmap pixmap;
23 QString tileLabel;
24 int index;
29 class tiles_model : public QAbstractListModel
31 Q_OBJECT
33 public:
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();
47 private:
48 QList<TileModel> tiles;
51 #endif