[telepathy] [Bug 318591] Implement "search when typing"
4k1r4.rulez at gmail.com
4k1r4.rulez at gmail.com
Tue Nov 19 09:35:40 GMT 2013
https://bugs.kde.org/show_bug.cgi?id=318591
4k1r4.rulez at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |4k1r4.rulez at gmail.com
--- Comment #7 from 4k1r4.rulez at gmail.com ---
It is really great idea, ctrl+f or hittin a small icon is just one more thing
to do. I'm usually start typing the name and after a few keystrokes i realize
nothing happens. More native (at least for me) is to start searching as soon as
I type, it could be implemented like this:
void TextUiClass::keyPressEvent(QKeyEvent* event)
{
if(ui->rosterView.hasFocus() == 0) // roster page
{
if(event->matches(QKeySequence::Find) || # the ctrl+f key stays the
same
(event->key() <= Qt::Key_9 && event->key() >= Qt::Key_1) ||
(event->key() <= Qt::Key_Z && event->key() >= Qt::Key_At) ||
(event->key() == Qt::Key_Backspace))
{
ui->searchBarEdit->show();
ui->searchBarEdit->setFocus();
ui->searchBarEdit->event(event);
}
else if(event->key() == Qt::Key_Escape)
{
ui->searchBarEdit->clear();
ui->searchBarEdit->hide();
ui->rosterView_->setFocus();
}
else if(event->key() == Qt::Key_Up ||
event->key() == Qt::Key_Down ||
event->key() == Qt::Key_PageUp ||
event->key() == Qt::Key_PageDown)
{
ui->rosterView_->setFocus();
}
if(event->key() == Qt::Key_Escape)
{
event->ignore();
return;
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kde-telepathy-bugs
mailing list