Libkleo
messagebox.cpp
68 QDialogButtonBox *box = new QDialogButtonBox(QDialogButtonBox::Yes | QDialogButtonBox::No, dialog);
69 KGuiItem::assign(box->button(QDialogButtonBox::Yes), KGuiItem{i18nc("@action:button", "Show Audit Log")});
78 const auto choice = KMessageBox::createKMessageBox(dialog, box, icon, text, QStringList{}, QString{}, nullptr, options | KMessageBox::Dangerous);
83 const auto dialogType = (icon == QMessageBox::Information) ? KMessageBox::Information : KMessageBox::Error;
89void MessageBox::information(QWidget *parent, const QString &text, const Kleo::AuditLogEntry &auditLog, const QString &title, KMessageBox::Options options)
91 showMessageBox(parent, QMessageBox::Information, text, auditLog, title.isEmpty() ? i18nc("@title:window", "Information") : title, options);
94void MessageBox::error(QWidget *parent, const QString &text, const Kleo::AuditLogEntry &auditLog, const QString &title, KMessageBox::Options options)
96 showMessageBox(parent, QMessageBox::Critical, text, auditLog, title.isEmpty() ? i18nc("@title:window", "Error") : title, options);
static void assign(QPushButton *button, const KGuiItem &item)
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QDialogButtonBox::StandardButton createKMessageBox(QDialog *dialog, QDialogButtonBox *buttons, const QIcon &icon, const QString &text, const QStringList &strlist, const QString &ask, bool *checkboxReturn, Options options, const QString &details=QString(), QMessageBox::Icon notifyType=QMessageBox::Information)
ButtonCode messageBox(QWidget *parent, DialogType type, const QString &text, const QString &title, const KGuiItem &primaryAction, const KGuiItem &secondaryAction, const KGuiItem &cancelAction=KStandardGuiItem::cancel(), const QString &dontShowAskAgainName=QString(), Options options=Notify)
WindowModal
Dangerous
Information
KGuiItem ok()
void setModal(bool modal)
QPushButton * button(StandardButton which) const const
bool isEmpty() const const
WindowModal
void setWindowModality(Qt::WindowModality windowModality)
void setWindowTitle(const QString &)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:29:01 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.