ginebra2/Application.cpp
changeset 10 232fbd5a2dcb
parent 5 0f2326c2a325
child 12 afcd8e6d025b
equal deleted inserted replaced
6:1c3b8676e58c 10:232fbd5a2dcb
    19 *
    19 *
    20 */
    20 */
    21 
    21 
    22 #include <QtGui>
    22 #include <QtGui>
    23 #include "Application.h"
    23 #include "Application.h"
       
    24 
       
    25 #ifdef Q_OS_SYMBIAN
       
    26 #include <eikenv.h>
       
    27 #include <apgtask.h>                // TApaTaskList, TApaTask
       
    28 #endif
    24 
    29 
    25 /* Application wraps the QApplication class to provide a JS interface. This could be implemented
    30 /* Application wraps the QApplication class to provide a JS interface. This could be implemented
    26  * as a derived class, but this would force the application developer to use this class instead
    31  * as a derived class, but this would force the application developer to use this class instead
    27  * of QApplication.
    32  * of QApplication.
    28  */
    33  */
    45 void GinebraApplication::quit()
    50 void GinebraApplication::quit()
    46 {
    51 {
    47   m_app->quit();
    52   m_app->quit();
    48 }
    53 }
    49 
    54 
       
    55 void GinebraApplication::sendToBackground()
       
    56 {
       
    57     //qDebug() << "GinebraApplication::goToBackground()";
       
    58 #ifdef Q_OS_SYMBIAN
       
    59     TApaTask task(CEikonEnv::Static()->WsSession());
       
    60     task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
       
    61     task.SendToBackground();
       
    62 #endif
       
    63 }
       
    64 
    50 void GinebraApplication::debug(const QString &msg) {
    65 void GinebraApplication::debug(const QString &msg) {
    51       qDebug() << msg;
    66       qDebug() << msg;
    52 }
    67 }
    53 
    68 
    54 }
    69 }