Diffstat (limited to 'core/settings/button/buttonutils.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/button/buttonutils.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/core/settings/button/buttonutils.h b/core/settings/button/buttonutils.h new file mode 100644 index 0000000..5ea59bb --- a/dev/null +++ b/core/settings/button/buttonutils.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | =. This file is part of the OPIE Project | ||
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | ||
4 | .>+-= | ||
5 | _;:, .> :=|. This file is free software; you can | ||
6 | .> <`_, > . <= redistribute it and/or modify it under | ||
7 | :`=1 )Y*s>-.-- : the terms of the GNU 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 file 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 General | ||
17 | ..}^=.= = ; Public License for more details. | ||
18 | ++= -. .` .: | ||
19 | : = ...= . :.=- You should have received a copy of the GNU | ||
20 | -. .:....=;==+<; General Public License along with this file; | ||
21 | -_. . . )=. = see the file COPYING. If not, write to the | ||
22 | -- :-=` Free Software Foundation, Inc., | ||
23 | 59 Temple Place - Suite 330, | ||
24 | Boston, MA 02111-1307, USA. | ||
25 | |||
26 | */ | ||
27 | |||
28 | #ifndef __BUTTON_UTILS_H__ | ||
29 | #define __BUTTON_UTILS_H__ | ||
30 | |||
31 | #include <opie/odevicebutton.h> | ||
32 | |||
33 | class AppLnkSet; | ||
34 | class QListViewItem; | ||
35 | |||
36 | |||
37 | class qCopInfo { | ||
38 | public: | ||
39 | qCopInfo ( const QString &str, const QPixmap &pix = QPixmap ( )) | ||
40 | : m_name ( str ), m_icon ( pix ) | ||
41 | { } | ||
42 | |||
43 | QString m_name; | ||
44 | QPixmap m_icon; | ||
45 | }; | ||
46 | |||
47 | |||
48 | class ButtonUtils { | ||
49 | public: | ||
50 | ~ButtonUtils ( ); | ||
51 | |||
52 | static ButtonUtils *inst ( ); | ||
53 | |||
54 | qCopInfo messageToInfo ( const Opie::OQCopMessage & ); | ||
55 | |||
56 | void insertActions ( QListViewItem *here ); | ||
57 | void insertAppLnks ( QListViewItem *here ); | ||
58 | |||
59 | private: | ||
60 | ButtonUtils ( ); | ||
61 | static void cleanup ( ); | ||
62 | |||
63 | private: | ||
64 | AppLnkSet *m_apps; | ||
65 | }; | ||
66 | |||
67 | #endif | ||