• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

KTimeZoneWidget Class Reference

A time zone selection widget. More...

#include <ktimezonewidget.h>

Inheritance diagram for KTimeZoneWidget:
QTreeWidget

List of all members.

Public Member Functions

 KTimeZoneWidget (QWidget *parent=0, KTimeZones *timeZones=0)
QStringList selection () const
void setSelected (const QString &zone, bool selected)
virtual ~KTimeZoneWidget ()

Static Public Member Functions

static QString displayName (const KTimeZone &zone)

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>

Definition at line 57 of file ktimezonewidget.h.


Constructor & Destructor Documentation

KTimeZoneWidget::KTimeZoneWidget ( QWidget *  parent = 0,
KTimeZones *  timeZones = 0 
) [explicit]

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.

Definition at line 54 of file ktimezonewidget.cpp.

KTimeZoneWidget::~KTimeZoneWidget (  )  [virtual]

Destroys the time zone selection widget.

Definition at line 117 of file ktimezonewidget.cpp.


Member Function Documentation

QString KTimeZoneWidget::displayName ( const KTimeZone &  zone  )  [static]

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.

Definition at line 122 of file ktimezonewidget.cpp.

QStringList KTimeZoneWidget::selection (  )  const

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 KTimeZoneWidget() constructor.

Definition at line 127 of file ktimezonewidget.cpp.

void KTimeZoneWidget::setSelected ( const 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.

Definition at line 143 of file ktimezonewidget.cpp.


The documentation for this class was generated from the following files:
  • ktimezonewidget.h
  • ktimezonewidget.cpp

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal