summaryrefslogtreecommitdiffstats
path: root/kaddressbook/printing/mikesstyle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/printing/mikesstyle.cpp')
-rw-r--r--kaddressbook/printing/mikesstyle.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/kaddressbook/printing/mikesstyle.cpp b/kaddressbook/printing/mikesstyle.cpp
index 1eae4281c..9ecc57f56 100644
--- a/kaddressbook/printing/mikesstyle.cpp
+++ b/kaddressbook/printing/mikesstyle.cpp
@@ -22,8 +22,8 @@
without including the source code for Qt in the source distribution.
*/
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
#include <kabc/addressee.h>
#include <kapplication.h>
@@ -55,9 +55,9 @@ MikesStyle::~MikesStyle()
void MikesStyle::print( const KABC::Addressee::List &contacts, PrintProgress *progress )
{
- QFont mFont;
- QFont mBoldFont;
- QPainter p;
+ TQFont mFont;
+ TQFont mBoldFont;
+ TQPainter p;
p.begin( wizard()->printer() );
int yPos = 0, count = 0;
@@ -67,8 +67,8 @@ void MikesStyle::print( const KABC::Addressee::List &contacts, PrintProgress *pr
mFont = p.font();
mBoldFont = p.font();
mBoldFont.setBold( true );
- QFontMetrics fm( mFont );
- QPaintDeviceMetrics metrics( p.device() );
+ TQFontMetrics fm( mFont );
+ TQPaintDeviceMetrics metrics( p.device() );
int height = 0;
KABC::Addressee::List::ConstIterator it;
@@ -114,14 +114,14 @@ void MikesStyle::print( const KABC::Addressee::List &contacts, PrintProgress *pr
p.end();
}
-QString MikesStyle::trimString( const QString &text, int width, QFontMetrics &fm )
+TQString MikesStyle::trimString( const TQString &text, int width, TQFontMetrics &fm )
{
if ( fm.width( text ) <= width )
return text;
- QString dots = "...";
+ TQString dots = "...";
int dotWidth = fm.width( dots );
- QString trimmed;
+ TQString trimmed;
int charNum = 0;
while ( fm.width( trimmed ) + dotWidth < width ) {
@@ -136,17 +136,17 @@ QString MikesStyle::trimString( const QString &text, int width, QFontMetrics &fm
return trimmed;
}
-void MikesStyle::doPaint( QPainter &painter, const KABC::Addressee &addr,
- int maxHeight, const QFont &font, const QFont &bFont )
+void MikesStyle::doPaint( TQPainter &painter, const KABC::Addressee &addr,
+ int maxHeight, const TQFont &font, const TQFont &bFont )
{
- QFontMetrics fm( font );
- QFontMetrics bfm( bFont );
- QPaintDeviceMetrics metrics( painter.device() );
+ TQFontMetrics fm( font );
+ TQFontMetrics bfm( bFont );
+ TQPaintDeviceMetrics metrics( painter.device() );
int margin = 10;
int width = metrics.width() - 10;
int xPos = 5;
int yPos = 0;
- QBrush brush( Qt::lightGray );
+ TQBrush brush( Qt::lightGray );
painter.setPen( Qt::black );
painter.drawRect( xPos, yPos, width, maxHeight );
@@ -166,8 +166,8 @@ void MikesStyle::doPaint( QPainter &painter, const KABC::Addressee &addr,
KABC::Field::List fields = wizard()->addressBook()->fields();
int numFields = fields.count();
- QString label;
- QString value;
+ TQString label;
+ TQString value;
for ( int i = 0; i < numFields / 2; i++ ) {
label = fields[ i ]->label();
@@ -200,22 +200,22 @@ void MikesStyle::doPaint( QPainter &painter, const KABC::Addressee &addr,
}
}
-void MikesStyle::paintTagLine( QPainter &p, const QFont &font )
+void MikesStyle::paintTagLine( TQPainter &p, const TQFont &font )
{
- QFontMetrics fm( font );
+ TQFontMetrics fm( font );
- QString text = i18n( "Printed on %1 by KAddressBook (http://www.kde.org)" )
- .arg( KGlobal::locale()->formatDateTime( QDateTime::currentDateTime() ) );
+ TQString text = i18n( "Printed on %1 by KAddressBook (http://www.kde.org)" )
+ .arg( KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ) );
p.setPen( Qt::black );
p.drawText( 0, fm.height(), text );
}
int MikesStyle::calcHeight( const KABC::Addressee &addr,
- const QFont &font, const QFont &bFont )
+ const TQFont &font, const TQFont &bFont )
{
- QFontMetrics fm( font );
- QFontMetrics bfm( bFont );
+ TQFontMetrics fm( font );
+ TQFontMetrics bfm( bFont );
int height = 0;
@@ -254,7 +254,7 @@ PrintStyle *MikesStyleFactory::create() const
return new MikesStyle( mParent, mName );
}
-QString MikesStyleFactory::description() const
+TQString MikesStyleFactory::description() const
{
return i18n( "Mike's Printing Style" );
}