wlanutilities/wpswizard/src/wpswizardstepfive.cpp
author hgs
Thu, 24 Jun 2010 10:49:51 +0300
changeset 39 7b3e49e4608a
parent 19 10810c91db26
permissions -rw-r--r--
201025
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
 * All rights reserved.
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
 * This component and the accompanying materials are made available
39
hgs
parents: 19
diff changeset
     5
 * under the terms of "Eclipse Public License v1.0"
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
 * which accompanies this distribution, and is available
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
 *
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
 * Initial Contributors:
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
 * Nokia Corporation - initial contribution.
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
 *
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
 * Contributors:
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
 *
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
 * Description: 
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
 *   WPS Wizard Page: Step 5
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
 *
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
 */
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
// System includes
39
hgs
parents: 19
diff changeset
    20
#include <HbDocumentLoader>
hgs
parents: 19
diff changeset
    21
#include <HbWidget>
hgs
parents: 19
diff changeset
    22
#include <HbRadioButtonList>
hgs
parents: 19
diff changeset
    23
#include <HbLineEdit>
hgs
parents: 19
diff changeset
    24
#include <HbLabel>
hgs
parents: 19
diff changeset
    25
#include <HbMainWindow>
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
// User includes
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
#include "wpswizardstepfive.h"
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
#include "wpswizard_p.h"
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
// Trace Includes
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    32
#include "OstTraceDefinitions.h"
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    33
#ifdef OST_TRACE_COMPILER_IN_USE
39
hgs
parents: 19
diff changeset
    34
#include "wpswizardstepfiveTraces.h"
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
#endif
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
39
hgs
parents: 19
diff changeset
    37
// External function prototypes
hgs
parents: 19
diff changeset
    38
hgs
parents: 19
diff changeset
    39
// Local constants
hgs
parents: 19
diff changeset
    40
hgs
parents: 19
diff changeset
    41
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    42
/*!
39
hgs
parents: 19
diff changeset
    43
   \class WpsPageStepFive
hgs
parents: 19
diff changeset
    44
   \brief Implementation of wps wizard page for step five. 
hgs
parents: 19
diff changeset
    45
 */
hgs
parents: 19
diff changeset
    46
hgs
parents: 19
diff changeset
    47
// ======== LOCAL FUNCTIONS ========
hgs
parents: 19
diff changeset
    48
hgs
parents: 19
diff changeset
    49
// ======== MEMBER FUNCTIONS ========
hgs
parents: 19
diff changeset
    50
hgs
parents: 19
diff changeset
    51
hgs
parents: 19
diff changeset
    52
/*!
hgs
parents: 19
diff changeset
    53
   Constructor for WPS page five
hgs
parents: 19
diff changeset
    54
   
hgs
parents: 19
diff changeset
    55
   @param [in] parent WpsWizardPrivate* Pointer to the WPS wizard private 
hgs
parents: 19
diff changeset
    56
          implementation 
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
 */
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
WpsPageStepFive::WpsPageStepFive(WpsWizardPrivate* parent) :
39
hgs
parents: 19
diff changeset
    59
    WpsWizardPage(parent), 
hgs
parents: 19
diff changeset
    60
    mWidget(NULL), 
hgs
parents: 19
diff changeset
    61
    mRadio(NULL), 
hgs
parents: 19
diff changeset
    62
    mHeading(NULL),
hgs
parents: 19
diff changeset
    63
    mValid(false),
hgs
parents: 19
diff changeset
    64
    mLoader(NULL)
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    65
{
39
hgs
parents: 19
diff changeset
    66
    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_WPSPAGESTEPFIVE_ENTRY, this);
hgs
parents: 19
diff changeset
    67
    OstTraceFunctionExit1(WPSPAGESTEPFIVE_WPSPAGESTEPFIVE_EXIT, this);
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    68
}
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    69
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    70
/*!
39
hgs
parents: 19
diff changeset
    71
   Destructor
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    72
 */
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    73
WpsPageStepFive::~WpsPageStepFive()
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    74
{
39
hgs
parents: 19
diff changeset
    75
    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_WPSPAGESTEPFIVE_DESTRUCTOR_ENTRY, this); 
hgs
parents: 19
diff changeset
    76
    delete mLoader;
