65 |
65 |
66 // ----------------------------------------------------------------------------- |
66 // ----------------------------------------------------------------------------- |
67 // LogsMatchesView::activated |
67 // LogsMatchesView::activated |
68 // ----------------------------------------------------------------------------- |
68 // ----------------------------------------------------------------------------- |
69 // |
69 // |
70 void LogsMatchesView::activated(bool showDialer, QVariant args) |
70 void LogsMatchesView::activated(bool showDialer, QVariant args, const QString& dialpadText) |
71 { |
71 {LOGS_QDEBUG( "logs [UI] -> LogsMatchesView::activated()" ); |
72 LogsBaseView::activated(showDialer, args); |
72 mShowDialpad = showDialer; |
|
73 LogsBaseView::activated(showDialer, args, dialpadText); |
73 |
74 |
74 LogsMatchesModel* model = qVariantValue<LogsMatchesModel*>(args); |
75 LogsMatchesModel* model = qVariantValue<LogsMatchesModel*>(args); |
75 updateModel(model); |
76 updateModel(model); |
76 dialpadEditorTextChanged(); |
77 dialpadEditorTextChanged(); |
77 |
78 |
78 activateEmptyListIndicator(mModel); |
79 activateEmptyListIndicator(mModel); |
79 |
80 |
80 scrollToTopItem(mListView); |
81 scrollToTopItem(mListView); |
81 |
82 |
82 LogsBaseView::activationCompleted(); |
83 LogsBaseView::activationCompleted(); |
|
84 LOGS_QDEBUG( "logs [UI] <- LogsMatchesView::activated()" ); |
83 } |
85 } |
84 |
86 |
85 // ----------------------------------------------------------------------------- |
87 // ----------------------------------------------------------------------------- |
86 // LogsMatchesView::deactivated |
88 // LogsMatchesView::deactivated |
87 // ----------------------------------------------------------------------------- |
89 // ----------------------------------------------------------------------------- |
193 // ----------------------------------------------------------------------------- |
195 // ----------------------------------------------------------------------------- |
194 // |
196 // |
195 void LogsMatchesView::handleBackSoftkey() |
197 void LogsMatchesView::handleBackSoftkey() |
196 { |
198 { |
197 LOGS_QDEBUG( "logs [UI] -> LogsMatchesView::::handleBackSoftkey()" ); |
199 LOGS_QDEBUG( "logs [UI] -> LogsMatchesView::::handleBackSoftkey()" ); |
198 mDialpad->editor().blockSignals(true); |
200 mShowDialpad = false; |
199 mDialpad->editor().setText(QString()); |
201 mDialpad->editor().setText(QString()); |
200 mDialpad->editor().blockSignals(false); |
|
201 |
|
202 if (mDialpad->isOpen()){ |
|
203 LOGS_QDEBUG( "logs [UI] -> LogsMatchesView::::handleBackSoftkey() closeDialpad" ); |
|
204 // Block aboutToClose signal to interfere with layout loading |
|
205 // at backstepping phase |
|
206 mDialpad->blockSignals(true); |
|
207 mDialpad->closeDialpad(); |
|
208 mDialpad->blockSignals(false); |
|
209 } |
|
210 |
|
211 LogsBaseView::handleBackSoftkey(); |
|
212 |
|
213 LOGS_QDEBUG( "logs [UI] <- LogsMatchesView::::handleBackSoftkey()" ); |
202 LOGS_QDEBUG( "logs [UI] <- LogsMatchesView::::handleBackSoftkey()" ); |
214 } |
203 } |
215 |
204 |
216 // ----------------------------------------------------------------------------- |
205 // ----------------------------------------------------------------------------- |
217 // LogsMatchesView::dialpadEditorTextChanged |
206 // LogsMatchesView::dialpadEditorTextChanged |
221 { |
210 { |
222 LOGS_QDEBUG( "logs [UI] -> LogsMatchesView::::dialpadEditorTextChanged()" ); |
211 LOGS_QDEBUG( "logs [UI] -> LogsMatchesView::::dialpadEditorTextChanged()" ); |
223 updateCallButton(); |
212 updateCallButton(); |
224 updateMenu(); |
213 updateMenu(); |
225 |
214 |
226 QString pattern = mDialpad->editor().text(); |
215 QString pattern = currDialpadText(); |
227 if ( pattern.isEmpty() ){ |
216 if ( pattern.isEmpty() ){ |
228 // Treat empty input field same way as back press |
217 // Treat empty input field same way as back press |
229 LogsBaseView::handleBackSoftkey(); |
218 LogsBaseView::handleBackSoftkey(); |
230 } else if ( mModel ) { |
219 } else if ( mModel ) { |
231 mModel->logsMatches( pattern ); |
220 mModel->logsMatches( pattern ); |