KCMUtils
kcmultidialog.cpp
69void KCMultiDialogPrivate::slotCurrentPageChanged(KPageWidgetItem *current, KPageWidgetItem *previous)
96 q->buttonBox()->setContentsMargins(layoutMargins.left(), layoutMargins.top(), layoutMargins.right(), layoutMargins.bottom());
183 const auto findIt = std::find_if(modules.cbegin(), modules.cend(), [item](const CreatedModule &module) {
193 item->setHeader(QStringLiteral("<b>") + moduleName + QStringLiteral("</b><br><i>") + message + QStringLiteral("</i>"));
194 item->setIcon(KIconUtils::addOverlay(QIcon::fromTheme(icon), QIcon::fromTheme(QStringLiteral("dialog-warning")), Qt::BottomRightCorner));
208 buttonBox->setStandardButtons(QDialogButtonBox::Help | QDialogButtonBox::RestoreDefaults | QDialogButtonBox::Cancel | QDialogButtonBox::Apply
212 KGuiItem::assign(buttonBox->button(QDialogButtonBox::RestoreDefaults), KStandardGuiItem::defaults());
221 q->connect(buttonBox->button(QDialogButtonBox::Apply), &QAbstractButton::clicked, q, &KCMultiDialog::slotApplyClicked);
222 q->connect(buttonBox->button(QDialogButtonBox::Ok), &QAbstractButton::clicked, q, &KCMultiDialog::slotOkClicked);
223 q->connect(buttonBox->button(QDialogButtonBox::RestoreDefaults), &QAbstractButton::clicked, q, &KCMultiDialog::slotDefaultClicked);
224 q->connect(buttonBox->button(QDialogButtonBox::Help), &QAbstractButton::clicked, q, &KCMultiDialog::slotHelpClicked);
225 q->connect(buttonBox->button(QDialogButtonBox::Reset), &QAbstractButton::clicked, q, &KCMultiDialog::slotUser1Clicked);
228 q->connect(q, &KPageDialog::currentPageChanged, q, [this](KPageWidgetItem *current, KPageWidgetItem *before) {
347 const QUrl docUrl = QUrl(QStringLiteral("help:/")).resolved(QUrl(docPath)); // same code as in KHelpClient::invokeHelp
354 if (foundExec && (docUrlScheme == QLatin1String("man") || docUrlScheme == QLatin1String("info"))) {
371KPageWidgetItem *KCMultiDialog::addModule(const KPluginMetaData &metaData, const QVariantList &args)
KPluginMetaData metaData() const
Returns the metaData that was used when instantiating the plugin.
Definition kabstractconfigmodule.cpp:140
Q_SIGNAL void needsSaveChanged()
Indicate that the state of the modules contents has changed.
virtual QWidget * widget()
Get the associated widget that can be embedded The returned widget should be used as a parent for wid...
Definition kcmodule.cpp:109
void save() override
The save method stores the config information as shown in the user interface in the config files.
Definition kcmodule.cpp:93
void slotApplyClicked()
This slot is called when the user presses the "Apply" Button.
Definition kcmultidialog.cpp:313
void slotOkClicked()
This slot is called when the user presses the "OK" Button.
Definition kcmultidialog.cpp:321
KCMultiDialog(QWidget *parent=nullptr)
Constructs a new KCMultiDialog.
Definition kcmultidialog.cpp:233
void slotUser1Clicked()
This slot is called when the user presses the "Reset" Button.
Definition kcmultidialog.cpp:274
KPageWidgetItem * addModule(const KPluginMetaData &metaData, const QVariantList &args={})
Add a module to the dialog.
Definition kcmultidialog.cpp:371
void setDefaultsIndicatorsVisible(bool show)
Show or hide an indicator when settings have changed from their default value.
Definition kcmultidialog.cpp:445
void slotDefaultClicked()
This slot is called when the user presses the "Default" Button.
Definition kcmultidialog.cpp:258
void slotHelpClicked()
This slot is called when the user presses the "Help" Button.
Definition kcmultidialog.cpp:330
static void assign(QPushButton *button, const KGuiItem &item)
QDialogButtonBox * buttonBox()
KPageWidget * pageWidget()
void currentPageChanged(KPageWidgetItem *current, KPageWidgetItem *before)
void setCurrentPage(KPageWidgetItem *item)
KPageWidgetItem * currentPage() const
void removePage(KPageWidgetItem *item)
void insertPage(KPageWidgetItem *before, KPageWidgetItem *item)
void addPage(KPageWidgetItem *item)
QWidget * pageHeader() const
void setHeaderVisible(bool visible)
void setIcon(const QIcon &icon)
void setHeader(const QString &header)
KPageWidgetItem * item(const QModelIndex &index) const
QModelIndex index(const KPageWidgetItem *item) const
QJsonObject rawData() const
QString iconName() const
QString name() const
Custom QScrollArea class that doesn't limit its size hint.
Definition kcmultidialog.h:137
QString i18n(const char *text, const TYPE &arg...)
KCMUTILS_EXPORT KCModule * loadModule(const KPluginMetaData &metaData, QWidget *parent=nullptr, const QVariantList &args={}, const std::shared_ptr< QQmlEngine > &engine={})
Loads a KCModule.
Definition kcmoduleloader.cpp:76
QIcon addOverlay(const QIcon &icon, const QIcon &overlay, Qt::Corner position)
PrimaryAction
SecondaryAction
Cancel
ButtonCode warningTwoActionsCancel(QWidget *parent, const QString &text, const QString &title, const KGuiItem &primaryAction, const KGuiItem &secondaryAction, const KGuiItem &cancelAction=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Options(Notify|Dangerous))
KGuiItem reset()
KGuiItem cancel()
KGuiItem defaults()
KGuiItem apply()
KGuiItem ok()
KGuiItem discard()
KGuiItem help()
KGuiItem close()
void clicked(bool checked)
virtual int rowCount(const QModelIndex &parent) const const=0
bool openUrl(const QUrl &url)
virtual void accept()
virtual void closeEvent(QCloseEvent *e) override
virtual void showEvent(QShowEvent *event) override
virtual QSize sizeHint() const const override
QPushButton * button(StandardButton which) const const
void setStandardButtons(StandardButtons buttons)
NoFrame
QIcon fromTheme(const QString &name)
QJsonValue value(QLatin1StringView key) const const
int toInt(int defaultValue) const const
virtual void setSpacing(int)
int bottom() const const
int left() const const
int right() const const
int top() const const
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QVariant property(const char *name) const const
T qobject_cast(QObject *object)
bool setProperty(const char *name, QVariant &&value)
bool startDetached(const QString &program, const QStringList &arguments, const QString &workingDirectory, qint64 *pid)
availableGeometry
int height() const const
int width() const const
QString findExecutable(const QString &executableName, const QStringList &paths)
bool isEmpty() const const
PM_LayoutLeftMargin
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
BottomRightCorner
singleShot
QUrl resolved(const QUrl &relative) const const
QString scheme() const const
QString toString(FormattingOptions options) const const
int toInt(bool *ok) const const
void adjustSize()
void setEnabled(bool)
virtual bool event(QEvent *event) override
height
QLayout * layout() const const
QScreen * screen() const const
void setContentsMargins(const QMargins &margins)
void setFocus()
void setHidden(bool hidden)
void resize(const QSize &)
virtual void setVisible(bool visible)
width
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:04:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:04:37 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.