QGIS API Documentation 4.3.0-Master (149067ad0b9)
Loading...
Searching...
No Matches
QgsTimeZoneSortFilterModel Class Reference

A sort filter model for display of available time zones. More...

#include <qgsdatetimewithtimezonewidget.h>

Inheritance diagram for QgsTimeZoneSortFilterModel:

Public Slots

void setFilterString (const QString &filter)
 Sets a filter string, such that only time zones with names containing the specified string will be shown.

Public Member Functions

 QgsTimeZoneSortFilterModel (QgsTimeZoneItemModel *source, QObject *parent=nullptr)
 Constructor for a QgsTimeZoneSortFilterModel with the specified parent object and source model.
QString filterString () const
 Returns the current filter string, if set.
QModelIndex indexFromTimeZone (const QTimeZone &timeZone) const
 Returns the proxy model index corresponding to a time zone.

Protected Member Functions

bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override
bool lessThan (const QModelIndex &left, const QModelIndex &right) const override

Detailed Description

A sort filter model for display of available time zones.

Since
QGIS 4.4

Definition at line 100 of file qgsdatetimewithtimezonewidget.h.

Constructor & Destructor Documentation

◆ QgsTimeZoneSortFilterModel()

QgsTimeZoneSortFilterModel::QgsTimeZoneSortFilterModel ( QgsTimeZoneItemModel * source,
QObject * parent = nullptr )

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

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

Definition at line 162 of file qgsdatetimewithtimezonewidget.cpp.

Member Function Documentation

◆ filterAcceptsRow()

bool QgsTimeZoneSortFilterModel::filterAcceptsRow ( int sourceRow,
const QModelIndex & sourceParent ) const
overrideprotected

Definition at line 182 of file qgsdatetimewithtimezonewidget.cpp.

◆ filterString()

QString QgsTimeZoneSortFilterModel::filterString ( ) const
inline

Returns the current filter string, if set.

See also
setFilterString()

Definition at line 117 of file qgsdatetimewithtimezonewidget.h.

◆ indexFromTimeZone()

QModelIndex QgsTimeZoneSortFilterModel::indexFromTimeZone ( const QTimeZone & timeZone) const

Returns the proxy model index corresponding to a time zone.

Definition at line 171 of file qgsdatetimewithtimezonewidget.cpp.

◆ lessThan()

bool QgsTimeZoneSortFilterModel::lessThan ( const QModelIndex & left,
const QModelIndex & right ) const
overrideprotected

Definition at line 195 of file qgsdatetimewithtimezonewidget.cpp.

◆ setFilterString

void QgsTimeZoneSortFilterModel::setFilterString ( const QString & filter)
slot

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

See also
filterString()

Definition at line 176 of file qgsdatetimewithtimezonewidget.cpp.


The documentation for this class was generated from the following files: