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 #ifndef VIEWSTACK_H |
|
20 #define VIEWSTACK_H |
|
21 #include <QObject> |
|
22 |
|
23 class ViewController; |
|
24 class ChromeView; |
|
25 |
|
26 |
|
27 class ViewStack : public QObject |
|
28 { |
|
29 Q_OBJECT |
|
30 |
|
31 public: |
|
32 static ViewStack* getSingleton(); |
|
33 ViewController *getViewController() { return m_viewController;} |
|
34 void setViewController(ViewController *viewController) { m_viewController = viewController;} |
|
35 ChromeView *getChromeView() { return m_chromeView;} |
|
36 void setChromeView(ChromeView *chromeView) { m_chromeView = chromeView;} |
|
37 |
|
38 public slots: |
|
39 void switchView(const QString &to, const QString &from); |
|
40 |
|
41 private: |
|
42 void fromWindowView(const QString &to); |
|
43 void fromGoAnywhereView(const QString &to); |
|
44 void fromWebView(const QString &to); |
|
45 void fromBookmarkHistoryView(const QString &to); |
|
46 void fromBookmarkTreeView(const QString &to); |
|
47 void toWindowView(); |
|
48 void toGoAnywhereView(); |
|
49 void toWebView(); |
|
50 void toBookmarkHistoryView(); |
|
51 void toBookmarkView(); |
|
52 void initWindowView(); |
|
53 |
|
54 private slots: |
|
55 void loadHistoryItem(int item); |
|
56 void goBackFromGoAnywhereView(); |
|
57 void goBackFromWindowView(); |
|
58 void goBackFromRecentUrlView(); |
|
59 void goBackFromBookmarkView(); |
|
60 void showContentView(int progress); |
|
61 |
|
62 |
|
63 signals: |
|
64 void activateBookmark(); |
|
65 void deActivateBookmark(); |
|
66 void activateHistory(); |
|
67 void deActivateHistory(); |
|
68 void activateBookMarkHistory(); |
|
69 void deActivateBookMarkHistory(); |
|
70 void activateWindowView(); |
|
71 void deActivateWindowView(); |
|
72 void activateWebView(); |
|
73 void deActivateWebView(); |
|
74 |
|
75 void pageChanged(int); |
|
76 |
|
77 private: |
|
78 ViewController *m_viewController; // Not owned |
|
79 ChromeView *m_chromeView; //Not owned |
|
80 }; |
|
81 |
|
82 #endif // VIEWSTACK_H |
|