1 #ifndef OSMSCOUT_CLIENT_QT_MAPSTYLEMODEL_H 2 #define OSMSCOUT_CLIENT_QT_MAPSTYLEMODEL_H 24 #include <QAbstractListModel> 38 Q_PROPERTY(QString style READ getStyle WRITE setStyle NOTIFY styleChanged)
45 void loadStyleRequested(QString,std::unordered_map<std::string,bool>);
49 NameRole = Qt::UserRole,
50 FileRole = Qt::UserRole+1,
51 PathRole = Qt::UserRole+2,
58 QString getStyle()
const;
59 void setStyle(
const QString &style);
61 Q_INVOKABLE
virtual int inline rowCount(
const QModelIndex &)
const 63 return stylesheets.size();
66 Q_INVOKABLE
virtual QVariant data(
const QModelIndex &index,
int role)
const;
67 virtual QHash<int, QByteArray> roleNames()
const;
68 Q_INVOKABLE
virtual Qt::ItemFlags flags(
const QModelIndex &index)
const;
70 Q_INVOKABLE
int indexOf(
const QString &style)
const;
71 Q_INVOKABLE QString file(
int i)
const;
74 QList<QFileInfo> stylesheets;
#define OSMSCOUT_CLIENT_QT_API
Definition: ClientQtImportExport.h:45
Definition: MapStyleModel.h:35
virtual Q_INVOKABLE int rowCount(const QModelIndex &) const
Definition: MapStyleModel.h:61
Definition: StyleModule.h:34
Roles
Definition: MapStyleModel.h:48