summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircmisc.cpp
authorzecke <zecke>2004-09-06 22:47:48 (UTC)
committer zecke <zecke>2004-09-06 22:47:48 (UTC)
commit8f18e8b46dfaaa7e03b9ed1f3faed12da5b30cd5 (patch) (side-by-side diff)
tree39158cd8abe423cf2df95b5038cdc7848de2e3dc /noncore/net/opieirc/ircmisc.cpp
parent8bf99aaa1b31e770b21b7bf50407a650a8f5d646 (diff)
downloadopie-8f18e8b46dfaaa7e03b9ed1f3faed12da5b30cd5.zip
opie-8f18e8b46dfaaa7e03b9ed1f3faed12da5b30cd5.tar.gz
opie-8f18e8b46dfaaa7e03b9ed1f3faed12da5b30cd5.tar.bz2
-Some keyboard handling
-ping notification merge of zautrixs work
Diffstat (limited to 'noncore/net/opieirc/ircmisc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircmisc.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/noncore/net/opieirc/ircmisc.cpp b/noncore/net/opieirc/ircmisc.cpp
index 6d93a34..df6f874 100644
--- a/noncore/net/opieirc/ircmisc.cpp
+++ b/noncore/net/opieirc/ircmisc.cpp
@@ -66,10 +66,17 @@ void IRCHistoryLineEdit::keyPressEvent(QKeyEvent *event) {
} else if (key == Key_Return) {
m_history.prepend(text());
m_index = -1;
- } else if (key == Key_Tab) {
- odebug << "got tab" << oendl;
+ } else if (key == Key_N && event->state() == Qt::ControlButton) {
+ emit nextTab();
+ return;
+ } else if ( ( key == Key_Y || key == Key_Z ) && event->state() == Qt::ControlButton) {
+ emit closeTab();
+ return;
+ } else if (key == Key_P && event->state() == Qt::ControlButton) {
+ emit prevTab();
return;
}
+
QLineEdit::keyPressEvent(event);
}
@@ -78,9 +85,15 @@ bool IRCHistoryLineEdit::eventFilter(QObject *object, QEvent *event) {
QKeyEvent *k = (QKeyEvent *) event;
/* Catch tab characters */
if (k->key() == Key_Tab) {
- odebug << "tab!" << oendl;
+ emit nextTab();
return TRUE;
}
}
return QLineEdit::eventFilter(object, event);
}
+
+
+void IRCHistoryLineEdit::setEditFocus() {
+ setActiveWindow();
+ setFocus();
+}