15#ifndef QGSMAPLAYERSTYLEMANAGERWIDGET_H
16#define QGSMAPLAYERSTYLEMANAGERWIDGET_H
21#include <QAbstractListModel>
48 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
49 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
50 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
51 Qt::ItemFlags
flags(
const QModelIndex &index )
const override;
60 void styleAdded(
const QString &name );
61 void styleRemoved(
const QString &name );
62 void styleRenamed(
const QString &oldname,
const QString &newname );
65 QPointer< QgsMapLayerStyleManager > mManager;
66 QStringList mStyleNames;
89 void selectionChanged(
const QItemSelection &selected,
const QItemSelection &deselected );
90 void currentStyleChanged(
const QString &name );
100 QListView *mStyleList =
nullptr;
Map canvas is a class for displaying all GIS data types on a canvas.
Management of styles for use with one map layer.
A model for display of styles from a QgsMapLayerStyleManager.
int rowCount(const QModelIndex &parent=QModelIndex()) const override
QModelIndex indexForName(const QString &name) const
Returns the model index corresponding to the specified style name.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Qt::ItemFlags flags(const QModelIndex &index) const override
QgsMapLayerStyleModel(QgsMapLayerStyleManager *manager, QObject *parent=nullptr)
Constructor for QgsMapLayerStyleModel, showing styles from the specified manager.
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Base class for all map layer types.