author | sandman <sandman> | 2002-12-30 14:39:13 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-12-30 14:39:13 (UTC) |
commit | a0eca1c0925a6893fa8f3ebfacd6363f906189df (patch) (unidiff) | |
tree | 83863ca74f9a9f52dd5de4f8ddb1e0d595cfde2d | |
parent | b1d3c5e4a2be3b3905bc813815d1ef898ad585fa (diff) | |
download | opie-a0eca1c0925a6893fa8f3ebfacd6363f906189df.zip opie-a0eca1c0925a6893fa8f3ebfacd6363f906189df.tar.gz opie-a0eca1c0925a6893fa8f3ebfacd6363f906189df.tar.bz2 |
removed the "Width 240" qWarning()
-rw-r--r-- | library/qpeapplication.cpp | 2 |
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 | |||
@@ -448,129 +448,129 @@ static void setTreble( int t = 0, int percent = -1 ) | |||
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 | */ |
505 | QPEApplication::QPEApplication( int & argc, char **argv, Type t ) | 505 | QPEApplication::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 | } |