author | zecke <zecke> | 2003-09-07 12:47:42 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-09-07 12:47:42 (UTC) |
commit | dbea3ba9d8315f94d102af7e4a7244b1fb507f85 (patch) (unidiff) | |
tree | 2c1fe2aa303b6a900f2fffe7a18f91a949fc2d99 /libopie/big-screen/omodalhelper.h | |
parent | e06de75edc6c01d97248050030f197bd8f21fb10 (diff) | |
download | opie-dbea3ba9d8315f94d102af7e4a7244b1fb507f85.zip opie-dbea3ba9d8315f94d102af7e4a7244b1fb507f85.tar.gz opie-dbea3ba9d8315f94d102af7e4a7244b1fb507f85.tar.bz2 |
Add thoughts and interface about dynamic ToolBar/MenuBar generation
and a modal helper template class
Diffstat (limited to 'libopie/big-screen/omodalhelper.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/big-screen/omodalhelper.h | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/libopie/big-screen/omodalhelper.h b/libopie/big-screen/omodalhelper.h new file mode 100644 index 0000000..643458f --- a/dev/null +++ b/libopie/big-screen/omodalhelper.h | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2003 hOlgAr <zecke@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This library is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
8 | .="- .-=="i, .._ License as published by the Free Software | ||
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This library is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
17 | ..}^=.= = ; Library General Public License for more | ||
18 | ++= -. .` .: details. | ||
19 | : = ...= . :.=- | ||
20 | -. .:....=;==+<; You should have received a copy of the GNU | ||
21 | -_. . . )=. = Library General Public License along with | ||
22 | -- :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | ||
24 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
28 | |||
29 | #ifndef HAZE_OMODAL_HELPER_H | ||
30 | #define HAZE_OMODAL_HELPER_H | ||
31 | |||
32 | #include <qwidget.h> | ||
33 | |||
34 | class OModalHelperSignal : public QObject { | ||
35 | Q_OBJECT | ||
36 | public: | ||
37 | OModalHelperSignal(); | ||
38 | |||
39 | signals: | ||
40 | done( int status, int transaction ); | ||
41 | accpeted( int transaction ); | ||
42 | rejected( int transaction ); | ||
43 | }; | ||
44 | |||
45 | /** | ||
46 | * Modality sucks! ;) But it is easy to work with | ||
47 | * do exec() on a dialog and you know everything is funky. | ||
48 | * You only need to have one Dialog loaded and so on. | ||
49 | * This class helps you to work like with modality and help | ||
50 | * you to keep things in sync | ||
51 | * It's a template class but it sends signals once one Item is ready | ||
52 | * the signals contains the status and id of the item and then you | ||
53 | * can fetch it. | ||
54 | * Also if you edit an record external you can tell this class and it'll | ||
55 | * call the merge() function of your widget to maybe merge in these changes. | ||
56 | * It also supports multiple modes. Either it can create new dialogs | ||
57 | * for each item or it can queue them depending on your usage. But it is | ||
58 | * so smart that if only one item is shown that the queue bar is not shown | ||
59 | * See the example for simple usage. | ||
60 | * | ||
61 | * @short helps to live without modaility | ||
62 | * @author hOlgAr | ||
63 | * @version 0.01 | ||
64 | */ | ||
65 | template<class Dialog, class Record> | ||
66 | class OModalHelper{ | ||
67 | public: | ||
68 | OModalHelper(QObject* parnet ); | ||
69 | |||
70 | }; | ||
71 | |||
72 | #endif | ||