searchui/stateproviders/searchstateprovider/src/searchsettingsstate.cpp
changeset 9 4a2987baf8f7
parent 2 208a4ba3894c
child 21 708468d5143e
equal deleted inserted replaced
8:2f67eb14d003 9:4a2987baf8f7
    44     connect(mWidget, SIGNAL(settingsEvent(bool)), this,
    44     connect(mWidget, SIGNAL(settingsEvent(bool)), this,
    45             SLOT(handleBackEvent(bool)));
    45             SLOT(handleBackEvent(bool)));
    46 
    46 
    47     connect(mWidget, SIGNAL(selectedItemCategory(int, bool)), this,
    47     connect(mWidget, SIGNAL(selectedItemCategory(int, bool)), this,
    48             SLOT(getItemCategory(int, bool)));
    48             SLOT(getItemCategory(int, bool)));
       
    49     
       
    50     connect(mWidget, SIGNAL(ISProvidersIcon(HbIcon, int)), this,
       
    51                 SLOT(slotISProvidersIcon(HbIcon, int)));
    49 
    52 
    50     }
    53     }
    51 // ---------------------------------------------------------------------------
    54 // ---------------------------------------------------------------------------
    52 // SearchSettingsState::~SearchSettingsState
    55 // SearchSettingsState::~SearchSettingsState
    53 // ---------------------------------------------------------------------------
    56 // ---------------------------------------------------------------------------
    56     {
    59     {
    57     delete mDocumentLoader;
    60     delete mDocumentLoader;
    58     delete mWidget;
    61     delete mWidget;
    59 
    62 
    60     }
    63     }
       
    64 // ---------------------------------------------------------------------------
       
    65 // SearchSettingsState::slotISProvidersIcon
       
    66 // ---------------------------------------------------------------------------
       
    67 //
       
    68 void SearchSettingsState::slotISProvidersIcon(HbIcon icon, int id)
       
    69     {
       
    70     emit publishISProviderIcon(id,icon);
       
    71     }
       
    72 
    61 // ---------------------------------------------------------------------------
    73 // ---------------------------------------------------------------------------
    62 // SearchSettingsState::getItemCategory
    74 // SearchSettingsState::getItemCategory
    63 // ---------------------------------------------------------------------------
    75 // ---------------------------------------------------------------------------
    64 //
    76 //
    65 void SearchSettingsState::getItemCategory(int str, bool avalue)
    77 void SearchSettingsState::getItemCategory(int str, bool avalue)
    72 //
    84 //
    73 void SearchSettingsState::onEntry(QEvent *event)
    85 void SearchSettingsState::onEntry(QEvent *event)
    74     {
    86     {
    75     qDebug() << "search:SearchSettingsState::onEntry";
    87     qDebug() << "search:SearchSettingsState::onEntry";
    76     QState::onEntry(event);
    88     QState::onEntry(event);
       
    89     emit settingslaunched();
    77     if (minitialCount)
    90     if (minitialCount)
    78         {
    91         {
    79         mWidget->loadBaseSettings();
    92         mWidget->loadBaseSettings();
    80         mWidget->loadDeviceSettings();
    93         mWidget->loadDeviceSettings();
       
    94         mWidget->loadIS();
    81         isInternetOn();
    95         isInternetOn();
    82         minitialCount = false;
    96         minitialCount = false;
    83         emit backEventTriggered();
    97        // isInternetOn();
       
    98         //emit backEventTriggered();
    84         }
    99         }
    85     else
   100     else
    86         {
   101         {
    87 
       
    88         mWidget->launchSettingWidget();
   102         mWidget->launchSettingWidget();
    89         }
   103         }    
    90     }
   104     }
    91 // ---------------------------------------------------------------------------
   105 // ---------------------------------------------------------------------------
    92 // SearchSettingsState::onExit
   106 // SearchSettingsState::onExit
    93 // ---------------------------------------------------------------------------
   107 // ---------------------------------------------------------------------------
    94 //
   108 //
   101 // SearchSettingsState::handleBackEvent
   115 // SearchSettingsState::handleBackEvent
   102 // ---------------------------------------------------------------------------
   116 // ---------------------------------------------------------------------------
   103 //
   117 //
   104 void SearchSettingsState::handleBackEvent(bool aStatus)
   118 void SearchSettingsState::handleBackEvent(bool aStatus)
   105     {
   119     {
   106     emit backEventTriggered();
       
   107     if (mWidget)
   120     if (mWidget)
   108         {
   121         {
   109         isInternetOn();
   122         isInternetOn();
   110         emit clickstatus(aStatus);
   123         emit clickstatus(aStatus);
   111         }
   124         }
   116 //
   129 //
   117 void SearchSettingsState::isInternetOn()
   130 void SearchSettingsState::isInternetOn()
   118     {
   131     {
   119     if (mWidget->isInternetSearchOptionSelected())
   132     if (mWidget->isInternetSearchOptionSelected())
   120         {
   133         {
   121         emit customizeGoButton(true);
   134         emit switchToOnlineState();
   122         }
   135         }
   123     else
   136     else
   124         {
   137         {
   125         emit customizeGoButton(false);
   138         emit switchToProState();
   126         }
   139         }
   127     }
   140     }