hgs
parents: 19
diff changeset
    77
    OstTraceFunctionExit1(WPSPAGESTEPFIVE_WPSPAGESTEPFIVE_DESTRUCTOR_EXIT, this);
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    78
}
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    79
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    80
/*!
39
hgs
parents: 19
diff changeset
    81
   Loads the page with all the widgets
hgs
parents: 19
diff changeset
    82
   
hgs
parents: 19
diff changeset
    83
   @return HbWidget* Returns the view widget
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    84
 */
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    85
HbWidget* WpsPageStepFive::initializePage()
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    86
{
39
hgs
parents: 19
diff changeset
    87
    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_INITIALIZEPAGE_ENTRY, this);
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    88
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    89
    if (!mWidget) {
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    90
        bool ok;
39
hgs
parents: 19
diff changeset
    91
        
hgs
parents: 19
diff changeset
    92
        mLoader = new HbDocumentLoader(mWizard->mainWindow());
hgs
parents: 19
diff changeset
    93
        
hgs
parents: 19
diff changeset
    94
        mLoader->load(":/docml/occ_wps_01_05.docml", &ok);
hgs
parents: 19
diff changeset
    95
        Q_ASSERT(ok);
hgs
parents: 19
diff changeset
    96
        
hgs
parents: 19
diff changeset
    97
        // Initialize orientation
hgs
parents: 19
diff changeset
    98
        loadDocmlSection(mWizard->mainWindow()->orientation());
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    99
39
hgs
parents: 19
diff changeset
   100
        mWidget = qobject_cast<HbWidget*> (mLoader->findWidget("occ_wps_P1"));
hgs
parents: 19
diff changeset
   101
        Q_ASSERT(mWidget);
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   102
39
hgs
parents: 19
diff changeset
   103
        mHeading = qobject_cast<HbLabel*> (mLoader->findWidget("label"));
hgs
parents: 19
diff changeset
   104
        Q_ASSERT(mHeading);
hgs
parents: 19
diff changeset
   105
        
hgs
parents: 19
diff changeset
   106
        mHeading->setPlainText(hbTrId("txt_occ_dialog_settings_received_for_multiple_wlan"));
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   107
39
hgs
parents: 19
diff changeset
   108
        mRadio = qobject_cast<HbRadioButtonList*> (mLoader->findWidget(
hgs
parents: 19
diff changeset
   109
                "radioButtonList"));
hgs
parents: 19
diff changeset
   110
        Q_ASSERT(mRadio);
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   111
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   112
        QList<TWlanProtectedSetupCredentialAttribute> arr = mWizard->getSettingsArray();
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   113
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   114
        QStringList ssidList;
39
hgs
parents: 19
diff changeset
   115
        for (int count = 0; count < arr.count(); count++)
hgs
parents: 19
diff changeset
   116
            {
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   117
            TWlanProtectedSetupCredentialAttribute attr = arr[count];
39
hgs
parents: 19
diff changeset
   118
            QString ssid = QString::fromUtf8((const char*) attr.iSsid.Ptr(),
hgs
parents: 19
diff changeset
   119
                    attr.iSsid.Length());
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   120
            ssidList.append(ssid);
39
hgs
parents: 19
diff changeset
   121
            }
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   122
        mRadio->setItems(ssidList);
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   123
39
hgs
parents: 19
diff changeset
   124
        bool connectOk = connect(
hgs
parents: 19
diff changeset
   125
            mRadio, 
hgs
parents: 19
diff changeset
   126
            SIGNAL(itemSelected(int)), 
hgs
parents: 19
diff changeset
   127
            this,
hgs
parents: 19
diff changeset
   128
            SLOT(itemSelected(int)));
hgs
parents: 19
diff changeset
   129
        Q_ASSERT(connectOk);
hgs
parents: 19
diff changeset
   130
        
hgs
parents: 19
diff changeset
   131
        connectOk = connect(
hgs
parents: 19
diff changeset
   132
            mWizard->mainWindow(), 
hgs
parents: 19
diff changeset
   133
            SIGNAL(orientationChanged(Qt::Orientation)),
hgs
parents: 19
diff changeset
   134
            this, 
hgs
parents: 19
diff changeset
   135
            SLOT(loadDocmlSection(Qt::Orientation)));
hgs
parents: 19
diff changeset
   136
                   
hgs
parents: 19
diff changeset
   137
        Q_ASSERT(connectOk);
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   138
    }
39
hgs
parents: 19
diff changeset
   139
    
hgs
parents: 19
diff changeset
   140
    OstTraceFunctionExit1(WPSPAGESTEPFIVE_INITIALIZEPAGE_EXIT, this);
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   141
    return mWidget;
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   142
}
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   143
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   144
/*!
39
hgs
parents: 19
diff changeset
   145
   Determines the Number of steps to move backwards when 'Prev' Button
hgs
parents: 19
diff changeset
   146
   is clicked
hgs
parents: 19
diff changeset
   147
   
hgs
parents: 19
diff changeset
   148
   @return int Number of pages to move backwards
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   149
 */
39
hgs
parents: 19
diff changeset
   150
int WpsPageStepFive::previousTriggered()
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   151
{
39
hgs
parents: 19
diff changeset
   152
    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_PREVIOUSTRIGGERED_ENTRY, this); 
hgs
parents: 19
diff changeset
   153
    OstTraceFunctionExit1(WPSPAGESTEPFIVE_PREVIOUSTRIGGERED_EXIT, this);
hgs
parents: 19
diff changeset
   154
    
