author | jowenn <jowenn> | 2002-11-10 21:08:01 (UTC) |
---|---|---|
committer | jowenn <jowenn> | 2002-11-10 21:08:01 (UTC) |
commit | e97a6da57804aa14907dec327fbae71bff9b383e (patch) (unidiff) | |
tree | 15f6ee292dba24bdda72f5c72f6d2224c3516763 /noncore/apps/tinykate/libkate/microkde/kdialogbase.h | |
parent | 7c012ee8cd16d8befacc6f6750711443fac0fd5e (diff) | |
download | opie-e97a6da57804aa14907dec327fbae71bff9b383e.zip opie-e97a6da57804aa14907dec327fbae71bff9b383e.tar.gz opie-e97a6da57804aa14907dec327fbae71bff9b383e.tar.bz2 |
import of tiny kate. (saving not possible yet)
Diffstat (limited to 'noncore/apps/tinykate/libkate/microkde/kdialogbase.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tinykate/libkate/microkde/kdialogbase.h | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/noncore/apps/tinykate/libkate/microkde/kdialogbase.h b/noncore/apps/tinykate/libkate/microkde/kdialogbase.h new file mode 100644 index 0000000..dfb85d2 --- a/dev/null +++ b/noncore/apps/tinykate/libkate/microkde/kdialogbase.h | |||
@@ -0,0 +1,105 @@ | |||
1 | #ifndef MINIKDE_KDIALOGBASE_H | ||
2 | #define MINIKDE_KDIALOGBASE_H | ||
3 | |||
4 | #include <qframe.h> | ||
5 | |||
6 | #include "kdialog.h" | ||
7 | |||
8 | class QPushButton; | ||
9 | class QLayout; | ||
10 | class QTabWidget; | ||
11 | class QBoxLayout; | ||
12 | |||
13 | class KDialogBase : public KDialog | ||
14 | { | ||
15 | Q_OBJECT | ||
16 | public: | ||
17 | enum ButtonCode | ||
18 | { | ||
19 | Help = 0x00000001, | ||
20 | Default = 0x00000002, | ||
21 | Ok = 0x00000004, | ||
22 | Apply = 0x00000008, | ||
23 | Try = 0x00000010, | ||
24 | Cancel = 0x00000020, | ||
25 | Close = 0x00000040, | ||
26 | User1 = 0x00000080, | ||
27 | User2 = 0x00000100, | ||
28 | User3 = 0x00000200, | ||
29 | No = 0x00000080, | ||
30 | Yes = 0x00000100, | ||
31 | Details = 0x00000400, | ||
32 | Filler = 0x40000000, | ||
33 | Stretch = 0x80000000 | ||
34 | }; | ||
35 | |||
36 | enum DialogType | ||
37 | { | ||
38 | TreeList, | ||
39 | Tabbed, | ||
40 | Plain, | ||
41 | Swallow, | ||
42 | IconList | ||
43 | }; | ||
44 | |||
45 | KDialogBase(); | ||
46 | KDialogBase( QWidget *parent=0, const char *name=0, bool modal=true, | ||
47 | const QString &caption=QString::null, | ||
48 | int buttonMask=Ok|Apply|Cancel, ButtonCode defaultButton=Ok, | ||
49 | bool separator=false, | ||
50 | const QString &user1=QString::null, | ||
51 | const QString &user2=QString::null, | ||
52 | const QString &user3=QString::null); | ||
53 | KDialogBase( int dialogFace, const QString &caption, | ||
54 | int buttonMask, ButtonCode defaultButton, | ||
55 | QWidget *parent=0, const char *name=0, bool modal=true, | ||
56 | bool separator=false, | ||
57 | const QString &user1=QString::null, | ||
58 | const QString &user2=QString::null, | ||
59 | const QString &user3=QString::null); | ||
60 | virtual ~KDialogBase(); | ||
61 | |||
62 | QFrame *addPage( const QString & ); | ||
63 | QFrame *addPage( const QString &, int, const QPixmap & ); | ||
64 | |||
65 | void setMainWidget( QWidget *widget ); | ||
66 | |||
67 | void enableButton( ButtonCode id, bool state ); | ||
68 | void enableButtonOK( bool state ); | ||
69 | void enableButtonApply( bool state ); | ||
70 | |||
71 | int pageIndex( QWidget *widget ) const; | ||
72 | |||
73 | bool showPage( int index ); | ||
74 | |||
75 | QFrame *plainPage(); | ||
76 | |||
77 | signals: | ||
78 | void user1Clicked(); | ||
79 | |||
80 | protected slots: | ||
81 | virtual void slotOk(); | ||
82 | virtual void slotApply(); | ||
83 | virtual void slotCancel(); | ||
84 | virtual void slotClose(); | ||
85 | virtual void slotUser1(); | ||
86 | |||
87 | private: | ||
88 | QTabWidget *tabWidget(); | ||
89 | void init( const QString &caption, int buttonMask, | ||
90 | const QString &user1=QString::null ); | ||
91 | void initLayout(); | ||
92 | |||
93 | QWidget *mMainWidget; | ||
94 | QTabWidget *mTabWidget; | ||
95 | QFrame *mPlainPage; | ||
96 | QBoxLayout *mTopLayout; | ||
97 | |||
98 | QPushButton *mUser1Button; | ||
99 | QPushButton *mCloseButton; | ||
100 | QPushButton *mOkButton; | ||
101 | QPushButton *mApplyButton; | ||
102 | QPushButton *mCancelButton; | ||
103 | }; | ||
104 | |||
105 | #endif | ||