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