diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kaddressbook/printing/mikesstyle.cpp | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/printing/mikesstyle.cpp')
-rw-r--r-- | kaddressbook/printing/mikesstyle.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kaddressbook/printing/mikesstyle.cpp b/kaddressbook/printing/mikesstyle.cpp index 26312ee1c..d7fb26b8d 100644 --- a/kaddressbook/printing/mikesstyle.cpp +++ b/kaddressbook/printing/mikesstyle.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <tqpaintdevicemetrics.h> @@ -43,8 +43,8 @@ using namespace KABPrinting; const int mFieldSpacingHint = 2; -MikesStyle::MikesStyle( PrintingWizard *parent, const char *name ) - : PrintStyle( parent, name ) +MikesStyle::MikesStyle( PrintingWizard *tqparent, const char *name ) + : PrintStyle( tqparent, name ) { setPreview( "mike-style.png" ); } @@ -68,7 +68,7 @@ void MikesStyle::print( const KABC::Addressee::List &contacts, PrintProgress *pr mBoldFont = p.font(); mBoldFont.setBold( true ); TQFontMetrics fm( mFont ); - TQPaintDeviceMetrics metrics( p.device() ); + TQPaintDeviceMetrics metrics( p.tqdevice() ); int height = 0; KABC::Addressee::List::ConstIterator it; @@ -141,14 +141,14 @@ void MikesStyle::doPaint( TQPainter &painter, const KABC::Addressee &addr, { TQFontMetrics fm( font ); TQFontMetrics bfm( bFont ); - TQPaintDeviceMetrics metrics( painter.device() ); + TQPaintDeviceMetrics metrics( painter.tqdevice() ); int margin = 10; int width = metrics.width() - 10; int xPos = 5; int yPos = 0; - TQBrush brush( Qt::lightGray ); + TQBrush brush( TQt::lightGray ); - painter.setPen( Qt::black ); + painter.setPen( TQt::black ); painter.drawRect( xPos, yPos, width, maxHeight ); // The header @@ -207,7 +207,7 @@ void MikesStyle::paintTagLine( TQPainter &p, const TQFont &font ) TQString text = i18n( "Printed on %1 by KAddressBook (http://www.kde.org)" ) .arg( KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime() ) ); - p.setPen( Qt::black ); + p.setPen( TQt::black ); p.drawText( 0, fm.height(), text ); } @@ -235,7 +235,7 @@ int MikesStyle::calcHeight( const KABC::Addressee &addr, for ( int i = numFields / 2; i < numFields; i++ ) halfHeight += fm.height() * (fieldList[ i ]->value( addr ).tqcontains( '\n' ) + 1); - height = QMAX( height, halfHeight ); + height = TQMAX( height, halfHeight ); // Add the title and the spacing height += bfm.height() + ((numFields / 2 + 3) * mFieldSpacingHint); @@ -244,8 +244,8 @@ int MikesStyle::calcHeight( const KABC::Addressee &addr, } -MikesStyleFactory::MikesStyleFactory( PrintingWizard *parent, const char *name ) - : PrintStyleFactory( parent, name ) +MikesStyleFactory::MikesStyleFactory( PrintingWizard *tqparent, const char *name ) + : PrintStyleFactory( tqparent, name ) { } |