KDEUI
ktimezonewidget.cpp
Go to the documentation of this file.
66 setHeaderLabels( QStringList() << i18nc("Define an area in the time zone, like a town area", "Area" ) << i18nc( "Time zone", "Region" ) << i18n( "Comment" ) );
121 listItem->setData( Private::CityColumn, Private::ZoneRole, tzName ); // store complete path in custom role
124 QString flag = KStandardDirs::locate( "locale", QString( "l10n/%1/flag.png" ).arg( zone.countryCode().toLower() ) );
164 QTreeWidgetItemIterator it(const_cast<KTimeZoneWidget*>(this), d->itemsCheckable ? QTreeWidgetItemIterator::Checked : QTreeWidgetItemIterator::Selected);
181 // Runtime compatibility for < 4.3 apps, which don't call the setMultiSelection reimplementation.
200 selectionModel()->select(index, selected ? (QItemSelectionModel::Select | QItemSelectionModel::Rows) : (QItemSelectionModel::Deselect | QItemSelectionModel::Rows));
QString countryCodeToName(const QString &country) const
static QString locate(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
static KTimeZones * timeZones()
static QString displayName(const KTimeZone &zone)
Format a time zone name in a standardised manner.
Definition: ktimezonewidget.cpp:151
void setSelected(const QString &zone, bool selected)
Select/deselect the named time zone.
Definition: ktimezonewidget.cpp:172
QAbstractItemView::SelectionMode selectionMode
Definition: ktimezonewidget.h:63
QStringList selection() const
Returns the currently selected time zones.
Definition: ktimezonewidget.cpp:156
void setSelectionMode(QAbstractItemView::SelectionMode mode)
Allows to select multiple timezones.
Definition: ktimezonewidget.cpp:233
void setItemsCheckable(bool enable)
Makes all items show a checkbox, so that the user can select multiple timezones by means of checking ...
Definition: ktimezonewidget.cpp:135
KTimeZoneWidget(QWidget *parent=0, KTimeZones *timeZones=0)
Constructs a time zone selection widget.
Definition: ktimezonewidget.cpp:60
virtual ~KTimeZoneWidget()
Destroys the time zone selection widget.
Definition: ktimezonewidget.cpp:130
QString name() const
QString countryCode() const
QString comment() const
static KTimeZone utc()
const ZoneMap zones() const
static bool localeLessThan(const QString &a, const QString &b)
Definition: fonthelpers.cpp:91
#define kDebug
QString i18n(const char *text)
QString i18nc(const char *ctxt, const char *text)
static bool localeLessThan(const QString &a, const QString &b)
Definition: ktimezonewidget.cpp:54
KLocale * locale()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.