summaryrefslogtreecommitdiff
authorsandman <sandman>2002-12-30 14:39:13 (UTC)
committer sandman <sandman>2002-12-30 14:39:13 (UTC)
commita0eca1c0925a6893fa8f3ebfacd6363f906189df (patch) (unidiff)
tree83863ca74f9a9f52dd5de4f8ddb1e0d595cfde2d
parentb1d3c5e4a2be3b3905bc813815d1ef898ad585fa (diff)
downloadopie-a0eca1c0925a6893fa8f3ebfacd6363f906189df.zip
opie-a0eca1c0925a6893fa8f3ebfacd6363f906189df.tar.gz
opie-a0eca1c0925a6893fa8f3ebfacd6363f906189df.tar.bz2
removed the "Width 240" qWarning()
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index e7e210a..b21428a 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -416,193 +416,193 @@ static void setTreble( int t = 0, int percent = -1 )
416/*! 416/*!
417 \fn void QPEApplication::clientMoused() 417 \fn void QPEApplication::clientMoused()
418 418
419 \internal 419 \internal
420*/ 420*/
421 421
422/*! 422/*!
423 \fn void QPEApplication::timeChanged(); 423 \fn void QPEApplication::timeChanged();
424 This signal is emitted when the time changes outside the normal 424 This signal is emitted when the time changes outside the normal
425 passage of time, i.e. if the time is set backwards or forwards. 425 passage of time, i.e. if the time is set backwards or forwards.
426*/ 426*/
427 427
428/*! 428/*!
429 \fn void QPEApplication::clockChanged( bool ampm ); 429 \fn void QPEApplication::clockChanged( bool ampm );
430 430
431 This signal is emitted when the user changes the clock's style. If 431 This signal is emitted when the user changes the clock's style. If
432 \a ampm is TRUE, the user wants a 12-hour AM/PM clock, otherwise, 432 \a ampm is TRUE, the user wants a 12-hour AM/PM clock, otherwise,
433 they want a 24-hour clock. 433 they want a 24-hour clock.
434*/ 434*/
435 435
436/*! 436/*!
437 \fn void QPEApplication::volumeChanged( bool muted ) 437 \fn void QPEApplication::volumeChanged( bool muted )
438 438
439 This signal is emitted whenever the mute state is changed. If \a 439 This signal is emitted whenever the mute state is changed. If \a
440 muted is TRUE, then sound output has been muted. 440 muted is TRUE, then sound output has been muted.
441*/ 441*/
442 442
443/*! 443/*!
444 \fn void QPEApplication::weekChanged( bool startOnMonday ) 444 \fn void QPEApplication::weekChanged( bool startOnMonday )
445 445
446 This signal is emitted if the week start day is changed. If \a 446 This signal is emitted if the week start day is changed. If \a
447 startOnMonday is TRUE then the first day of the week is Monday; if 447 startOnMonday is TRUE then the first day of the week is Monday; if
448 \a startOnMonday is FALSE then the first day of the week is 448 \a startOnMonday is FALSE then the first day of the week is
449 Sunday. 449 Sunday.
450*/ 450*/
451 451
452/*! 452/*!
453 \fn void QPEApplication::dateFormatChanged() 453 \fn void QPEApplication::dateFormatChanged()
454 454
455 This signal is emitted whenever the date format is changed. 455 This signal is emitted whenever the date format is changed.
456*/ 456*/
457 457
458/*! 458/*!
459 \fn void QPEApplication::flush() 459 \fn void QPEApplication::flush()
460 460
461 ### 461 ###
462*/ 462*/
463 463
464/*! 464/*!
465 \fn void QPEApplication::reload() 465 \fn void QPEApplication::reload()
466 466
467*/ 467*/
468 468
469/*! 469/*!
470 \fn void QPEApplication::appMessage( const QCString& msg, const QByteArray& data ) 470 \fn void QPEApplication::appMessage( const QCString& msg, const QByteArray& data )
471 471
472 This signal is emitted when a message is received on this 472 This signal is emitted when a message is received on this
473 application's QPE/Application/<i>appname</i> \link qcop.html 473 application's QPE/Application/<i>appname</i> \link qcop.html
474 QCop\endlink channel. 474 QCop\endlink channel.
475 475
476 The slot to which you connect this signal uses \a msg and \a data 476 The slot to which you connect this signal uses \a msg and \a data
477 in the following way: 477 in the following way:
478 478
479\code 479\code
480 void MyWidget::receive( const QCString& msg, const QByteArray& data ) 480 void MyWidget::receive( const QCString& msg, const QByteArray& data )
481 { 481 {
482 QDataStream stream( data, IO_ReadOnly ); 482 QDataStream stream( data, IO_ReadOnly );
483 if ( msg == "someMessage(int,int,int)" ) { 483 if ( msg == "someMessage(int,int,int)" ) {
484 int a,b,c; 484 int a,b,c;
485 stream >> a >> b >> c; 485 stream >> a >> b >> c;
486 ... 486 ...
487 } else if ( msg == "otherMessage(QString)" ) { 487 } else if ( msg == "otherMessage(QString)" ) {
488 ... 488 ...
489 } 489 }
490 } 490 }
491\endcode 491\endcode
492 492
493 \sa qcop.html 493 \sa qcop.html
494 Note that messages received here may be processed by qpe application 494 Note that messages received here may be processed by qpe application
495 and emitted as signals, such as flush() and reload(). 495 and emitted as signals, such as flush() and reload().
496*/ 496*/
497 497
498/*! 498/*!
499 Constructs a QPEApplication just as you would construct 499 Constructs a QPEApplication just as you would construct
500 a QApplication, passing \a argc, \a argv, and \a t. 500 a QApplication, passing \a argc, \a argv, and \a t.
501 501
502 For applications, \a t should be the default, GuiClient. Only 502 For applications, \a t should be the default, GuiClient. Only
503 the Qtopia server passes GuiServer. 503 the Qtopia server passes GuiServer.
504*/ 504*/
505QPEApplication::QPEApplication( int & argc, char **argv, Type t ) 505QPEApplication::QPEApplication( int & argc, char **argv, Type t )
506 : QApplication( argc, argv, t ) 506 : QApplication( argc, argv, t )
507{ 507{
508 d = new QPEApplicationData; 508 d = new QPEApplicationData;
509 d->loadTextCodecs(); 509 d->loadTextCodecs();
510 d->loadImageCodecs(); 510 d->loadImageCodecs();
511 int dw = desktop() ->width(); 511 int dw = desktop() ->width();
512 qWarning( "Width %d", dw ); 512
513 if ( dw < 200 ) { 513 if ( dw < 200 ) {
514 setFont( QFont( "helvetica", 8 ) ); 514 setFont( QFont( "helvetica", 8 ) );
515 AppLnk::setSmallIconSize( 10 ); 515 AppLnk::setSmallIconSize( 10 );
516 AppLnk::setBigIconSize( 28 ); 516 AppLnk::setBigIconSize( 28 );
517 } 517 }
518 else if ( dw > 600 ) { 518 else if ( dw > 600 ) {
519 setFont( QFont( "helvetica", 12 ) ); 519 setFont( QFont( "helvetica", 12 ) );
520 AppLnk::setSmallIconSize( 24 ); 520 AppLnk::setSmallIconSize( 24 );
521 AppLnk::setBigIconSize( 48 ); 521 AppLnk::setBigIconSize( 48 );
522 } 522 }
523 else if ( dw > 200 ) { 523 else if ( dw > 200 ) {
524 setFont( QFont( "helvetica", 10 ) ); 524 setFont( QFont( "helvetica", 10 ) );
525 AppLnk::setSmallIconSize( 16 ); 525 AppLnk::setSmallIconSize( 16 );
526 AppLnk::setBigIconSize( 32 ); 526 AppLnk::setBigIconSize( 32 );
527 } 527 }
528 528
529 529
530 QMimeSourceFactory::setDefaultFactory( new ResourceMimeFactory ); 530 QMimeSourceFactory::setDefaultFactory( new ResourceMimeFactory );
531 531
532 connect( this, SIGNAL( lastWindowClosed() ), this, SLOT( hideOrQuit() ) ); 532 connect( this, SIGNAL( lastWindowClosed() ), this, SLOT( hideOrQuit() ) );
533#if defined(Q_WS_QWS) && !defined(QT_NO_COP) 533#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
534 534
535 QString qcopfn( "/tmp/qcop-msg-" ); 535 QString qcopfn( "/tmp/qcop-msg-" );
536 qcopfn += QString( argv[ 0 ] ); // append command name 536 qcopfn += QString( argv[ 0 ] ); // append command name
537 537
538 QFile f( qcopfn ); 538 QFile f( qcopfn );
539 if ( f.open( IO_ReadOnly ) ) { 539 if ( f.open( IO_ReadOnly ) ) {
540 flock( f.handle(), LOCK_EX ); 540 flock( f.handle(), LOCK_EX );
541 } 541 }
542 542
543 sysChannel = new QCopChannel( "QPE/System", this ); 543 sysChannel = new QCopChannel( "QPE/System", this );
544 connect( sysChannel, SIGNAL( received( const QCString &, const QByteArray & ) ), 544 connect( sysChannel, SIGNAL( received( const QCString &, const QByteArray & ) ),
545 this, SLOT( systemMessage( const QCString &, const QByteArray & ) ) ); 545 this, SLOT( systemMessage( const QCString &, const QByteArray & ) ) );
546 546
547 QCString channel = QCString( argv[ 0 ] ); 547 QCString channel = QCString( argv[ 0 ] );
548 channel.replace( QRegExp( ".*/" ), "" ); 548 channel.replace( QRegExp( ".*/" ), "" );
549 d->appName = channel; 549 d->appName = channel;
550 channel = "QPE/Application/" + channel; 550 channel = "QPE/Application/" + channel;
551 pidChannel = new QCopChannel( channel, this ); 551 pidChannel = new QCopChannel( channel, this );
552 connect( pidChannel, SIGNAL( received( const QCString &, const QByteArray & ) ), 552 connect( pidChannel, SIGNAL( received( const QCString &, const QByteArray & ) ),
553 this, SLOT( pidMessage( const QCString &, const QByteArray & ) ) ); 553 this, SLOT( pidMessage( const QCString &, const QByteArray & ) ) );
554 554
555 if ( f.isOpen() ) { 555 if ( f.isOpen() ) {
556 d->keep_running = FALSE; 556 d->keep_running = FALSE;
557 QDataStream ds( &f ); 557 QDataStream ds( &f );
558 QCString channel, message; 558 QCString channel, message;
559 QByteArray data; 559 QByteArray data;
560 while ( !ds.atEnd() ) { 560 while ( !ds.atEnd() ) {
561 ds >> channel >> message >> data; 561 ds >> channel >> message >> data;
562 d->enqueueQCop( channel, message, data ); 562 d->enqueueQCop( channel, message, data );
563 } 563 }
564 564
565 flock( f.handle(), LOCK_UN ); 565 flock( f.handle(), LOCK_UN );
566 f.close(); 566 f.close();
567 f.remove(); 567 f.remove();
568 } 568 }
569 569
570 for ( int a = 0; a < argc; a++ ) { 570 for ( int a = 0; a < argc; a++ ) {
571 if ( qstrcmp( argv[ a ], "-preload" ) == 0 ) { 571 if ( qstrcmp( argv[ a ], "-preload" ) == 0 ) {
572 argv[ a ] = argv[ a + 1 ]; 572 argv[ a ] = argv[ a + 1 ];
573 a++; 573 a++;
574 d->preloaded = TRUE; 574 d->preloaded = TRUE;
575 argc -= 1; 575 argc -= 1;
576 } 576 }
577 else if ( qstrcmp( argv[ a ], "-preload-show" ) == 0 ) { 577 else if ( qstrcmp( argv[ a ], "-preload-show" ) == 0 ) {
578 argv[ a ] = argv[ a + 1 ]; 578 argv[ a ] = argv[ a + 1 ];
579 a++; 579 a++;
580 d->preloaded = TRUE; 580 d->preloaded = TRUE;
581 d->forceshow = TRUE; 581 d->forceshow = TRUE;
582 argc -= 1; 582 argc -= 1;
583 } 583 }
584 } 584 }
585 585
586 /* overide stored arguments */ 586 /* overide stored arguments */
587 setArgs( argc, argv ); 587 setArgs( argc, argv );
588 588
589#endif 589#endif
590 590
591 // qwsSetDecoration( new QPEDecoration() ); 591 // qwsSetDecoration( new QPEDecoration() );
592 592
593#ifndef QT_NO_TRANSLATION 593#ifndef QT_NO_TRANSLATION
594 594
595 QStringList langs = Global::languageList(); 595 QStringList langs = Global::languageList();
596 for ( QStringList::ConstIterator it = langs.begin(); it != langs.end(); ++it ) { 596 for ( QStringList::ConstIterator it = langs.begin(); it != langs.end(); ++it ) {
597 QString lang = *it; 597 QString lang = *it;
598 598
599 QTranslator * trans; 599 QTranslator * trans;
600 QString tfn; 600 QString tfn;
601 601
602 trans = new QTranslator( this ); 602 trans = new QTranslator( this );
603 tfn = qpeDir() + "/i18n/" + lang + "/libqpe.qm"; 603 tfn = qpeDir() + "/i18n/" + lang + "/libqpe.qm";
604 if ( trans->load( tfn ) ) 604 if ( trans->load( tfn ) )
605 installTranslator( trans ); 605 installTranslator( trans );
606 else 606 else
607 delete trans; 607 delete trans;
608 608