2 * Stringlistmodel class
4 * @author Toni Jussila <toni.jussila@fudeco.com>
5 * @copyright (c) 2010 Speed Freak team
6 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
7 * @exaple http://qt.nokia.com/doc/4.0/qt4-interview.html#example-code
10 #ifndef STRINGLISTMODEL_H
11 #define STRINGLISTMODEL_H
12 #include <QAbstractListModel>
14 #include <QStringList>
16 class StringListModel : public QAbstractListModel
20 StringListModel(const QStringList &strings, QObject *parent = 0):QAbstractListModel(parent), stringList(strings) {}
21 int rowCount(const QModelIndex &parent = QModelIndex()) const;
22 QVariant data(const QModelIndex &index, int role) const;
23 QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
26 QStringList stringList;
29 #endif // STRINGLISTMODEL_H