# class KTimeZoneWidget

###

Module | kdeui
Namespace |
Class | KTimeZoneWidget
Inherits | QTreeWidget

A time zone selection widget.

Detail:

This class provides for selection of one or more time zones.

Example:

To use the class to implement a system timezone selection feature:

    // This adds a time zone widget to a dialog.
    m_timezones = new KTimeZoneWidget(this);
    ...

To use the class to implement a multiple-choice custom time zone selector:

    m_timezones = new KTimeZoneWidget( this, "Time zones", vcalendarTimezones );
    m_timezones->setSelectionMode( QTreeView.MultiSelection );
    ...

Author S.R.Haque <srhaque@iee.org>

### methods

- KTimeZoneWidget (parent, timeZones)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  parent | QWidget | 0
  timeZones | KTimeZones | 0

  Constructs a time zone selection widget.

  parent - The parent widget.

  timeZones - The time zone database to use. If 0, the system time zone database is used.

- KTimeZoneWidget (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QWidget | 0
  a1 | KTimeZones | 0

- displayName (zone)

  returns QString
  static

  Argument | Type | Default
  --- | --- | ---
  zone | KTimeZone |

  Format a time zone name in a standardised manner. The returned value is transformed via an i18n lookup, so the caller should previously have set the time zone catalog:

      KGlobal.locale()->insertCatalog( "timezones4" );

  Returns formatted time zone name.

- selection ( )

  returns QStringList

  Returns the currently selected time zones. See QTreeView.selectionChanged().

  Returns a list of time zone names, in the format used by the database supplied to the {@link KTimeZoneWidget() } constructor.

- setSelected (zone, selected)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  zone | QString |
  selected | bool |

  Select/deselect the named time zone.

  zone - The time zone name to be selected. Ignored if not recognized!

  selected - The new selection state.