Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

QTimeZoneSelector Class Reference
[QtBaseModule]

The QTimeZoneSelector class provides a widget for selecting a time zone. More...

    #include <QTimeZoneSelector>

Inherits QWidget.

Properties

Public Functions

Signals

Additional Inherited Members


Detailed Description

The QTimeZoneSelector class provides a widget for selecting a time zone.

QTimeZoneSelector presents a list of common city names, corresponding to time zones, for the user to choose from. A "More..." option allows the user to access all time zones via a world map.

The cities included in the initial list are determined by the configuration file WorldTime.conf. This file has the following format:

    [TimeZones]
    Zone0=Area/Location
    ...
    ZoneN=Area/Location

where each Area/Location is a zoneinfo identifier. For example:

    [TimeZones]
    Zone0=America/New_York
    Zone1=America/Los_Angeles
    Zone2=Europe/Oslo
    ...

The selector list also includes the current time zone, regardless of whether or not that time zone is represented by a city in the configuration file.

See also QTimeZone.


Property Documentation

allowNoZone : bool

This property holds true if no timezone is included as an option; false otherwise.

Access functions:

currentZone : QString

This property holds the currently selected timezone.

Access functions:


Member Function Documentation

QTimeZoneSelector::QTimeZoneSelector ( QWidget * p = 0 )

Creates a new QTimeZoneSelector with parent p. The selector will be populated with the appropriate timezones (see Detailed Description for an explanation of which zones will be included).

QTimeZoneSelector::~QTimeZoneSelector ()

Destroys the QTimeZoneSelector.

void QTimeZoneSelector::zoneChanged ( const QString & id )   [signal]

This signal is emitted whenever the time zone is changed. The id is a QString in Area/Location format, for example,

    Australia/Brisbane


Copyright © 2009 Trolltech Trademarks
Qt Extended 4.4.3