src/hbwidgets/widgets/hbsearchpanel_p.cpp
changeset 34 ed14f46c0e55
parent 7 923ff622b8b9
equal deleted inserted replaced
31:7516d6d86cf5 34:ed14f46c0e55
    67     //set default values
    67     //set default values
    68     q->setFlag(QGraphicsItem::ItemIsFocusable);
    68     q->setFlag(QGraphicsItem::ItemIsFocusable);
    69 
    69 
    70     // connect initial state signals
    70     // connect initial state signals
    71     QObject::connect(mLineEdit, SIGNAL(textChanged(QString)), q, SIGNAL(criteriaChanged(QString)));
    71     QObject::connect(mLineEdit, SIGNAL(textChanged(QString)), q, SIGNAL(criteriaChanged(QString)));
       
    72     mLineEdit->installEventFilter(q);
    72 
    73 
    73 }
    74 }
    74 
    75 
    75 void HbSearchPanelPrivate::addSearchOptionsButton()
    76 void HbSearchPanelPrivate::addSearchOptionsButton()
    76 {
    77 {
    90 {
    91 {
    91     Q_Q( HbSearchPanel );
    92     Q_Q( HbSearchPanel );
    92     mSearchOptions = false;
    93     mSearchOptions = false;
    93     HbStyle::setItemName( mSearchOptionsButton, "" );
    94     HbStyle::setItemName( mSearchOptionsButton, "" );
    94     QObject::disconnect(mSearchOptionsButton, SIGNAL(clicked()), q, SLOT(_q_searchOptionsClicked()));
    95     QObject::disconnect(mSearchOptionsButton, SIGNAL(clicked()), q, SLOT(_q_searchOptionsClicked()));
    95     mSearchOptionsButton->deleteLater();
    96     delete mSearchOptionsButton;
    96     mSearchOptionsButton = 0;
    97     mSearchOptionsButton = 0;
    97     q->repolish();
    98     q->repolish();
    98 }
    99 }
    99 
   100 
   100 void HbSearchPanelPrivate::addProgressButton()
   101 void HbSearchPanelPrivate::addProgressButton()
   116 {
   117 {
   117     Q_Q( HbSearchPanel );
   118     Q_Q( HbSearchPanel );
   118     mProgressive = true;
   119     mProgressive = true;
   119     HbStyle::setItemName( mProgressButton, "" );
   120     HbStyle::setItemName( mProgressButton, "" );
   120     QObject::disconnect(mProgressButton, SIGNAL(clicked()), q, SLOT(_q_criteriaChanged()));
   121     QObject::disconnect(mProgressButton, SIGNAL(clicked()), q, SLOT(_q_criteriaChanged()));
   121     mProgressButton->deleteLater();
   122     delete mProgressButton;
   122     mProgressButton = 0;
   123     mProgressButton = 0;
   123 
   124 
   124     // start to send events always when text is updated
   125     // start to send events always when text is updated
   125     QObject::connect(mLineEdit, SIGNAL(textChanged(QString)), q, SIGNAL(criteriaChanged(QString)));
   126     QObject::connect(mLineEdit, SIGNAL(textChanged(QString)), q, SIGNAL(criteriaChanged(QString)));
   126     q->repolish();
   127     q->repolish();
   143 void HbSearchPanelPrivate::removeCancelButton()
   144 void HbSearchPanelPrivate::removeCancelButton()
   144 {
   145 {
   145     Q_Q( HbSearchPanel );
   146     Q_Q( HbSearchPanel );
   146     mCancelEnabled = false;
   147     mCancelEnabled = false;
   147     HbStyle::setItemName( mCancelButton, "" );
   148     HbStyle::setItemName( mCancelButton, "" );
   148     mCancelButton->deleteLater();
   149     delete mCancelButton;
   149     mCancelButton = 0;
   150     mCancelButton = 0;
   150     q->repolish();
   151     q->repolish();
   151 }
   152 }
   152 
   153 
   153 
   154