QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
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 
24 class QgsMapLayer;
25 class QgsMapCanvas;
26 
27 
33 {
34  Q_OBJECT
35  public:
36 
43  QgsMapLayerStyleManagerWidget( QgsMapLayer* layer, QgsMapCanvas* canvas, QWidget *parent = 0 );
44 
45  public slots:
46  void apply() override {}
47 
48  private slots:
49  void styleClicked( QModelIndex index );
50  void currentStyleChanged( QString name );
51  void styleAdded( QString name );
52  void styleRemoved( QString name );
53  void styleRenamed( QString oldname, QString newname );
54  void addStyle();
55  void removeStyle();
56  void saveAsDefault();
57  void loadDefault();
58  void saveStyle();
59  void loadStyle();
60 
61  private:
62  QStandardItemModel* mModel;
63  QListView* mStyleList;
64 };
65 
66 #endif // QGSMAPLAYERSTYLEMANAGERWIDGET_H
A panel widget that can be shown in the map style dock.
static unsigned index
Base class for all map layer types.
Definition: qgsmaplayer.h:49
The QgsMapLayerStyleManagerWidget class which is used to visually manage the layer styles...
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:109