QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
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
35{
36 Q_OBJECT
37 public:
44 QgsMapLayerStyleManagerWidget( QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent = nullptr );
45
46 public slots:
47 void apply() override {}
48
49 private slots:
50 void styleClicked( const QModelIndex &index );
51 void currentStyleChanged( const QString &name );
52 void styleAdded( const QString &name );
53 void styleRemoved( const QString &name );
54 void styleRenamed( const QString &oldname, const QString &newname );
55 void addStyle();
56 void removeStyle();
57 void renameStyle( QStandardItem *item );
58 void saveAsDefault();
59 void loadDefault();
60 void saveStyle();
61 void loadStyle();
62
63 private:
64 QStandardItemModel *mModel = nullptr;
65 QListView *mStyleList = nullptr;
66};
67
68#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.
The QgsMapLayerStyleManagerWidget class which is used to visually manage the layer styles.
Base class for all map layer types.
Definition qgsmaplayer.h:76