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 void doSelectComm(HbAction*); |
|
89 void doEnableSerialComm(HbAction* ); |
|
90 void doSelectIAP(HbAction* ); |
|
91 void doSelectIpComm(HbAction* ); |
|
92 void doListenOnPort(HbAction* ); |
|
93 void doConnectRemoteHost(HbAction*); |
|
94 void doSelectBTComm(HbAction*); |
|
95 void doEnableByBTAddress(HbAction*); |
|
96 void doEnableByBTName(HbAction*); |
|
97 void doSetPriority(HbAction*); |
|
98 void doSelectCfgFile(HbAction*); |
|
99 void doModifyHtiCfgFile(HbAction*); |
|
100 void doModifyBtCfgFile(HbAction*); |
|
101 void doModifySerialCfgFile(HbAction*); |
|
102 void doModifyIPCfgFile(HbAction*); |
|
103 void doSetHtiCfgParameter(HbAction*); |
|
104 void doSetBtCfgParameter(HbAction*); |
|
105 void doSetSerialCfgParameter(HbAction*); |
|
106 void doSetIPCfgParameter(HbAction*); |
|
107 private: |
|
108 |
|
109 /** |
|
110 * Creates menu |
|
111 */ |
|
112 void createMenu(HbApplication &app); |
|
113 |
|
114 /** |
|
115 * Creates toolbar components |
|
116 */ |
|
117 void createToolbar(); |
|
118 |
|
119 void createTexts(); |
|
120 |
|
121 void openListDialog(const QStringList& items, const int currentSelection, |
|
122 const QString &titleText, QObject* receiver, const char* member); |
|
123 void openIPAddressDialog(const QString &titleText, QObject* receiver, const char* member); |
|
124 |
|
125 public: |
|
126 |
|
127 private: |
|
128 /* Main windo of Screen Grabber */ |
|
129 HbMainWindow &mMainWindow; |
|
130 |
|
131 /* Hti Engine Wrapper */ |
|
132 HtiEngineWrapper& mEngineWrapper; |
|
133 |
|
134 /* Actions that are used in toolbars and menus */ |
|
135 HbAction* mActionExit; |
|
136 HbAction* mActionStartHti; |
|
137 HbAction* mActionStopHti; |
|
138 HbAction* mActionSelectComm; |
|
139 HbAction* mActionSetPriority; |
|
140 HbAction* mActionEnableAuto; |
|
141 HbAction* mActionDisableAuto; |
|
142 HbAction* mActionEnableWdog; |
|
143 HbAction* mActionDisableWdog; |
|
144 HbAction* mActionEnableConsole; |
|
145 HbAction* mActionDisableConsole; |
|
146 HbAction* mActionSetParameter; |
|
147 |
|
148 HbLabel* mHtiStatusTxt; |
|
149 HbLabel* mHtiVersionTxt; |
|
150 HbLabel* mHtiAutoStartStatusTxt; |
|
151 HbLabel* mCommunicationTxt; |
|
152 HbLabel* mCommDetailsTxt; |
|
153 |
|
154 QStringList mPluginList; |
|
155 |
|
156 QString mIapSelection; |
|
157 |
|
158 }; |
|
159 |
|
160 #endif // MAINVIEW_H |
|
161 |
|
162 |
|