searchui/stateproviders/searchstateprovider/src/searchonlinestate.cpp
changeset 26 367228f82b66
parent 21 708468d5143e
equal deleted inserted replaced
24:1abfa342db42 26:367228f82b66
    23 #include <hbstackedwidget.h>
    23 #include <hbstackedwidget.h>
    24 #include <hbicon.h>
    24 #include <hbicon.h>
    25 #include <hbinstance.h>
    25 #include <hbinstance.h>
    26 #include <hbaction.h>
    26 #include <hbaction.h>
    27 #include <qstandarditemmodel.h>
    27 #include <qstandarditemmodel.h>
    28 #include <qdebug.h>
       
    29 #include <qgraphicswidget.h>
    28 #include <qgraphicswidget.h>
    30 #include <qdir.h>
    29 #include <qdir.h>
    31 #include <hbsearchpanel.h>
    30 #include <hbsearchpanel.h>
    32 #include <hbapplication.h>
    31 #include <hbapplication.h>
    33 #include <hblistwidget.h>
    32 #include <hblistwidget.h>
    47 
    46 
    48     mMainWindow = hbInstance->allMainWindows().at(0);
    47     mMainWindow = hbInstance->allMainWindows().at(0);
    49 
    48 
    50     mView = mUiLoader->View();
    49     mView = mUiLoader->View();
    51     mListView = mUiLoader->ListWidget();
    50     mListView = mUiLoader->ListWidget();
    52     mSearchPanel = mUiLoader->SearchPanel();
    51     mSearchPanel = mUiLoader->SearchPanel();   
    53     if (mSearchPanel)
       
    54         {
       
    55         mSearchPanel->setFocus();
       
    56         }
       
    57     if (mView && mMainWindow)
    52     if (mView && mMainWindow)
    58         {
    53         {
    59         mMainWindow->addView(mView);
    54         mMainWindow->addView(mView);
    60         mMainWindow->setCurrentView(mView);
    55         mMainWindow->setCurrentView(mView);
    61         }
    56         }
    74 // SearchOnlineState::onEntry
    69 // SearchOnlineState::onEntry
    75 // ---------------------------------------------------------------------------
    70 // ---------------------------------------------------------------------------
    76 //
    71 //
    77 void SearchOnlineState::onEntry(QEvent *event)
    72 void SearchOnlineState::onEntry(QEvent *event)
    78     {
    73     {
    79     qDebug() << "search:SearchOnlineState::onEntry";
       
    80     QState::onEntry(event);
    74     QState::onEntry(event);
    81     if (mSearchPanel)
    75     if (mSearchPanel)
    82         {
    76         {
    83         mSearchPanel->setProgressive(false);
    77         mSearchPanel->setProgressive(false);
    84         mSearchPanel->setPlaceholderText(hbTrId(
    78         mSearchPanel->setPlaceholderText(hbTrId(