129 q->updatePrimitives( ); |
132 q->updatePrimitives( ); |
130 if ( q->count( ) > 0 ) { |
133 if ( q->count( ) > 0 ) { |
131 HbWidgetFeedback::triggered( q, Hb::InstantReleased ); |
134 HbWidgetFeedback::triggered( q, Hb::InstantReleased ); |
132 } |
135 } |
133 |
136 |
134 q->setProperty( "state", "normal" ); |
|
135 } |
137 } |
136 |
138 |
137 void HbComboBoxPrivate::touchAreaClicked( ) |
139 void HbComboBoxPrivate::touchAreaClicked( ) |
138 { |
140 { |
139 Q_Q( HbComboBox ); |
141 Q_Q( HbComboBox ); |
140 if ( mModel && mModel->rowCount( ) ) { |
142 if ( mModel && mModel->rowCount( ) ) { |
141 addDropDownToScene( ); |
143 addDropDownToScene( ); |
142 mDropDown->setVisible( true ); |
144 mDropDown->setVisible( true ); |
|
145 q->setProperty( "state", "latched" ); |
143 if( !mDropDown->mList ) { |
146 if( !mDropDown->mList ) { |
144 mDropDown->createList( ); |
147 mDropDown->createList( ); |
145 mDropDown->mList->setModel( mModel ); |
148 mDropDown->mList->setModel( mModel ); |
146 q->connect( mDropDown->mList, SIGNAL( activated( QModelIndex ) ), q, |
149 q->connect( mDropDown->mList, SIGNAL( activated( QModelIndex ) ), q, |
147 SLOT( _q_textChanged( QModelIndex ) ) ); |
150 SLOT( _q_textChanged( QModelIndex ) ) ); |
201 } |
204 } |
202 } |
205 } |
203 |
206 |
204 void HbComboBoxPrivate::createDropDown( ) |
207 void HbComboBoxPrivate::createDropDown( ) |
205 { |
208 { |
|
209 Q_Q ( HbComboBox ); |
206 if( !mIsDorpdownCreated ) { |
210 if( !mIsDorpdownCreated ) { |
207 mDropDown = new HbComboDropDown( this ); |
211 mDropDown = new HbComboDropDown( this ); |
208 mIsDorpdownCreated = true; |
212 mIsDorpdownCreated = true; |
209 mDropDown->setVisible( false ); |
213 mDropDown->setVisible( false ); |
|
214 q->setProperty( "state", "normal" ); |
210 } |
215 } |
211 } |
216 } |
212 |
217 |
213 void HbComboBoxPrivate::calculateListItemHeight( ) |
218 void HbComboBoxPrivate::calculateListItemHeight( ) |
214 { |
219 { |
405 q->connect( mLineEdit, SIGNAL( textChanged ( QString ) ), q, |
410 q->connect( mLineEdit, SIGNAL( textChanged ( QString ) ), q, |
406 SLOT( _q_textChanged( QString ) ) ); |
411 SLOT( _q_textChanged( QString ) ) ); |
407 } |
412 } |
408 if ( mDropDown->isVisible( ) ) { |
413 if ( mDropDown->isVisible( ) ) { |
409 mDropDown->setVisible( false ); |
414 mDropDown->setVisible( false ); |
|
415 q->setProperty( "state", "normal" ); |
410 } |
416 } |
411 currentIndexChanged( mCurrentIndex ); |
417 currentIndexChanged( mCurrentIndex ); |
412 } |
418 } |
413 |
419 |
414 void HbComboBoxPrivate::_q_textCompleted( const QModelIndex & aIndex ) |
420 void HbComboBoxPrivate::_q_textCompleted( const QModelIndex & aIndex ) |