summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/volumeapplet/volume.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp
index 276f47f..6a14d07 100644
--- a/core/applets/volumeapplet/volume.cpp
+++ b/core/applets/volumeapplet/volume.cpp
@@ -156,198 +156,197 @@ static const char * treble_xpm[] = {
156" . .. ", 156" . .. ",
157"++++++++ . .. ++++++", 157"++++++++ . .. ++++++",
158" . . ", 158" . . ",
159" ... ", 159" ... ",
160"++++++++ . +++++++", 160"++++++++ . +++++++",
161" .. ", 161" .. ",
162" .. . ", 162" .. . ",
163"+++ .. ... +++++++", 163"+++ .. ... +++++++",
164" .. .. .. ", 164" .. .. .. ",
165" .. . . .. ", 165" .. . . .. ",
166"+++ .. . . + . +++++", 166"+++ .. . . + . +++++",
167" .. . .. ", 167" .. . .. ",
168" .. . .. ", 168" .. . .. ",
169"++++ ...... +++++++", 169"++++ ...... +++++++",
170" . ", 170" . ",
171" .. . ", 171" .. . ",
172" .. . ", 172" .. . ",
173" .. "}; 173" .. "};
174 174
175 175
176 176
177 177
178/* XPM */ 178/* XPM */
179static const char * alarm_xpm[] = { 179static const char * alarm_xpm[] = {
180"20 20 33 1", 180"20 20 33 1",
181" c None", 181" c None",
182". c #080602", 182". c #080602",
183"+ c #AAA602", 183"+ c #AAA602",
184"@ c #252002", 184"@ c #252002",
185"# c #434202", 185"# c #434202",
186"$ c #795602", 186"$ c #795602",
187"% c #C3C20D", 187"% c #C3C20D",
188"& c #DADAC2", 188"& c #DADAC2",
189"* c #826002", 189"* c #826002",
190"= c #740502", 190"= c #740502",
191"- c #D6D602", 191"- c #D6D602",
192"; c #322E02", 192"; c #322E02",
193"> c #826A02", 193"> c #826A02",
194", c #F1F195", 194", c #F1F195",
195"' c #959215", 195"' c #959215",
196") c #423602", 196") c #423602",
197"! c #4B0302", 197"! c #4B0302",
198"~ c #844315", 198"~ c #844315",
199"{ c #AAAA2A", 199"{ c #AAAA2A",
200"] c #E2DE42", 200"] c #E2DE42",
201"^ c #BA7E04", 201"^ c #BA7E04",
202"/ c #7F7502", 202"/ c #7F7502",
203"( c #828276", 203"( c #828276",
204"_ c #FEFE4E", 204"_ c #FEFE4E",
205": c #7D1902", 205": c #7D1902",
206"< c #989656", 206"< c #989656",
207"[ c #260B02", 207"[ c #260B02",
208"} c #F7F7D8", 208"} c #F7F7D8",
209"| c #DCDA5A", 209"| c #DCDA5A",
210"1 c #823102", 210"1 c #823102",
211"2 c #B1AC6B", 211"2 c #B1AC6B",
212"3 c #F7F710", 212"3 c #F7F710",
213"4 c #838204", 213"4 c #838204",
214" ", 214" ",
215" ", 215" ",
216" 4'4/ ", 216" 4'4/ ",
217" /-^= ", 217" /-^= ",
218" 42{4>4 ", 218" 42{4>4 ",
219" '2|+*$44 ", 219" '2|+*$44 ",
220" +2&3+$1*44 ", 220" +2&3+$1*44 ",
221" (%_}_+/$:>/4 ", 221" (%_}_+/$:>/4 ",
222" 4%_}3+#;>:*4 ", 222" 4%_}3+#;>:*4 ",
223" 4%_}&+#[1$/4 ", 223" 4%_}&+#[1$/4 ",
224" 4%_,2')[~~>4 ", 224" 4%_,2')[~~>4 ",
225" 4%33'4#@~1>4 ", 225" 4%33'4#@~1>4 ",
226" 4%3344#[:>/4 ", 226" 4%3344#[:>/4 ",
227" 42&_3'4#@>:*44 ", 227" 42&_3'4#@>:*44 ",
228" 42|}}3'4#[;$)$44 ", 228" 42|}}3'4#[;$)$44 ",
229"444{]]2^~~:!!#.@##/ ", 229"444{]]2^~~:!!#.@##/ ",
230"4444-%*:==!!=...../ ", 230"4444-%*:==!!=...../ ",
231" /:[.. ", 231" /:[.. ",
232" /@. ", 232" /@. ",
233" "}; 233" "};
234 234
235VolumeControl::VolumeControl ( VolumeApplet *icon, bool /*showMic*/, QWidget *parent, const char *name ) 235VolumeControl::VolumeControl ( VolumeApplet *icon, bool /*showMic*/, QWidget *parent, const char *name )
236 : QFrame ( parent, name, WStyle_StaysOnTop | WType_Popup ) 236 : QFrame ( parent, name, WStyle_StaysOnTop | WType_Popup )
237{ 237{
238 m_icon = icon; 238 m_icon = icon;
239 239
240 bool has_wav_alarm = true; 240 bool has_wav_alarm = true;
241 bool has_bass = true; 241 bool has_bass = true;
242 bool has_treble = true; 242 bool has_treble = true;
243 243
244 switch ( ODevice::inst ( )-> model ( )) { // we need to add other devices eventually 244 switch ( ODevice::inst ( )-> model ( )) { // we need to add other devices eventually
245 case Model_Zaurus_SL5000: 245 case Model_Zaurus_SL5000:
246 has_wav_alarm = false; //poor guys probably feeling left out... 246 has_wav_alarm = false; //poor guys probably feeling left out...
247 break; 247 break;
248 default: 248 default:
249 break; 249 break;
250 } 250 }
251 251
252 if ( !ODevice::inst ( )-> series ( ) == Model_iPAQ ) { 252 if ( !ODevice::inst()->modelString().contains( "Model_iPAQ" )) {
253 has_bass = false; 253 has_bass = false;
254 has_treble = false; 254 has_treble = false;
255 } 255 }
256 256
257
258 setFrameStyle ( QFrame::PopupPanel | QFrame::Raised ); 257 setFrameStyle ( QFrame::PopupPanel | QFrame::Raised );
259 258
260 QGridLayout *grid = new QGridLayout ( this, 1, 1, 6, 4 ); 259 QGridLayout *grid = new QGridLayout ( this, 1, 1, 6, 4 );
261 grid-> setSpacing ( 4 ); 260 grid-> setSpacing ( 4 );
262 grid-> setMargin ( 6 ); 261 grid-> setMargin ( 6 );
263 262
264 QVBoxLayout *vbox; 263 QVBoxLayout *vbox;
265 QLabel *l; 264 QLabel *l;
266 265
267 vbox = new QVBoxLayout ( ); 266 vbox = new QVBoxLayout ( );
268 vbox-> setSpacing ( 4 ); 267 vbox-> setSpacing ( 4 );
269 grid-> addLayout ( vbox, 1, 0 ); 268 grid-> addLayout ( vbox, 1, 0 );
270 269
271 upButton = new QPushButton ( this ); 270 upButton = new QPushButton ( this );
272 upButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding )); 271 upButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding ));
273 upButton-> setPixmap ( Resource::loadPixmap ( "up" )); 272 upButton-> setPixmap ( Resource::loadPixmap ( "up" ));
274 upButton-> setFocusPolicy ( QWidget::NoFocus ); 273 upButton-> setFocusPolicy ( QWidget::NoFocus );
275 274
276 vbox-> addWidget ( upButton ); 275 vbox-> addWidget ( upButton );
277 276
278 downButton = new QPushButton ( this ); 277 downButton = new QPushButton ( this );
279 downButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding )); 278 downButton-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding ));
280 downButton-> setPixmap ( Resource::loadPixmap ( "down" )); 279 downButton-> setPixmap ( Resource::loadPixmap ( "down" ));
281 downButton-> setFocusPolicy ( QWidget::NoFocus ); 280 downButton-> setFocusPolicy ( QWidget::NoFocus );
282 281
283 vbox-> addWidget ( downButton ); 282 vbox-> addWidget ( downButton );
284 283
285 volSlider = new QSlider ( this ); 284 volSlider = new QSlider ( this );
286 volSlider-> setRange ( 0, 100 ); 285 volSlider-> setRange ( 0, 100 );
287 volSlider-> setTickmarks ( QSlider::Both ); 286 volSlider-> setTickmarks ( QSlider::Both );
288 volSlider-> setTickInterval ( 20 ); 287 volSlider-> setTickInterval ( 20 );
289 volSlider-> setFocusPolicy ( QWidget::NoFocus ); 288 volSlider-> setFocusPolicy ( QWidget::NoFocus );
290 289
291 l = new QLabel ( this ); 290 l = new QLabel ( this );
292 l-> setPixmap ( QPixmap ( vol_xpm )); 291 l-> setPixmap ( QPixmap ( vol_xpm ));
293 292
294 grid-> addWidget ( l, 0, 1, AlignCenter ); 293 grid-> addWidget ( l, 0, 1, AlignCenter );
295 grid-> addWidget ( volSlider, 1, 1, AlignCenter ); 294 grid-> addWidget ( volSlider, 1, 1, AlignCenter );
296 295
297 volLed = new OLedBox ( green, this ); 296 volLed = new OLedBox ( green, this );
298 volLed-> setFocusPolicy ( QWidget::NoFocus ); 297 volLed-> setFocusPolicy ( QWidget::NoFocus );
299 volLed-> setFixedSize ( 16, 16 ); 298 volLed-> setFixedSize ( 16, 16 );
300 299
301 grid-> addWidget ( volLed, 2, 1, AlignCenter ); 300 grid-> addWidget ( volLed, 2, 1, AlignCenter );
302 301
303 QVBox *basstrebleBox = new QVBox( this ); 302 QVBox *basstrebleBox = new QVBox( this );
304 303
305 trebleSlider = new QSlider ( basstrebleBox ); 304 trebleSlider = new QSlider ( basstrebleBox );
306 trebleSlider-> setRange ( 0, 100 ); 305 trebleSlider-> setRange ( 0, 100 );
307 trebleSlider-> setTickmarks ( QSlider::Both ); 306 trebleSlider-> setTickmarks ( QSlider::Both );
308 trebleSlider-> setTickInterval ( 20 ); 307 trebleSlider-> setTickInterval ( 20 );
309 trebleSlider->setMaximumHeight( 40 ); 308 trebleSlider->setMaximumHeight( 40 );
310 trebleSlider-> setFocusPolicy ( QWidget::NoFocus ); 309 trebleSlider-> setFocusPolicy ( QWidget::NoFocus );
311 310
312 bassSlider = new QSlider ( basstrebleBox ); 311 bassSlider = new QSlider ( basstrebleBox );
313 bassSlider-> setRange ( 0, 100 ); 312 bassSlider-> setRange ( 0, 100 );
314 bassSlider-> setTickmarks ( QSlider::Both ); 313 bassSlider-> setTickmarks ( QSlider::Both );
315 bassSlider-> setTickInterval ( 20 ); 314 bassSlider-> setTickInterval ( 20 );
316 bassSlider->setMaximumHeight( 40 ); 315 bassSlider->setMaximumHeight( 40 );
317 bassSlider-> setFocusPolicy ( QWidget::NoFocus ); 316 bassSlider-> setFocusPolicy ( QWidget::NoFocus );
318 317
319 QLabel *bassLabel = new QLabel ( this ); 318 QLabel *bassLabel = new QLabel ( this );
320 bassLabel-> setPixmap ( QPixmap ( bass_xpm )); 319 bassLabel-> setPixmap ( QPixmap ( bass_xpm ));
321 320
322 QLabel *trebleLabel = new QLabel( this ); 321 QLabel *trebleLabel = new QLabel( this );
323 trebleLabel->setPixmap( QPixmap ( treble_xpm ) ); 322 trebleLabel->setPixmap( QPixmap ( treble_xpm ) );
324 323
325 grid->addWidget( trebleLabel, 0, 4, AlignCenter ); 324 grid->addWidget( trebleLabel, 0, 4, AlignCenter );
326 grid->addWidget( basstrebleBox, 1, 4, AlignCenter ); 325 grid->addWidget( basstrebleBox, 1, 4, AlignCenter );
327 grid-> addWidget ( bassLabel, 2, 4, AlignCenter ); 326 grid-> addWidget ( bassLabel, 2, 4, AlignCenter );
328 327
329 if ( !has_bass ) { 328 if ( !has_bass ) {
330 bassSlider->hide(); 329 bassSlider->hide();
331 bassLabel->hide(); 330 bassLabel->hide();
332 } 331 }
333 332
334 if ( !has_treble ) { 333 if ( !has_treble ) {
335 trebleSlider->hide(); 334 trebleSlider->hide();
336 trebleLabel->hide(); 335 trebleLabel->hide();
337 } 336 }
338 337
339 micSlider = new QSlider ( this ); 338 micSlider = new QSlider ( this );
340 micSlider-> setRange ( 0, 100 ); 339 micSlider-> setRange ( 0, 100 );
341 micSlider-> setTickmarks ( QSlider::Both ); 340 micSlider-> setTickmarks ( QSlider::Both );
342 micSlider-> setTickInterval ( 20 ); 341 micSlider-> setTickInterval ( 20 );
343 micSlider-> setFocusPolicy ( QWidget::NoFocus ); 342 micSlider-> setFocusPolicy ( QWidget::NoFocus );
344 343
345 l = new QLabel ( this ); 344 l = new QLabel ( this );
346 l-> setPixmap ( QPixmap ( mic_xpm )); 345 l-> setPixmap ( QPixmap ( mic_xpm ));
347 346
348 grid-> addWidget ( l, 0, 2, AlignCenter ); 347 grid-> addWidget ( l, 0, 2, AlignCenter );
349 grid-> addWidget ( micSlider, 1, 2, AlignCenter ); 348 grid-> addWidget ( micSlider, 1, 2, AlignCenter );
350 349
351 micLed = new OLedBox ( red, this ); 350 micLed = new OLedBox ( red, this );
352 micLed-> setFocusPolicy ( QWidget::NoFocus ); 351 micLed-> setFocusPolicy ( QWidget::NoFocus );
353 micLed-> setFixedSize ( 16, 16 ); 352 micLed-> setFixedSize ( 16, 16 );