Class: QgsAggregateToolButton

Offers a toolbutton to choose between different aggregate functions.

Functions are filtered based on the type.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsAggregateToolButton

Base classes

QToolButton

QAbstractButton

QWidget

QObject

QPaintDevice

class qgis.gui.QgsAggregateToolButton[source]

Bases: QToolButton

__init__()

Constructor

active(self) bool[source]

When this flag is False, the aggregate will be deactivated. I.e. no aggregate is chosen.

Return type:

bool

signal activeChanged[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

aggregate(self) str[source]

The function name of the selected aggregate or a Null String if none is chosen.

Return type:

str

signal aggregateChanged[source]

pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL

types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.

setActive(self, active: bool)[source]

When this flag is False, the aggregate will be deactivated. I.e. no aggregate is chosen.

Parameters:

active (bool)

setAggregate(self, aggregate: str | None)[source]

The function name of the selected aggregate or a Null String if none is chosen.

Parameters:

aggregate (Optional[str])

setType(self, type: QMetaType.Type)[source]

Based on the type of underlying data, some aggregates will be available or not.

setType(self, type: QVariant.Type) Based on the type of underlying data, some aggregates will be available or not.

Deprecated since version 3.38: Use the method with a QMetaType.Type argument instead.

Parameters:

type (QMetaType.Type)

type(self) QMetaType.Type[source]

Based on the type of underlying data, some aggregates will be available or not.

Return type:

QMetaType.Type