QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
qgsaggregatetoolbutton.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsaggregatetoolbutton.h
3
--------------------------------------
4
Date : Nov 2017
5
Copyright : (C) 2017 Matthias Kuhn
6
Email : matthias@opengis.ch
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 QGSAGGREGATETOOLBUTTON_H
17
#define QGSAGGREGATETOOLBUTTON_H
18
19
#include "qgis_gui.h"
20
#include "
qgsaggregatecalculator.h
"
21
22
#include <QToolButton>
23
#include <QVariant>
24
32
class
GUI_EXPORT
QgsAggregateToolButton
:
public
QToolButton
33
{
34
Q_OBJECT
35
36
public
:
40
QgsAggregateToolButton
();
41
45
void
setType
( QMetaType::Type
type
);
46
51
Q_DECL_DEPRECATED
void
setType
( QVariant::Type
type
)
SIP_DEPRECATED
;
52
56
QMetaType::Type
type
()
const
;
57
61
void
setActive
(
bool
active
);
62
66
bool
active
()
const
;
67
71
QString
aggregate
()
const
;
72
76
void
setAggregate
(
const
QString &
aggregate
);
77
78
signals:
79
83
void
aggregateChanged
();
84
88
void
activeChanged
();
89
90
private
slots:
91
void
aboutToShowMenu();
92
93
private
:
94
void
updateAvailableAggregates();
95
QMenu *mMenu =
nullptr
;
96
QMetaType::Type mType = QMetaType::Type::UnknownType;
97
bool
mActive =
false
;
98
QString mAggregate;
99
QList<QgsAggregateCalculator::AggregateInfo> mAvailableAggregates;
100
};
101
102
#endif
// QGSAGGREGATETOOLBUTTON_H
QgsAggregateToolButton::setActive
void setActive(bool active)
When this flag is false, the aggregate will be deactivated.
Definition
qgsaggregatetoolbutton.cpp:81
QgsAggregateToolButton::active
bool active() const
When this flag is false, the aggregate will be deactivated.
Definition
qgsaggregatetoolbutton.cpp:120
QgsAggregateToolButton::setType
void setType(QMetaType::Type type)
Based on the type of underlying data, some aggregates will be available or not.
Definition
qgsaggregatetoolbutton.cpp:37
QgsAggregateToolButton::setAggregate
void setAggregate(const QString &aggregate)
The function name of the selected aggregate or a Null String if none is chosen.
Definition
qgsaggregatetoolbutton.cpp:98
QgsAggregateToolButton::type
QMetaType::Type type() const
Based on the type of underlying data, some aggregates will be available or not.
Definition
qgsaggregatetoolbutton.cpp:125
QgsAggregateToolButton::aggregate
QString aggregate() const
The function name of the selected aggregate or a Null String if none is chosen.
Definition
qgsaggregatetoolbutton.cpp:93
QgsAggregateToolButton::activeChanged
void activeChanged()
A function has been selected or deselected.
QgsAggregateToolButton::aggregateChanged
void aggregateChanged()
The function name of the selected aggregate has changed.
QgsAggregateToolButton::QgsAggregateToolButton
QgsAggregateToolButton()
Constructor.
Definition
qgsaggregatetoolbutton.cpp:25
SIP_DEPRECATED
#define SIP_DEPRECATED
Definition
qgis_sip.h:113
qgsaggregatecalculator.h
Generated on
for QGIS API Documentation by
1.17.0