summaryrefslogtreecommitdiffstats
path: root/src/drawparts/dptext.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
commit87a016680e3677da3993f333561e79eb0cead7d5 (patch)
treecbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/drawparts/dptext.cpp
parent6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff)
downloadktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz
ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/drawparts/dptext.cpp')
-rw-r--r--src/drawparts/dptext.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/drawparts/dptext.cpp b/src/drawparts/dptext.cpp
index ebb239a..e2d1060 100644
--- a/src/drawparts/dptext.cpp
+++ b/src/drawparts/dptext.cpp
@@ -15,7 +15,7 @@
#include <kiconloader.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
Item* DPText::construct( ItemDocument *itemDocument, bool newItem, const char *id )
{
@@ -24,7 +24,7 @@ Item* DPText::construct( ItemDocument *itemDocument, bool newItem, const char *i
LibraryItem* DPText::libraryItem()
{
- QStringList idList;
+ TQStringList idList;
idList << "dp/text" << "dp/canvas_text" << "canvas_text";
return new LibraryItem(
@@ -52,17 +52,17 @@ DPText::DPText( ItemDocument *itemDocument, bool newItem, const char *id )
property("background")->setAdvanced(true);
createProperty( "background-color", Variant::Type::Color );
- property("background-color")->setValue(Qt::white);
+ property("background-color")->setValue(TQt::white);
property("background-color")->setCaption( i18n("Background Color") );
property("background-color")->setAdvanced(true);
createProperty( "frame-color", Variant::Type::Color );
- property("frame-color")->setValue(Qt::black);
+ property("frame-color")->setValue(TQt::black);
property("frame-color")->setCaption( i18n("Frame Color") );
property("frame-color")->setAdvanced(true);
createProperty( "text-color", Variant::Type::Color );
- property("text-color")->setValue(Qt::black);
+ property("text-color")->setValue(TQt::black);
property("text-color")->setCaption( i18n("Text Color") );
}
@@ -93,19 +93,19 @@ void DPText::dataChanged()
void DPText::postResize()
{
- setItemPoints( QPointArray(m_sizeRect), false );
+ setItemPoints( TQPointArray(m_sizeRect), false );
}
-QSize DPText::minimumSize() const
+TQSize DPText::tqminimumSize() const
{
- return QSize( 48, 24 );
+ return TQSize( 48, 24 );
}
-void DPText::drawShape( QPainter &p )
+void DPText::drawShape( TQPainter &p )
{
- QRect bound = m_sizeRect;
+ TQRect bound = m_sizeRect;
bound.setWidth( bound.width()-2 );
bound.setHeight( bound.height()-2 );
bound.moveBy( int(x()+1), int(y()+1) );
@@ -113,7 +113,7 @@ void DPText::drawShape( QPainter &p )
if (b_displayBackground)
{
p.save();
- p.setPen( QPen( m_frameColor, 1, Qt::DotLine) );
+ p.setPen( TQPen( m_frameColor, 1, TQt::DotLine) );
p.setBrush(m_backgroundColor);
p.drawRect(bound);
p.restore();
@@ -128,6 +128,6 @@ void DPText::drawShape( QPainter &p )
p.setPen(m_textColor);
p.setFont( font() );
- p.drawText( bound, (Qt::WordBreak | Qt::AlignHCenter | Qt::AlignVCenter), m_caption );
+ p.drawText( bound, (TQt::WordBreak | TQt::AlignHCenter | TQt::AlignVCenter), m_caption );
}