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

Methods

active

When this flag is False, the aggregate will be deactivated.

aggregate

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

setActive

When this flag is False, the aggregate will be deactivated.

setAggregate

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

setType

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

type

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

Signals

activeChanged

A function has been selected or deselected.

aggregateChanged

The function name of the selected aggregate has changed.

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]

A function has been selected or deselected.

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]

The function name of the selected aggregate has changed.

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.

Parameters:

type (QMetaType.Type)

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

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 (QVariant.Type)

type(self) QMetaType.Type[source]

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

Return type:

QMetaType.Type