securitysettings/eapqtdialogs/src/eapmschapv2newpwddialog.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 02 Sep 2010 20:29:01 +0300
changeset 48 432fb2364cb8
parent 42 53085837e73a
child 49 43351a4f2da3
permissions -rw-r--r--
Revision: 201033 Kit: 201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
fe6b6762fccd Revision: 201025
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".
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    14
* Description: 
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    15
*   EAP-MSCHAPv2 New Password Input Dialog implementation
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
*/
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    18
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    19
/*
48
432fb2364cb8 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 42
diff changeset
    20
* %version: 6 %
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    21
*/
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    22
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    23
// System includes
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    24
#include <HbAction>
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
#include <HbLineEdit>
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
#include <HbTranslator>
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
#include <HbMessageBox>
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    28
#include <eapqtvalidator.h>
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
#include <eapqtexpandedeaptype.h>
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
#include <eapqtconfiginterface.h>
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
#include <eapqtconfig.h>
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    32
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    33
// User includes
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
#include "eapmschapv2newpwddialog.h"
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    35
#include "OstTraceDefinitions.h"
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    36
#ifdef OST_TRACE_COMPILER_IN_USE
48
432fb2364cb8 Revision: 201033
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 42
diff changeset
    37
#include "eapmschapv2newpwddialogTraces.h"
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
#endif
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    39
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    40
/*!
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    41
 * \class EapMschapv2NewPwdDialog
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    42
 * \brief Implements EAP-MSCHAPv2 New Password Input Dialog. 
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    43
 */
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    44
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    45
// External function prototypes
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    46
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    47
// Local constants
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    48
 
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    49
// ======== LOCAL FUNCTIONS ========
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    50
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    51
// ======== MEMBER FUNCTIONS ========
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    52
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    53
/*!
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    54
 * Constructor.
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    55
 * 
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    56
 * @param [in]  parameters Parameters for the Constructor.
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    57
 */
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    58
EapMschapv2NewPwdDialog::EapMschapv2NewPwdDialog(const QVariantMap &parameters) 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    59
 :mEdit1(NULL), 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    60
 mEdit2(NULL), 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    61
 mPwdValidator(NULL),
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    62
 mTranslator(new HbTranslator("eapprompts")),
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    63
 mErrMsgTranslator(new HbTranslator("cpdestinationplugin")),
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    64
 mClose(false) 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    65
{
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    66
    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_EAPMSCHAPV2NEWPWDDIALOG_ENTRY );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    67
    qDebug("EapMschapv2NewPwdDialog::EapMschapv2NewPwdDialog ENTER");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    68
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    69
    createDialog(parameters);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    70
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    71
    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_EAPMSCHAPV2NEWPWDDIALOG_EXIT );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    72
    qDebug("EapMschapv2NewPwdDialog::EapMschapv2NewPwdDialog EXIT");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    73
}
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    74
    
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    75
/*!
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    76
 * The construction of the dialog
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    77
 *
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    78
 * @param [in] parameters Parameters for the Construction of the dialog.
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    79
 */ 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    80
