emailuis/nmailui/inc/nmapplication.h
changeset 18 578830873419
child 20 ecc8def7944a
equal deleted inserted replaced
4:e7aa27f58ae1 18:578830873419
       
     1 /*
       
     2 * Copyright (c) 2009 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 #ifndef NMAPPLICATION_H
       
    19 #define NMAPPLICATION_H
       
    20 
       
    21 #include <QStack>
       
    22 #include <QObject>
       
    23 
       
    24 #include "nmuiviewids.h"
       
    25 
       
    26 class HbMainWindow;
       
    27 class NmBaseView;
       
    28 class NmUiEngine;
       
    29 class NmMailboxListModel;
       
    30 class HbAction;
       
    31 class NmUiExtensionManager;
       
    32 class NmSendServiceInterface;
       
    33 class NmMailboxServiceInterface;
       
    34 class NmViewerServiceInterface;
       
    35 class NmViewerViewNetManager;
       
    36 
       
    37 class NmApplication : public QObject
       
    38 {
       
    39     Q_OBJECT
       
    40 public:
       
    41     NmApplication(QObject *parent);
       
    42     ~NmApplication();
       
    43     void enterNmUiView(NmUiStartParam *startParam);
       
    44     HbMainWindow* mainWindow();
       
    45     NmUiExtensionManager &extManager();
       
    46     NmViewerViewNetManager* networkAccessManager();
       
    47     QSize screenSize();
       
    48 
       
    49 
       
    50 public slots:
       
    51     void popView();
       
    52     void exitApplication();
       
    53     void delayedExitApplication();
       
    54 
       
    55 private:
       
    56     void createMainWindow();
       
    57     void pushView(NmBaseView *view);
       
    58     void resetViewStack();
       
    59 
       
    60 private:
       
    61     HbMainWindow *mMainWindow;              // Not owned
       
    62     QStack<NmBaseView*> *mViewStack;        // Owned
       
    63     NmUiViewId mActiveViewId;
       
    64     NmUiEngine *mUiEngine;                  // Owned
       
    65     HbAction *mBackAction;                  // Owned
       
    66     NmUiExtensionManager *mExtensionManager;// Owned
       
    67     NmSendServiceInterface *mSendServiceInterface; // Owned
       
    68     NmMailboxServiceInterface *mMailboxServiceInterface; // Owned
       
    69     NmViewerServiceInterface *mViewerServiceInterface; // Owned
       
    70     NmMailboxListModel *mMbListModel;       // Not owned
       
    71     NmUiViewId mServiceViewId;
       
    72     NmViewerViewNetManager* mNetManager;     // Owned
       
    73 };
       
    74 
       
    75 #endif // NMAPPLICATION_H