summaryrefslogtreecommitdiffabout
path: root/microkde/kdialogbase.h
Unidiff
Diffstat (limited to 'microkde/kdialogbase.h') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdialogbase.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/microkde/kdialogbase.h b/microkde/kdialogbase.h
index 17c186b..64cbd17 100644
--- a/microkde/kdialogbase.h
+++ b/microkde/kdialogbase.h
@@ -1,143 +1,145 @@
1#ifndef MINIKDE_KDIALOGBASE_H 1#ifndef MINIKDE_KDIALOGBASE_H
2#define MINIKDE_KDIALOGBASE_H 2#define MINIKDE_KDIALOGBASE_H
3 3
4#include <qframe.h> 4#include <q3frame.h>
5//Added by qt3to4:
6#include <QPixmap>
5 7
6#include "kdialog.h" 8#include "kdialog.h"
7 9
8class QPushButton; 10class QPushButton;
9class QLayout; 11class QLayout;
10class QTabWidget; 12class QTabWidget;
11class QBoxLayout; 13class Q3BoxLayout;
12 14
13class KDialogBase : public KDialog 15class KDialogBase : public KDialog
14{ 16{
15 Q_OBJECT 17 Q_OBJECT
16 public: 18 public:
17 enum ButtonCode 19 enum ButtonCode
18 { 20 {
19 Help = 0x00000001, 21 Help = 0x00000001,
20 Default = 0x00000002, 22 Default = 0x00000002,
21 Ok = 0x00000004, 23 Ok = 0x00000004,
22 Apply = 0x00000008, 24 Apply = 0x00000008,
23 Try = 0x00000010, 25 Try = 0x00000010,
24 Cancel = 0x00000020, 26 Cancel = 0x00000020,
25 Close = 0x00000040, 27 Close = 0x00000040,
26 User1 = 0x00000080, 28 User1 = 0x00000080,
27 User2 = 0x00000100, 29 User2 = 0x00000100,
28 User3 = 0x00000200, 30 User3 = 0x00000200,
29 No = 0x00000080, 31 No = 0x00000080,
30 Yes = 0x00000100, 32 Yes = 0x00000100,
31 Details = 0x00000400, 33 Details = 0x00000400,
32 Filler = 0x40000000, 34 Filler = 0x40000000,
33 Stretch = 0x80000000 35 Stretch = 0x80000000
34 }; 36 };
35 37
36 enum DialogType 38 enum DialogType
37 { 39 {
38 TreeList, 40 TreeList,
39 Tabbed, 41 Tabbed,
40 Plain, 42 Plain,
41 Swallow, 43 Swallow,
42 IconList 44 IconList
43 }; 45 };
44 46
45 KDialogBase(); 47 KDialogBase();
46 KDialogBase( QWidget *parent=0, const char *name=0, bool modal=true, 48 KDialogBase( QWidget *parent=0, const char *name=0, bool modal=true,
47 const QString &caption=QString::null, 49 const QString &caption=QString::null,
48 int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok, 50 int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok,
49 bool separator=false, 51 bool separator=false,
50 const QString &user1=QString::null, 52 const QString &user1=QString::null,
51 const QString &user2=QString::null, 53 const QString &user2=QString::null,
52 const QString &user3=QString::null); 54 const QString &user3=QString::null);
53 KDialogBase( int dialogFace, const QString &caption, 55 KDialogBase( int dialogFace, const QString &caption,
54 int buttonMask, ButtonCode defaultButton, 56 int buttonMask, ButtonCode defaultButton,
55 QWidget *parent=0, const char *name=0, bool modal=true, 57 QWidget *parent=0, const char *name=0, bool modal=true,
56 bool separator=false, 58 bool separator=false,
57 const QString &user1=QString::null, 59 const QString &user1=QString::null,
58 const QString &user2=QString::null, 60 const QString &user2=QString::null,
59 const QString &user3=QString::null); 61 const QString &user3=QString::null);
60 virtual ~KDialogBase(); 62 virtual ~KDialogBase();
61 63
62 QFrame *addPage( const QString & ); 64 Q3Frame *addPage( const QString & );
63 QFrame *addPage( const QString &, int, const QPixmap & ); 65 Q3Frame *addPage( const QString &, int, const QPixmap & );
64 66
65 void setMainWidget( QWidget *widget ); 67 void setMainWidget( QWidget *widget );
66 68
67 void setButtonText( ButtonCode id, const QString &text ); 69 void setButtonText( ButtonCode id, const QString &text );
68 70
69 void enableButton( ButtonCode id, bool state ); 71 void enableButton( ButtonCode id, bool state );
70 void enableButtonOK( bool state ); 72 void enableButtonOK( bool state );
71 void enableButtonApply( bool state ); 73 void enableButtonApply( bool state );
72 74
73 void showButton( ButtonCode, bool show ); 75 void showButton( ButtonCode, bool show );
74 76
75 int pageIndex( QWidget *widget ) const; 77 int pageIndex( QWidget *widget ) const;
76 78
77 bool showPage( int index ); 79 bool showPage( int index );
78 void hideButtons(); 80 void hideButtons();
79 81
80 QFrame *plainPage(); 82 Q3Frame *plainPage();
81 83
82 signals: 84 signals:
83 void user1Clicked(); 85 void user1Clicked();
84 void user2Clicked(); 86 void user2Clicked();
85 /** 87 /**
86 * The Apply button was pressed. This signal is only emitted if 88 * The Apply button was pressed. This signal is only emitted if
87 * @ref slotApply() is not replaced. 89 * @ref slotApply() is not replaced.
88 */ 90 */
89 void applyClicked(); 91 void applyClicked();
90 92
91 /** 93 /**
92 * The OK button was pressed. This signal is only emitted if 94 * The OK button was pressed. This signal is only emitted if
93 * @ref slotOk() is not replaced. 95 * @ref slotOk() is not replaced.
94 */ 96 */
95 void okClicked(); 97 void okClicked();
96 98
97 /** 99 /**
98 * The Cancel button was pressed. This signal is only emitted if 100 * The Cancel button was pressed. This signal is only emitted if
99 * @ref slotCancel() is not replaced. 101 * @ref slotCancel() is not replaced.
100 */ 102 */
101 void cancelClicked(); 103 void cancelClicked();
102 104
103 /** 105 /**
104 * The Close button was pressed. This signal is only emitted if 106 * The Close button was pressed. This signal is only emitted if
105 * @ref slotClose() is not replaced. 107 * @ref slotClose() is not replaced.
106 */ 108 */
107 void closeClicked(); 109 void closeClicked();
108 void defaultClicked(); 110 void defaultClicked();
109 111
110 void acceptClicked(); 112 void acceptClicked();
111 113
112 protected slots: 114 protected slots:
113 virtual void slotOk(); 115 virtual void slotOk();
114 virtual void slotApply(); 116 virtual void slotApply();
115 virtual void slotCancel(); 117 virtual void slotCancel();
116 virtual void slotClose(); 118 virtual void slotClose();
117 virtual void slotUser1(); 119 virtual void slotUser1();
118 virtual void slotUser2(); 120 virtual void slotUser2();
119 virtual void accept (); 121 virtual void accept ();
120 protected: 122 protected:
121 QPushButton *findButton( ButtonCode ); 123 QPushButton *findButton( ButtonCode );
122 QTabWidget *tabWidget(); 124 QTabWidget *tabWidget();
123 125
124 private: 126 private:
125 void init( const QString &caption, int buttonMask, 127 void init( const QString &caption, int buttonMask,
126 const QString &user1=QString::null, const QString &user2=QString::null ); 128 const QString &user1=QString::null, const QString &user2=QString::null );
127 void initLayout(); 129 void initLayout();
128 130
129 QWidget *mMainWidget; 131 QWidget *mMainWidget;
130 QTabWidget *mTabWidget; 132 QTabWidget *mTabWidget;
131 QFrame *mPlainPage; 133 Q3Frame *mPlainPage;
132 QBoxLayout *mTopLayout; 134 Q3BoxLayout *mTopLayout;
133 135
134 QPushButton *mUser1Button; 136 QPushButton *mUser1Button;
135 QPushButton *mUser2Button; 137 QPushButton *mUser2Button;
136 QPushButton *mCloseButton; 138 QPushButton *mCloseButton;
137 QPushButton *mOkButton; 139 QPushButton *mOkButton;
138 QPushButton *mApplyButton; 140 QPushButton *mApplyButton;
139 QPushButton *mCancelButton; 141 QPushButton *mCancelButton;
140 QPushButton *mDefaultButton; 142 QPushButton *mDefaultButton;
141}; 143};
142 144
143#endif 145#endif