hgs
parents: 19
diff changeset
   155
    return (PageWpsWizardStep5 - PageWpsWizardStep2) - 1;
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   156
}
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   157
/*!
39
hgs
parents: 19
diff changeset
   158
   CallBack when the cancel button is clicked
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   159
 */
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   160
void WpsPageStepFive::cancelTriggered()
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   161
{
39
hgs
parents: 19
diff changeset
   162
    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_CANCELTRIGGERED_ENTRY, this); 
hgs
parents: 19
diff changeset
   163
    OstTraceFunctionExit1(WPSPAGESTEPFIVE_CANCELTRIGGERED_EXIT, this);
hgs
parents: 19
diff changeset
   164
}
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   165
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   166
/*!
39
hgs
parents: 19
diff changeset
   167
   Funtion to determine the next page to be displayed in the wizard process
hgs
parents: 19
diff changeset
   168
   
hgs
parents: 19
diff changeset
   169
   @param [out] removeFromStack bool RemoveFromStack indicating whether the current 
hgs
parents: 19
diff changeset
   170
          page should be removed from the stack
hgs
parents: 19
diff changeset
   171
   
hgs
parents: 19
diff changeset
   172
   @return int Page Id of the next page to be displayed.
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   173
 */
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   174
int WpsPageStepFive::nextId(bool &removeFromStack) const
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   175
{
39
hgs
parents: 19
diff changeset
   176
    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_NEXTID_ENTRY, this);
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   177
    removeFromStack = false;
39
hgs
parents: 19
diff changeset
   178
    OstTraceFunctionExit1(WPSPAGESTEPFIVE_NEXTID_EXIT, this);
hgs
parents: 19
diff changeset
   179
    return WlanWizardPage::PageProcessSettings;
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   180
}
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   181
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   182
/*!
39
hgs
parents: 19
diff changeset
   183
   Determines whether the Next action button should be enabled or not
hgs
parents: 19
diff changeset
   184
   
hgs
parents: 19
diff changeset
   185
   @return bool Indicating whether next button is enabled or not.
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   186
 */
39
hgs
parents: 19
diff changeset
   187
bool WpsPageStepFive::showPage()
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   188
{
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   189
    return mValid;
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   190
}
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   191
39
hgs
parents: 19
diff changeset
   192
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   193
/*!
39
hgs
parents: 19
diff changeset
   194
   Call back when an item is selected from the list on the UI
hgs
parents: 19
diff changeset
   195
   
hgs
parents: 19
diff changeset
   196
   @param [in] index Indicating the relative position in the list
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   197
 */
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   198
void WpsPageStepFive::itemSelected(int index)
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   199
{
39
hgs
parents: 19
diff changeset
   200
    OstTraceFunctionEntry1(WPSPAGESTEPFIVE_ITEMSELECTED_ENTRY, this);
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   201
    mValid = true;
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   202
    mWizard->storeSettings(index);
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   203
    mWizard->enableNextButton(mValid);
39
hgs
parents: 19
diff changeset
   204
    OstTraceFunctionExit1(WPSPAGESTEPFIVE_ITEMSELECTED_EXIT, this);
19
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   205
}
10810c91db26 Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   206
39
hgs
parents: 19
diff changeset
   207
hgs
parents: 19
diff changeset
   208
/*!
hgs
parents: 19
diff changeset
   209
   Loads docml at initialization phase and when HbMainWindow sends orientation()
hgs
parents: 19
diff changeset
   210
   signal.
hgs
parents: 19
diff changeset
   211
   
hgs
parents: 19
diff changeset
   212
   @param [in] orientation orientation to be loaded.
hgs
parents: 19
diff changeset
   213
 */
hgs
parents: 19
diff changeset
   214
void WpsPageStepFive::loadDocmlSection(Qt::Orientation orientation)
hgs
parents: 19
diff changeset
   215
{
hgs
parents: 19
diff changeset
   216
    bool ok = false;
hgs
parents: 19
diff changeset
   217
    
hgs
parents: 19
diff changeset
   218
    // Load the orientation specific section
hgs
parents: 19
diff changeset
   219
    if (orientation == Qt::Horizontal) {
hgs
parents: 19
diff changeset
   220
    mLoader->load(":/docml/occ_wps_01_05.docml", "landscape", &ok);
hgs
parents: 19
diff changeset
   221
        Q_ASSERT(ok);
hgs
parents: 19
diff changeset
   222
    } 
hgs
parents: 19
diff changeset
   223
    else {
hgs
parents: 19
diff changeset
   224
        Q_ASSERT(orientation == Qt::Vertical);
hgs
parents: 19
diff changeset
   225
        mLoader->load(":/docml/occ_wps_01_05.docml", "portrait", &ok);
hgs
parents: 19
diff changeset
   226
        Q_ASSERT(ok);
hgs
parents: 19
diff changeset
   227
    }
hgs
parents: 19
diff changeset
   228
}
hgs
parents: 19
diff changeset
   229