wlanutilities/wlanlogin/wlanloginapp/src/wlanloginmainwindow.cpp
branchRCL_3
changeset 25 f28ada11abbf
parent 24 63be7eb3fc78
equal deleted inserted replaced
24:63be7eb3fc78 25:f28ada11abbf
     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 * Wlan Login main window class implementation
       
    16 * 
       
    17 */
       
    18 
       
    19 // System includes
       
    20 
       
    21 //User includes
       
    22 
       
    23 #include "wlanloginmainwindow.h"
       
    24 #include "wlanloginengine.h"
       
    25 #include "wlanloginview.h"
       
    26 #include "wlanloginapplication.h"
       
    27 
       
    28 #include "OstTraceDefinitions.h"
       
    29 #ifdef OST_TRACE_COMPILER_IN_USE
       
    30 #include "wlanloginmainwindowTraces.h"
       
    31 #endif
       
    32 
       
    33 /*!
       
    34     \class WlanLoginMainWindow
       
    35     \brief WLAN Login main window class implementation.
       
    36 */
       
    37 
       
    38 /*!
       
    39     Constructor.
       
    40  */
       
    41 WlanLoginMainWindow::WlanLoginMainWindow(WlanLoginApplication* appRef) :
       
    42     mAppRef(appRef),
       
    43     mLoginView(NULL)
       
    44 {
       
    45     OstTraceFunctionEntry0(WLANLOGINMAINWINDOW_WLANLOGINMAINWINDOW_ENTRY);
       
    46     
       
    47     addLoginView();
       
    48     setCurrentView(mLoginView);
       
    49     show();
       
    50     
       
    51     OstTraceFunctionExit0(WLANLOGINMAINWINDOW_WLANLOGINMAINWINDOW_EXIT);
       
    52 }
       
    53 
       
    54 
       
    55 /*!
       
    56     Destructor.
       
    57  */
       
    58 WlanLoginMainWindow::~WlanLoginMainWindow()
       
    59 {
       
    60     OstTraceFunctionEntry0(WLANLOGINMAINWINDOW_DESTRUCTOR_ENTRY);
       
    61 
       
    62     OstTraceFunctionExit0(WLANLOGINMAINWINDOW_DESTRUCTOR_EXIT);
       
    63 }
       
    64 
       
    65 
       
    66 /*!
       
    67     This function creates login view
       
    68  */
       
    69 void WlanLoginMainWindow::addLoginView()
       
    70 {
       
    71     OstTraceFunctionEntry0(WLANLOGINMAINWINDOW_ADDLOGINVIEW_ENTRY);
       
    72 
       
    73     mLoginView = new WlanLoginView(this);
       
    74     addView(mLoginView);
       
    75 
       
    76     OstTraceFunctionExit0(WLANLOGINMAINWINDOW_ADDLOGINVIEW_EXIT);
       
    77 }
       
    78 
       
    79 
       
    80 /*!
       
    81     This function returns pointer to login view
       
    82  */
       
    83 WlanLoginView* WlanLoginMainWindow::loginView() const
       
    84 {
       
    85     OstTraceFunctionEntry0(WLANLOGINMAINWINDOW_LOGINVIEW_ENTRY); 
       
    86     OstTraceFunctionExit0(WLANLOGINMAINWINDOW_LOGINVIEW_EXIT);
       
    87     
       
    88     return mLoginView;
       
    89 }
       
    90 
       
    91 /*!
       
    92     This function returns pointer to application instance
       
    93  */
       
    94 WlanLoginApplication* WlanLoginMainWindow::application() const
       
    95 {
       
    96     OstTraceFunctionEntry0(WLANLOGINMAINWINDOW_APPLICATION_ENTRY); 
       
    97     OstTraceFunctionExit0(WLANLOGINMAINWINDOW_APPLICATION_EXIT);
       
    98     
       
    99     return mAppRef;
       
   100 }
       
   101