summaryrefslogtreecommitdiffstats
path: root/kdeprint/marginpreview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kdeprint/marginpreview.cpp
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeprint/marginpreview.cpp')
-rw-r--r--kdeprint/marginpreview.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/kdeprint/marginpreview.cpp b/kdeprint/marginpreview.cpp
index 2190b4958..b41a14388 100644
--- a/kdeprint/marginpreview.cpp
+++ b/kdeprint/marginpreview.cpp
@@ -21,7 +21,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kcursor.h>
#define A4_WIDTH 595
@@ -34,7 +34,7 @@
#define SCALE(d,z) ((int)(float(d)*z+0.5))
#define UNSCALE(d,z) ((int)(float(d)/z+0.5))
-static void draw3DPage(QPainter *p, QRect r)
+static void draw3DPage(TQPainter *p, TQRect r)
{
// draw white page
p->fillRect(r,Qt::white);
@@ -52,8 +52,8 @@ static void draw3DPage(QPainter *p, QRect r)
p->lineTo(r.right()-1,r.top()+1);
}
-MarginPreview::MarginPreview(QWidget *parent, const char *name)
- : QWidget(parent,name)
+MarginPreview::MarginPreview(TQWidget *parent, const char *name)
+ : TQWidget(parent,name)
{
width_ = A4_WIDTH;
height_ = A4_HEIGHT;
@@ -102,7 +102,7 @@ void MarginPreview::setSymetric(bool on)
symetric_ = on;
}
-void MarginPreview::resizeEvent(QResizeEvent *)
+void MarginPreview::resizeEvent(TQResizeEvent *)
{
if (width_/height_ > float(width())/height())
{
@@ -124,11 +124,11 @@ void MarginPreview::resizeEvent(QResizeEvent *)
}
}
-void MarginPreview::paintEvent(QPaintEvent *)
+void MarginPreview::paintEvent(TQPaintEvent *)
{
QPainter p(this);
- QRect pagebox(QPoint(box_.left()-1,box_.top()-1),QPoint(box_.right()+2,box_.bottom()+2));
+ QRect pagebox(TQPoint(box_.left()-1,box_.top()-1),TQPoint(box_.right()+2,box_.bottom()+2));
if (nopreview_)
{
@@ -154,7 +154,7 @@ void MarginPreview::paintEvent(QPaintEvent *)
p.drawLine(box_.left(),m,box_.right(),m);
// fill useful area
- p.fillRect(margbox_,QColor(220,220,220));
+ p.fillRect(margbox_,TQColor(220,220,220));
}
}
@@ -169,7 +169,7 @@ void MarginPreview::setNoPreview(bool on)
// 2: bottom
// 3: left
// 4: right
-int MarginPreview::locateMouse(const QPoint& p)
+int MarginPreview::locateMouse(const TQPoint& p)
{
int tol = 2;
if (p.x() <= margbox_.left()+tol && p.x() >= margbox_.left()-tol)
@@ -184,7 +184,7 @@ int MarginPreview::locateMouse(const QPoint& p)
return 0;
}
-void MarginPreview::mouseMoveEvent(QMouseEvent *e)
+void MarginPreview::mouseMoveEvent(TQMouseEvent *e)
{
if (nopreview_ || state_ == Fixed)
return;
@@ -238,7 +238,7 @@ void MarginPreview::mouseMoveEvent(QMouseEvent *e)
}
}
-void MarginPreview::drawTempLine(QPainter *p)
+void MarginPreview::drawTempLine(TQPainter *p)
{
if (state_ >= LMoving)
{
@@ -260,7 +260,7 @@ void MarginPreview::drawTempLine(QPainter *p)
}
}
-void MarginPreview::mousePressEvent(QMouseEvent *e)
+void MarginPreview::mousePressEvent(TQMouseEvent *e)
{
if (e->button() != Qt::LeftButton || state_ != None)
return;
@@ -271,7 +271,7 @@ void MarginPreview::mousePressEvent(QMouseEvent *e)
}
}
-void MarginPreview::mouseReleaseEvent(QMouseEvent *e)
+void MarginPreview::mouseReleaseEvent(TQMouseEvent *e)
{
if (state_ > None)
{