summaryrefslogtreecommitdiffstats
path: root/kaddressbook/printing/kabentrypainter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kaddressbook/printing/kabentrypainter.cpp')
-rw-r--r--kaddressbook/printing/kabentrypainter.cpp96
1 files changed, 48 insertions, 48 deletions
diff --git a/kaddressbook/printing/kabentrypainter.cpp b/kaddressbook/printing/kabentrypainter.cpp
index 6ae163de..c7432d5d 100644
--- a/kaddressbook/printing/kabentrypainter.cpp
+++ b/kaddressbook/printing/kabentrypainter.cpp
@@ -22,8 +22,8 @@
*/
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -48,42 +48,42 @@ KABEntryPainter::~KABEntryPainter()
mTalkRects.clear();
}
-void KABEntryPainter::setForegroundColor( const QColor &color )
+void KABEntryPainter::setForegroundColor( const TQColor &color )
{
mForegroundColor = color;
}
-void KABEntryPainter::setBackgroundColor( const QColor &color )
+void KABEntryPainter::setBackgroundColor( const TQColor &color )
{
mBackgroundColor = color;
}
-void KABEntryPainter::setHeaderColor( const QColor &color )
+void KABEntryPainter::setHeaderColor( const TQColor &color )
{
mHeaderColor = color;
}
-void KABEntryPainter::setHeaderFont( const QFont &font )
+void KABEntryPainter::setHeaderFont( const TQFont &font )
{
mHeaderFont = font;
}
-void KABEntryPainter::setHeadLineFont( const QFont &font )
+void KABEntryPainter::setHeadLineFont( const TQFont &font )
{
mHeadLineFont = font;
}
-void KABEntryPainter::setBodyFont( const QFont &font )
+void KABEntryPainter::setBodyFont( const TQFont &font )
{
mBodyFont = font;
}
-void KABEntryPainter::setFixedFont( const QFont &font )
+void KABEntryPainter::setFixedFont( const TQFont &font )
{
mFixedFont = font;
}
-void KABEntryPainter::setCommentFont( const QFont &font )
+void KABEntryPainter::setCommentFont( const TQFont &font )
{
mCommentFont = font;
}
@@ -113,27 +113,27 @@ void KABEntryPainter::setShowURLs( bool value )
mShowURLs = value;
}
-int KABEntryPainter::hitsEmail( const QPoint &p )
+int KABEntryPainter::hitsEmail( const TQPoint &p )
{
return hits( mEmailRects, p );
}
-int KABEntryPainter::hitsURL( const QPoint &p )
+int KABEntryPainter::hitsURL( const TQPoint &p )
{
return hits( mURLRects, p );
}
-int KABEntryPainter::hitsPhone( const QPoint &p )
+int KABEntryPainter::hitsPhone( const TQPoint &p )
{
return hits( mPhoneRects, p );
}
-int KABEntryPainter::hitsTalk( const QPoint &p )
+int KABEntryPainter::hitsTalk( const TQPoint &p )
{
return hits( mTalkRects, p );
}
-int KABEntryPainter::hits( const QRectList& list, const QPoint &p )
+int KABEntryPainter::hits( const QRectList& list, const TQPoint &p )
{
QRectList::const_iterator pos;
int count = 0;
@@ -149,8 +149,8 @@ int KABEntryPainter::hits( const QRectList& list, const QPoint &p )
}
bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
- const QRect &window, QPainter *painter,
- int top, bool fake, QRect *brect )
+ const TQRect &window, TQPainter *painter,
+ int top, bool fake, TQRect *brect )
{
// TODO: custom fields, custom (?) for Entry
const int Width = window.width();
@@ -158,23 +158,23 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
const int Ruler1 = Width/32;
const int Ruler2 = 2 * Ruler1;
const int Ruler3 = 3 * Ruler1;
- QString text, line1, line2, line3, line4;
- QRect rect;
+ TQString text, line1, line2, line3, line4;
+ TQRect rect;
// settings derived from the options:
- QFontMetrics fmHeader( mHeaderFont );
- QFontMetrics fmHeadLine( mHeadLineFont );
- QFontMetrics fmBody( mBodyFont );
- QFontMetrics fmFixed( mFixedFont );
- QFontMetrics fmComment( mCommentFont );
+ TQFontMetrics fmHeader( mHeaderFont );
+ TQFontMetrics fmHeadLine( mHeadLineFont );
+ TQFontMetrics fmBody( mBodyFont );
+ TQFontMetrics fmFixed( mFixedFont );
+ TQFontMetrics fmComment( mCommentFont );
int y = top;
KABC::Address address;
// this is used to prepare some fields for printing and decide about
// the layout later:
- QValueList<QStringList> parts;
- QValueList<QRectList*> contents;
+ TQValueList<TQStringList> parts;
+ TQValueList<QRectList*> contents;
mEmailRects.clear();
mPhoneRects.clear();
@@ -185,7 +185,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
// first draw a black rectangle on top, containing the entries name, centered:
painter->setFont( mHeaderFont );
- painter->setBrush( QBrush( mBackgroundColor ) );
+ painter->setBrush( TQBrush( mBackgroundColor ) );
painter->setPen( mBackgroundColor );
text = addr.realName();
@@ -206,7 +206,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
}
// paint the birthday to the right:
- QDateTime dt = addr.birthday();
+ TQDateTime dt = addr.birthday();
if ( dt.isValid() ) {
line1 = KGlobal::locale()->formatDate( dt.date(), true );
if ( !fake ) {
@@ -246,7 +246,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
// Email addresses:
if ( !addr.emails().isEmpty() && mShowEmails ) {
contents.push_back( &mEmailRects );
- QStringList list;
+ TQStringList list;
list.append( addr.emails().count() == 1 ? i18n( "Email address:" )
: i18n( "Email addresses:" ) );
@@ -258,8 +258,8 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
const KABC::PhoneNumber::List phoneNumbers( addr.phoneNumbers() );
if ( !phoneNumbers.isEmpty() && mShowPhones ) {
contents.push_back( &mPhoneRects );
- QStringList list;
- QString line;
+ TQStringList list;
+ TQString line;
list.append( phoneNumbers.count() == 1 ? i18n( "Telephone:" )
: i18n( "Telephones:" ) );
@@ -277,7 +277,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
// Web pages/URLs:
if ( !addr.url().isEmpty() && addr.url().isValid() && mShowURLs ) {
contents.push_back( &mURLRects );
- QStringList list;
+ TQStringList list;
list.append( i18n( "Web page:" ) );
list += addr.url().prettyURL();
@@ -288,7 +288,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
// Talk addresses:
if ( !addr.talk.isEmpty() ) {
contents.push_back( &mTalkRects );
- QStringList list;
+ TQStringList list;
list.append( addr.talk.count() == 1 ? i18n( "Talk address:" )
: i18n( "Talk addresses:" ) );
@@ -297,18 +297,18 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
}
*/
- QRect limits[] = { QRect( 0, y, Width / 2, Height ),
- QRect( Width / 2, y, Width / 2, Height ),
- QRect( 0, y, Width / 2, Height ),
- QRect( Width / 2, y, Width / 2, Height ) };
+ TQRect limits[] = { TQRect( 0, y, Width / 2, Height ),
+ TQRect( Width / 2, y, Width / 2, Height ),
+ TQRect( 0, y, Width / 2, Height ),
+ TQRect( Width / 2, y, Width / 2, Height ) };
int heights[ 4 ]= { 0, 0, 0, 0 };
- QValueList<QStringList>::iterator pos = parts.begin();
- QValueList<QRectList*>::iterator rpos = contents.begin();
+ TQValueList<TQStringList>::iterator pos = parts.begin();
+ TQValueList<QRectList*>::iterator rpos = contents.begin();
for ( uint counter = 0; counter < parts.count(); ++counter ) {
const int Offset = counter > 1 ? QMAX( heights[ 0 ], heights[ 1 ] ) : 0;
- QStringList list = *pos;
+ TQStringList list = *pos;
painter->setFont( mHeadLineFont );
if ( fake ) {
@@ -399,27 +399,27 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
line1 = i18n( "Preferred Address" );
}
- line1 += QString::fromLatin1( ":" );
- text = QString::null;
+ line1 += TQString::fromLatin1( ":" );
+ text = TQString::null;
if ( !address.extended().isEmpty() )
text = address.extended().stripWhiteSpace();
if ( !text.isEmpty() ) {
- line1 = line1 + QString::fromLatin1( " (" ) + text +
- QString::fromLatin1( ")" );
+ line1 = line1 + TQString::fromLatin1( " (" ) + text +
+ TQString::fromLatin1( ")" );
}
line1 = line1.stripWhiteSpace();
line2 = address.street();
if ( !address.postOfficeBox().isEmpty() )
- line2 += QString::fromLatin1( " - " ) + address.postOfficeBox();
+ line2 += TQString::fromLatin1( " - " ) + address.postOfficeBox();
// print address in american style, this will need localisation:
line3 = address.locality() + ( address.region().isEmpty() ?
- QString::fromLatin1( "" ) : QString::fromLatin1( ", " ) +
+ TQString::fromLatin1( "" ) : TQString::fromLatin1( ", " ) +
address.region() ) + ( address.postalCode().isEmpty()
- ? QString::fromLatin1( "" ) : QString::fromLatin1( " " )
+ ? TQString::fromLatin1( "" ) : TQString::fromLatin1( " " )
+ address.postalCode() );
line4 = address.country();
@@ -512,7 +512,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
y += fmBody.lineSpacing() / 2;
if ( brect != 0 )
- *brect = QRect( 0, top, Width, y - top );
+ *brect = TQRect( 0, top, Width, y - top );
if ( y < Height )
return true;