author | harlekin <harlekin> | 2002-08-15 18:34:42 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-08-15 18:34:42 (UTC) |
commit | 8cd40434c7011022a8e1706698e5c5075681bd1e (patch) (unidiff) | |
tree | 74e8634c40c1b35cdf32620d219d3a98ec3e2ded | |
parent | fc0f625393128d47ef4e2baef4dfcdbe48a18ca7 (diff) | |
download | opie-8cd40434c7011022a8e1706698e5c5075681bd1e.zip opie-8cd40434c7011022a8e1706698e5c5075681bd1e.tar.gz opie-8cd40434c7011022a8e1706698e5c5075681bd1e.tar.bz2 |
applied hashs patch
-rw-r--r-- | library/qpeapplication.cpp | 76 |
1 files changed, 41 insertions, 35 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 187a7e2..8448352 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -487,7 +487,7 @@ static void setScreenSaverInterval( int interval ) | |||
487 | \class QPEApplication qpeapplication.h | 487 | \class QPEApplication qpeapplication.h |
488 | \brief The QPEApplication class implements various system services | 488 | \brief The QPEApplication class implements various system services |
489 | that are available to all Qtopia applications. | 489 | that are available to all Qtopia applications. |
490 | 490 | ||
491 | Simply by using QPEApplication instead of QApplication, a plain Qt | 491 | Simply by using QPEApplication instead of QApplication, a plain Qt |
492 | application becomes a Qtopia application. It automatically follows | 492 | application becomes a Qtopia application. It automatically follows |
493 | style changes, quits and raises, and in the | 493 | style changes, quits and raises, and in the |
@@ -497,20 +497,20 @@ static void setScreenSaverInterval( int interval ) | |||
497 | 497 | ||
498 | /*! | 498 | /*! |
499 | \fn void QPEApplication::clientMoused() | 499 | \fn void QPEApplication::clientMoused() |
500 | 500 | ||
501 | \internal | 501 | \internal |
502 | */ | 502 | */ |
503 | 503 | ||
504 | /*! | 504 | /*! |
505 | \fn void QPEApplication::timeChanged(); | 505 | \fn void QPEApplication::timeChanged(); |
506 | 506 | ||
507 | This signal is emitted when the time jumps forward or backwards | 507 | This signal is emitted when the time jumps forward or backwards |
508 | by more than the normal passage of time. | 508 | by more than the normal passage of time. |
509 | */ | 509 | */ |
510 | 510 | ||
511 | /*! | 511 | /*! |
512 | \fn void QPEApplication::clockChanged( bool ampm ); | 512 | \fn void QPEApplication::clockChanged( bool ampm ); |
513 | 513 | ||
514 | This signal is emitted when the user changes the style | 514 | This signal is emitted when the user changes the style |
515 | of clock. If \a ampm is TRUE, the user wants a 12-hour | 515 | of clock. If \a ampm is TRUE, the user wants a 12-hour |
516 | AM/PM close, otherwise, they want a 24-hour clock. | 516 | AM/PM close, otherwise, they want a 24-hour clock. |
@@ -518,13 +518,13 @@ static void setScreenSaverInterval( int interval ) | |||
518 | 518 | ||
519 | /*! | 519 | /*! |
520 | \fn void QPEApplication::appMessage( const QCString& msg, const QByteArray& data ) | 520 | \fn void QPEApplication::appMessage( const QCString& msg, const QByteArray& data ) |
521 | 521 | ||
522 | This signal is emitted when a message is received on the | 522 | This signal is emitted when a message is received on the |
523 | QPE/Application/<i>appname</i> QCop channel for this application. | 523 | QPE/Application/<i>appname</i> QCop channel for this application. |
524 | 524 | ||
525 | The slot to which you connect this signal uses \a msg and \a data | 525 | The slot to which you connect this signal uses \a msg and \a data |
526 | in the following way: | 526 | in the following way: |
527 | 527 | ||
528 | \code | 528 | \code |
529 | void MyWidget::receive( const QCString& msg, const QByteArray& data ) | 529 | void MyWidget::receive( const QCString& msg, const QByteArray& data ) |
530 | { | 530 | { |
@@ -538,7 +538,7 @@ static void setScreenSaverInterval( int interval ) | |||
538 | } | 538 | } |
539 | } | 539 | } |
540 | \endcode | 540 | \endcode |
541 | 541 | ||
542 | \sa qcop.html | 542 | \sa qcop.html |
543 | */ | 543 | */ |
544 | 544 | ||
@@ -643,13 +643,19 @@ QPEApplication::QPEApplication( int & argc, char **argv, Type t ) | |||
643 | else | 643 | else |
644 | delete trans; | 644 | delete trans; |
645 | 645 | ||
646 | //###language/font hack; should look it up somewhere | 646 | /* |
647 | if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) { | 647 | * not required. if using one of these languages, you might as well install |
648 | QFont fn = FontManager::unicodeFont( FontManager::Proportional ); | 648 | * a custom font. |
649 | setFont( fn ); | 649 | |
650 | } | 650 | //###language/font hack; should look it up somewhere |
651 | else { | 651 | if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) { |
652 | Config config( "qpe" ); | 652 | QFont fn = FontManager::unicodeFont( FontManager::Proportional ); |
653 | setFont( fn ); | ||
654 | } | ||
655 | |||
656 | else { | ||
657 | */ | ||
658 | Config config( "qpe" ); | ||
653 | config.setGroup( "Appearance" ); | 659 | config.setGroup( "Appearance" ); |
654 | QString familyStr = config.readEntry( "FontFamily", "helvetica" ); | 660 | QString familyStr = config.readEntry( "FontFamily", "helvetica" ); |
655 | QString styleStr = config.readEntry( "FontStyle", "Regular" ); | 661 | QString styleStr = config.readEntry( "FontStyle", "Regular" ); |
@@ -660,7 +666,7 @@ QPEApplication::QPEApplication( int & argc, char **argv, Type t ) | |||
660 | FontDatabase fdb; | 666 | FontDatabase fdb; |
661 | QFont selectedFont = fdb.font( familyStr, styleStr, i_size, charSetStr ); | 667 | QFont selectedFont = fdb.font( familyStr, styleStr, i_size, charSetStr ); |
662 | setFont( selectedFont ); | 668 | setFont( selectedFont ); |
663 | } | 669 | //} |
664 | } | 670 | } |
665 | 671 | ||
666 | #endif | 672 | #endif |
@@ -693,7 +699,7 @@ static void createInputMethodDict() | |||
693 | /*! | 699 | /*! |
694 | Returns the currently set hint to the system as to whether | 700 | Returns the currently set hint to the system as to whether |
695 | \a w has any use for text input methods. | 701 | \a w has any use for text input methods. |
696 | 702 | ||
697 | \sa setInputMethodHint() | 703 | \sa setInputMethodHint() |
698 | */ | 704 | */ |
699 | QPEApplication::InputMethodHint QPEApplication::inputMethodHint( QWidget * w ) | 705 | QPEApplication::InputMethodHint QPEApplication::inputMethodHint( QWidget * w ) |
@@ -705,7 +711,7 @@ QPEApplication::InputMethodHint QPEApplication::inputMethodHint( QWidget * w ) | |||
705 | 711 | ||
706 | /*! | 712 | /*! |
707 | \enum QPEApplication::InputMethodHint | 713 | \enum QPEApplication::InputMethodHint |
708 | 714 | ||
709 | \value Normal the application sometimes needs text input (the default). | 715 | \value Normal the application sometimes needs text input (the default). |
710 | \value AlwaysOff the application never needs text input. | 716 | \value AlwaysOff the application never needs text input. |
711 | \value AlwaysOn the application always needs text input. | 717 | \value AlwaysOn the application always needs text input. |
@@ -714,7 +720,7 @@ QPEApplication::InputMethodHint QPEApplication::inputMethodHint( QWidget * w ) | |||
714 | /*! | 720 | /*! |
715 | Hints to the system that \a w has use for text input methods | 721 | Hints to the system that \a w has use for text input methods |
716 | as specified by \a mode. | 722 | as specified by \a mode. |
717 | 723 | ||
718 | \sa inputMethodHint() | 724 | \sa inputMethodHint() |
719 | */ | 725 | */ |
720 | void QPEApplication::setInputMethodHint( QWidget * w, InputMethodHint mode ) | 726 | void QPEApplication::setInputMethodHint( QWidget * w, InputMethodHint mode ) |
@@ -1269,9 +1275,9 @@ static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appNa | |||
1269 | // then it uses the name stored in the .desktop file as the caption | 1275 | // then it uses the name stored in the .desktop file as the caption |
1270 | // for the main widget. This saves duplicating translations for | 1276 | // for the main widget. This saves duplicating translations for |
1271 | // the app name in the program and in the .desktop files. | 1277 | // the app name in the program and in the .desktop files. |
1272 | 1278 | ||
1273 | AppLnkSet apps( appsPath ); | 1279 | AppLnkSet apps( appsPath ); |
1274 | 1280 | ||
1275 | QList<AppLnk> appsList = apps.children(); | 1281 | QList<AppLnk> appsList = apps.children(); |
1276 | for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) { | 1282 | for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) { |
1277 | if ( (*it)->exec() == appName ) { | 1283 | if ( (*it)->exec() == appName ) { |
@@ -1279,7 +1285,7 @@ static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appNa | |||
1279 | return TRUE; | 1285 | return TRUE; |
1280 | } | 1286 | } |
1281 | } | 1287 | } |
1282 | */ | 1288 | */ |
1283 | return FALSE; | 1289 | return FALSE; |
1284 | } | 1290 | } |
1285 | 1291 | ||
@@ -1287,7 +1293,7 @@ static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appNa | |||
1287 | /*! | 1293 | /*! |
1288 | Sets \a mw as the mainWidget() and shows it. For small windows, | 1294 | Sets \a mw as the mainWidget() and shows it. For small windows, |
1289 | consider passing TRUE for \a nomaximize rather than the default FALSE. | 1295 | consider passing TRUE for \a nomaximize rather than the default FALSE. |
1290 | 1296 | ||
1291 | \sa showMainDocumentWidget() | 1297 | \sa showMainDocumentWidget() |
1292 | */ | 1298 | */ |
1293 | void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize ) | 1299 | void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize ) |
@@ -1322,12 +1328,12 @@ void QPEApplication::showMainWidget( QWidget* mw, bool nomaximize ) | |||
1322 | /*! | 1328 | /*! |
1323 | Sets \a mw as the mainWidget() and shows it. For small windows, | 1329 | Sets \a mw as the mainWidget() and shows it. For small windows, |
1324 | consider passing TRUE for \a nomaximize rather than the default FALSE. | 1330 | consider passing TRUE for \a nomaximize rather than the default FALSE. |
1325 | 1331 | ||
1326 | This calls designates the application as | 1332 | This calls designates the application as |
1327 | a \link docwidget.html document-oriented\endlink application. | 1333 | a \link docwidget.html document-oriented\endlink application. |
1328 | 1334 | ||
1329 | The \a mw widget must have a slot: setDocument(const QString&). | 1335 | The \a mw widget must have a slot: setDocument(const QString&). |
1330 | 1336 | ||
1331 | \sa showMainWidget() | 1337 | \sa showMainWidget() |
1332 | */ | 1338 | */ |
1333 | void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) | 1339 | void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) |
@@ -1368,7 +1374,7 @@ void QPEApplication::showMainDocumentWidget( QWidget* mw, bool nomaximize ) | |||
1368 | the application will process the qcop message and then quit. If while | 1374 | the application will process the qcop message and then quit. If while |
1369 | processing the qcop message it calls this function, then the application | 1375 | processing the qcop message it calls this function, then the application |
1370 | will show and start proper once it has finished processing qcop messages. | 1376 | will show and start proper once it has finished processing qcop messages. |
1371 | 1377 | ||
1372 | \sa keepRunning() | 1378 | \sa keepRunning() |
1373 | */ | 1379 | */ |
1374 | void QPEApplication::setKeepRunning() | 1380 | void QPEApplication::setKeepRunning() |
@@ -1381,8 +1387,8 @@ void QPEApplication::setKeepRunning() | |||
1381 | 1387 | ||
1382 | /*! | 1388 | /*! |
1383 | Returns whether the application will quit after processing the current | 1389 | Returns whether the application will quit after processing the current |
1384 | list of qcop messages. | 1390 | list of qcop messages. |
1385 | 1391 | ||
1386 | \sa setKeepRunning() | 1392 | \sa setKeepRunning() |
1387 | */ | 1393 | */ |
1388 | bool QPEApplication::keepRunning() const | 1394 | bool QPEApplication::keepRunning() const |
@@ -1464,7 +1470,7 @@ void QPEApplication::internalSetStyle( const QString &style ) | |||
1464 | if ( iface ) | 1470 | if ( iface ) |
1465 | iface-> release ( ); | 1471 | iface-> release ( ); |
1466 | delete lib; | 1472 | delete lib; |
1467 | 1473 | ||
1468 | setStyle ( new QPEStyle ( )); | 1474 | setStyle ( new QPEStyle ( )); |
1469 | } | 1475 | } |
1470 | 1476 | ||
@@ -1564,7 +1570,7 @@ static void createDict() | |||
1564 | 1570 | ||
1565 | /*! | 1571 | /*! |
1566 | Returns the current StylusMode for \a w. | 1572 | Returns the current StylusMode for \a w. |
1567 | 1573 | ||
1568 | \sa setStylusOperation() | 1574 | \sa setStylusOperation() |
1569 | */ | 1575 | */ |
1570 | QPEApplication::StylusMode QPEApplication::stylusOperation( QWidget * w ) | 1576 | QPEApplication::StylusMode QPEApplication::stylusOperation( QWidget * w ) |
@@ -1576,18 +1582,18 @@ QPEApplication::StylusMode QPEApplication::stylusOperation( QWidget * w ) | |||
1576 | 1582 | ||
1577 | /*! | 1583 | /*! |
1578 | \enum QPEApplication::StylusMode | 1584 | \enum QPEApplication::StylusMode |
1579 | 1585 | ||
1580 | \value LeftOnly the stylus only generates LeftButton | 1586 | \value LeftOnly the stylus only generates LeftButton |
1581 | events (the default). | 1587 | events (the default). |
1582 | \value RightOnHold the stylus generates RightButton events | 1588 | \value RightOnHold the stylus generates RightButton events |
1583 | if the user uses the press-and-hold gesture. | 1589 | if the user uses the press-and-hold gesture. |
1584 | 1590 | ||
1585 | See setStylusOperation(). | 1591 | See setStylusOperation(). |
1586 | */ | 1592 | */ |
1587 | 1593 | ||
1588 | /*! | 1594 | /*! |
1589 | Causes \a w to receive mouse events according to \a mode. | 1595 | Causes \a w to receive mouse events according to \a mode. |
1590 | 1596 | ||
1591 | \sa stylusOperation() | 1597 | \sa stylusOperation() |
1592 | */ | 1598 | */ |
1593 | void QPEApplication::setStylusOperation( QWidget * w, StylusMode mode ) | 1599 | void QPEApplication::setStylusOperation( QWidget * w, StylusMode mode ) |
@@ -1720,7 +1726,7 @@ void QPEApplication::ungrabKeyboard() | |||
1720 | Grabs the keyboard such that the system's application launching | 1726 | Grabs the keyboard such that the system's application launching |
1721 | keys no longer work, and instead they are receivable by this | 1727 | keys no longer work, and instead they are receivable by this |
1722 | application. | 1728 | application. |
1723 | 1729 | ||
1724 | \sa ungrabKeyboard() | 1730 | \sa ungrabKeyboard() |
1725 | */ | 1731 | */ |
1726 | void QPEApplication::grabKeyboard() | 1732 | void QPEApplication::grabKeyboard() |