QGIS API Documentation 3.43.0-Master (c67cf405802)
qgsmaplayerstylemanagerwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmaplayerstylemanagerwidget.h
3 ---------------------
4 begin : June 2016
5 copyright : (C) 2016 by Nathan Woodrow
6 email : woodrow dot nathan at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15#ifndef QGSMAPLAYERSTYLEMANAGERWIDGET_H
16#define QGSMAPLAYERSTYLEMANAGERWIDGET_H
17
18#include <QWidget>
19#include <QListView>
20#include <QStandardItemModel>
21
23#include "qgis_gui.h"
24
25class QgsMapLayer;
26class QgsMapCanvas;
27
28
34{
35 Q_OBJECT
36 public:
43 QgsMapLayerStyleManagerWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent = nullptr );
44
45 public slots:
46 void apply() override {}
47
48 private slots:
49 void styleClicked( const QModelIndex &index );
50 void currentStyleChanged( const QString &name );
51 void styleAdded( const QString &name );
52 void styleRemoved( const QString &name );
53 void styleRenamed( const QString &oldname, const QString &newname );
54 void addStyle();
55 void removeStyle();
56 void renameStyle( QStandardItem *item );
57 void saveAsDefault();
58 void loadDefault();
59 void saveStyle();
60 void loadStyle();
61
62 private:
63 QStandardItemModel *mModel = nullptr;
64 QListView *mStyleList = nullptr;
65};
66
67#endif // QGSMAPLAYERSTYLEMANAGERWIDGET_H
Map canvas is a class for displaying all GIS data types on a canvas.
A panel widget that can be shown in the map style dock.
A widget which is used to visually manage the layer styles.
Base class for all map layer types.
Definition qgsmaplayer.h:77