QGIS API Documentation 3.39.0-Master (47f7b3a4989)
Loading...
Searching...
No Matches
qgsaggregatetoolbutton.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsaggregatetoolbutton.h
3 --------------------------------------
4 Date : Nov 2017
5 Copyright : (C) 2017 Matthias Kuhn
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 <QToolButton>
20#include <QVariant>
21
23#include "qgis_gui.h"
24
32class GUI_EXPORT QgsAggregateToolButton : public QToolButton
33{
34 Q_OBJECT
35
36 public:
37
42
46 void setType( QMetaType::Type type );
47
52 Q_DECL_DEPRECATED void setType( QVariant::Type type ) SIP_DEPRECATED;
53
57 QMetaType::Type type() const;
58
62 void setActive( bool active );
63
67 bool active() const;
68
72 QString aggregate() const;
73
77 void setAggregate( const QString &aggregate );
78
79 signals:
80
85
90
91 private slots:
92 void aboutToShowMenu();
93
94 private:
95 void updateAvailableAggregates();
96 QMenu *mMenu = nullptr;
97 QMetaType::Type mType = QMetaType::Type::UnknownType;
98 bool mActive = false;
99 QString mAggregate;
100 QList<QgsAggregateCalculator::AggregateInfo> mAvailableAggregates;
101};
102
103#endif // QGSAGGREGATETOOLBUTTON_H
Offers a toolbutton to choose between different aggregate functions.
void activeChanged()
A function has been selected or deselected.
void aggregateChanged()
The function name of the selected aggregate has changed.
#define SIP_DEPRECATED
Definition qgis_sip.h:106