author | wazlaf <wazlaf> | 2002-10-15 10:11:31 (UTC) |
---|---|---|
committer | wazlaf <wazlaf> | 2002-10-15 10:11:31 (UTC) |
commit | e09b7ab685d29eba947c3bb021192408acae70be (patch) (unidiff) | |
tree | 5adf52c8d56819aab0daed8e7da189110276e90a /noncore/net/opieirc/ircmisc.cpp | |
parent | 31a73cafb40fffe2bbc12bb6fd0df6dc254d6646 (diff) | |
download | opie-e09b7ab685d29eba947c3bb021192408acae70be.zip opie-e09b7ab685d29eba947c3bb021192408acae70be.tar.gz opie-e09b7ab685d29eba947c3bb021192408acae70be.tar.bz2 |
some qwhatsthis introduced, the IRCHistoryLineEdit now catches tabs
Diffstat (limited to 'noncore/net/opieirc/ircmisc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircmisc.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircmisc.cpp b/noncore/net/opieirc/ircmisc.cpp index 2e7f316..c8e6190 100644 --- a/noncore/net/opieirc/ircmisc.cpp +++ b/noncore/net/opieirc/ircmisc.cpp | |||
@@ -71,6 +71,7 @@ void IRCTabWidget::setTabColor(int index, QColor color) { | |||
71 | 71 | ||
72 | IRCHistoryLineEdit::IRCHistoryLineEdit(QWidget *parent, const char *name) : QLineEdit(parent, name) { | 72 | IRCHistoryLineEdit::IRCHistoryLineEdit(QWidget *parent, const char *name) : QLineEdit(parent, name) { |
73 | m_index = -1; | 73 | m_index = -1; |
74 | installEventFilter(this); | ||
74 | } | 75 | } |
75 | 76 | ||
76 | void IRCHistoryLineEdit::keyPressEvent(QKeyEvent *event) { | 77 | void IRCHistoryLineEdit::keyPressEvent(QKeyEvent *event) { |
@@ -92,6 +93,21 @@ void IRCHistoryLineEdit::keyPressEvent(QKeyEvent *event) { | |||
92 | } else if (key == Key_Return) { | 93 | } else if (key == Key_Return) { |
93 | m_history.prepend(text()); | 94 | m_history.prepend(text()); |
94 | m_index = -1; | 95 | m_index = -1; |
96 | } else if (key == Key_Tab) { | ||
97 | printf("got tab\n"); | ||
98 | return; | ||
95 | } | 99 | } |
96 | QLineEdit::keyPressEvent(event); | 100 | QLineEdit::keyPressEvent(event); |
97 | } | 101 | } |
102 | |||
103 | bool IRCHistoryLineEdit::eventFilter(QObject *object, QEvent *event) { | ||
104 | if (event->type() == QEvent::KeyPress) { | ||
105 | QKeyEvent *k = (QKeyEvent *) event; | ||
106 | /* Catch tab characters */ | ||
107 | if (k->key() == Key_Tab) { | ||
108 | qDebug("tab!"); | ||
109 | return TRUE; | ||
110 | } | ||
111 | } | ||
112 | return QLineEdit::eventFilter(object, event); | ||
113 | } | ||