summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrPolygonPreview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kpresenter/KPrPolygonPreview.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpresenter/KPrPolygonPreview.cpp')
-rw-r--r--kpresenter/KPrPolygonPreview.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/kpresenter/KPrPolygonPreview.cpp b/kpresenter/KPrPolygonPreview.cpp
index 985c1eef..114420bc 100644
--- a/kpresenter/KPrPolygonPreview.cpp
+++ b/kpresenter/KPrPolygonPreview.cpp
@@ -23,12 +23,12 @@
#include "KPrPolygonPreview.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <math.h>
-KPrPolygonPreview::KPrPolygonPreview( QWidget* parent, const char* name)
- : QFrame( parent, name )
+KPrPolygonPreview::KPrPolygonPreview( TQWidget* tqparent, const char* name)
+ : TQFrame( tqparent, name )
{
setFrameStyle( WinPanel | Sunken );
setBackgroundColor( white );
@@ -37,19 +37,19 @@ KPrPolygonPreview::KPrPolygonPreview( QWidget* parent, const char* name)
}
-void KPrPolygonPreview::drawContents( QPainter *painter )
+void KPrPolygonPreview::drawContents( TQPainter *painter )
{
double angle = 2 * M_PI / nCorners;
- double diameter = static_cast<double>( QMAX( width(), height() ) - 10 );
+ double diameter = static_cast<double>( TQMAX( width(), height() ) - 10 );
double radius = diameter * 0.5;
- painter->setWindow( qRound( -radius ), qRound( -radius ), qRound( diameter ), qRound( diameter ) );
+ painter->setWindow( tqRound( -radius ), tqRound( -radius ), tqRound( diameter ), tqRound( diameter ) );
painter->setViewport( 5, 5, width() - 10, height() - 10 );
painter->setPen( pen );
painter->setBrush( brush );
- QPointArray points( isConcave ? nCorners * 2 : nCorners );
- points.setPoint( 0, 0, qRound( -radius ) );
+ TQPointArray points( isConcave ? nCorners * 2 : nCorners );
+ points.setPoint( 0, 0, tqRound( -radius ) );
if ( isConcave ) {
angle = angle / 2.0;
@@ -85,35 +85,35 @@ void KPrPolygonPreview::drawContents( QPainter *painter )
void KPrPolygonPreview::slotConvexConcave( bool convexConcave )
{
isConcave = convexConcave;
- repaint();
+ tqrepaint();
}
void KPrPolygonPreview::slotConvexPolygon()
{
isConcave = false;
- repaint();
+ tqrepaint();
}
void KPrPolygonPreview::slotConcavePolygon()
{
isConcave = true;
- repaint();
+ tqrepaint();
}
void KPrPolygonPreview::slotCornersValue( int value )
{
nCorners = value;
- repaint();
+ tqrepaint();
}
void KPrPolygonPreview::slotSharpnessValue( int value )
{
sharpness = value;
- repaint();
+ tqrepaint();
}