QGIS API Documentation 3.99.0-Master (26c88405ac0)
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 "qgis_gui.h"
20
21#include <QObject>
22
23#define SIP_NO_FILE
24
25class QgsMapLayer;
26
27class QAction;
28class QMenu;
29
30
38
39class GUI_EXPORT QgsMapLayerStyleGuiUtils : public QObject
40{
41 Q_OBJECT
42
43 public:
44
49
53 void addStyleManagerActions( QMenu *m, QgsMapLayer *layer );
54
60 void removesExtraMenuSeparators( QMenu *m );
61
62 public slots:
63
64 private:
65 QAction *actionAddStyle( QgsMapLayer *layer, QObject *parent = nullptr );
66 QAction *actionRemoveStyle( QgsMapLayer *layer, QObject *parent = nullptr );
67 QAction *actionRenameStyle( QgsMapLayer *layer, QObject *parent = nullptr );
68 QList<QAction *> actionsUseStyle( QgsMapLayer *layer, QObject *parent = nullptr );
69
70 private slots:
71 void addStyle();
72 void useStyle();
73 void removeStyle();
74 void renameStyle();
75};
76
77#endif // QGSMAPLAYERSTYLEGUIUTILS_H
Various GUI utility functions for dealing with map layer's style manager.
void removesExtraMenuSeparators(QMenu *m)
removes extra separators from the menu
void addStyleManagerActions(QMenu *m, QgsMapLayer *layer)
adds actions to the menu in accordance to the layer
static QgsMapLayerStyleGuiUtils * instance()
returns a singleton instance of this class
Base class for all map layer types.
Definition qgsmaplayer.h:80