QGIS API Documentation 3.41.0-Master (af5edcb665c)
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:
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
84
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
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