ginebra2/Application.cpp
changeset 0 1450b09d0cfd
child 3 0954f5dd2cd0
equal deleted inserted replaced
-1:000000000000 0:1450b09d0cfd
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include <QtGui>
       
    20 #include "Application.h"
       
    21 
       
    22 /* Application wraps the QApplication class to provide a JS interface. This could be implemented 
       
    23  * as a derived class, but this would force the application developer to use this class instead 
       
    24  * of QApplication.
       
    25  */
       
    26 
       
    27 namespace GVA {
       
    28 
       
    29 GinebraApplication::GinebraApplication()
       
    30   : m_app(QApplication::instance())
       
    31 {
       
    32   setObjectName("app");
       
    33   connect(m_app, SIGNAL(aboutToQuit()), this, SIGNAL(aboutToQuit()));
       
    34   //qDebug()<<QLibraryInfo::location(QLibraryInfo::PluginsPath);
       
    35   QCoreApplication::addLibraryPath(QLibraryInfo::location(QLibraryInfo::PluginsPath) + "imageformats");
       
    36 }
       
    37 
       
    38 GinebraApplication::~GinebraApplication()
       
    39 {
       
    40 }
       
    41 
       
    42 void GinebraApplication::quit()
       
    43 {
       
    44   m_app->quit();
       
    45 }
       
    46 
       
    47 void GinebraApplication::debug(const QString &msg) {
       
    48 	  qDebug() << msg;
       
    49 }
       
    50 
       
    51 }