summaryrefslogtreecommitdiffstats
path: root/kviewshell/sizePreview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /kviewshell/sizePreview.cpp
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kviewshell/sizePreview.cpp')
-rw-r--r--kviewshell/sizePreview.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/kviewshell/sizePreview.cpp b/kviewshell/sizePreview.cpp
index 37f7bb66..e3ba44df 100644
--- a/kviewshell/sizePreview.cpp
+++ b/kviewshell/sizePreview.cpp
@@ -18,8 +18,8 @@
#include "simplePageSize.h"
-SizePreview::SizePreview( TQWidget *parent, const char *name, WFlags)
- : TQWidget( parent, name, WStaticContents | WNoAutoErase )
+SizePreview::SizePreview( TQWidget *tqparent, const char *name, WFlags)
+ : TQWidget( tqparent, name, WStaticContents | WNoAutoErase )
{
// Set a sane default
_width = _height = 50.0;
@@ -74,15 +74,15 @@ void SizePreview::paintEvent( TQPaintEvent * )
pixmap.resize(width(), height());
TQPainter p(&pixmap);
- p.fillRect(rect(), colorGroup().background());
- p.setPen(Qt::black);
- p.setBrush(Qt::white);
+ p.fillRect(rect(), tqcolorGroup().background());
+ p.setPen(TQt::black);
+ p.setBrush(TQt::white);
p.drawRect(hOffset, vOffset, displayedWidth, displayedHeight);
// mark the textbox; we assume 25mm margin
int margin = (int)(25.0*displayedWidth/_width + 0.5);
TQRect textBox(hOffset+margin, vOffset+margin, displayedWidth-2*margin, displayedHeight-2*margin);
- p.setPen(Qt::lightGray);
+ p.setPen(TQt::lightGray);
p.drawRect(textBox);
// Draw some dummy "text", represented by black lines
@@ -96,7 +96,7 @@ void SizePreview::paintEvent( TQPaintEvent * )
KRandomSequence rnd(1); // to generate word widths
p.setClipRect(textBox);
- p.setPen(Qt::black);
+ p.setPen(TQt::black);
int count = 1; // Counts lines
for (int y = vOffset+margin+lineSpacing; y <= vOffset+displayedHeight-margin; y += lineSpacing) {
// We start each line with its own seed.