author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/kdialogbase.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | microkde/kdialogbase.h | 16 |
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,27 +1,29 @@ | |||
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 | ||
8 | class QPushButton; | 10 | class QPushButton; |
9 | class QLayout; | 11 | class QLayout; |
10 | class QTabWidget; | 12 | class QTabWidget; |
11 | class QBoxLayout; | 13 | class Q3BoxLayout; |
12 | 14 | ||
13 | class KDialogBase : public KDialog | 15 | class 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, |
@@ -46,51 +48,51 @@ class KDialogBase : public KDialog | |||
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 | ||
@@ -115,29 +117,29 @@ class KDialogBase : public KDialog | |||
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 |