|
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 WLANLOGINVIEW_H |
|
19 #define WLANLOGINVIEW_H |
|
20 |
|
21 // System includes |
|
22 #include <QUrl> |
|
23 #include <HbView> |
|
24 #include <HbScrollArea> |
|
25 #include <QGraphicsLinearLayout> |
|
26 |
|
27 // User includes |
|
28 #include "wlanloginapplication.h" |
|
29 #include "wlanloginwebpage.h" |
|
30 #include "ictsqtwrapper.h" |
|
31 |
|
32 // Forward declarations |
|
33 class HbProgressBar; |
|
34 class WlanLoginWebView; |
|
35 class QNetworkAccessManager; |
|
36 class HbWidget; |
|
37 |
|
38 // External data types |
|
39 |
|
40 // Constants |
|
41 |
|
42 // Class declaration |
|
43 class WlanLoginView : public HbView |
|
44 { |
|
45 Q_OBJECT |
|
46 |
|
47 public: |
|
48 WlanLoginView(WlanLoginApplication* appref); |
|
49 virtual ~WlanLoginView(); |
|
50 |
|
51 /*! |
|
52 Enumeration type for current toolbar action in use |
|
53 */ |
|
54 enum ActionType { |
|
55 Cancel, //!< "Cancel" button |
|
56 Next, //!< "Next" button |
|
57 Continue //!< "Continue" button |
|
58 }; |
|
59 void setActiveToolBarAction(ActionType newAction); |
|
60 |
|
61 private slots: |
|
62 |
|
63 void handleConnectionReady(QUrl url); |
|
64 void handleOrientationChanged(Qt::Orientation orientation); |
|
65 void adjustViewSize(); |
|
66 |
|
67 void handleUrlChanged(const QUrl& newUrl); |
|
68 void handleLoadStarted(); |
|
69 void handleLoadProgress(int progressValue); |
|
70 void handleLoadFinished(bool status ); |
|
71 |
|
72 void handleFormSubmitted(); |
|
73 void handleCancelAction(); |
|
74 void handleNextAction(); |
|
75 void handleContinueAction(); |
|
76 |
|
77 void handleIctsOk(); |
|
78 |
|
79 signals: |
|
80 void cancelTriggered(); |
|
81 void nextTriggered(); |
|
82 void continueTriggered(); |
|
83 void startIcts(); |
|
84 |
|
85 private: // Data |
|
86 |
|
87 // Not owned data |
|
88 WlanLoginApplication* mAppRef; //!< pointer to application instance |
|
89 |
|
90 // Owned data |
|
91 |
|
92 QGraphicsLinearLayout* mMainLayout; //!< pointer to main layout |
|
93 QGraphicsLinearLayout* mContentLayout; //!< pointer to scroall area content layout |
|
94 |
|
95 HbProgressBar* mProgressBar; //!< pointer to HB progressbar |
|
96 HbScrollArea* mScrollArea; //!< pointer to HB scroll area |
|
97 HbWidget* mScrollAreaContent; |
|
98 WlanLoginWebView* mWebView; //!< pointer to web view |
|
99 HbToolBar* mToolBar; //!< pointer to HB toolbar |
|
100 HbAction* mCancelAction; //!< pointer to "cancel" action |
|
101 HbAction* mNextAction; //!< pointer to "next" action |
|
102 HbAction* mContinueAction; //!< pointer to "continue" action |
|
103 |
|
104 }; |
|
105 |
|
106 #endif // WLANLOGINWEBVIEW_H |