summaryrefslogtreecommitdiffstats
path: root/src/knowitedit.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 19:20:52 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 19:20:52 +0000
commite86f8310a920cbf1ecfac955fbad05916e954693 (patch)
treeddc018560d03c6aa794d9f399d006e5e3aa597f0 /src/knowitedit.cpp
parent1829a84466f690d4a6a10ddab91cea0f45ec9d77 (diff)
downloadknowit-e86f8310a920cbf1ecfac955fbad05916e954693.tar.gz
knowit-e86f8310a920cbf1ecfac955fbad05916e954693.zip
TQt4 port knowit
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knowit@1238876 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/knowitedit.cpp')
-rw-r--r--src/knowitedit.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/knowitedit.cpp b/src/knowitedit.cpp
index 298d63c..7f30eb4 100644
--- a/src/knowitedit.cpp
+++ b/src/knowitedit.cpp
@@ -18,42 +18,42 @@
#include "knowitedit.h"
#include <kurldrag.h>
-KnowitEdit::KnowitEdit(const QString& text, const QString& context, QWidget* parent,
- const char* name) : KTextEdit(text, context, parent, name), swapEOL(true)
+KnowitEdit::KnowitEdit(const TQString& text, const TQString& context, TQWidget* tqparent,
+ const char* name) : KTextEdit(text, context, tqparent, name), swapEOL(true)
{
setAcceptDrops(true);
}
-KnowitEdit::KnowitEdit(QWidget* parent, const char* name) : KTextEdit(parent, name),
+KnowitEdit::KnowitEdit(TQWidget* tqparent, const char* name) : KTextEdit(tqparent, name),
swapEOL(true)
{
}
-void KnowitEdit::keyPressEvent(QKeyEvent* e)
+void KnowitEdit::keyPressEvent(TQKeyEvent* e)
{
if (swapEOL &&
- (e->key() == Qt::Key_Enter || e->key() == Qt::Key_Return) &&
- (e->state() | (Qt::NoButton | Qt::ControlButton | Qt::Keypad) ==
- (Qt::NoButton | Qt::ControlButton | Qt::Keypad))) {
- QKeyEvent* e1 = new QKeyEvent(QKeyEvent::KeyPress, e->key(),
- e->ascii(), e->state() ^ Qt::ControlButton, e->text(), e->isAutoRepeat(),
+ (e->key() == TQt::Key_Enter || e->key() == TQt::Key_Return) &&
+ (e->state() | (Qt::NoButton | TQt::ControlButton | TQt::Keypad) ==
+ (Qt::NoButton | TQt::ControlButton | TQt::Keypad))) {
+ TQKeyEvent* e1 = new TQKeyEvent(TQKeyEvent::KeyPress, e->key(),
+ e->ascii(), e->state() ^ TQt::ControlButton, e->text(), e->isAutoRepeat(),
e->count());
e->ignore();
- QTextEdit::keyPressEvent(e1);
+ TQTextEdit::keyPressEvent(e1);
}
- else QTextEdit::keyPressEvent(e);
+ else TQTextEdit::keyPressEvent(e);
}
-void KnowitEdit::contentsDragEnterEvent(QDragEnterEvent* event)
+void KnowitEdit::contentsDragEnterEvent(TQDragEnterEvent* event)
{
if (KURLDrag::canDecode(event))
event->accept(true);
- else QTextEdit::contentsDragEnterEvent(event);
+ else TQTextEdit::contentsDragEnterEvent(event);
}
-void KnowitEdit::contentsDropEvent(QDropEvent* event)
+void KnowitEdit::contentsDropEvent(TQDropEvent* event)
{
if (KURLDrag::canDecode(event)) {
KURL::List L;
@@ -61,6 +61,6 @@ void KnowitEdit::contentsDropEvent(QDropEvent* event)
for (uint i=0; i<L.count(); i++)
emit textDropped(L[i].url(), L.count() > 1);
}
- else QTextEdit::contentsDropEvent(event);
+ else TQTextEdit::contentsDropEvent(event);
}