libosmscout 0.1
Loading...
Searching...
No Matches
osmscout::MapStyleModel Class Reference

#include <MapStyleModel.h>

Inheritance diagram for osmscout::MapStyleModel:

Public Types

enum  Roles { NameRole = Qt::UserRole , FileRole = Qt::UserRole+1 , PathRole = Qt::UserRole+2 }

Signals

void loadStyleRequested (QString, std::unordered_map< std::string, bool >)
void styleChanged ()

Public Member Functions

Q_INVOKABLE QVariant data (const QModelIndex &index, int role) const override
Q_INVOKABLE QString file (int i) const
Q_INVOKABLE Qt::ItemFlags flags (const QModelIndex &index) const override
QString getStyle () const
Q_INVOKABLE int indexOf (const QString &style) const
 MapStyleModel ()
QHash< int, QByteArray > roleNames () const override
Q_INVOKABLE int rowCount (const QModelIndex &parent=QModelIndex()) const override
void setStyle (const QString &style)
 ~MapStyleModel () override

Properties

QString style

Member Enumeration Documentation

◆ Roles

Enumerator
NameRole 
FileRole 
PathRole 

Constructor & Destructor Documentation

◆ MapStyleModel()

◆ ~MapStyleModel()

osmscout::MapStyleModel::~MapStyleModel ( )
override

Member Function Documentation

◆ data()

QVariant osmscout::MapStyleModel::data ( const QModelIndex & index,
int role ) const
override

References file(), FileRole, NameRole, and PathRole.

◆ file()

Q_INVOKABLE QString osmscout::MapStyleModel::file ( int i) const

Referenced by data().

◆ flags()

Qt::ItemFlags osmscout::MapStyleModel::flags ( const QModelIndex & index) const
override

◆ getStyle()

QString osmscout::MapStyleModel::getStyle ( ) const

◆ indexOf()

Q_INVOKABLE int osmscout::MapStyleModel::indexOf ( const QString & style) const

References style.

◆ loadStyleRequested

void osmscout::MapStyleModel::loadStyleRequested ( QString ,
std::unordered_map< std::string, bool >  )
signal

Referenced by MapStyleModel(), and setStyle().

◆ roleNames()

QHash< int, QByteArray > osmscout::MapStyleModel::roleNames ( ) const
override

References FileRole, NameRole, and PathRole.

◆ rowCount()

Q_INVOKABLE int osmscout::MapStyleModel::rowCount ( const QModelIndex & parent = QModelIndex()) const
inlineoverride

◆ setStyle()

void osmscout::MapStyleModel::setStyle ( const QString & style)

◆ styleChanged

void osmscout::MapStyleModel::styleChanged ( )
signal

Referenced by MapStyleModel().

Property Documentation

◆ style

QString osmscout::MapStyleModel::style
readwrite

Referenced by indexOf().


The documentation for this class was generated from the following files: