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 i18n(const char *text)
KTimeZoneWidget(QWidget *parent=0, KTimeZones *timeZones=0)
Constructs a time zone selection widget.
Definition: ktimezonewidget.cpp:60
virtual int rowCount(const QModelIndex &parent) const =0
iterator insert(const Key &key, const T &value)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const =0
int localeAwareCompare(const QString &other) const
void setSelectionMode(QAbstractItemView::SelectionMode mode)
virtual ~KTimeZoneWidget()
Destroys the time zone selection widget.
Definition: ktimezonewidget.cpp:130
QItemSelectionModel * selectionModel() const
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
static QString locate(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
QStringList selection() const
Returns the currently selected time zones.
Definition: ktimezonewidget.cpp:156
void setIcon(int column, const QIcon &icon)
void setSelectionMode(QAbstractItemView::SelectionMode mode)
Allows to select multiple timezones.
Definition: ktimezonewidget.cpp:233
virtual void setData(int column, int role, const QVariant &value)
QString join(const QString &separator) const
QString countryCodeToName(const QString &country) const
bool exists() const
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
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
static bool localeLessThan(const QString &a, const QString &b)
Definition: ktimezonewidget.cpp:54
bool itemsCheckable() const
QString i18nc(const char *ctxt, const char *text)
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
static KTimeZones * timeZones()
Definition: kstandardaction.h:133
static QString displayName(const KTimeZone &zone)
Format a time zone name in a standardised manner.
Definition: ktimezonewidget.cpp:151
int count(const T &value) const
void append(const T &value)
QAbstractItemView::SelectionMode selectionMode() const
virtual void select(const QModelIndex &index, QFlags< QItemSelectionModel::SelectionFlag > command)
bool isEmpty() const
iterator end()
iterator begin()
QTreeWidgetItem * itemFromIndex(const QModelIndex &index) const
iterator end()
const T value(const Key &key) const
virtual void scrollTo(const QModelIndex &index, ScrollHint hint)
KLocale * locale()
KAction * replace(const QObject *recvr, const char *slot, QObject *parent)
Find and replace matches.
Definition: kstandardaction.cpp:344
void setHeaderLabels(const QStringList &labels)
void setSelected(const QString &zone, bool selected)
Select/deselect the named time zone.
Definition: ktimezonewidget.cpp:172
void setCheckState(int column, Qt::CheckState state)
QString mid(int position, int n) const
QVariant data(int role) const
void setText(int column, const QString &text)
QString left(int n) const
QTreeWidgetItem * topLevelItem(int index) const
const ZoneMap zones() const
QAbstractItemModel * model() const
typedef ConstIterator
void setRootIsDecorated(bool show)
int topLevelItemCount() const
void clearSelection()
QString toString() const
iterator begin()
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.