summaryrefslogtreecommitdiffstats
path: root/kugar/lib/mlabelobject.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 /kugar/lib/mlabelobject.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 'kugar/lib/mlabelobject.cpp')
-rw-r--r--kugar/lib/mlabelobject.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kugar/lib/mlabelobject.cpp b/kugar/lib/mlabelobject.cpp
index bc01c22d..6a0db974 100644
--- a/kugar/lib/mlabelobject.cpp
+++ b/kugar/lib/mlabelobject.cpp
@@ -9,7 +9,7 @@
***************************************************************************/
//#include <kglobalsettings.h>
-#include <qfont.h>
+#include <tqfont.h>
#include "mlabelobject.h"
@@ -23,13 +23,13 @@ MLabelObject::MLabelObject() : MReportObject(), xMargin( 0 ), yMargin( 0 )
text = "";
// Set the default font
- QFont defaultFont;
+ TQFont defaultFont;
fontFamily = defaultFont.family();
fontSize = 10;
fontWeight = MLabelObject::Normal;
fontItalic = false;
- // Set the default alignment
+ // Set the default tqalignment
hAlignment = MLabelObject::Left;
vAlignment = MLabelObject::Top;
wordWrap = false;
@@ -62,13 +62,13 @@ MLabelObject::~MLabelObject()
{}
/** Sets the label's text string */
-void MLabelObject::setText( const QString txt )
+void MLabelObject::setText( const TQString txt )
{
text = txt;
}
/** Sets the label's text font */
-void MLabelObject::setFont( const QString family, int size, int weight, bool italic )
+void MLabelObject::setFont( const TQString family, int size, int weight, bool italic )
{
fontFamily = family;
fontSize = size;
@@ -76,13 +76,13 @@ void MLabelObject::setFont( const QString family, int size, int weight, bool ita
fontItalic = italic;
}
-/** Sets the label's horizontal alignment */
+/** Sets the label's horizontal tqalignment */
void MLabelObject::setHorizontalAlignment( int a )
{
hAlignment = a;
}
-/** Sets the label's vertical alignment */
+/** Sets the label's vertical tqalignment */
void MLabelObject::setVerticalAlignment( int a )
{
vAlignment = a;
@@ -95,10 +95,10 @@ void MLabelObject::setWordWrap( bool state )
}
/** Draws the label using the specificed painter & x/y-offsets */
-void MLabelObject::draw( QPainter* p, int xoffset, int yoffset )
+void MLabelObject::draw( TQPainter* p, int xoffset, int yoffset )
{
- QFont font( fontFamily, fontSize, fontWeight, fontItalic );
- QPen textPen( foregroundColor, 0, QPen::NoPen );
+ TQFont font( fontFamily, fontSize, fontWeight, fontItalic );
+ TQPen textPen( foregroundColor, 0, TQPen::NoPen );
int tf;
@@ -111,39 +111,39 @@ void MLabelObject::draw( QPainter* p, int xoffset, int yoffset )
// Set the font
p->setFont( font );
- QFontMetrics fm = p->fontMetrics();
+ TQFontMetrics fm = p->fontMetrics();
- // Set the text alignment flags
+ // Set the text tqalignment flags
- // Horizontal
+ //Qt::Horizontal
switch ( hAlignment )
{
case MLabelObject::Left:
- tf = QPainter::AlignLeft;
+ tf = TQPainter::AlignLeft;
break;
case MLabelObject::Center:
- tf = QPainter::AlignHCenter;
+ tf = TQPainter::AlignHCenter;
break;
case MLabelObject::Right:
- tf = QPainter::AlignRight;
+ tf = TQPainter::AlignRight;
}
- // Vertical
+ //Qt::Vertical
switch ( vAlignment )
{
case MLabelObject::Top:
- tf = tf | QPainter::AlignTop;
+ tf = tf | TQPainter::AlignTop;
break;
case MLabelObject::Bottom:
- tf = tf | QPainter::AlignBottom;
+ tf = tf | TQPainter::AlignBottom;
break;
case MLabelObject::Middle:
- tf = tf | QPainter::AlignVCenter;
+ tf = tf | TQPainter::AlignVCenter;
}
// Word wrap
if ( wordWrap )
- tf = tf | QPainter::WordBreak;
+ tf = tf | TQPainter::WordBreak;
// Draw the text
p->setPen( textPen );
@@ -165,7 +165,7 @@ void MLabelObject::copy( const MLabelObject* mLabelObject )
fontWeight = mLabelObject->fontWeight;
fontItalic = mLabelObject->fontItalic;
- // Copy the label's alignment data
+ // Copy the label's tqalignment data
vAlignment = mLabelObject->vAlignment;
hAlignment = mLabelObject->hAlignment;
wordWrap = mLabelObject->wordWrap;