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

A date time widget with time zone control. More...

#include <qgsdatetimewithtimezonewidget.h>

Inheritance diagram for QgsDateTimeWithTimeZoneWidget:

Public Slots

void setDateTime (const QDateTime &dateTime)
 Sets the date time to show in the widget.

Signals

void dateTimeChanged (const QDateTime &dateTime)
 Emitted whenever the date time shown in the widget is changed.

Public Member Functions

 QgsDateTimeWithTimeZoneWidget (QWidget *parent=nullptr)
 Constructor for QgsDateTimeWithTimeZoneWidget, with the specified parent widget.
QDateTime dateTime () const
 Returns the date time shown in the widget, with corresponding time zone set.
QgsDateTimeEdit * dateTimeEdit ()
 Returns the date time edit portion of the widget.
QString dialogTitle () const
 Returns the title for the time zone selector dialog window.
void setDialogTitle (const QString &title)
 Sets the title for the time zone selector dialog window.
QgsTimeZoneComboBox * timeZoneComboBox ()
 Returns the time zone combo box portion of the widget.

Detailed Description

A date time widget with time zone control.

Since
QGIS 4.4

Definition at line 391 of file qgsdatetimewithtimezonewidget.h.

Constructor & Destructor Documentation

◆ QgsDateTimeWithTimeZoneWidget()

QgsDateTimeWithTimeZoneWidget::QgsDateTimeWithTimeZoneWidget ( QWidget * parent = nullptr)
explicit

Constructor for QgsDateTimeWithTimeZoneWidget, with the specified parent widget.

Definition at line 587 of file qgsdatetimewithtimezonewidget.cpp.

Member Function Documentation

◆ dateTime()

QDateTime QgsDateTimeWithTimeZoneWidget::dateTime ( ) const

Returns the date time shown in the widget, with corresponding time zone set.

See also
setDateTime()

Definition at line 633 of file qgsdatetimewithtimezonewidget.cpp.

◆ dateTimeChanged

void QgsDateTimeWithTimeZoneWidget::dateTimeChanged ( const QDateTime & dateTime)
signal

Emitted whenever the date time shown in the widget is changed.

◆ dateTimeEdit()

QgsDateTimeEdit * QgsDateTimeWithTimeZoneWidget::dateTimeEdit ( )

Returns the date time edit portion of the widget.

Warning
Do not directly set or retrieve the date time from this widget, as it will not respect the time zone portion of the widget.

Definition at line 613 of file qgsdatetimewithtimezonewidget.cpp.

◆ dialogTitle()

QString QgsDateTimeWithTimeZoneWidget::dialogTitle ( ) const

Returns the title for the time zone selector dialog window.

See also
setDialogTitle()

Definition at line 628 of file qgsdatetimewithtimezonewidget.cpp.

◆ setDateTime

void QgsDateTimeWithTimeZoneWidget::setDateTime ( const QDateTime & dateTime)
slot

Sets the date time to show in the widget.

The time zone will be automatically set to match the time zone of this date time value.

See also
dateTime()

Definition at line 640 of file qgsdatetimewithtimezonewidget.cpp.

◆ setDialogTitle()

void QgsDateTimeWithTimeZoneWidget::setDialogTitle ( const QString & title)

Sets the title for the time zone selector dialog window.

See also
dialogTitle()

Definition at line 623 of file qgsdatetimewithtimezonewidget.cpp.

◆ timeZoneComboBox()

QgsTimeZoneComboBox * QgsDateTimeWithTimeZoneWidget::timeZoneComboBox ( )

Returns the time zone combo box portion of the widget.

Definition at line 618 of file qgsdatetimewithtimezonewidget.cpp.


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