summaryrefslogtreecommitdiffstats
path: root/kugar/kudesigner_lib/label.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/kudesigner_lib/label.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/kudesigner_lib/label.cpp')
-rw-r--r--kugar/kudesigner_lib/label.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/kugar/kudesigner_lib/label.cpp b/kugar/kudesigner_lib/label.cpp
index d77e484e..27226774 100644
--- a/kugar/kudesigner_lib/label.cpp
+++ b/kugar/kudesigner_lib/label.cpp
@@ -21,8 +21,8 @@
#include <klocale.h>
#include <klineeditdlg.h>
-#include <qmap.h>
-#include <qpainter.h>
+#include <tqmap.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <klocale.h>
@@ -37,7 +37,7 @@ namespace Kudesigner
Label::Label( int x, int y, int width, int height, Canvas *canvas )
: ReportItem( x, y, width, height, canvas )
{
- QMap<QString, QString> m;
+ TQMap<TQString, TQString> m;
props.addProperty( new Property( "Text", i18n( "Text" ), i18n( "Text to Display" ), i18n( "Text" ), KoProperty::String ) );
@@ -50,28 +50,28 @@ Label::Label( int x, int y, int width, int height, Canvas *canvas )
props.addProperty( new Property( "Height", height, i18n( "Height" ), i18n( "Height" ), KoProperty::Integer ), "Geometry" );
- props.addProperty( new Property( "BackgroundColor", QColor( 255, 255, 255 ), i18n( "Background Color" ), i18n( "Background Color" ), KoProperty::Color ) );
+ props.addProperty( new Property( "BackgroundColor", TQColor( 255, 255, 255 ), i18n( "Background Color" ), i18n( "Background Color" ), KoProperty::Color ) );
- props.addProperty( new Property( "ForegroundColor", QColor( 0, 0, 0 ), i18n( "Foreground Color" ), i18n( "Foreground Color" ), KoProperty::Color ) );
+ props.addProperty( new Property( "ForegroundColor", TQColor( 0, 0, 0 ), i18n( "Foreground Color" ), i18n( "Foreground Color" ), KoProperty::Color ) );
props.setGroupDescription( "BorderStyle", i18n( "Border Style" ) );
- props.addProperty( new Property( "BorderColor", QColor( 0, 0, 0 ), i18n( "Color" ), i18n( "Border Color" ), KoProperty::Color ), "BorderStyle" );
+ props.addProperty( new Property( "BorderColor", TQColor( 0, 0, 0 ), i18n( "Color" ), i18n( "Border Color" ), KoProperty::Color ), "BorderStyle" );
props.addProperty( new Property( "BorderWidth", 1, i18n( "Width" ), i18n( "Border Width" ), KoProperty::Integer ), "BorderStyle" );
props.addProperty( new Property( "BorderStyle", 1, i18n( "Line" ), i18n( "Border Style" ), KoProperty::LineStyle ), "BorderStyle" );
props.setGroupDescription( "DrawBorder", i18n( "Border" ) );
- props.addProperty( new Property( "DrawTop", QVariant( false, 3 ), i18n( "Top" ), i18n( "Draw Top Border" ), KoProperty::Boolean ), "DrawBorder" );
- props.addProperty( new Property( "DrawBottom", QVariant( false, 3 ), i18n( "Bottom" ), i18n( "Draw Bottom Border" ), KoProperty::Boolean ), "DrawBorder" );
- props.addProperty( new Property( "DrawLeft", QVariant( false, 3 ), i18n( "Left" ), i18n( "Draw Left Border" ), KoProperty::Boolean ), "DrawBorder" );
- props.addProperty( new Property( "DrawRight", QVariant( false, 3 ), i18n( "Right" ), i18n( "Draw Right Border" ), KoProperty::Boolean ), "DrawBorder" );
+ props.addProperty( new Property( "DrawTop", TQVariant( false, 3 ), i18n( "Top" ), i18n( "Draw Top Border" ), KoProperty::Boolean ), "DrawBorder" );
+ props.addProperty( new Property( "DrawBottom", TQVariant( false, 3 ), i18n( "Bottom" ), i18n( "Draw Bottom Border" ), KoProperty::Boolean ), "DrawBorder" );
+ props.addProperty( new Property( "DrawLeft", TQVariant( false, 3 ), i18n( "Left" ), i18n( "Draw Left Border" ), KoProperty::Boolean ), "DrawBorder" );
+ props.addProperty( new Property( "DrawRight", TQVariant( false, 3 ), i18n( "Right" ), i18n( "Draw Right Border" ), KoProperty::Boolean ), "DrawBorder" );
props.setGroupDescription( "Font", i18n( "Font" ) );
- props.addProperty( new Property( "FontFamily", QApplication::font(), i18n( "Family" ), i18n( "Font Family" ), KoProperty::Font ), "Font" );
+ props.addProperty( new Property( "FontFamily", TQFont(TQApplication::font()), i18n( "Family" ), i18n( "Font Family" ), KoProperty::Font ), "Font" );
- props.addProperty( new Property( "FontSize", QApplication::font().pointSize(), i18n( "Size" ), i18n( "Font Size" ), KoProperty::Integer ), "Font" );
+ props.addProperty( new Property( "FontSize", TQApplication::font().pointSize(), i18n( "Size" ), i18n( "Font Size" ), KoProperty::Integer ), "Font" );
m[ i18n( "Light" ) ] = "25";
m[ i18n( "Normal" ) ] = "50";
@@ -90,7 +90,7 @@ Label::Label( int x, int y, int width, int height, Canvas *canvas )
m[ i18n( "Center" ) ] = "1";
m[ i18n( "Right" ) ] = "2";
props.addProperty( new Property( "HAlignment", m.values(), m.keys(),
- QString( "" ).isRightToLeft() ? "2" : "0", i18n( "HAlignment" ), i18n( "HAlignment" ) ) );
+ TQString( "" ).isRightToLeft() ? "2" : "0", i18n( "HAlignment" ), i18n( "HAlignment" ) ) );
m.clear();
m[ i18n( "Top" ) ] = "0";
@@ -153,20 +153,20 @@ int Label::getTextWrap()
}
}
-QFont Label::getFont()
+TQFont Label::getFont()
{
- return QFont( props[ "FontFamily" ].value().toString(),
+ return TQFont( props[ "FontFamily" ].value().toString(),
props[ "FontSize" ].value().toInt(),
props[ "FontWeight" ].value().toInt(),
props[ "FontItalic" ].value().toInt() );
}
-QPen Label::getPenForText()
+TQPen Label::getPenForText()
{
- return QPen( QColor( props[ "ForegroundColor" ].value().toColor() ) );
+ return TQPen( TQColor( props[ "ForegroundColor" ].value().toColor() ) );
}
-QPen Label::getPenForShape()
+TQPen Label::getPenForShape()
{
PenStyle style = SolidLine;
switch ( props[ "BorderStyle" ].value().toInt() )
@@ -190,16 +190,16 @@ QPen Label::getPenForShape()
style = DashDotDotLine;
break;
}
- return QPen( QColor( props[ "BorderColor" ].value().toColor() ),
+ return TQPen( TQColor( props[ "BorderColor" ].value().toColor() ),
props[ "BorderWidth" ].value().toInt(), style );
}
-QBrush Label::getBrush()
+TQBrush Label::getBrush()
{
- return QBrush( QColor( props[ "BackgroundColor" ].value().toColor() ) );
+ return TQBrush( TQColor( props[ "BackgroundColor" ].value().toColor() ) );
}
-void Label::draw( QPainter &painter )
+void Label::draw( TQPainter &painter )
{
//update dimensions
if ( !section() )
@@ -236,7 +236,7 @@ void Label::draw( QPainter &painter )
// CanvasReportItem::draw(painter);
}
-QString Label::getXml()
+TQString Label::getXml()
{
return "\t\t<Label" + ReportItem::getXml() + " />\n";
}
@@ -245,7 +245,7 @@ void Label::fastProperty()
{
bool accepted;
- QString sText = KLineEditDlg::getText( i18n( "Change Label" ),
+ TQString sText = KLineEditDlg::getText( i18n( "Change Label" ),
"Enter label name:", props[ "Text" ].value().toString(),
&accepted );