summaryrefslogtreecommitdiff
Unidiff
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
@@ -464,97 +464,97 @@ static void setTreble( int t = 0, int percent = -1 )
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() ) {