KWidgetsAddons

kmessagebox.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 1999 Waldo Bastian <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-only
6 */
7 
8 //krazy:excludeall=dpointer
9 
10 #ifndef KMESSAGEBOX_H
11 #define KMESSAGEBOX_H
12 
13 #include <QDialogButtonBox>
14 #include <QMessageBox>
15 
16 #include <kguiitem.h>
17 #include <kstandardguiitem.h>
18 
19 #include <kwidgetsaddons_export.h>
20 
23 class QDialog;
24 class QDialogButtonBox;
25 class QWidget;
26 class QStringList;
27 class KConfig;
28 
43 namespace KMessageBox
44 {
48 enum ButtonCode {
49  Ok = 1,
50  Cancel = 2,
51  Yes = 3,
52  No = 4,
53  Continue = 5
54 };
55 
56 enum DialogType {
57  QuestionYesNo = 1,
58  WarningYesNo = 2,
59  WarningContinueCancel = 3,
60  WarningYesNoCancel = 4,
61  Information = 5,
62  // Reserved for: SSLMessageBox = 6
63  Sorry = 7,
64  Error = 8,
65  QuestionYesNoCancel = 9
66 };
67 
71 enum Option {
72  Notify = 1,
73  AllowLink = 2,
74  Dangerous = 4,
76  NoExec = 16,
78 };
79 
83 Q_DECLARE_FLAGS(Options, Option)
84 
85 } // namespace
86 
87 // This declaration must be defined before first Option is used in method signatures AND outside the namespace
88 Q_DECLARE_OPERATORS_FOR_FLAGS(KMessageBox::Options)
89 
90 namespace KMessageBox
91 {
120 KWIDGETSADDONS_EXPORT ButtonCode questionYesNo(QWidget *parent,
121  const QString &text,
122  const QString &caption = QString(),
123  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
124  const KGuiItem &buttonNo = KStandardGuiItem::no(),
125  const QString &dontAskAgainName = QString(),
126  Options options = Notify);
157 KWIDGETSADDONS_EXPORT ButtonCode questionYesNoCancel(QWidget *parent,
158  const QString &text,
159  const QString &caption = QString(),
160  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
161  const KGuiItem &buttonNo = KStandardGuiItem::no(),
162  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
163  const QString &dontAskAgainName = QString(),
164  Options options = Notify);
165 
198 KWIDGETSADDONS_EXPORT ButtonCode questionYesNoList(QWidget *parent,
199  const QString &text,
200  const QStringList &strlist,
201  const QString &caption = QString(),
202  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
203  const KGuiItem &buttonNo = KStandardGuiItem::no(),
204  const QString &dontAskAgainName = QString(),
205  Options options = Notify);
206 
235 KWIDGETSADDONS_EXPORT ButtonCode warningYesNo(QWidget *parent,
236  const QString &text,
237  const QString &caption = QString(),
238  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
239  const KGuiItem &buttonNo = KStandardGuiItem::no(),
240  const QString &dontAskAgainName = QString(),
241  Options options = Options(Notify | Dangerous));
242 
275 KWIDGETSADDONS_EXPORT ButtonCode warningYesNoList(QWidget *parent,
276  const QString &text,
277  const QStringList &strlist,
278  const QString &caption = QString(),
279  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
280  const KGuiItem &buttonNo = KStandardGuiItem::no(),
281  const QString &dontAskAgainName = QString(),
282  Options options = Options(Notify | Dangerous));
283 
312 KWIDGETSADDONS_EXPORT ButtonCode warningContinueCancel(QWidget *parent,
313  const QString &text,
314  const QString &caption = QString(),
315  const KGuiItem &buttonContinue = KStandardGuiItem::cont(),
316  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
317  const QString &dontAskAgainName = QString(),
318  Options options = Notify);
319 
325 KWIDGETSADDONS_EXPORT ButtonCode warningContinueCancelDetailed(QWidget *parent,
326  const QString &text,
327  const QString &caption = QString(),
328  const KGuiItem &buttonContinue = KStandardGuiItem::cont(),
329  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
330  const QString &dontAskAgainName = QString(),
331  Options options = Notify,
332  const QString &details = QString());
333 
366 KWIDGETSADDONS_EXPORT ButtonCode warningContinueCancelList(QWidget *parent,
367  const QString &text,
368  const QStringList &strlist,
369  const QString &caption = QString(),
370  const KGuiItem &buttonContinue = KStandardGuiItem::cont(),
371  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
372  const QString &dontAskAgainName = QString(),
373  Options options = Notify);
374 
409 KWIDGETSADDONS_EXPORT ButtonCode warningYesNoCancel(QWidget *parent,
410  const QString &text,
411  const QString &caption = QString(),
412  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
413  const KGuiItem &buttonNo = KStandardGuiItem::no(),
414  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
415  const QString &dontAskAgainName = QString(),
416  Options options = Notify);
417 
455 KWIDGETSADDONS_EXPORT ButtonCode warningYesNoCancelList(QWidget *parent,
456  const QString &text,
457  const QStringList &strlist,
458  const QString &caption = QString(),
459  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
460  const KGuiItem &buttonNo = KStandardGuiItem::no(),
461  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
462  const QString &dontAskAgainName = QString(),
463  Options options = Notify);
464 
486 KWIDGETSADDONS_EXPORT void error(QWidget *parent,
487  const QString &text,
488  const QString &caption = QString(),
489  Options options = Notify);
490 
515 KWIDGETSADDONS_EXPORT void errorList(QWidget *parent,
516  const QString &text,
517  const QStringList &strlist,
518  const QString &caption = QString(),
519  Options options = Notify);
520 
545 KWIDGETSADDONS_EXPORT void detailedError(QWidget *parent,
546  const QString &text,
547  const QString &details,
548  const QString &caption = QString(),
549  Options options = Notify);
550 
571 KWIDGETSADDONS_EXPORT void sorry(QWidget *parent,
572  const QString &text,
573  const QString &caption = QString(),
574  Options options = Notify);
575 
598 KWIDGETSADDONS_EXPORT void sorry(QWidget *parent,
599  const QString &text,
600  const QString &caption /*= QString()*/,
601  const KGuiItem &buttonOk /*= KStandardGuiItem::ok()*/,
602  Options options = Notify); // TODO KF6 merge with previous overload
603 
631 KWIDGETSADDONS_EXPORT void detailedSorry(QWidget *parent,
632  const QString &text,
633  const QString &details,
634  const QString &caption = QString(),
635  Options options = Notify);
636 
664 KWIDGETSADDONS_EXPORT void detailedSorry(QWidget *parent,
665  const QString &text,
666  const QString &details,
667  const QString &caption /* = QString() */,
668  const KGuiItem &buttonOk /*= KStandardGuiItem::ok()*/,
669  Options options = Notify); // TODO KF6: merge with previous overload
670 
695 KWIDGETSADDONS_EXPORT void information(QWidget *parent,
696  const QString &text,
697  const QString &caption = QString(),
698  const QString &dontShowAgainName = QString(),
699  Options options = Notify);
700 
728 KWIDGETSADDONS_EXPORT void informationList(QWidget *parent,
729  const QString &text,
730  const QStringList &strlist,
731  const QString &caption = QString(),
732  const QString &dontShowAgainName = QString(),
733  Options options = Notify);
734 
739 KWIDGETSADDONS_EXPORT void enableAllMessages();
740 
747 KWIDGETSADDONS_EXPORT void enableMessage(const QString &dontShowAgainName);
748 
766 KWIDGETSADDONS_EXPORT void about(QWidget *parent,
767  const QString &text,
768  const QString &caption = QString(),
769  Options options = Notify);
770 
796 KWIDGETSADDONS_EXPORT ButtonCode messageBox(QWidget *parent, DialogType type, const QString &text,
797  const QString &caption = QString(),
798  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
799  const KGuiItem &buttonNo = KStandardGuiItem::no(),
800  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
801  const QString &dontShowAskAgainName = QString(),
802  Options options = Notify);
803 
812 KWIDGETSADDONS_EXPORT bool shouldBeShownYesNo(const QString &dontShowAgainName,
813  ButtonCode &result);
820 KWIDGETSADDONS_EXPORT bool shouldBeShownContinue(const QString &dontShowAgainName);
821 
829 KWIDGETSADDONS_EXPORT void saveDontShowAgainYesNo(const QString &dontShowAgainName,
830  ButtonCode result);
831 
838 KWIDGETSADDONS_EXPORT void saveDontShowAgainContinue(const QString &dontShowAgainName);
839 
844 KWIDGETSADDONS_EXPORT void setDontShowAgainConfig(KConfig *cfg);
845 
846 #if KWIDGETSADDONS_ENABLE_DEPRECATED_SINCE(5, 0)
847 
850 KWIDGETSADDONS_DEPRECATED_VERSION(5, 0, "Use KMessageBox::setDontShowAgainConfig(KConfig*)")
851 KWIDGETSADDONS_EXPORT inline void setDontShowAskAgainConfig(KConfig *cfg) { setDontShowAgainConfig(cfg); }
852 #endif
853 
860 KWIDGETSADDONS_EXPORT void setDontShowAgainInterface(KMessageBoxDontAskAgainInterface *dontAskAgainInterface);
861 
868 KWIDGETSADDONS_EXPORT void setNotifyInterface(KMessageBoxNotifyInterface *notifyInterface);
869 
895 KWIDGETSADDONS_EXPORT QDialogButtonBox::StandardButton createKMessageBox(QDialog *dialog, QDialogButtonBox *buttons,
896  QMessageBox::Icon icon, //krazy:exclude=qclasses
897  const QString &text, const QStringList &strlist,
898  const QString &ask, bool *checkboxReturn,
899  Options options, const QString &details = QString());
900 
929 KWIDGETSADDONS_EXPORT QDialogButtonBox::StandardButton createKMessageBox(QDialog *dialog, QDialogButtonBox *buttons,
930  const QIcon &icon,
931  const QString &text, const QStringList &strlist,
932  const QString &ask, bool *checkboxReturn,
933  Options options, const QString &details = QString(),
934  QMessageBox::Icon notifyType = QMessageBox::Information); //krazy:exclude=qclasses
935 
940 KWIDGETSADDONS_EXPORT ButtonCode questionYesNoWId(WId parent_id,
941  const QString &text,
942  const QString &caption = QString(),
943  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
944  const KGuiItem &buttonNo = KStandardGuiItem::no(),
945  const QString &dontAskAgainName = QString(),
946  Options options = Notify);
947 
952 KWIDGETSADDONS_EXPORT ButtonCode questionYesNoCancelWId(WId parent_id,
953  const QString &text,
954  const QString &caption = QString(),
955  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
956  const KGuiItem &buttonNo = KStandardGuiItem::no(),
957  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
958  const QString &dontAskAgainName = QString(),
959  Options options = Notify);
960 
965 KWIDGETSADDONS_EXPORT ButtonCode questionYesNoListWId(WId parent_id,
966  const QString &text,
967  const QStringList &strlist,
968  const QString &caption = QString(),
969  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
970  const KGuiItem &buttonNo = KStandardGuiItem::no(),
971  const QString &dontAskAgainName = QString(),
972  Options options = Notify);
973 
978 KWIDGETSADDONS_EXPORT ButtonCode warningYesNoWId(WId parent_id,
979  const QString &text,
980  const QString &caption = QString(),
981  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
982  const KGuiItem &buttonNo = KStandardGuiItem::no(),
983  const QString &dontAskAgainName = QString(),
984  Options options = Options(Notify | Dangerous));
985 
990 KWIDGETSADDONS_EXPORT ButtonCode warningYesNoListWId(WId parent_id,
991  const QString &text,
992  const QStringList &strlist,
993  const QString &caption = QString(),
994  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
995  const KGuiItem &buttonNo = KStandardGuiItem::no(),
996  const QString &dontAskAgainName = QString(),
997  Options options = Options(Notify | Dangerous));
998 
1003 KWIDGETSADDONS_EXPORT ButtonCode warningContinueCancelWId(WId parent_id,
1004  const QString &text,
1005  const QString &caption = QString(),
1006  const KGuiItem &buttonContinue = KStandardGuiItem::cont(),
1007  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
1008  const QString &dontAskAgainName = QString(),
1009  Options options = Notify);
1010 
1015 KWIDGETSADDONS_EXPORT ButtonCode warningContinueCancelListWId(WId parent_id,
1016  const QString &text,
1017  const QStringList &strlist,
1018  const QString &caption = QString(),
1019  const KGuiItem &buttonContinue = KStandardGuiItem::cont(),
1020  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
1021  const QString &dontAskAgainName = QString(),
1022  Options options = Notify);
1023 
1028 KWIDGETSADDONS_EXPORT ButtonCode warningYesNoCancelWId(WId parent_id,
1029  const QString &text,
1030  const QString &caption = QString(),
1031  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
1032  const KGuiItem &buttonNo = KStandardGuiItem::no(),
1033  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
1034  const QString &dontAskAgainName = QString(),
1035  Options options = Notify);
1036 
1041 KWIDGETSADDONS_EXPORT ButtonCode warningYesNoCancelListWId(WId parent_id,
1042  const QString &text,
1043  const QStringList &strlist,
1044  const QString &caption = QString(),
1045  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
1046  const KGuiItem &buttonNo = KStandardGuiItem::no(),
1047  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
1048  const QString &dontAskAgainName = QString(),
1049  Options options = Notify);
1050 
1055 KWIDGETSADDONS_EXPORT void errorWId(WId parent_id,
1056  const QString &text,
1057  const QString &caption = QString(),
1058  Options options = Notify);
1059 
1064 KWIDGETSADDONS_EXPORT void errorListWId(WId parent_id,
1065  const QString &text,
1066  const QStringList &strlist,
1067  const QString &caption = QString(),
1068  Options options = Notify);
1069 
1074 KWIDGETSADDONS_EXPORT void detailedErrorWId(WId parent_id,
1075  const QString &text,
1076  const QString &details,
1077  const QString &caption = QString(),
1078  Options options = Notify);
1079 
1084 KWIDGETSADDONS_EXPORT void sorryWId(WId parent_id,
1085  const QString &text,
1086  const QString &caption = QString(),
1087  Options options = Notify);
1088 
1094 KWIDGETSADDONS_EXPORT void sorryWId(WId parent_id,
1095  const QString &text,
1096  const QString &caption /*= QString()*/,
1097  const KGuiItem &buttonOk /*= KStandardGuiItem::ok()*/,
1098  Options options = Notify); // TODO KF6 merge with previous overload
1099 
1104 KWIDGETSADDONS_EXPORT void detailedSorryWId(WId parent_id,
1105  const QString &text,
1106  const QString &details,
1107  const QString &caption = QString(),
1108  Options options = Notify);
1109 
1115 KWIDGETSADDONS_EXPORT void detailedSorryWId(WId parent_id,
1116  const QString &text,
1117  const QString &details,
1118  const QString &caption /*= QString()*/,
1119  const KGuiItem &buttonOk /*= KStandardGuiItem::ok()*/,
1120  Options options = Notify); // TODO KF6 merge with previous overload
1121 
1126 KWIDGETSADDONS_EXPORT void informationWId(WId parent_id,
1127  const QString &text,
1128  const QString &caption = QString(),
1129  const QString &dontShowAgainName = QString(),
1130  Options options = Notify);
1131 
1136 KWIDGETSADDONS_EXPORT void informationListWId(WId parent_id,
1137  const QString &text,
1138  const QStringList &strlist,
1139  const QString &caption = QString(),
1140  const QString &dontShowAgainName = QString(),
1141  Options options = Notify);
1142 
1147 KWIDGETSADDONS_EXPORT ButtonCode messageBoxWId(WId parent_id, DialogType type, const QString &text,
1148  const QString &caption = QString(),
1149  const KGuiItem &buttonYes = KStandardGuiItem::yes(),
1150  const KGuiItem &buttonNo = KStandardGuiItem::no(),
1151  const KGuiItem &buttonCancel = KStandardGuiItem::cancel(),
1152  const QString &dontShowAskAgainName = QString(),
1153  Options options = Notify);
1154 
1155 }
1156 
1157 #endif
void errorListWId(WId parent_id, const QString &text, const QStringList &strlist, const QString &caption, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
void detailedSorry(QWidget *parent, const QString &text, const QString &details, const QString &caption, Options options)
Displays a "Sorry" dialog with a "Details >>" button.
Easy message dialog box.
Definition: kmessagebox.cpp:66
void errorList(QWidget *parent, const QString &text, const QStringList &strlist, const QString &caption, Options options)
Display an "Error" dialog with a listbox.
void detailedErrorWId(WId parent_id, const QString &text, const QString &details, const QString &caption, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
void about(QWidget *parent, const QString &text, const QString &caption, Options options)
Display an "About" dialog.
Do not use KApplication::makeStdCaption()
Definition: kmessagebox.h:75
void saveDontShowAgainYesNo(const QString &dontShowAgainName, ButtonCode result)
Save the fact that the yes/no message box should not be shown again.
void errorWId(WId parent_id, const QString &text, const QString &caption, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
KWIDGETSADDONS_EXPORT void setDontShowAgainInterface(KMessageBoxDontAskAgainInterface *dontAskAgainInterface)
Use dontAskAgainInterface for all settings related to the dontShowAgain feature.
void detailedError(QWidget *parent, const QString &text, const QString &details, const QString &caption, Options options)
Displays an "Error" dialog with a "Details >>" button.
ButtonCode warningYesNoList(QWidget *parent, const QString &text, const QStringList &strlist, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const QString &dontAskAgainName, Options options)
Display a "warning" dialog with a listbox to show information to the user.
ButtonCode questionYesNoList(QWidget *parent, const QString &text, const QStringList &strlist, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const QString &dontAskAgainName, Options options)
Display a "question" dialog with a listbox to show information to the user.
KGuiItem cont()
Returns the &#39;Continue&#39; gui item.
KGuiItem cancel()
Returns the &#39;Cancel&#39; gui item.
ButtonCode messageBoxWId(WId parent_id, DialogType type, const QString &text, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const KGuiItem &buttonCancel, const QString &dontShow, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
void setDontShowAgainConfig(KConfig *cfg)
Use cfg for all settings related to the dontShowAgainName feature.
ButtonCode warningContinueCancelDetailed(QWidget *parent, const QString &text, const QString &caption, const KGuiItem &buttonContinue, const KGuiItem &buttonCancel, const QString &dontAskAgainName, Options options, const QString &details)
Display a "warning" dialog with a collapsible "Details" section.
void sorryWId(WId parent_id, const QString &text, const QString &caption, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
ButtonCode questionYesNoWId(WId parent_id, const QString &text, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const QString &dontAskAgainName, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
The action to be confirmed by the dialog is a potentially destructive one. The default button will be...
Definition: kmessagebox.h:74
KGuiItem no()
Returns the &#39;No&#39; gui item.
ButtonCode
Button types.
Definition: kmessagebox.h:48
ButtonCode warningContinueCancel(QWidget *parent, const QString &text, const QString &caption, const KGuiItem &buttonContinue, const KGuiItem &buttonCancel, const QString &dontAskAgainName, Options options)
Display a "warning" dialog.
ButtonCode warningContinueCancelListWId(WId parent_id, const QString &text, const QStringList &strlist, const QString &caption, const KGuiItem &buttonContinue, const KGuiItem &buttonCancel, const QString &dontAskAgainName, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
void informationWId(WId parent_id, const QString &text, const QString &caption, const QString &dontShowAgainName, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
ButtonCode warningYesNoCancelList(QWidget *parent, const QString &text, const QStringList &strlist, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const KGuiItem &buttonCancel, const QString &dontAskAgainName, Options options)
Display a Yes/No/Cancel "warning" dialog with a listbox to show information to the user...
void enableMessage(const QString &dontShowAgainName)
Re-enable a specific dontShowAgainName messages that had previously been turned off.
ButtonCode warningContinueCancelWId(WId parent_id, const QString &text, const QString &caption, const KGuiItem &buttonContinue, const KGuiItem &buttonCancel, const QString &dontAskAgainName, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
An abstract class for GUI data such as ToolTip and Icon.
Definition: kguiitem.h:31
void error(QWidget *parent, const QString &text, const QString &caption, Options options)
Display an "Error" dialog.
void saveDontShowAgainContinue(const QString &dontShowAgainName)
Save the fact that the continue/cancel message box should not be shown again.
QFlags< Option > Options
Stores a combination of Option values.
Definition: kmessagebox.h:83
QDialogButtonBox::StandardButton createKMessageBox(QDialog *dialog, QDialogButtonBox *buttons, QMessageBox::Icon icon, const QString &text, const QStringList &strlist, const QString &ask, bool *checkboxReturn, Options options, const QString &details)
Create content and layout of a standard dialog.
ButtonCode questionYesNo(QWidget *parent, const QString &text, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const QString &dontAskAgainName, Options options)
Display a simple "question" dialog.
The message may contain links.
Definition: kmessagebox.h:73
void enableAllMessages()
Enable all messages which have been turned off with the dontShowAgainName feature.
ButtonCode questionYesNoCancel(QWidget *parent, const QString &text, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const KGuiItem &buttonCancel, const QString &dontAskAgainName, Options options)
Display a simple "question" dialog.
KGuiItem yes()
Returns the &#39;Yes&#39; gui item.
ButtonCode questionYesNoCancelWId(WId parent_id, const QString &text, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const KGuiItem &buttonCancel, const QString &dontAskAgainName, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
ButtonCode messageBox(QWidget *parent, DialogType type, const QString &text, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const KGuiItem &buttonCancel, const QString &dontShow, Options options)
Alternate method to show a messagebox:
ButtonCode warningYesNoWId(WId parent_id, const QString &text, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const QString &dontAskAgainName, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
ButtonCode warningContinueCancelList(QWidget *parent, const QString &text, const QStringList &strlist, const QString &caption, const KGuiItem &buttonContinue, const KGuiItem &buttonCancel, const QString &dontAskAgainName, Options options)
Display a "warning" dialog with a listbox to show information to the user.
ButtonCode warningYesNoCancel(QWidget *parent, const QString &text, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const KGuiItem &buttonCancel, const QString &dontAskAgainName, Options options)
Display a Yes/No/Cancel "warning" dialog.
ButtonCode warningYesNoCancelWId(WId parent_id, const QString &text, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const KGuiItem &buttonCancel, const QString &dontAskAgainName, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
KWIDGETSADDONS_EXPORT void setNotifyInterface(KMessageBoxNotifyInterface *notifyInterface)
Use notifyInterface to send notifications.
KWIDGETSADDONS_EXPORT void setDontShowAskAgainConfig(KConfig *cfg)
Definition: kmessagebox.h:851
Emit a KNotify event.
Definition: kmessagebox.h:72
The window is to be modal relative to its parent. By default, it is application modal.
Definition: kmessagebox.h:77
void information(QWidget *parent, const QString &text, const QString &caption, const QString &dontShowAgainName, Options options)
Display an "Information" dialog.
void informationListWId(WId parent_id, const QString &text, const QStringList &strlist, const QString &caption, const QString &dontShowAgainName, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
Do not call exec() in createKMessageBox()
Definition: kmessagebox.h:76
ButtonCode questionYesNoListWId(WId parent_id, const QString &text, const QStringList &strlist, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const QString &dontAskAgainName, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
bool shouldBeShownYesNo(const QString &dontShowAgainName, ButtonCode &result)
void informationList(QWidget *parent, const QString &text, const QStringList &strlist, const QString &caption, const QString &dontShowAgainName, Options options)
Display an "Information" dialog with a listbox.
ButtonCode warningYesNoListWId(WId parent_id, const QString &text, const QStringList &strlist, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const QString &dontAskAgainName, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
ButtonCode warningYesNoCancelListWId(WId parent_id, const QString &text, const QStringList &strlist, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const KGuiItem &buttonCancel, const QString &dontAskAgainName, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
void sorry(QWidget *parent, const QString &text, const QString &caption, Options options)
Display a "Sorry" dialog.
bool shouldBeShownContinue(const QString &dontShowAgainName)
ButtonCode warningYesNo(QWidget *parent, const QString &text, const QString &caption, const KGuiItem &buttonYes, const KGuiItem &buttonNo, const QString &dontAskAgainName, Options options)
Display a "warning" dialog.
void detailedSorryWId(WId parent_id, const QString &text, const QString &details, const QString &caption, Options options)
This function accepts the window id of the parent window, instead of QWidget*.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Aug 8 2020 22:42:59 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.