1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
---|
4 | ** All rights reserved.
|
---|
5 | ** Contact: Nokia Corporation ([email protected])
|
---|
6 | **
|
---|
7 | ** This file is part of the Symbian application wrapper of the Qt Toolkit.
|
---|
8 | **
|
---|
9 | ** $QT_BEGIN_LICENSE:LGPL$
|
---|
10 | ** Commercial Usage
|
---|
11 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
12 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
13 | ** Software or, alternatively, in accordance with the terms contained in
|
---|
14 | ** a written agreement between you and Nokia.
|
---|
15 | **
|
---|
16 | ** GNU Lesser General Public License Usage
|
---|
17 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
---|
18 | ** General Public License version 2.1 as published by the Free Software
|
---|
19 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
---|
20 | ** packaging of this file. Please review the following information to
|
---|
21 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
---|
22 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
---|
23 | **
|
---|
24 | ** In addition, as a special exception, Nokia gives you certain additional
|
---|
25 | ** rights. These rights are described in the Nokia Qt LGPL Exception
|
---|
26 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
---|
27 | **
|
---|
28 | ** GNU General Public License Usage
|
---|
29 | ** Alternatively, this file may be used under the terms of the GNU
|
---|
30 | ** General Public License version 3.0 as published by the Free Software
|
---|
31 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
32 | ** packaging of this file. Please review the following information to
|
---|
33 | ** ensure the GNU General Public License version 3.0 requirements will be
|
---|
34 | ** met: http://www.gnu.org/copyleft/gpl.html.
|
---|
35 | **
|
---|
36 | ** If you have questions regarding the use of this file, please contact
|
---|
37 | ** Nokia at [email protected].
|
---|
38 | ** $QT_END_LICENSE$
|
---|
39 | **
|
---|
40 | ****************************************************************************/
|
---|
41 |
|
---|
42 | #ifndef QS60MAINAPPUI_H
|
---|
43 | #define QS60MAINAPPUI_H
|
---|
44 |
|
---|
45 | #include <QtCore/qglobal.h>
|
---|
46 |
|
---|
47 | #ifdef Q_OS_SYMBIAN
|
---|
48 |
|
---|
49 | #ifdef Q_WS_S60
|
---|
50 | #include <aknappui.h>
|
---|
51 | typedef CAknAppUi QS60MainAppUiBase;
|
---|
52 | #else
|
---|
53 | #include <eikappui.h>
|
---|
54 | // these stub classes simulate the structure of CAknAppUi, to help binary compatibility between Qt configured with and without S60/Avkon
|
---|
55 | class QS60StubAknAppUiBase : public CEikAppUi
|
---|
56 | {
|
---|
57 | private:
|
---|
58 | int qS60StubAknAppUiBaseSpace[4];
|
---|
59 | };
|
---|
60 |
|
---|
61 | class QS60StubMEikStatusPaneObserver
|
---|
62 | {
|
---|
63 | public:
|
---|
64 | virtual void HandleStatusPaneSizeChange() = 0;
|
---|
65 | };
|
---|
66 |
|
---|
67 | class QS60StubMAknTouchPaneObserver
|
---|
68 | {
|
---|
69 | public:
|
---|
70 | virtual void HandleTouchPaneSizeChange() = 0;
|
---|
71 | };
|
---|
72 |
|
---|
73 | class QS60StubAknAppUi : public QS60StubAknAppUiBase, QS60StubMEikStatusPaneObserver,
|
---|
74 | public MCoeViewDeactivationObserver,
|
---|
75 | public QS60StubMAknTouchPaneObserver
|
---|
76 | {
|
---|
77 | public: // MCoeViewDeactivationObserver
|
---|
78 | virtual void HandleViewDeactivation(const TVwsViewId&, const TVwsViewId &);
|
---|
79 |
|
---|
80 | public: // from MAknTouchPaneObserver
|
---|
81 | virtual void HandleTouchPaneSizeChange();
|
---|
82 |
|
---|
83 | protected: // from MEikStatusPaneObserver
|
---|
84 | virtual void HandleStatusPaneSizeChange();
|
---|
85 |
|
---|
86 | protected: // from CAknAppUi
|
---|
87 | virtual void Reserved_MtsmPosition();
|
---|
88 | virtual void Reserved_MtsmObject();
|
---|
89 |
|
---|
90 | private:
|
---|
91 | int qS60StubAknAppUiSpace[4];
|
---|
92 | };
|
---|
93 |
|
---|
94 | typedef QS60StubAknAppUi QS60MainAppUiBase;
|
---|
95 | #endif
|
---|
96 |
|
---|
97 | QT_BEGIN_HEADER
|
---|
98 |
|
---|
99 | QT_BEGIN_NAMESPACE
|
---|
100 |
|
---|
101 | QT_MODULE(Gui)
|
---|
102 |
|
---|
103 | class Q_GUI_EXPORT QS60MainAppUi : public QS60MainAppUiBase
|
---|
104 | {
|
---|
105 | public:
|
---|
106 | QS60MainAppUi();
|
---|
107 | // The virtuals are for qdoc.
|
---|
108 | virtual ~QS60MainAppUi();
|
---|
109 |
|
---|
110 | virtual void ConstructL();
|
---|
111 |
|
---|
112 | virtual void RestoreMenuL(CCoeControl *menuWindow,TInt resourceId,TMenuType menuType);
|
---|
113 | virtual void DynInitMenuBarL(TInt resourceId, CEikMenuBar *menuBar);
|
---|
114 | virtual void DynInitMenuPaneL(TInt resourceId, CEikMenuPane *menuPane);
|
---|
115 |
|
---|
116 | virtual void HandleCommandL( TInt command );
|
---|
117 |
|
---|
118 | virtual void HandleResourceChangeL(TInt type);
|
---|
119 |
|
---|
120 | virtual void HandleStatusPaneSizeChange();
|
---|
121 |
|
---|
122 | protected:
|
---|
123 | virtual void HandleWsEventL(const TWsEvent &event, CCoeControl *destination);
|
---|
124 |
|
---|
125 | public:
|
---|
126 | virtual void Exit();
|
---|
127 | virtual void SetFadedL(TBool aFaded);
|
---|
128 | virtual TRect ApplicationRect() const;
|
---|
129 | virtual void ProcessCommandL(TInt aCommand);
|
---|
130 | virtual TErrorHandlerResponse HandleError (TInt aError, const SExtendedError &aExtErr, TDes &aErrorText, TDes &aContextText);
|
---|
131 | virtual void HandleViewDeactivation(const TVwsViewId &aViewIdToBeDeactivated, const TVwsViewId &aNewlyActivatedViewId);
|
---|
132 | virtual void PrepareToExit();
|
---|
133 | virtual void HandleTouchPaneSizeChange();
|
---|
134 |
|
---|
135 | protected:
|
---|
136 | virtual void HandleScreenDeviceChangedL();
|
---|
137 | virtual void HandleApplicationSpecificEventL(TInt aType, const TWsEvent &aEvent);
|
---|
138 | virtual TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
|
---|
139 | virtual void HandleSystemEventL(const TWsEvent &aEvent);
|
---|
140 | virtual void Reserved_MtsmPosition();
|
---|
141 | virtual void Reserved_MtsmObject();
|
---|
142 | virtual void HandleForegroundEventL(TBool aForeground);
|
---|
143 | };
|
---|
144 |
|
---|
145 | QT_END_NAMESPACE
|
---|
146 |
|
---|
147 | QT_END_HEADER
|
---|
148 |
|
---|
149 | #endif // Q_OS_SYMBIAN
|
---|
150 |
|
---|
151 | #endif // QS60MAINAPPUI_H
|
---|