KUtils
dialog.cpp
Go to the documentation of this file.
178 const QList<KService::Ptr> services = KServiceTypeTrader::self()->query("KCModule", constraint);
186 bool DialogPrivate::isPluginForKCMEnabled(const KCModuleInfo *moduleinfo, KPluginInfo &pinfo) const
249 const KPageWidgetModel *model = qobject_cast<const KPageWidgetModel *>(q->pageWidget()->model());
300 KPageWidgetItem *item = createPageItem(parentItem, conf.readEntry("Name"), conf.readEntry("Comment"),
325 const QStringList parentComponents = info.service()->property("X-KDE-ParentComponents").toStringList();
336 const QString parentId = info.service()->property("X-KDE-CfgDlgHierarchy", QVariant::String).toString();
347 KPageWidgetItem *item = createPageItem(0, service->name(), service->comment(), service->icon(), weight);
394 const KPageWidgetModel *model = qobject_cast<const KPageWidgetModel *>(q->pageWidget()->model());
440 void DialogPrivate::connectItemCheckBox(KPageWidgetItem *item, const KPluginInfo &pinfo, bool isEnabled)
508 // iterate over all child KPageWidgetItem objects and check whether they need to be enabled/disabled
509 const KPageWidgetModel *model = qobject_cast<const KPageWidgetModel *>(q->pageWidget()->model());
QString i18n(const char *text)
QList< KPluginInfo > pluginInfos() const
Returns a list of all KPluginInfo objects the dialog uses.
Definition: dialog.cpp:113
QHash< QString, KPageWidgetItem * > pageItemForGroupId
Definition: dialog_p.h:51
iterator insert(const Key &key, const T &value)
void _k_reparseConfiguration(const QByteArray &a)
Definition: dialog.cpp:473
QVariant property(const QString &key) const
const Key key(const T &value) const
T pop()
void setChecked(bool checked)
static KServiceTypeTrader * self()
bool isPluginEnabled() const
KService::Ptr service() const
static QString locate(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
void push(const T &t)
void setPixmap(const QPixmap &)
QVariant property(const QString &_name, QVariant::Type t) const
bool isValid() const
KStandardDirs * dirs()
bool contains(const QString &str, Qt::CaseSensitivity cs) const
virtual void setVisible(bool visible)
static QDebug kError(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
QString join(const QString &separator) const
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const
QString comment() const
static QDebug kDebug(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
void setEnabled(bool)
QPixmap pixmap(const QSize &size, Mode mode, State state) const
void syncConfiguration()
When this function is called the KConfig objects of all the registered instances are sync()ed...
Definition: dispatcher.cpp:97
int size() const
bool isNull() const
void setIcon(const KIcon &icon)
Dialog(QWidget *parent=0)
Construct a new Preferences Dialog for the application.
Definition: dialog.cpp:46
bool isValid() const
void load(const KConfigGroup &config=KConfigGroup())
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
KIcon icon
int count(const T &value) const
void append(const T &value)
QVariant property(const char *name) const
void setLayout(QLayout *layout)
const_iterator constEnd() const
int toInt(bool *ok) const
void setUpdatesEnabled(bool enable)
void setPluginEnabled(bool enabled)
QList< KService::Ptr > kcmServices() const
bool isEmpty() const
int row() const
iterator begin()
void setTextFormat(Qt::TextFormat)
void connectItemCheckBox(KPageWidgetItem *item, const KPluginInfo &pinfo, bool isEnabled)
Definition: dialog.cpp:440
bool isChecked() const
QString componentName() const
iterator end()
const T value(const Key &key) const
QString name() const
QString icon() const
void reparseConfiguration(const QString &componentName)
Call this function when the configuration belonging to the associated componentData name has changed...
Definition: dispatcher.cpp:81
bool contains(const T &value) const
KPageWidgetItem * item(const QModelIndex &index) const
QModelIndex child(int row, int column) const
void setComponentBlacklist(const QStringList &blacklist)
Set the blacklisted component list.
Definition: dialog.cpp:78
void save(KConfigGroup config=KConfigGroup())
void setChecked(bool)
Definition: dialog_p.h:44
const_iterator constBegin() const
KService::List query(const QString &servicetype, const QString &constraint=QString()) const
static Ptr childGroup(const QString &parent)
QStringList toStringList() const
bool allowComponentSelection() const
Definition: dialog.cpp:67
void addStretch(int stretch)
void setKCMArguments(const QStringList &arguments)
Sets the argument list that is given to all the KControlModule's when they are created.
Definition: dialog.cpp:72
bool isEmpty() const
QModelIndex sibling(int row, int column) const
typedef ConstIterator
const KComponentData & mainComponent()
bool toBool() const
static QDebug kWarning(bool cond, int area=KDE_DEFAULT_DEBUG_AREA)
QHash< KPageWidgetItem *, QCheckBox * > checkBoxForItem
Definition: dialog_p.h:53
QHash< KPageWidgetItem *, KPluginInfo > pluginForItem
Definition: dialog_p.h:52
virtual void _k_clientChanged()
Definition: kcmultidialog.cpp:108
bool setProperty(const char *name, const QVariant &value)
A class that offers a KPageDialog containing arbitrary KControl Modules.
Definition: kcmultidialog.h:37
QStringList findAllResources(const char *type, const QString &filter=QString(), SearchOptions options=NoSearchOptions) const
iterator end()
void addPluginInfos(const QList< KPluginInfo > &plugininfos)
If you use a Configurable dialog you need to pass KPluginInfo objects that the dialog should configur...
Definition: dialog.cpp:84
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
KPageWidgetItem * createPageItem(KPageWidgetItem *parentItem, const QString &name, const QString &comment, const QString &iconName, int weight)
Definition: dialog.cpp:225
void showEvent(QShowEvent *)
Reimplemented to lazy create the dialog on first show.
Definition: dialog.cpp:118
void setAllowComponentSelection(bool allowSelection)
Tells the dialog whether the entries in the listview are all static or whether it should add checkbox...
Definition: dialog.cpp:62
const KShortcut & end()
QString toString() const
iterator begin()
void setCheckable(bool checkable)
Generic configuration dialog that works over component boundaries.
Definition: dialog.h:73
void _k_updateEnabledState(bool)
Definition: dialog.cpp:499
QString pluginName() const
QStringList list(const QString &fileClass)
QStringList registeredComponents
Definition: dialog_p.h:56
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:25:27 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:25:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.