KDE 4.2 PyKDE API Reference
  • KDE's Python API
  • Overview
  • PyKDE Home
  • Sitemap
  • Contact Us
 

KTimeZoneWidget Class Reference

from PyKDE4.kdeui import *

Inherits: QTreeWidget → QTreeView → QAbstractItemView → QAbstractScrollArea → QFrame → QWidget → QObject

Detailed Description

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

 __init__ (self, QWidget parent=0, KTimeZones timeZones=0)
QStringList selection (self)
 setSelected (self, QString zone, bool selected)

Static Methods

QString displayName (KTimeZone zone)

Method Documentation

__init__ (  self,
QWidget  parent=0,
KTimeZones  timeZones=0
)

Constructs a time zone selection widget.

Parameters:
parent  The parent widget.
timeZones  The time zone database to use. If 0, the system time zone database is used.

QString displayName ( KTimeZone  zone
)

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.

QStringList selection (   self )

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 (  self,
QString  zone,
bool  selected
)

Select/deselect the named time zone.

Parameters:
zone  The time zone name to be selected. Ignored if not recognized!
selected  The new selection state.

  • Full Index

Modules

  • akonadi
  • dnssd
  • kdecore
  • kdeui
  • khtml
  • kio
  • knewstuff
  • kparts
  • kutils
  • nepomuk
  • phonon
  • plasma
  • solid
  • soprano
This documentation is maintained by Simon Edwards.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal