Class: QgsTimeZoneSortFilterModel

A sort filter model for display of available time zones.

Added in version 4.4.

List of all members, including inherited members

Class Hierarchy

Inheritance diagram of qgis.gui.QgsTimeZoneSortFilterModel

Base classes

QSortFilterProxyModel

QAbstractProxyModel

QAbstractItemModel

QObject

Constructor

__init__

Methods

filterString

Returns the current filter string, if set.

indexFromTimeZone

Returns the proxy model index corresponding to a time zone.

setFilterString

Sets a filter string, such that only time zones with names containing the specified string will be shown.

class qgis.gui.QgsTimeZoneSortFilterModel[source]

Bases: QSortFilterProxyModel

__init__(source: QgsTimeZoneItemModel | None, parent: QObject | None = None)

Constructor for a QgsTimeZoneSortFilterModel with the specified parent object and source model.

The source model must exist for the lifetime of the proxy.

Parameters:
filterString(self) → str[source]

Returns the current filter string, if set.

Return type:

str

indexFromTimeZone(self, timeZone: QTimeZone) → QModelIndex[source]

Returns the proxy model index corresponding to a time zone.

Parameters:

timeZone (QTimeZone)

Return type:

QModelIndex

setFilterString(self, filter: str | None)[source]

Sets a filter string, such that only time zones with names containing the specified string will be shown.

See also

filterString()

Parameters:

filter (str|None)