|
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: Implementation of HtiAdmin main. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MAINVIEW_H |
|
19 #define MAINVIEW_H |
|
20 |
|
21 |
|
22 #include <hbview.h> |
|
23 #include "htienginewrapper.h" |
|
24 |
|
25 |
|
26 class HbMainWindow; |
|
27 class HbApplication; |
|
28 class SettingsView; |
|
29 class HbAction; |
|
30 class HbTextEdit; |
|
31 class HbTextItem; |
|
32 class HbLabel; |
|
33 class QGraphicsLinearLayout; |
|
34 class QGraphicsGridLayout; |
|
35 |
|
36 |
|
37 /** |
|
38 * Class that implements the main view of Screen Grabber |
|
39 */ |
|
40 class MainView : public HbView |
|
41 { |
|
42 Q_OBJECT |
|
43 |
|
44 public: |
|
45 |
|
46 /** |
|
47 * Constructor |
|
48 */ |
|
49 MainView(HbMainWindow &mainWindow, HtiEngineWrapper &engineWrapper); |
|
50 |
|
51 /** |
|
52 * Destructor |
|
53 */ |
|
54 ~MainView(); |
|
55 |
|
56 /** |
|
57 * Initializes Engine Wrapper |
|
58 * @param app application class of Screen Grabber |
|
59 */ |
|
60 void init(HbApplication &app); |
|
61 |
|
62 void enableSerialComm(); |
|
63 void enableBTComm(); |
|
64 void enableIPComm(); |
|
65 |
|
66 |
|
67 private slots: |
|
68 void htiStatusChanged(HtiEngineWrapper::HtiStatus newStatus); |
|
69 void commStatusChanged(QString& newStatus); |
|
70 void updatePluginInfo(QStringList& pluginList); |
|
71 void autostartStatusChanged(HtiEngineWrapper::AutoStartStatus newStatus); |
|
72 void consoleStatusChanged(bool enabled); |
|
73 void watchDogStatusChanged(bool enabled); |
|
74 void commDetailsChanged(QString& newStatus); |
|
75 |
|
76 void startHti(); |
|
77 void stopHti(); |
|
78 void enableComm(); |
|
79 void setPriority(); |
|
80 void enableAutoStart(); |
|
81 void disableAutoStart(); |
|
82 void enableWatchdog(); |
|
83 void disableWatchdog(); |
|
84 void enableConsole(); |
|
85 void disableConsole(); |
|
86 void showParamList (); |
|
87 |
|
88 |
|
89 private: |
|
90 |
|
91 /** |
|
92 * Creates menu |
|
93 */ |
|
94 void createMenu(HbApplication &app); |
|
95 |
|
96 /** |
|
97 * Creates toolbar components |
|
98 */ |
|
99 void createToolbar(); |
|
100 |
|
101 void createTexts(); |
|
102 |
|
103 public: |
|
104 |
|
105 private: |
|
106 /* Main windo of Screen Grabber */ |
|
107 HbMainWindow &mMainWindow; |
|
108 |
|
109 /* Hti Engine Wrapper */ |
|
110 HtiEngineWrapper& mEngineWrapper; |
|
111 |
|
112 /* Actions that are used in toolbars and menus */ |
|
113 HbAction* mActionExit; |
|
114 HbAction* mActionStartHti; |
|
115 HbAction* mActionStopHti; |
|
116 HbAction* mActionSelectComm; |
|
117 HbAction* mActionSetPriority; |
|
118 HbAction* mActionEnableAuto; |
|
119 HbAction* mActionDisableAuto; |
|
120 HbAction* mActionEnableWdog; |
|
121 HbAction* mActionDisableWdog; |
|
122 HbAction* mActionEnableConsole; |
|
123 HbAction* mActionDisableConsole; |
|
124 HbAction* mActionSetParameter; |
|
125 |
|
126 HbLabel* mHtiStatusTxt; |
|
127 HbLabel* mHtiVersionTxt; |
|
128 HbLabel* mHtiAutoStartStatusTxt; |
|
129 HbLabel* mCommunicationTxt; |
|
130 HbLabel* mCommDetailsTxt; |
|
131 |
|
132 QStringList mPluginList; |
|
133 |
|
134 }; |
|
135 |
|
136 #endif // MAINVIEW_H |
|
137 |
|
138 |