-rw-r--r-- | libopie2/opieui/odialog.h | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/libopie2/opieui/odialog.h b/libopie2/opieui/odialog.h new file mode 100644 index 0000000..38f25e8 --- a/dev/null +++ b/libopie2/opieui/odialog.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /* | ||
2 | � � � � � � � � This file is part of the Opie Project | ||
3 | |||
4 | � � � � � � � (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | =. | ||
6 | .=l. | ||
7 | � � � � � �.>+-= | ||
8 | �_;:, � � .> � �:=|. This program is free software; you can | ||
9 | .> <`_, � > �. � <= redistribute it and/or modify it under | ||
10 | :`=1 )Y*s>-.-- � : the terms of the GNU Library General Public | ||
11 | .="- .-=="i, � � .._ License as published by the Free Software | ||
12 | �- . � .-<_> � � .<> Foundation; either version 2 of the License, | ||
13 | � � �._= =} � � � : or (at your option) any later version. | ||
14 | � � .%`+i> � � � _;_. | ||
15 | � � .i_,=:_. � � �-<s. This program is distributed in the hope that | ||
16 | � � �+ �. �-:. � � � = it will be useful, but WITHOUT ANY WARRANTY; | ||
17 | � � : .. � �.:, � � . . . without even the implied warranty of | ||
18 | � � =_ � � � �+ � � =;=|` MERCHANTABILITY or FITNESS FOR A | ||
19 | � _.=:. � � � : � �:=>`: PARTICULAR PURPOSE. See the GNU | ||
20 | ..}^=.= � � � = � � � ; Library General Public License for more | ||
21 | ++= � -. � � .` � � .: details. | ||
22 | �: � � = �...= . :.=- | ||
23 | �-. � .:....=;==+<; You should have received a copy of the GNU | ||
24 | � -_. . . � )=. �= Library General Public License along with | ||
25 | � � -- � � � �:-=` this library; see the file COPYING.LIB. | ||
26 | If not, write to the Free Software Foundation, | ||
27 | Inc., 59 Temple Place - Suite 330, | ||
28 | Boston, MA 02111-1307, USA. | ||
29 | |||
30 | */ | ||
31 | |||
32 | #ifndef ODIALOG_H | ||
33 | #define ODIALOG_H | ||
34 | |||
35 | class QLayoutItem; | ||
36 | |||
37 | #include <qdialog.h> | ||
38 | |||
39 | /** | ||
40 | * Dialog with extended nonmodal support and methods for OPIE standard | ||
41 | * compliance. | ||
42 | * | ||
43 | * The @ref marginHint() and @ref spacingHint() sizes shall be used | ||
44 | * whenever you layout the interior of a dialog. One special note. If | ||
45 | * you make your own action buttons (OK, Cancel etc), the space | ||
46 | * beteween the buttons shall be @ref spacingHint(), whereas the space | ||
47 | * above, below, to the right and to the left shall be @ref marginHint(). | ||
48 | * If you add a separator line above the buttons, there shall be a | ||
49 | * @ref marginHint() between the buttons and the separator and a | ||
50 | * @ref marginHint() above the separator as well. | ||
51 | * | ||
52 | * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
53 | */ | ||
54 | |||
55 | class ODialog : public QDialog | ||
56 | { | ||
57 | Q_OBJECT | ||
58 | |||
59 | public: | ||
60 | |||
61 | /** | ||
62 | * Constructor. | ||
63 | * | ||
64 | * Takes the same arguments as @ref QDialog. | ||
65 | */ | ||
66 | ODialog(QWidget *parent = 0, const char *name = 0, | ||
67 | bool modal = false, WFlags f = 0); | ||
68 | |||
69 | /** | ||
70 | * Return the number of pixels you shall use between a | ||
71 | * dialog edge and the outermost widget(s) according to the KDE standard. | ||
72 | **/ | ||
73 | static int marginHint(); | ||
74 | |||
75 | /** | ||
76 | * Return the number of pixels you shall use between | ||
77 | * widgets inside a dialog according to the KDE standard. | ||
78 | */ | ||
79 | static int spacingHint(); | ||
80 | |||
81 | private: | ||
82 | static int mMarginSize; | ||
83 | static int mSpacingSize; | ||
84 | |||
85 | //class ODialogPrivate; | ||
86 | //ODialogPrivate *d; | ||
87 | |||
88 | }; | ||
89 | #endif // ODIALOG_H | ||