Diffstat (limited to 'core/applets/volumeapplet/volume.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/volumeapplet/volume.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp index 45c106a..23c847d 100644 --- a/core/applets/volumeapplet/volume.cpp +++ b/core/applets/volumeapplet/volume.cpp | |||
@@ -1,139 +1,142 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "volume.h" | 21 | #include "volume.h" |
22 | 22 | ||
23 | /* OPIE */ | ||
23 | #include <opie2/oledbox.h> | 24 | #include <opie2/oledbox.h> |
24 | #include <opie2/odevice.h> | 25 | #include <opie2/odevice.h> |
25 | #include <opie2/otaskbarapplet.h> | 26 | #include <opie2/otaskbarapplet.h> |
26 | #include <qpe/resource.h> | 27 | #include <qpe/resource.h> |
27 | #include <qpe/applnk.h> | 28 | #include <qpe/applnk.h> |
28 | #include <qpe/config.h> | 29 | #include <qpe/config.h> |
29 | #include <qpe/qcopenvelope_qws.h> | 30 | #include <qpe/qcopenvelope_qws.h> |
31 | using namespace Opie::Core; | ||
32 | using namespace Opie::Ui; | ||
30 | 33 | ||
34 | /* QT */ | ||
31 | #include <qpainter.h> | 35 | #include <qpainter.h> |
32 | #include <qcheckbox.h> | 36 | #include <qcheckbox.h> |
33 | #include <qslider.h> | 37 | #include <qslider.h> |
34 | #include <qlayout.h> | 38 | #include <qlayout.h> |
35 | #include <qvbox.h> | 39 | #include <qvbox.h> |
36 | #include <qlabel.h> | 40 | #include <qlabel.h> |
37 | #include <qpushbutton.h> | 41 | #include <qpushbutton.h> |
38 | #include <qtimer.h> | 42 | #include <qtimer.h> |
39 | 43 | ||
44 | /* STD */ | ||
40 | #include <stdio.h> | 45 | #include <stdio.h> |
41 | 46 | ||
42 | using namespace Opie::Core; | ||
43 | |||
44 | #define RATE_TIMER_INTERVAL 100 | 47 | #define RATE_TIMER_INTERVAL 100 |
45 | // Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time | 48 | // Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time |
46 | // results in "hanging" buttons on the iPAQ due to quite high CPU consumption. | 49 | // results in "hanging" buttons on the iPAQ due to quite high CPU consumption. |
47 | 50 | ||
48 | 51 | ||
49 | /* XPM */ | 52 | /* XPM */ |
50 | using namespace Opie::Ui; | 53 | using namespace Opie::Ui; |
51 | static const char * vol_xpm[] = { | 54 | static const char * vol_xpm[] = { |
52 | "20 20 3 1", | 55 | "20 20 3 1", |
53 | " c None", | 56 | " c None", |
54 | ". c #0000FF", | 57 | ". c #0000FF", |
55 | "+ c #000000", | 58 | "+ c #000000", |
56 | " ", | 59 | " ", |
57 | " . ", | 60 | " . ", |
58 | " . . . . ", | 61 | " . . . . ", |
59 | " . . . . . . ", | 62 | " . . . . . . ", |
60 | " . . . . . . . ", | 63 | " . . . . . . . ", |
61 | " . . ..... . . ", | 64 | " . . ..... . . ", |
62 | " . ... ..... ... ", | 65 | " . ... ..... ... ", |
63 | " ........... .... ", | 66 | " ........... .... ", |
64 | " ................. ", | 67 | " ................. ", |
65 | "++++++++++++++++++++", | 68 | "++++++++++++++++++++", |
66 | " .................. ", | 69 | " .................. ", |
67 | " . ............. . ", | 70 | " . ............. . ", |
68 | " . ..... ....... ", | 71 | " . ..... ....... ", |
69 | " . ... ..... . ", | 72 | " . ... ..... . ", |
70 | " . ... ..... . ", | 73 | " . ... ..... . ", |
71 | " . ... ..... ", | 74 | " . ... ..... ", |
72 | " . . . . . ", | 75 | " . . . . . ", |
73 | " . . . ", | 76 | " . . . ", |
74 | " . . . ", | 77 | " . . . ", |
75 | " "}; | 78 | " "}; |
76 | /* XPM */ | 79 | /* XPM */ |
77 | static const char * mic_xpm[] = { | 80 | static const char * mic_xpm[] = { |
78 | "20 20 21 1", | 81 | "20 20 21 1", |
79 | " c None", | 82 | " c None", |
80 | ". c #000000", | 83 | ". c #000000", |
81 | "+ c #EEEEEE", | 84 | "+ c #EEEEEE", |
82 | "@ c #B4B6B4", | 85 | "@ c #B4B6B4", |
83 | "# c #8B8D8B", | 86 | "# c #8B8D8B", |
84 | "$ c #D5D6D5", | 87 | "$ c #D5D6D5", |
85 | "% c #E6E6E6", | 88 | "% c #E6E6E6", |
86 | "& c #9C9D9C", | 89 | "& c #9C9D9C", |
87 | "* c #6A696A", | 90 | "* c #6A696A", |
88 | "= c #E6E2E6", | 91 | "= c #E6E2E6", |
89 | "- c #F6F2F6", | 92 | "- c #F6F2F6", |
90 | "; c #CDC6CD", | 93 | "; c #CDC6CD", |
91 | "> c #737573", | 94 | "> c #737573", |
92 | ", c #4A484A", | 95 | ", c #4A484A", |
93 | "' c #DEDEDE", | 96 | "' c #DEDEDE", |
94 | ") c #F6EEF6", | 97 | ") c #F6EEF6", |
95 | "! c #414041", | 98 | "! c #414041", |
96 | "~ c #202020", | 99 | "~ c #202020", |
97 | "{ c #ACAEAC", | 100 | "{ c #ACAEAC", |
98 | "] c #838583", | 101 | "] c #838583", |
99 | "^ c #6A656A", | 102 | "^ c #6A656A", |
100 | " ", | 103 | " ", |
101 | " .... ", | 104 | " .... ", |
102 | " .+@+#. ", | 105 | " .+@+#. ", |
103 | " ..$%&%*. ", | 106 | " ..$%&%*. ", |
104 | " .=-.;=>=,. ", | 107 | " .=-.;=>=,. ", |
105 | " .'+).&+!+. ", | 108 | " .'+).&+!+. ", |
106 | " .+;+;.~+~. ", | 109 | " .+;+;.~+~. ", |
107 | " ..%{%,.... ", | 110 | " ..%{%,.... ", |
108 | " ..&=>=~.. ", | 111 | " ..&=>=~.. ", |
109 | " .+..]^,.. ", | 112 | " .+..]^,.. ", |
110 | " .+....... ", | 113 | " .+....... ", |
111 | " .%... ", | 114 | " .%... ", |
112 | " .=... ", | 115 | " .=... ", |
113 | " .+... ", | 116 | " .+... ", |
114 | " .+... ", | 117 | " .+... ", |
115 | " .... ", | 118 | " .... ", |
116 | " .... ", | 119 | " .... ", |
117 | " .. ", | 120 | " .. ", |
118 | " . ", | 121 | " . ", |
119 | ". "}; | 122 | ". "}; |
120 | 123 | ||
121 | 124 | ||
122 | static const char * bass_xpm[] = { | 125 | static const char * bass_xpm[] = { |
123 | "20 20 3 1", | 126 | "20 20 3 1", |
124 | " c None", | 127 | " c None", |
125 | ". c #000000", | 128 | ". c #000000", |
126 | "+ c #0000FF", | 129 | "+ c #0000FF", |
127 | " ", | 130 | " ", |
128 | " ", | 131 | " ", |
129 | " ", | 132 | " ", |
130 | "..... +++ ......", | 133 | "..... +++ ......", |
131 | " +++++++ ", | 134 | " +++++++ ", |
132 | " ++ ++ ", | 135 | " ++ ++ ", |
133 | "... ++ ... ++ ++ .", | 136 | "... ++ ... ++ ++ .", |
134 | " +++ ++ ++ ", | 137 | " +++ ++ ++ ", |
135 | " ++++ ++ ", | 138 | " ++++ ++ ", |
136 | "... ++++ .. ++ .....", | 139 | "... ++++ .. ++ .....", |
137 | " ++ ++ ", | 140 | " ++ ++ ", |
138 | " ++ ++ ", | 141 | " ++ ++ ", |
139 | "..........++ ++ .", | 142 | "..........++ ++ .", |