• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

  • tdeui
tdemessagebox.h
1/* This file is part of the KDE libraries
2 Copyright (C) 1999 Waldo Bastian (bastian@kde.org)
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; version 2
7 of the License.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19#ifndef _TDEMESSAGEBOX_H_
20#define _TDEMESSAGEBOX_H_
21
22#include <tqstring.h>
23#include <tqmessagebox.h>
24
25#include <kguiitem.h>
26#include <kstdguiitem.h>
27
28class TQWidget;
29class TQStringList;
30class TDEConfig;
31class KDialogBase;
32
44class TDEUI_EXPORT KMessageBox
45{
46public:
50 enum ButtonCode
51 {
52 Ok = 1,
53 Cancel = 2,
54 Yes = 3,
55 No = 4,
56 Continue = 5
57 };
58
59 enum DialogType
60 {
61 QuestionYesNo = 1,
62 WarningYesNo = 2,
63 WarningContinueCancel = 3,
64 WarningYesNoCancel = 4,
65 Information = 5,
66 // Reserved for: SSLMessageBox = 6
67 Sorry = 7,
68 Error = 8,
69 QuestionYesNoCancel = 9
70 };
71
72 enum OptionsType
73 {
74 Notify = 1,
75 AllowLink = 2,
76 Dangerous = 4,
77 PlainCaption = 8,
80 NoExec = 16
83 };
84
115 static int questionYesNo(TQWidget *parent,
116 const TQString &text,
117 const TQString &caption = TQString::null,
118 const KGuiItem &buttonYes = KStdGuiItem::yes(),
119 const KGuiItem &buttonNo = KStdGuiItem::no(),
120 const TQString &dontAskAgainName = TQString::null,
121 int options = Notify);
127 static int questionYesNoWId(WId parent_id,
128 const TQString &text,
129 const TQString &caption = TQString::null,
130 const KGuiItem &buttonYes = KStdGuiItem::yes(),
131 const KGuiItem &buttonNo = KStdGuiItem::no(),
132 const TQString &dontAskAgainName = TQString::null,
133 int options = Notify);
166 static int questionYesNoCancel(TQWidget *parent,
167 const TQString &text,
168 const TQString &caption = TQString::null,
169 const KGuiItem &buttonYes = KStdGuiItem::yes(),
170 const KGuiItem &buttonNo = KStdGuiItem::no(),
171 const TQString &dontAskAgainName = TQString::null,
172 int options = Notify);
173
179 static int questionYesNoCancelWId(WId parent_id,
180 const TQString &text,
181 const TQString &caption = TQString::null,
182 const KGuiItem &buttonYes = KStdGuiItem::yes(),
183 const KGuiItem &buttonNo = KStdGuiItem::no(),
184 const TQString &dontAskAgainName = TQString::null,
185 int options = Notify);
186
221 static int questionYesNoList(TQWidget *parent,
222 const TQString &text,
223 const TQStringList &strlist,
224 const TQString &caption = TQString::null,
225 const KGuiItem &buttonYes = KStdGuiItem::yes(),
226 const KGuiItem &buttonNo = KStdGuiItem::no(),
227 const TQString &dontAskAgainName = TQString::null,
228 int options = Notify);
229
235 static int questionYesNoListWId(WId parent_id,
236 const TQString &text,
237 const TQStringList &strlist,
238 const TQString &caption = TQString::null,
239 const KGuiItem &buttonYes = KStdGuiItem::yes(),
240 const KGuiItem &buttonNo = KStdGuiItem::no(),
241 const TQString &dontAskAgainName = TQString::null,
242 int options = Notify);
243
274 static int warningYesNo(TQWidget *parent,
275 const TQString &text,
276 const TQString &caption = TQString::null,
277 const KGuiItem &buttonYes = KStdGuiItem::yes(),
278 const KGuiItem &buttonNo = KStdGuiItem::no(),
279 const TQString &dontAskAgainName = TQString::null,
280 int options = Notify | Dangerous);
281
287 static int warningYesNoWId(WId parent_id,
288 const TQString &text,
289 const TQString &caption = TQString::null,
290 const KGuiItem &buttonYes = KStdGuiItem::yes(),
291 const KGuiItem &buttonNo = KStdGuiItem::no(),
292 const TQString &dontAskAgainName = TQString::null,
293 int options = Notify | Dangerous);
294
329 static int warningYesNoList(TQWidget *parent,
330 const TQString &text,
331 const TQStringList &strlist,
332 const TQString &caption = TQString::null,
333 const KGuiItem &buttonYes = KStdGuiItem::yes(),
334 const KGuiItem &buttonNo = KStdGuiItem::no(),
335 const TQString &dontAskAgainName = TQString::null,
336 int options = Notify | Dangerous);
337
343 static int warningYesNoListWId(WId parent_id,
344 const TQString &text,
345 const TQStringList &strlist,
346 const TQString &caption = TQString::null,
347 const KGuiItem &buttonYes = KStdGuiItem::yes(),
348 const KGuiItem &buttonNo = KStdGuiItem::no(),
349 const TQString &dontAskAgainName = TQString::null,
350 int options = Notify | Dangerous);
351
381 static int warningContinueCancel(TQWidget *parent,
382 const TQString &text,
383 const TQString &caption = TQString::null,
384 const KGuiItem &buttonContinue = KStdGuiItem::cont(),
385 const TQString &dontAskAgainName = TQString::null,
386 int options = Notify);
387
393 static int warningContinueCancelWId(WId parent_id,
394 const TQString &text,
395 const TQString &caption = TQString::null,
396 const KGuiItem &buttonContinue = KStdGuiItem::cont(),
397 const TQString &dontAskAgainName = TQString::null,
398 int options = Notify);
399
433 static int warningContinueCancelList(TQWidget *parent,
434 const TQString &text,
435 const TQStringList &strlist,
436 const TQString &caption = TQString::null,
437 const KGuiItem &buttonContinue = KStdGuiItem::cont(),
438 const TQString &dontAskAgainName = TQString::null,
439 int options = Notify);
440
446 static int warningContinueCancelListWId(WId parent_id,
447 const TQString &text,
448 const TQStringList &strlist,
449 const TQString &caption = TQString::null,
450 const KGuiItem &buttonContinue = KStdGuiItem::cont(),
451 const TQString &dontAskAgainName = TQString::null,
452 int options = Notify);
453
490 static int warningYesNoCancel(TQWidget *parent,
491 const TQString &text,
492 const TQString &caption = TQString::null,
493 const KGuiItem &buttonYes = KStdGuiItem::yes(),
494 const KGuiItem &buttonNo = KStdGuiItem::no(),
495 const TQString &dontAskAgainName = TQString::null,
496 int options = Notify);
497
503 static int warningYesNoCancelWId(WId parent_id,
504 const TQString &text,
505 const TQString &caption = TQString::null,
506 const KGuiItem &buttonYes = KStdGuiItem::yes(),
507 const KGuiItem &buttonNo = KStdGuiItem::no(),
508 const TQString &dontAskAgainName = TQString::null,
509 int options = Notify);
510
552 static int warningYesNoCancelList(TQWidget *parent,
553 const TQString &text,
554 const TQStringList &strlist,
555 const TQString &caption = TQString::null,
556 const KGuiItem &buttonYes = KStdGuiItem::yes(),
557 const KGuiItem &buttonNo = KStdGuiItem::no(),
558 const TQString &dontAskAgainName = TQString::null,
559 int options = Notify);
560
566 static int warningYesNoCancelListWId(WId parent_id,
567 const TQString &text,
568 const TQStringList &strlist,
569 const TQString &caption = TQString::null,
570 const KGuiItem &buttonYes = KStdGuiItem::yes(),
571 const KGuiItem &buttonNo = KStdGuiItem::no(),
572 const TQString &dontAskAgainName = TQString::null,
573 int options = Notify);
574
598 static void error(TQWidget *parent,
599 const TQString &text,
600 const TQString &caption = TQString::null,
601 int options = Notify);
602
609 static void errorWId(WId parent_id,
610 const TQString &text,
611 const TQString &caption = TQString::null,
612 int options = Notify);
613
642 static void errorList(TQWidget *parent,
643 const TQString &text,
644 const TQStringList &strlist,
645 const TQString &caption = TQString::null,
646 int options = Notify);
647
654 static void errorListWId(WId parent_id,
655 const TQString &text,
656 const TQStringList &strlist,
657 const TQString &caption = TQString::null,
658 int options = Notify);
659
686 static void detailedError(TQWidget *parent,
687 const TQString &text,
688 const TQString &details,
689 const TQString &caption = TQString::null,
690 int options = Notify);
691
697 static void detailedErrorWId(WId parent_id,
698 const TQString &text,
699 const TQString &details,
700 const TQString &caption = TQString::null,
701 int options = Notify);
702
713 static void queuedDetailedError( TQWidget *parent,
714 const TQString &text,
715 const TQString &details,
716 const TQString &caption = TQString::null);
717
723 static void queuedDetailedErrorWId( WId parent_id,
724 const TQString &text,
725 const TQString &details,
726 const TQString &caption = TQString::null);
727
750 static void sorry(TQWidget *parent,
751 const TQString &text,
752 const TQString &caption = TQString::null,
753 int options = Notify);
754
760 static void sorryWId(WId parent_id,
761 const TQString &text,
762 const TQString &caption = TQString::null,
763 int options = Notify);
764
793 static void detailedSorry(TQWidget *parent,
794 const TQString &text,
795 const TQString &details,
796 const TQString &caption = TQString::null,
797 int options = Notify);
798
804 static void detailedSorryWId(WId parent_id,
805 const TQString &text,
806 const TQString &details,
807 const TQString &caption = TQString::null,
808 int options = Notify);
809
836 static void information(TQWidget *parent,
837 const TQString &text,
838 const TQString &caption = TQString::null,
839 const TQString &dontShowAgainName = TQString::null,
840 int options = Notify);
841
847 static void informationWId(WId parent_id,
848 const TQString &text,
849 const TQString &caption = TQString::null,
850 const TQString &dontShowAgainName = TQString::null,
851 int options = Notify);
852
883 static void informationList(TQWidget *parent,
884 const TQString &text,
885 const TQStringList & strlist,
886 const TQString &caption = TQString::null,
887 const TQString &dontShowAgainName = TQString::null,
888 int options = Notify);
889
895 static void informationListWId(WId parent_id,
896 const TQString &text,
897 const TQStringList & strlist,
898 const TQString &caption = TQString::null,
899 const TQString &dontShowAgainName = TQString::null,
900 int options = Notify);
901
906 static void enableAllMessages();
907
915 static void enableMessage(const TQString &dontShowAgainName);
916
936 static void about(TQWidget *parent,
937 const TQString& text,
938 const TQString& caption = TQString::null,
939 int options = Notify);
940
965 static int messageBox( TQWidget *parent, DialogType type, const TQString &text,
966 const TQString &caption,
967 const KGuiItem &buttonYes,
968 const KGuiItem &buttonNo,
969 const TQString &dontShowAskAgainName,
970 int options = Notify);
971
990 // KDE4 - merge with above?
991 static int messageBox( TQWidget *parent, DialogType type, const TQString &text,
992 const TQString &caption = TQString::null,
993 const KGuiItem &buttonYes = KStdGuiItem::yes(),
994 const KGuiItem &buttonNo = KStdGuiItem::no(),
995 int options = Notify);
996
1002 static int messageBoxWId( WId parent_id, DialogType type, const TQString &text,
1003 const TQString &caption = TQString::null,
1004 const KGuiItem &buttonYes = KStdGuiItem::yes(),
1005 const KGuiItem &buttonNo = KStdGuiItem::no(),
1006 const TQString &dontShowAskAgainName = TQString::null,
1007 int options = Notify);
1008
1021 static void queuedMessageBox( TQWidget *parent,
1022 DialogType type, const TQString &text,
1023 const TQString &caption,
1024 int options );
1025
1031 static void queuedMessageBoxWId( WId parent_id,
1032 DialogType type, const TQString &text,
1033 const TQString &caption,
1034 int options );
1035
1042 static void queuedMessageBox( TQWidget *parent,
1043 DialogType type, const TQString &text,
1044 const TQString &caption = TQString::null );
1045
1051 static void queuedMessageBoxWId( WId parent_id,
1052 DialogType type, const TQString &text,
1053 const TQString &caption = TQString::null );
1054
1064 static bool shouldBeShownYesNo(const TQString &dontShowAgainName,
1065 ButtonCode &result);
1073 static bool shouldBeShownContinue(const TQString &dontShowAgainName);
1074
1083 static void saveDontShowAgainYesNo(const TQString &dontShowAgainName,
1084 ButtonCode result);
1085
1093 static void saveDontShowAgainContinue(const TQString &dontShowAgainName);
1094
1100 static void setDontShowAskAgainConfig(TDEConfig* cfg);
1101
1125 static int createKMessageBox(KDialogBase *dialog, TQMessageBox::Icon icon,
1126 const TQString &text, const TQStringList &strlist,
1127 const TQString &ask, bool *checkboxReturn,
1128 int options, const TQString &details=TQString::null);
1129
1156 static int createKMessageBox(KDialogBase *dialog, TQPixmap icon,
1157 const TQString &text, const TQStringList &strlist,
1158 const TQString &ask, bool *checkboxReturn,
1159 int options, const TQString &details=TQString::null,
1160 TQMessageBox::Icon notifyType=TQMessageBox::Information);
1161
1162private:
1163 static TDEConfig* againConfig;
1164};
1165
1166#endif
KDialogBase
A dialog base class with standard buttons and predefined layouts.
Definition: kdialogbase.h:192
KGuiItem
An abstract class for GUI data such as ToolTip and Icon.
Definition: kguiitem.h:39
KMessageBox
Easy message dialog box.
Definition: tdemessagebox.h:45
KMessageBox::OptionsType
OptionsType
Definition: tdemessagebox.h:73
KMessageBox::ButtonCode
ButtonCode
Button types.
Definition: tdemessagebox.h:51
KStdGuiItem::cont
static KGuiItem cont()
Returns a "continue" item.
Definition: kstdguiitem.cpp:212
TDEConfig

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.