|
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 #ifndef MAINVIEW_H |
|
19 #define MAINVIEW_H |
|
20 |
|
21 #include <hbview.h> |
|
22 #include <hbmainwindow.h> |
|
23 |
|
24 class EngineWrapper; |
|
25 class HbMainWindow; |
|
26 class HbApplication; |
|
27 class SettingsView; |
|
28 class HbAction; |
|
29 |
|
30 |
|
31 |
|
32 /** |
|
33 * Class that implements the main view of Screen Grabber |
|
34 */ |
|
35 class MainView : public HbView |
|
36 { |
|
37 Q_OBJECT |
|
38 |
|
39 public: |
|
40 |
|
41 /** |
|
42 * Constructor |
|
43 */ |
|
44 MainView(HbMainWindow &mainWindow, EngineWrapper &engineWrapper); |
|
45 |
|
46 /** |
|
47 * Destructor |
|
48 */ |
|
49 ~MainView(); |
|
50 |
|
51 /** |
|
52 * Initializes Engine Wrapper |
|
53 * @param app application class of Screen Grabber |
|
54 */ |
|
55 void init(HbApplication &app); |
|
56 |
|
57 inline void setSettingsView(SettingsView *aSettingsView){ mSettingsView = aSettingsView; } |
|
58 |
|
59 |
|
60 private: |
|
61 |
|
62 /** |
|
63 * Creates menu |
|
64 */ |
|
65 void createMenu(HbApplication &app); |
|
66 |
|
67 /** |
|
68 * Created info text ui components |
|
69 */ |
|
70 void createInfoText(); |
|
71 |
|
72 /** |
|
73 * Creates toolbar components |
|
74 */ |
|
75 void createToolbar(); |
|
76 |
|
77 public slots: |
|
78 |
|
79 |
|
80 /** |
|
81 * Shows about pop-up |
|
82 */ |
|
83 void showAboutPopup(); |
|
84 |
|
85 /** |
|
86 * Sends UI to background |
|
87 */ |
|
88 void sendToBackground(); |
|
89 |
|
90 /** |
|
91 * opens settings view |
|
92 */ |
|
93 void showSettings(); |
|
94 |
|
95 void my_quit(); |
|
96 |
|
97 |
|
98 public: |
|
99 |
|
100 /* Main windo of Screen Grabber */ |
|
101 HbMainWindow &mMainWindow; |
|
102 |
|
103 /* Settings view */ |
|
104 SettingsView *mSettingsView; |
|
105 |
|
106 /* Engine Wrapper */ |
|
107 EngineWrapper &mEngineWrapper; |
|
108 |
|
109 /* Actions that are used in toolbars and menus */ |
|
110 HbAction* actionSendToBg; |
|
111 HbAction* actionSettings; |
|
112 HbAction* actionAbout; |
|
113 HbAction* actionExit; |
|
114 |
|
115 }; |
|
116 |
|
117 #endif // MAINVIEW_H |