void EapMschapv2NewPwdDialog::createDialog(const QVariantMap &parameters )
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    81
{
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    82
    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_CREATEDIALOG_ENTRY );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    83
    qDebug("EapMschapv2NewPwdDialog::createDialog ENTER");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    84
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    85
    Q_UNUSED(parameters)
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    86
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    87
    QString labelText1(hbTrId("txt_occ_dialog_new_eapmschapv2_password"));
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    88
    QString labelText2(hbTrId("txt_occ_dialog_verify_password"));
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    89
        
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    90
    //Set the dialog to be on the screen until user reacts
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    91
    //by pressing any of the Action buttons
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    92
    this->setModal(true);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    93
    this->setTimeout(HbPopup::NoTimeout);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    94
    this->setDismissPolicy(HbPopup::NoDismiss);    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    95
    this->setAdditionalRowVisible(true);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    96
    
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
    97
    //Set the first Line Edit to be on the screen
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    98
    this->setPromptText(labelText1, 0);   
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    99
    mEdit1 = this->lineEdit(0);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   100
    mEdit1->setEchoMode(HbLineEdit::Password);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   101
    
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   102
    //Set the second Line Edit to be on the screen also
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   103
    this->setPromptText(labelText2, 1);   
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   104
    mEdit2 = this->lineEdit(1);        
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   105
    mEdit2->setEchoMode(HbLineEdit::Password);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   106
    
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   107
    EapQtConfigInterface eapConfigIf;
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   108
    
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   109
    mPwdValidator.reset( eapConfigIf.validatorEap(EapQtExpandedEapType::TypeEapMschapv2,
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   110
                EapQtConfig::Password ) );  
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   111
    Q_ASSERT( mPwdValidator.isNull() == false );                
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   112
                   
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   113
    mPwdValidator->updateEditor(mEdit1);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   114
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   115
    //Remove all default actions from the dialog     
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   116
    QList<QAction*> action_list = this->actions();        
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   117
    for ( int i = 0; i < action_list.count(); i++ ) {
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   118
        this->removeAction(action_list.at(i));
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   119
        } 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   120
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   121
    //Add a new Ok button action 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   122
    HbAction* actionOk = new HbAction(hbTrId("txt_common_button_ok"),this); 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   123
    this->addAction(actionOk);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   124
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   125
    //Add a new Cancel button action 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   126
    HbAction* actionCancel = new HbAction(hbTrId("txt_common_button_cancel"),this);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   127
    this->addAction(actionCancel);    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   128
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   129
    //Disconnect action Ok from the default SLOT and connect to 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   130
    //a SLOT owned by this class   
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   131
    disconnect(actionOk, SIGNAL(triggered()),this, SLOT(close()));
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   132
    bool connected = connect(actionOk, SIGNAL(triggered()), this, SLOT(okPressed()));
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   133
    Q_ASSERT(connected == true);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   134
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   135
    //Disconnect action Cancel from the default SLOT and connect to 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   136
    //a SLOT owned by this class  
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   137
    disconnect(actionCancel, SIGNAL(triggered()),this, SLOT(close()));
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   138
    connected = connect(actionCancel, SIGNAL(triggered()), this, SLOT(cancelPressed()));
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   139
    Q_ASSERT(connected == true);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   140
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   141
    //Connect the about to close and hide signals, so that we are able to inform 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   142
    //the caller that the dialog was closed   
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   143
    connected = connect(this, SIGNAL(aboutToClose()), this, SLOT(closingDialog()));
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   144
    Q_ASSERT(connected == true);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   145
    connected = connect(this, SIGNAL(aboutToHide()), this, SLOT(closingDialog()));
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   146
    Q_ASSERT(connected == true);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   147
   
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   148
    OstTraceFunctionExit0( DUP1_EAPMSCHAPV2NEWPWDDIALOG_CREATEDIALOG_EXIT );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   149
    qDebug("EapMschapv2NewPwdDialog::createDialog EXIT");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   150
}
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   151
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   152
/*!
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   153
 * Destructor.
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   154
 */
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   155
EapMschapv2NewPwdDialog::~EapMschapv2NewPwdDialog()
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   156
{
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   157
    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_DEAPMSCHAPV2NEWPWDDIALOG_ENTRY );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   158
    qDebug("EapMschapv2NewPwdDialog::~EapMschapv2NewPwdDialog");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   159
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   160
    //The dialog widgets are deleted as the dialog is deleted
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   161
    //mPwdValidator:   scoped pointer deleted automatically
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   162
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   163
    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_DEAPMSCHAPV2NEWPWDDIALOG_EXIT );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   164
}
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   165
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   166
/*!
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   167
 * Line edit validator
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   168
 *
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   169
 * @return true if content is valid.
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   170
 */
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   171
bool EapMschapv2NewPwdDialog::validate() const
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   172
{
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   173
    qDebug("EapMschapv2NewPwdDialog::validate ENTER");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   174
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   175
    bool valid = false;
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   176
     
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   177
    if ( mPwdValidator->validate(mEdit1->text())== EapQtValidator::StatusOk &&
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   178
        mEdit1->text() == mEdit2->text()) {
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   179
        qDebug("EapMschapv2NewPwdDialog::validate: ret val: TRUE");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   180
        valid = true;
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   181
    }
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   182
    qDebug("EapPasswordQueryDialog::validate EXIT");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   183
    return valid;
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   184
}
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   185
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   186
/*!
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   187
 * Function is called when the Ok Action button is pressed
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   188
 */
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   189
void EapMschapv2NewPwdDialog::okPressed()
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   190
{
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   191
    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_OKPRESSED_ENTRY );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   192
    qDebug("EapMschapv2NewPwdDialog::okPressed ENTER");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   193
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   194
    if ( validate() == true ) {
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   195
         
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   196
        QVariantMap data;
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   197
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   198
        data["password"] = mEdit1->text();
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   199
      
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   200
        qDebug("EapMschapv2NewPwdDialog::okPressed: emit deviceDialogData");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   201
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   202
        emit deviceDialogData(data); 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   203
        closeDeviceDialog(true);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   204
        }
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   205
    else {    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   206
        HbMessageBox* box = new HbMessageBox(hbTrId("txt_occ_info_passwords_do_not_match_try_again"),
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   207
            HbMessageBox::MessageTypeInformation);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   208
        
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   209
        box->setAttribute(Qt::WA_DeleteOnClose);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   210
        box->open();       
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   211
        }
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   212
    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_OKPRESSED_EXIT );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   213
    qDebug("EapMschapv2NewPwdDialog::okPressed EXIT");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   214
}
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   215
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   216
/*!
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   217
 * Function is called when the Cancel Action button is pressed
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   218
 */
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   219
void EapMschapv2NewPwdDialog::cancelPressed()
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   220
{
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   221
    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_CANCELPRESSED_ENTRY );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   222
    qDebug("EapMschapv2NewPwdDialog::cancelPressed ENTER");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   223
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   224
    if (!mClose) {
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   225
        mClose = true;
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   226
        closeDeviceDialog(true);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   227
    }   
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   228
    qDebug("EapMschapv2NewPwdDialog::cancelPressed EXIT");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   229
    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_CANCELPRESSED_EXIT );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   230
}
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   231
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   232
/*!
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   233
 * Function is called when the dialog is about to close
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   234
 */
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   235
void EapMschapv2NewPwdDialog::closingDialog()
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   236
{
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   237
    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_CLOSINGDIALOG_ENTRY );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   238
    qDebug("EapMschapv2NewPwdDialog::closingDialog ENTER");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   239
 
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   240
    qDebug("EapMschapv2NewPwdDialog::closingDialog EXIT");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   241
    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_CLOSINGDIALOG_EXIT );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   242
}
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   243
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   244
/*!
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   245
 * Device dialog parameters to be set while dialog is displayed.
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   246
 * Not supported. 
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   247
 *
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   248
 * @param [in] parameters NOT USED
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   249
 * @return true always.
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   250
 */  
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   251
bool EapMschapv2NewPwdDialog::setDeviceDialogParameters
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   252
                (const QVariantMap &parameters)
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   253
{
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   254
    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_SETDEVICEDIALOGPARAMETERS_ENTRY );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   255
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   256
    Q_UNUSED(parameters)
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   257
    // changing the dialog after presenting it is not supported.
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   258
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   259
    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_SETDEVICEDIALOGPARAMETERS_EXIT );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   260
    return true;
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   261
}
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   262
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   263
/*!
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   264
 * Not supported
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   265
 *
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   266
 * @return 0 always returned.
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   267
 */
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   268
int EapMschapv2NewPwdDialog::deviceDialogError() const
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   269
{
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   270
    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_DEVICEDIALOGERROR_ENTRY );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   271
    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_DEVICEDIALOGERROR_EXIT);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   272
    return 0;
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   273
}
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   274
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   275
/*!
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   276
 * Dialog is closed and the signal about closing is emitted
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   277
 *
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   278
 * @param [in] byClient indicates when the user closes the dialog
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   279
 */
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   280
void EapMschapv2NewPwdDialog::closeDeviceDialog(bool byClient)
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   281
{   
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   282
    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_CLOSEDEVICEDIALOG_ENTRY );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   283
    qDebug("EapMschapv2NewPwdDialog::closeDeviceDialog ENTER");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   284
            
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   285
    //If the user closes the dialog, then the deviceDialogClosed is emitted
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   286
    if( byClient == true ) {
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   287
        qDebug("EapMschapv2NewPwdDialog::closeDeviceDialog: emit deviceDialogClosed");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   288
        emit deviceDialogClosed();
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   289
        }
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   290
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   291
    qDebug("EapMschapv2NewPwdDialog::closeDeviceDialog EXIT");
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   292
    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_CLOSEDEVICEDIALOG_EXIT );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   293
}
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   294
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   295
/*!
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   296
 * This dialog widget is returned to the caller
42
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   297
 *
53085837e73a Revision: 201029
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 39
diff changeset
   298
 * @return this dialog widget
39
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   299
 */
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   300
HbPopup *EapMschapv2NewPwdDialog::deviceDialogWidget() const
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   301
{
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   302
    OstTraceFunctionEntry0( EAPMSCHAPV2NEWPWDDIALOG_DEVICEDIALOGWIDGET_ENTRY );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   303
    OstTraceFunctionExit0( EAPMSCHAPV2NEWPWDDIALOG_DEVICEDIALOGWIDGET_EXIT );
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   304
    
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   305
    return const_cast<EapMschapv2NewPwdDialog*>(this);
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   306
}
fe6b6762fccd Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
   307