summaryrefslogtreecommitdiffabout
path: root/microkde/ktextedit.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/ktextedit.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-p1.zip
kdepimpi-p1.tar.gz
kdepimpi-p1.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'microkde/ktextedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/ktextedit.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/microkde/ktextedit.cpp b/microkde/ktextedit.cpp
index 4dd6875..d74706b 100644
--- a/microkde/ktextedit.cpp
+++ b/microkde/ktextedit.cpp
@@ -1,53 +1,55 @@
#include <ktextedit.h>
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
+//Added by qt3to4:
+#include <QMouseEvent>
#endif
-KTextEdit::KTextEdit ( QWidget *parent ) : QMultiLineEdit( parent )
+KTextEdit::KTextEdit ( QWidget *parent ) : Q3MultiLineEdit( parent )
{
mAllowPopupMenu = false;
mMouseDown = false;
mIgnoreMark = false;
#ifndef DESKTOP_VERSION
QPEApplication::setStylusOperation( this, QPEApplication::RightOnHold );
#endif
}
void KTextEdit::mousePressEvent(QMouseEvent *e)
{
- if ( e->button() == LeftButton ) {
+ if ( e->button() == Qt::LeftButton ) {
mAllowPopupMenu = true;
mYMousePos = mapToGlobal( (e->pos())).y();
mXMousePos = mapToGlobal( (e->pos())).x();
}
- if ( e->button() == RightButton && !mAllowPopupMenu )
+ if ( e->button() == Qt::RightButton && !mAllowPopupMenu )
return;
- if ( e->button() == LeftButton ) {
+ if ( e->button() == Qt::LeftButton ) {
if ( hasMarkedText () )
mIgnoreMark = !mIgnoreMark;
if ( mIgnoreMark && hasMarkedText () ) {
mMouseDown = false;
return ;
}
}
- QMultiLineEdit::mousePressEvent( e );
+ Q3MultiLineEdit::mousePressEvent( e );
}
void KTextEdit::mouseReleaseEvent(QMouseEvent *e)
{
- QMultiLineEdit::mouseReleaseEvent(e);
+ Q3MultiLineEdit::mouseReleaseEvent(e);
}
void KTextEdit::mouseMoveEvent(QMouseEvent *e)
{
int diff = mYMousePos - mapToGlobal( (e->pos())).y();
if ( diff < 0 ) diff = -diff;
int diff2 = mXMousePos - mapToGlobal( (e->pos())).x();
if ( diff2 < 0 ) diff2 = -diff2;
if ( diff+ diff2 > 20 )
mAllowPopupMenu = false;
- QMultiLineEdit::mouseMoveEvent(e);
+ Q3MultiLineEdit::mouseMoveEvent(e);
}