ginebra2/Application.h
changeset 5 0f2326c2a325
parent 0 1450b09d0cfd
child 9 b39122337a00
equal deleted inserted replaced
1:b0dd75e285d2 5:0f2326c2a325
     1 /*
     1 /*
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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 *
     4 *
     9 * Initial Contributors:
     5 * This program is free software: you can redistribute it and/or modify
    10 * Nokia Corporation - initial contribution.
     6 * it under the terms of the GNU Lesser General Public License as published by
       
     7 * the Free Software Foundation, version 2.1 of the License.
    11 *
     8 *
    12 * Contributors:
     9 * This program is distributed in the hope that it will be useful,
       
    10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12 * GNU Lesser General Public License for more details.
    13 *
    13 *
    14 * Description: 
    14 * You should have received a copy of the GNU Lesser General Public License
       
    15 * along with this program.  If not,
       
    16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
       
    17 *
       
    18 * Description:
    15 *
    19 *
    16 */
    20 */
    17 
       
    18 #ifndef __GINEBRA_APPLICATION_H__
    21 #ifndef __GINEBRA_APPLICATION_H__
    19 #define __GINEBRA_APPLICATION_H__
    22 #define __GINEBRA_APPLICATION_H__
    20 
    23 
    21 #include <QObject>
    24 #include <QObject>
    22 
    25 
       
    26 #ifdef ORBIT_UI
       
    27 #define UI_FRAMEWORK "orbit_ui"
       
    28 #else
       
    29 #define UI_FRAMEWORK ""
       
    30 #endif // ORBIT_UI
       
    31 
    23 class QCoreApplication;
    32 class QCoreApplication;
    24 
    33 
    25 namespace GVA {
    34 namespace GVA {
    26 
    35 
       
    36 /*! \ingroup JavascriptAPI
       
    37  * \brief This class owns the QCoreApplication object.
       
    38  *
       
    39  * Example javascript code print a string to the debug output:
       
    40  * \code
       
    41  * app.debug("hello");
       
    42  * \endcode
       
    43  */
    27 class GinebraApplication : public QObject
    44 class GinebraApplication : public QObject
    28 {
    45 {
    29   Q_OBJECT
    46   Q_OBJECT
    30   public:
    47   public:
    31     GinebraApplication();
    48     GinebraApplication();
    32     ~GinebraApplication();
    49     ~GinebraApplication();
    33   public slots:
    50   public slots:
    34     void quit();
    51     void quit();
    35     void debug(const QString &msg);
    52     void debug(const QString &msg);
       
    53     QString ui() const { return UI_FRAMEWORK; }
    36   signals:
    54   signals:
    37     void aboutToQuit();
    55     void aboutToQuit();
    38   private:
    56   private:
    39     QCoreApplication * m_app;
    57     QCoreApplication * m_app;
    40 };
    58 };
    41   
    59 
    42 }
    60 }
    43 #endif
    61 #endif