wlanutilities/eapwizard/src/eapwizardpagenewpacstore.cpp
changeset 43 72ebcbb64834
parent 39 7b3e49e4608a
equal deleted inserted replaced
39:7b3e49e4608a 43:72ebcbb64834
    29 
    29 
    30 // User includes
    30 // User includes
    31 #include "wlanwizardhelper.h"
    31 #include "wlanwizardhelper.h"
    32 #include "eapwizardpagenewpacstore.h"
    32 #include "eapwizardpagenewpacstore.h"
    33 #include "eapwizard_p.h"
    33 #include "eapwizard_p.h"
       
    34 #include "OstTraceDefinitions.h"
       
    35 #ifdef OST_TRACE_COMPILER_IN_USE
       
    36 #include "eapwizardpagenewpacstoreTraces.h"
       
    37 #endif
       
    38 
    34 
    39 
    35 /*!
    40 /*!
    36    \class EapWizardPageNewPacStore
    41    \class EapWizardPageNewPacStore
    37    \brief Implements EAP wizard page: New PAC store password
    42    \brief Implements EAP wizard page: New PAC store password
    38  */
    43  */
    60     mEditPasswordNew(NULL),
    65     mEditPasswordNew(NULL),
    61     mEditPasswordConfirm(NULL), 
    66     mEditPasswordConfirm(NULL), 
    62     mTitlePasswordNew(NULL), 
    67     mTitlePasswordNew(NULL), 
    63     mTitlePasswordConfirm(NULL)
    68     mTitlePasswordConfirm(NULL)
    64 {
    69 {
       
    70     OstTraceFunctionEntry0( EAPWIZARDPAGENEWPACSTORE_EAPWIZARDPAGENEWPACSTORE_ENTRY );
       
    71     OstTraceFunctionExit0( EAPWIZARDPAGENEWPACSTORE_EAPWIZARDPAGENEWPACSTORE_EXIT );
    65 }
    72 }
    66 
    73 
    67 /*!
    74 /*!
    68    Destructor.
    75    Destructor.
    69  */
    76  */
    70 EapWizardPageNewPacStore::~EapWizardPageNewPacStore()
    77 EapWizardPageNewPacStore::~EapWizardPageNewPacStore()
    71 {
    78 {
       
    79     OstTraceFunctionEntry0( DUP1_EAPWIZARDPAGENEWPACSTORE_EAPWIZARDPAGENEWPACSTORE_ENTRY );
       
    80     OstTraceFunctionExit0( DUP1_EAPWIZARDPAGENEWPACSTORE_EAPWIZARDPAGENEWPACSTORE_EXIT );
    72 }
    81 }
    73 
    82 
    74 /*!
    83 /*!
    75    See WlanWizardPage. 
    84    See WlanWizardPage. 
    76  */
    85  */
    77 HbWidget* EapWizardPageNewPacStore::initializePage()
    86 HbWidget* EapWizardPageNewPacStore::initializePage()
    78 {
    87 {
       
    88     OstTraceFunctionEntry0( EAPWIZARDPAGENEWPACSTORE_INITIALIZEPAGE_ENTRY );
    79     if (!mWidget) {
    89     if (!mWidget) {
    80         bool ok;
    90         bool ok;
    81         mDocumentLoader.reset( 
    91         mDocumentLoader.reset( 
    82             new HbDocumentLoader(mWizard->wizardHelper()->mainWindow()));
    92             new HbDocumentLoader(mWizard->wizardHelper()->mainWindow()));
    83         mDocumentLoader->load(":/docml/occ_eap_wizard_05_07.docml", &ok);
    93         mDocumentLoader->load(":/docml/occ_eap_wizard_05_07.docml", &ok);
   127         ok = connect(
   137         ok = connect(
   128             mEditPasswordConfirm, SIGNAL(textChanged(const QString &)), 
   138             mEditPasswordConfirm, SIGNAL(textChanged(const QString &)), 
   129             this, SLOT(textChanged(const QString &)));
   139             this, SLOT(textChanged(const QString &)));
   130         Q_ASSERT(ok);
   140         Q_ASSERT(ok);
   131     }
   141     }
       
   142     OstTraceFunctionExit0( EAPWIZARDPAGENEWPACSTORE_INITIALIZEPAGE_EXIT );
   132     return mWidget;
   143     return mWidget;
   133 }
   144 }
   134 
   145 
   135 /*!
   146 /*!
   136    Loads the required orientation of docml.
   147    Loads the required orientation of docml.
   137    
   148    
   138    @param [in] orientation Orientation to be loaded. 
   149    @param [in] orientation Orientation to be loaded. 
   139  */
   150  */
   140 void EapWizardPageNewPacStore::loadDocmlSection(Qt::Orientation orientation)
   151 void EapWizardPageNewPacStore::loadDocmlSection(Qt::Orientation orientation)
   141 {
   152 {
       
   153     OstTraceFunctionEntry0( EAPWIZARDPAGENEWPACSTORE_LOADDOCMLSECTION_ENTRY );
   142     EapWizardPage::loadDocmlSection(
   154     EapWizardPage::loadDocmlSection(
   143         mDocumentLoader.data(),
   155         mDocumentLoader.data(),
   144         orientation,
   156         orientation,
   145         ":/docml/occ_eap_wizard_05_07.docml",
   157         ":/docml/occ_eap_wizard_05_07.docml",
   146         "portrait_section",
   158         "portrait_section",
   147         "landscape_section");
   159         "landscape_section");
       
   160     OstTraceFunctionExit0( EAPWIZARDPAGENEWPACSTORE_LOADDOCMLSECTION_EXIT );
   148 }
   161 }
   149 
   162 
   150 /*!
   163 /*!
   151    See WlanWizardPage.
   164    See WlanWizardPage.
   152    
   165    
   154    
   167    
   155    @return true if content is valid.
   168    @return true if content is valid.
   156  */
   169  */
   157 bool EapWizardPageNewPacStore::showPage()
   170 bool EapWizardPageNewPacStore::showPage()
   158 {
   171 {
       
   172     OstTraceFunctionEntry0( EAPWIZARDPAGENEWPACSTORE_SHOWPAGE_ENTRY );
   159     bool valid = false;
   173     bool valid = false;
   160     if (mValidator->validate(mEditPasswordNew->text()) == EapQtValidator::StatusOk &&
   174     if (mValidator->validate(mEditPasswordNew->text()) == EapQtValidator::StatusOk &&
   161         mEditPasswordNew->text() == mEditPasswordConfirm->text()) {
   175         mEditPasswordNew->text() == mEditPasswordConfirm->text()) {
   162         valid = true;
   176         valid = true;
   163     }
   177     }
       
   178     OstTraceFunctionExit0( EAPWIZARDPAGENEWPACSTORE_SHOWPAGE_EXIT );
   164     return valid;
   179     return valid;
   165 }
   180 }
   166 
   181 
   167 /*!
   182 /*!
   168    See WlanWizardPage.
   183    See WlanWizardPage.
   169    
   184    
   170    @return next wizard page: EapWizardPage::PageUsernamePassword
   185    @return next wizard page: EapWizardPage::PageUsernamePassword
   171  */
   186  */
   172 int EapWizardPageNewPacStore::nextId() const
   187 int EapWizardPageNewPacStore::nextId() const
   173 {
   188 {
       
   189     OstTraceFunctionEntry0( EAPWIZARDPAGENEWPACSTORE_NEXTID_ENTRY );
   174     mWizard->setConfigurations(EapWizardPrivate::PacStorePassword, mEditPasswordNew->text());
   190     mWizard->setConfigurations(EapWizardPrivate::PacStorePassword, mEditPasswordNew->text());
       
   191     OstTraceFunctionExit0( EAPWIZARDPAGENEWPACSTORE_NEXTID_EXIT );
   175     return EapWizardPage::PageUsernamePassword;
   192     return EapWizardPage::PageUsernamePassword;
   176 }
   193 }
   177 
   194 
   178 /*!
   195 /*!
   179    Slot for textChanged() signal from HbLineEdit.
   196    Slot for textChanged() signal from HbLineEdit.
   180    
   197    
   181    @param [in] text NOT USED.
   198    @param [in] text NOT USED.
   182  */
   199  */
   183 void EapWizardPageNewPacStore::textChanged(const QString &text)
   200 void EapWizardPageNewPacStore::textChanged(const QString &text)
   184 {
   201 {
       
   202     OstTraceFunctionEntry0( EAPWIZARDPAGENEWPACSTORE_TEXTCHANGED_ENTRY );
   185     Q_UNUSED(text);
   203     Q_UNUSED(text);
   186     mWizard->wizardHelper()->enableNextButton(showPage());
   204     mWizard->wizardHelper()->enableNextButton(showPage());
   187 }
   205     OstTraceFunctionExit0( EAPWIZARDPAGENEWPACSTORE_TEXTCHANGED_EXIT );
       
   206 }