QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
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
25
class
QgsMapLayer
;
26
27
class
QAction;
28
class
QMenu;
29
30
38
39
class
GUI_EXPORT
QgsMapLayerStyleGuiUtils
:
public
QObject
40
{
41
Q_OBJECT
42
43
public
:
47
static
QgsMapLayerStyleGuiUtils
*
instance
();
48
52
void
addStyleManagerActions
( QMenu *m,
QgsMapLayer
*layer );
53
59
void
removesExtraMenuSeparators
( QMenu *m );
60
61
public
slots:
62
63
private
:
64
QAction *actionAddStyle(
QgsMapLayer
*layer, QObject *parent =
nullptr
);
65
QAction *actionRemoveStyle(
QgsMapLayer
*layer, QObject *parent =
nullptr
);
66
QAction *actionRenameStyle(
QgsMapLayer
*layer, QObject *parent =
nullptr
);
67
QList<QAction *> actionsUseStyle(
QgsMapLayer
*layer, QObject *parent =
nullptr
);
68
69
private
slots:
70
void
addStyle();
71
void
useStyle();
72
void
removeStyle();
73
void
renameStyle();
74
};
75
76
#endif
// QGSMAPLAYERSTYLEGUIUTILS_H
QgsMapLayerStyleGuiUtils
Various GUI utility functions for dealing with map layer's style manager.
Definition
qgsmaplayerstyleguiutils.h:40
QgsMapLayerStyleGuiUtils::removesExtraMenuSeparators
void removesExtraMenuSeparators(QMenu *m)
removes extra separators from the menu
Definition
qgsmaplayerstyleguiutils.cpp:102
QgsMapLayerStyleGuiUtils::addStyleManagerActions
void addStyleManagerActions(QMenu *m, QgsMapLayer *layer)
adds actions to the menu in accordance to the layer
Definition
qgsmaplayerstyleguiutils.cpp:87
QgsMapLayerStyleGuiUtils::instance
static QgsMapLayerStyleGuiUtils * instance()
returns a singleton instance of this class
Definition
qgsmaplayerstyleguiutils.cpp:33
QgsMapLayer
Base class for all map layer types.
Definition
qgsmaplayer.h:83
Generated on
for QGIS API Documentation by
1.17.0