QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
src
gui
symbology-ng
qgsstylev2managerdialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsstylev2managerdialog.h
3
---------------------
4
begin : November 2009
5
copyright : (C) 2009 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 QGSSTYLEV2MANAGERDIALOG_H
17
#define QGSSTYLEV2MANAGERDIALOG_H
18
19
#include <QDialog>
20
#include <QStandardItem>
21
#include <QAction>
22
#include <QMenu>
23
24
#include "ui_qgsstylev2managerdialogbase.h"
25
#include "
qgscontexthelp.h
"
26
27
class
QgsStyleV2
;
28
32
class
GUI_EXPORT
QgsStyleV2ManagerDialog
:
public
QDialog
,
private
Ui::QgsStyleV2ManagerDialogBase
33
{
34
Q_OBJECT
35
36
public
:
37
QgsStyleV2ManagerDialog
(
QgsStyleV2
* style,
QWidget
* parent =
nullptr
);
38
40
static
QString
addColorRampStatic(
QWidget
* parent,
QgsStyleV2
* style,
41
QString
RampType =
QString
() );
42
43
public
slots:
44
void
addItem();
45
void
editItem();
46
void
removeItem();
47
void
exportItemsSVG();
48
void
exportItemsPNG();
49
void
exportSelectedItemsImages(
const
QString
& dir,
const
QString
& format,
QSize
size );
50
void
exportItems();
51
void
importItems();
52
53
void
on_tabItemType_currentChanged(
int
);
55
void
populateList();
56
58
void
onFinished();
59
60
void
on_buttonBox_helpRequested
() {
QgsContextHelp::run
(
metaObject
()->
className
() ); }
61
62
void
itemChanged(
QStandardItem
* item );
63
64
void
groupChanged(
const
QModelIndex
& );
65
void
groupRenamed(
QStandardItem
* );
66
void
addGroup();
67
void
removeGroup();
68
70
void
groupSymbolsAction();
71
73
void
editSmartgroupAction();
74
76
void
regrouped(
QStandardItem
* );
77
79
void
filterSymbols(
const
QString
& );
80
82
void
tagsChanged();
83
85
void
symbolSelected(
const
QModelIndex
& );
86
88
void
selectedSymbolsChanged(
const
QItemSelection
& selected,
const
QItemSelection
& deselected );
89
91
void
grouptreeContextMenu(
QPoint
);
92
94
void
listitemsContextMenu(
QPoint
);
95
96
protected
slots:
97
bool
addColorRamp(
QAction
* action );
98
void
groupSelectedSymbols();
99
100
protected
:
101
103
void
populateTypes();
104
106
void
populateGroups();
108
void
buildGroupTree(
QStandardItem
* &parent );
110
void
setSymbolsChecked(
const
QStringList
& );
111
113
void
populateSymbols(
const
QStringList
& symbolNames,
bool
checkable =
false
);
114
116
void
populateColorRamps(
const
QStringList
& colorRamps,
bool
checkable =
false
);
117
118
int
currentItemType();
119
QString
currentItemName();
120
122
bool
addSymbol();
124
bool
addColorRamp();
125
126
bool
editSymbol();
127
bool
editColorRamp();
128
129
bool
removeSymbol();
130
bool
removeColorRamp();
131
133
void
enableSymbolInputs(
bool
);
135
void
enableGroupInputs(
bool
);
137
void
enableItemsForGroupingMode(
bool
);
138
140
bool
eventFilter
(
QObject
*,
QEvent
* )
override
;
141
143
void
setBold(
QStandardItem
* );
144
145
QgsStyleV2
*
mStyle
;
146
147
QString
mStyleFilename
;
148
149
bool
mModified
;
150
152
bool
mGrouppingMode
;
153
155
QStringList
mTagList
;
156
158
QMenu
*
mGroupMenu
;
159
161
QMenu
*
mGroupListMenu
;
162
164
QMenu
*
mGroupTreeContextMenu
;
165
167
QMenu
*
mMenuBtnAddItemColorRamp
;
168
};
169
170
#endif
QObject::className
const char * className() const
QModelIndex
QEvent
QWidget
QgsStyleV2ManagerDialog::mMenuBtnAddItemColorRamp
QMenu * mMenuBtnAddItemColorRamp
Menu for the "Add item" toolbutton when in colorramp mode.
Definition:
qgsstylev2managerdialog.h:167
qgscontexthelp.h
QObject::metaObject
virtual const QMetaObject * metaObject() const
QPoint
QgsStyleV2ManagerDialog::mStyle
QgsStyleV2 * mStyle
Definition:
qgsstylev2managerdialog.h:145
QgsContextHelp::run
static void run(const QString &context)
Definition:
qgscontexthelp.cpp:31
QObject
QgsStyleV2ManagerDialog::mTagList
QStringList mTagList
space to store symbol tags
Definition:
qgsstylev2managerdialog.h:155
QgsStyleV2ManagerDialog::mGroupMenu
QMenu * mGroupMenu
Context menu for the symbols/colorramps.
Definition:
qgsstylev2managerdialog.h:158
QString
QgsStyleV2ManagerDialog::mGroupTreeContextMenu
QMenu * mGroupTreeContextMenu
Context menu for the group tree.
Definition:
qgsstylev2managerdialog.h:164
QStringList
QMenu
QSize
QgsStyleV2ManagerDialog::mGrouppingMode
bool mGrouppingMode
Mode to display the symbol list.
Definition:
qgsstylev2managerdialog.h:152
QItemSelection
QgsStyleV2
Definition:
qgsstylev2.h:69
QgsStyleV2ManagerDialog
Definition:
qgsstylev2managerdialog.h:32
QgsStyleV2ManagerDialog::mStyleFilename
QString mStyleFilename
Definition:
qgsstylev2managerdialog.h:147
QAction
QDialog
QStandardItem
QDialog::eventFilter
virtual bool eventFilter(QObject *o, QEvent *e)
QgsStyleV2ManagerDialog::mModified
bool mModified
Definition:
qgsstylev2managerdialog.h:149
QgsStyleV2ManagerDialog::on_buttonBox_helpRequested
void on_buttonBox_helpRequested()
Definition:
qgsstylev2managerdialog.h:60
QgsStyleV2ManagerDialog::mGroupListMenu
QMenu * mGroupListMenu
Sub-menu of mGroupMenu, dynamically filled to show one entry for every group.
Definition:
qgsstylev2managerdialog.h:161
Generated on Sun Jun 24 2018 11:42:48 for QGIS API Documentation by
1.8.13