|
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 #ifndef LOGVIEWMANAGER_H |
|
18 #define LOGVIEWMANAGER_H |
|
19 |
|
20 |
|
21 #include <QObject> |
|
22 #include <QList> |
|
23 #include <QVariant> |
|
24 #include <logsservices.h> |
|
25 #include "logsabstractviewmanager.h" |
|
26 |
|
27 class HbMainWindow; |
|
28 class LogsComponentRepository; |
|
29 class LogsServiceHandler; |
|
30 class LogsMainWindow; |
|
31 class HbView; |
|
32 class LogsBaseView; |
|
33 |
|
34 /** |
|
35 * |
|
36 */ |
|
37 class LogsViewManager : public QObject, public LogsAbstractViewManager |
|
38 { |
|
39 Q_OBJECT |
|
40 |
|
41 friend class UT_LogsViewManager; |
|
42 friend class UT_LogsServiceHandler; |
|
43 |
|
44 public: |
|
45 |
|
46 /** |
|
47 * Constructor |
|
48 * @param mainWindow |
|
49 * @param service |
|
50 */ |
|
51 LogsViewManager( LogsMainWindow& mainWindow, LogsServiceHandler& service ); |
|
52 ~LogsViewManager(); |
|
53 |
|
54 public slots: |
|
55 |
|
56 void changeRecentView(LogsServices::LogsView view, bool showDialpad); |
|
57 void changeMatchesView(QString dialpadText); |
|
58 void appFocusGained(); |
|
59 void appFocusLost(); |
|
60 |
|
61 public: // From LogsAbstractViewManager |
|
62 |
|
63 virtual bool activateView(LogsAppViewId viewId); |
|
64 virtual bool activateView(LogsAppViewId viewId, bool showDialpad, QVariant args); |
|
65 virtual bool activatePreviousView(); |
|
66 virtual HbMainWindow& mainWindow(); |
|
67 virtual void exitApplication(); |
|
68 |
|
69 private slots: |
|
70 |
|
71 void proceedExit(); |
|
72 void handleOrientationChanged(); |
|
73 void completeViewActivation(); |
|
74 |
|
75 private: |
|
76 |
|
77 void initViews(); |
|
78 bool doActivateView(LogsAppViewId viewId, bool showDialpad, QVariant args); |
|
79 |
|
80 private: //data |
|
81 |
|
82 LogsMainWindow& mMainWindow; |
|
83 LogsServiceHandler& mService; |
|
84 LogsComponentRepository* mComponentsRepository; |
|
85 QList<LogsBaseView*> mViewStack; |
|
86 bool mFirstActivation; |
|
87 QVariant mViewActivationArgs; |
|
88 bool mViewActivationShowDialpad; |
|
89 |
|
90 }; |
|
91 |
|
92 #endif //LOGVIEWMANAGER_H |