wlanutilities/wlanlogin/wlanloginapp/inc/wlanloginview.h
branchRCL_3
changeset 24 63be7eb3fc78
equal deleted inserted replaced
23:b852595f5cbe 24:63be7eb3fc78
       
     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 HbDocumentLoader;
       
    34 class HbProgressBar;
       
    35 class WlanLoginWebView;
       
    36 class QNetworkAccessManager;
       
    37 class HbWidget;
       
    38 
       
    39 // External data types
       
    40 
       
    41 // Constants
       
    42 
       
    43 // Class declaration
       
    44 class WlanLoginView : public HbView
       
    45     {
       
    46     Q_OBJECT
       
    47     
       
    48 public:
       
    49     WlanLoginView(WlanLoginMainWindow* mainWindow);
       
    50     virtual ~WlanLoginView();
       
    51     
       
    52     /*!
       
    53         Enumeration type for current toolbar action in use
       
    54     */ 
       
    55     enum ActionType {
       
    56         Cancel,     //!< "Cancel" button
       
    57         Next       //!< "Next" button
       
    58     };
       
    59     
       
    60 private:
       
    61     void loadDocml();
       
    62     
       
    63 private slots:
       
    64 
       
    65     void handleConnectionReady(QUrl url);    
       
    66     void handleOrientationChanged(Qt::Orientation orientation);
       
    67     void adjustViewSize();
       
    68     
       
    69     void handleUrlChanged(const QUrl& newUrl);    
       
    70     void handleLoadStarted();
       
    71     void handleLoadProgress(int progressValue);
       
    72     void handleLoadFinished(bool status );
       
    73     void handleFormSubmitted();
       
    74     void handleCancelAction();
       
    75     void handleNextAction();
       
    76     void handleIctsOk();
       
    77     
       
    78 signals:
       
    79     void cancelTriggered();
       
    80     void nextTriggered();
       
    81 
       
    82     void startIcts();
       
    83     
       
    84 private: // Data
       
    85     
       
    86     // Not owned data
       
    87     WlanLoginMainWindow* mMainWindow;  //!< pointer to main window instance
       
    88 
       
    89     // Owned data
       
    90 
       
    91     QScopedPointer<HbDocumentLoader> mDocLoader; //! Document loader for list view
       
    92     
       
    93     HbProgressBar* mProgressBar;    //!< pointer to HB progressbar  
       
    94     HbWidget* mScrollAreaContent;   //!< pointer to scroll are content
       
    95     WlanLoginWebView* mWebView;     //!< pointer to web view
       
    96     HbAction* mCancelAction;        //!< pointer to "cancel" action 
       
    97     HbAction* mNextAction;          //!< pointer to "next" action
       
    98     bool mFirstIctsOkResult;         //!< Variable for controlling automatic background sending
       
    99 
       
   100     };
       
   101 
       
   102 #endif // WLANLOGINWEBVIEW_H