QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsmaplayerstyleguiutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmaplayerstyleguiutils.h
3 --------------------------------------
4 Date : January 2015
5 Copyright : (C) 2015 by Martin Dobias
6 Email : wonder dot sk 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
16#ifndef QGSMAPLAYERSTYLEGUIUTILS_H
17#define QGSMAPLAYERSTYLEGUIUTILS_H
18
19#include <QObject>
20#include "qgis_gui.h"
21
22#define SIP_NO_FILE
23
24class QgsMapLayer;
25
26class QAction;
27class QMenu;
28
29
38class GUI_EXPORT QgsMapLayerStyleGuiUtils : public QObject
39{
40 Q_OBJECT
41
42 public:
46 static QgsMapLayerStyleGuiUtils *instance();
47
51 void addStyleManagerActions( QMenu *m, QgsMapLayer *layer );
52
58 void removesExtraMenuSeparators( QMenu *m );
59
60 public slots:
61
62 private:
63 QAction *actionAddStyle( QgsMapLayer *layer, QObject *parent = nullptr );
64 QAction *actionRemoveStyle( QgsMapLayer *layer, QObject *parent = nullptr );
65 QAction *actionRenameStyle( QgsMapLayer *layer, QObject *parent = nullptr );
66 QList<QAction *> actionsUseStyle( QgsMapLayer *layer, QObject *parent = nullptr );
67
68 private slots:
69 void addStyle();
70 void useStyle();
71 void removeStyle();
72 void renameStyle();
73};
74
75#endif // QGSMAPLAYERSTYLEGUIUTILS_H
Various GUI utility functions for dealing with map layer's style manager.
Base class for all map layer types.
Definition qgsmaplayer.h:76