1 #ifndef COLORSAMPLEMODEL_H
2 #define COLORSAMPLEMODEL_H
4 #include <QAbstractTableModel>
8 typedef QMap<QString, QColor> ColorMap;
10 class ColorSampleModel : public QAbstractTableModel
14 explicit ColorSampleModel(QObject *parent = 0);
16 const QFont& font() { return m_font; }
17 void setFont(const QFont &font);
19 void setColorMap(ColorMap *colorMap) {
20 m_colorMap = colorMap;
37 // QAbstractItemModel interface
39 int rowCount(const QModelIndex &parent) const;
40 int columnCount(const QModelIndex &parent) const;
41 QVariant data(const QModelIndex &index, int role) const;
45 #endif // COLORSAMPLEMODEL_H