diff options
Diffstat (limited to 'kaddressbook/printing')
-rw-r--r-- | kaddressbook/printing/detailledstyle.cpp | 48 | ||||
-rw-r--r-- | kaddressbook/printing/detailledstyle.h | 8 | ||||
-rw-r--r-- | kaddressbook/printing/kabentrypainter.cpp | 96 | ||||
-rw-r--r-- | kaddressbook/printing/kabentrypainter.h | 60 | ||||
-rw-r--r-- | kaddressbook/printing/mikesstyle.cpp | 52 | ||||
-rw-r--r-- | kaddressbook/printing/mikesstyle.h | 14 | ||||
-rw-r--r-- | kaddressbook/printing/printingwizard.cpp | 30 | ||||
-rw-r--r-- | kaddressbook/printing/printingwizard.h | 14 | ||||
-rw-r--r-- | kaddressbook/printing/printprogress.cpp | 32 | ||||
-rw-r--r-- | kaddressbook/printing/printprogress.h | 12 | ||||
-rw-r--r-- | kaddressbook/printing/printsortmode.cpp | 8 | ||||
-rw-r--r-- | kaddressbook/printing/printstyle.cpp | 20 | ||||
-rw-r--r-- | kaddressbook/printing/printstyle.h | 26 | ||||
-rw-r--r-- | kaddressbook/printing/selectionpage.cpp | 84 | ||||
-rw-r--r-- | kaddressbook/printing/selectionpage.h | 28 | ||||
-rw-r--r-- | kaddressbook/printing/stylepage.cpp | 42 | ||||
-rw-r--r-- | kaddressbook/printing/stylepage.h | 10 |
17 files changed, 292 insertions, 292 deletions
diff --git a/kaddressbook/printing/detailledstyle.cpp b/kaddressbook/printing/detailledstyle.cpp index 78283a080..39046481c 100644 --- a/kaddressbook/printing/detailledstyle.cpp +++ b/kaddressbook/printing/detailledstyle.cpp @@ -22,18 +22,18 @@ */ #include <kapplication.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <kcolorbutton.h> #include <kconfig.h> #include <kdebug.h> #include <kdialog.h> #include <kfontcombo.h> #include <kglobalsettings.h> -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> #include <knuminput.h> -#include <qpaintdevicemetrics.h> -#include <qpainter.h> +#include <tqpaintdevicemetrics.h> +#include <tqpainter.h> #include <kprinter.h> #include <kstandarddirs.h> @@ -70,10 +70,10 @@ DetailledPrintStyle::DetailledPrintStyle( PrintingWizard *parent, const char *na mPrintProgress( 0 ) { KConfig *config; - QFont font; + TQFont font; bool kdeFonts; - QFont standard = KGlobalSettings::generalFont(); - QFont fixed = KGlobalSettings::fixedFont(); + TQFont standard = KGlobalSettings::generalFont(); + TQFont fixed = KGlobalSettings::fixedFont(); setPreview( "detailed-style.png" ); @@ -130,19 +130,19 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro progress->setProgress( 0 ); bool useKDEFonts; - QFont font; - QColor foreColor = Qt::black; - QColor headerColor = Qt::white; + TQFont font; + TQColor foreColor = Qt::black; + TQColor headerColor = Qt::white; bool useHeaderColor = true; - QColor backColor = Qt::black; + TQColor backColor = Qt::black; bool useBGColor; // save, always available defaults: - QFont header = QFont("Helvetica", 12, QFont::Normal); - QFont headlines = QFont("Helvetica", 12, QFont::Normal, true); - QFont body = QFont("Helvetica", 12, QFont::Normal); - QFont fixed = QFont("Courier", 12, QFont::Normal); - QFont comment = QFont("Helvetica", 10, QFont::Normal); + TQFont header = TQFont("Helvetica", 12, TQFont::Normal); + TQFont headlines = TQFont("Helvetica", 12, TQFont::Normal, true); + TQFont body = TQFont("Helvetica", 12, TQFont::Normal); + TQFont fixed = TQFont("Courier", 12, TQFont::Normal); + TQFont comment = TQFont("Helvetica", 10, TQFont::Normal); // store the configuration settings: KConfig *config = kapp->config(); @@ -163,7 +163,7 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro } if ( mPageAppearance->cbStandardFonts->isChecked() ) { - QFont standard = KGlobalSettings::generalFont(); + TQFont standard = KGlobalSettings::generalFont(); header = standard; headlines = standard; body = standard; @@ -208,7 +208,7 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro KPrinter *printer = wizard()->printer(); - QPainter painter; + TQPainter painter; progress->addMessage( i18n( "Setting up margins and spacing" ) ); int marginTop = 0, marginLeft = 64, // to allow stapling, need refinement with two-side prints @@ -220,7 +220,7 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro painter.begin( printer ); printer->setFullPage( true ); // use whole page - QPaintDeviceMetrics metrics( printer ); + TQPaintDeviceMetrics metrics( printer ); left = QMAX( printer->margins().width(), marginLeft ); top = QMAX( printer->margins().height(), marginTop ); @@ -231,7 +231,7 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro progress->addMessage( i18n( "Printing" ) ); printEntries( contacts, printer, &painter, - QRect( 0, 0, metrics.width(), metrics.height() ) ); + TQRect( 0, 0, metrics.width(), metrics.height() ) ); progress->addMessage( i18n( "Done" ) ); painter.end(); @@ -241,10 +241,10 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro bool DetailledPrintStyle::printEntries( const KABC::Addressee::List &contacts, KPrinter *printer, - QPainter *painter, - const QRect &window) + TQPainter *painter, + const TQRect &window) { - QRect brect; + TQRect brect; int ypos = 0, count = 0; KABC::Addressee::List::ConstIterator it; @@ -283,7 +283,7 @@ PrintStyle *DetailledPrintStyleFactory::create() const return new DetailledPrintStyle( mParent, mName ); } -QString DetailledPrintStyleFactory::description() const +TQString DetailledPrintStyleFactory::description() const { return i18n( "Detailed Style" ); } diff --git a/kaddressbook/printing/detailledstyle.h b/kaddressbook/printing/detailledstyle.h index 91c6dfe19..e8515aa0d 100644 --- a/kaddressbook/printing/detailledstyle.h +++ b/kaddressbook/printing/detailledstyle.h @@ -45,9 +45,9 @@ class DetailledPrintStyle : public PrintStyle protected: bool printEntries( const KABC::Addressee::List &contacts, KPrinter *printer, - QPainter *painter, const QRect &window ); - bool printEntry( const KABC::Addressee &contact, const QRect &window, - QPainter *painter, int top, bool fake, QRect *brect ); + TQPainter *painter, const TQRect &window ); + bool printEntry( const KABC::Addressee &contact, const TQRect &window, + TQPainter *painter, int top, bool fake, TQRect *brect ); private: AppearancePage *mPageAppearance; KABEntryPainter *mPainter; @@ -60,7 +60,7 @@ class DetailledPrintStyleFactory : public PrintStyleFactory DetailledPrintStyleFactory( PrintingWizard *parent, const char *name = 0 ); PrintStyle *create() const; - QString description() const; + TQString description() const; }; } diff --git a/kaddressbook/printing/kabentrypainter.cpp b/kaddressbook/printing/kabentrypainter.cpp index 6ae163de8..c7432d5d0 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; diff --git a/kaddressbook/printing/kabentrypainter.h b/kaddressbook/printing/kabentrypainter.h index 6c5b8dca9..57ce69d88 100644 --- a/kaddressbook/printing/kabentrypainter.h +++ b/kaddressbook/printing/kabentrypainter.h @@ -26,12 +26,12 @@ #include <kabc/addressbook.h> -#include <qcolor.h> -#include <qfont.h> -#include <qrect.h> -#include <qvaluelist.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqrect.h> +#include <tqvaluelist.h> -typedef QValueList<QRect> QRectList; +typedef TQValueList<TQRect> QRectList; class KABEntryPainter { @@ -41,7 +41,7 @@ class KABEntryPainter /** Paint one entry using the given painter. May not only be used on - printer objects but on any suitable QPaintDevice. + printer objects but on any suitable TQPaintDevice. The function does not paint a background, just the contents of the addressee. @@ -58,19 +58,19 @@ class KABEntryPainter @returns false if some error happens, otherwise true. */ - bool printAddressee( const KABC::Addressee &addr, const QRect &window, - QPainter *p, int top = 0, bool fake = false, - QRect *rect = 0 ); + bool printAddressee( const KABC::Addressee &addr, const TQRect &window, + TQPainter *p, int top = 0, bool fake = false, + TQRect *rect = 0 ); - void setForegroundColor( const QColor &color = Qt::black ); - void setBackgroundColor( const QColor &color = Qt::black ); - void setHeaderColor( const QColor &color = Qt::white ); + void setForegroundColor( const TQColor &color = Qt::black ); + void setBackgroundColor( const TQColor &color = Qt::black ); + void setHeaderColor( const TQColor &color = Qt::white ); - void setHeaderFont( const QFont &font = QFont( "Helvetica", 12, QFont::Normal, true ) ); - void setHeadLineFont( const QFont &font = QFont( "Helvetica", 12, QFont::Normal, true ) ); - void setBodyFont( const QFont &font = QFont( "Helvetica", 12, QFont::Normal, true ) ); - void setFixedFont( const QFont &font = QFont( "Courier", 12, QFont::Normal, true ) ); - void setCommentFont( const QFont &font = QFont( "Helvetica", 10, QFont::Normal, true ) ); + void setHeaderFont( const TQFont &font = TQFont( "Helvetica", 12, TQFont::Normal, true ) ); + void setHeadLineFont( const TQFont &font = TQFont( "Helvetica", 12, TQFont::Normal, true ) ); + void setBodyFont( const TQFont &font = TQFont( "Helvetica", 12, TQFont::Normal, true ) ); + void setFixedFont( const TQFont &font = TQFont( "Courier", 12, TQFont::Normal, true ) ); + void setCommentFont( const TQFont &font = TQFont( "Helvetica", 10, TQFont::Normal, true ) ); void setUseHeaderColor( bool value = true ); @@ -85,38 +85,38 @@ class KABEntryPainter email address in the emails list. If it does not point at one of the email addresses, -1 is returned. */ - int hitsEmail( const QPoint &p ); + int hitsEmail( const TQPoint &p ); /** Returns the index of the rectangle if the point p is inside of one of the telephone numbers. See hitsEmail */ - int hitsPhone( const QPoint &p ); + int hitsPhone( const TQPoint &p ); /** Returns the index of the rectangle if the point p is inside of one of the telephone numbers. See hitsEmail */ - int hitsTalk( const QPoint &p ); + int hitsTalk( const TQPoint &p ); /** Returns the index of the rectangle if the point p is inside of one of the telephone numbers. See hitsEmail */ - int hitsURL( const QPoint &p ); + int hitsURL( const TQPoint &p ); private: - int hits( const QRectList& rects, const QPoint &p ); + int hits( const QRectList& rects, const TQPoint &p ); - QColor mForegroundColor; - QColor mBackgroundColor; - QColor mHeaderColor; + TQColor mForegroundColor; + TQColor mBackgroundColor; + TQColor mHeaderColor; - QFont mHeaderFont; - QFont mHeadLineFont; - QFont mBodyFont; - QFont mFixedFont; - QFont mCommentFont; + TQFont mHeaderFont; + TQFont mHeadLineFont; + TQFont mBodyFont; + TQFont mFixedFont; + TQFont mCommentFont; bool mUseHeaderColor; bool mShowAddresses; 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" ); } diff --git a/kaddressbook/printing/mikesstyle.h b/kaddressbook/printing/mikesstyle.h index 52278d390..dbfabf178 100644 --- a/kaddressbook/printing/mikesstyle.h +++ b/kaddressbook/printing/mikesstyle.h @@ -25,7 +25,7 @@ #ifndef MIKESSTYLE_H #define MIKESSTYLE_H -#include <qfont.h> +#include <tqfont.h> #include "printstyle.h" @@ -44,11 +44,11 @@ class MikesStyle : public PrintStyle void print( const KABC::Addressee::List&, PrintProgress* ); protected: - void doPaint( QPainter &painter, const KABC::Addressee &addr, int maxHeight, - const QFont &font, const QFont &bFont ); - int calcHeight( const KABC::Addressee &addr, const QFont &font, const QFont &bFont); - void paintTagLine( QPainter &p, const QFont &font); - QString trimString( const QString &text, int width, QFontMetrics &fm); + void doPaint( TQPainter &painter, const KABC::Addressee &addr, int maxHeight, + const TQFont &font, const TQFont &bFont ); + int calcHeight( const KABC::Addressee &addr, const TQFont &font, const TQFont &bFont); + void paintTagLine( TQPainter &p, const TQFont &font); + TQString trimString( const TQString &text, int width, TQFontMetrics &fm); }; class MikesStyleFactory : public PrintStyleFactory @@ -57,7 +57,7 @@ class MikesStyleFactory : public PrintStyleFactory MikesStyleFactory( PrintingWizard *parent, const char *name = 0 ); PrintStyle *create() const; - QString description() const; + TQString description() const; }; } diff --git a/kaddressbook/printing/printingwizard.cpp b/kaddressbook/printing/printingwizard.cpp index a961ac5fc..2bf6deaf8 100644 --- a/kaddressbook/printing/printingwizard.cpp +++ b/kaddressbook/printing/printingwizard.cpp @@ -22,14 +22,14 @@ without including the source code for Qt in the source distribution. */ -#include <qcombobox.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qradiobutton.h> +#include <tqcombobox.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> #include <kabc/addresseelist.h> #include <kapplication.h> @@ -53,7 +53,7 @@ using namespace KABPrinting; PrintingWizard::PrintingWizard( KPrinter *printer, KABC::AddressBook* ab, - const QStringList& selection, QWidget *parent, + const TQStringList& selection, TQWidget *parent, const char* name ) : KWizard( parent, name ), mPrinter( printer ), mAddressBook( ab ), mSelection( selection ), mStyle( 0 ) @@ -63,7 +63,7 @@ PrintingWizard::PrintingWizard( KPrinter *printer, KABC::AddressBook* ab, insertPage( mSelectionPage, i18n("Choose Contacts to Print"), -1 ); mFilters = Filter::restore( kapp->config(), "Filter" ); - QStringList filters; + TQStringList filters; for ( Filter::List::ConstIterator it = mFilters.begin(); it != mFilters.end(); ++it ) filters.append( (*it).name() ); @@ -75,7 +75,7 @@ PrintingWizard::PrintingWizard( KPrinter *printer, KABC::AddressBook* ab, mStylePage = new StylePage( mAddressBook, this ); - connect( mStylePage, SIGNAL( styleChanged(int) ), SLOT( slotStyleSelected(int) ) ); + connect( mStylePage, TQT_SIGNAL( styleChanged(int) ), TQT_SLOT( slotStyleSelected(int) ) ); insertPage( mStylePage, i18n("Choose Printing Style"), -1 ); registerStyles(); @@ -160,7 +160,7 @@ void PrintingWizard::print() KABC::AddresseeList list; if ( mStyle != 0 ) { if ( mSelectionPage->useSelection() ) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = mSelection.begin(); it != mSelection.end(); ++it ) { KABC::Addressee addr = addressBook()->findByUid( *it ); if ( !addr.isEmpty() ) @@ -180,11 +180,11 @@ void PrintingWizard::print() } } else if ( mSelectionPage->useCategories() ) { - QStringList categories = mSelectionPage->categories(); + TQStringList categories = mSelectionPage->categories(); KABC::AddressBook::ConstIterator it; for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) { - const QStringList tmp( (*it).categories() ); - QStringList::ConstIterator tmpIt; + const TQStringList tmp( (*it).categories() ); + TQStringList::ConstIterator tmpIt; for ( tmpIt = tmp.begin(); tmpIt != tmp.end(); ++tmpIt ) if ( categories.contains( *tmpIt ) ) { list.append( *it ); diff --git a/kaddressbook/printing/printingwizard.h b/kaddressbook/printing/printingwizard.h index 528aac71f..8e6a678b5 100644 --- a/kaddressbook/printing/printingwizard.h +++ b/kaddressbook/printing/printingwizard.h @@ -25,8 +25,8 @@ #ifndef PRINTINGWIZARD_H #define PRINTINGWIZARD_H -#include <qptrlist.h> -#include <qstringlist.h> +#include <tqptrlist.h> +#include <tqstringlist.h> #include <kwizard.h> @@ -57,8 +57,8 @@ class PrintingWizard : public KWizard */ PrintingWizard( KPrinter *printer, KABC::AddressBook* ab, - const QStringList& selection, - QWidget *parent = 0, const char *name = 0 ); + const TQStringList& selection, + TQWidget *parent = 0, const char *name = 0 ); ~PrintingWizard(); /** @@ -89,12 +89,12 @@ class PrintingWizard : public KWizard void slotStyleSelected(int); protected: - QPtrList<PrintStyleFactory> mStyleFactories; - QPtrList<PrintStyle> mStyleList; + TQPtrList<PrintStyleFactory> mStyleFactories; + TQPtrList<PrintStyle> mStyleList; Filter::List mFilters; KPrinter *mPrinter; KABC::AddressBook *mAddressBook; - QStringList mSelection; + TQStringList mSelection; PrintStyle *mStyle; StylePage *mStylePage; diff --git a/kaddressbook/printing/printprogress.cpp b/kaddressbook/printing/printprogress.cpp index cb4a91d85..43aec8cf7 100644 --- a/kaddressbook/printing/printprogress.cpp +++ b/kaddressbook/printing/printprogress.cpp @@ -21,9 +21,9 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> -#include <qprogressbar.h> -#include <qtextbrowser.h> +#include <tqlayout.h> +#include <tqprogressbar.h> +#include <tqtextbrowser.h> #include <kapplication.h> #include <kdebug.h> @@ -34,41 +34,41 @@ using namespace KABPrinting; -PrintProgress::PrintProgress( QWidget *parent, const char *name ) - : QWidget( parent, name ) +PrintProgress::PrintProgress( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { setCaption( i18n( "Printing: Progress" ) ); - QGridLayout *topLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), + TQGridLayout *topLayout = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); - mLogBrowser = new QTextBrowser( this ); + mLogBrowser = new TQTextBrowser( this ); topLayout->addWidget( mLogBrowser, 0, 0 ); - mProgressBar = new QProgressBar( this ); + mProgressBar = new TQProgressBar( this ); mProgressBar->setProgress( 0 ); topLayout->addWidget( mProgressBar, 1, 0 ); - resize( QSize( 370, 220 ).expandedTo( minimumSizeHint() ) ); + resize( TQSize( 370, 220 ).expandedTo( minimumSizeHint() ) ); } PrintProgress::~PrintProgress() { } -void PrintProgress::addMessage( const QString &msg ) +void PrintProgress::addMessage( const TQString &msg ) { mMessages.append( msg ); - QString head = QString( "<qt><b>" ) + i18n( "Progress" ) + - QString( ":</b><ul>" ); + TQString head = TQString( "<qt><b>" ) + i18n( "Progress" ) + + TQString( ":</b><ul>" ); - QString foot = QString( "</ul></qt>" ); + TQString foot = TQString( "</ul></qt>" ); - QString body; - QStringList::ConstIterator it; + TQString body; + TQStringList::ConstIterator it; for ( it = mMessages.begin(); it != mMessages.end(); ++it ) - body.append( QString( "<li>" ) + (*it) + QString( "</li>" ) ); + body.append( TQString( "<li>" ) + (*it) + TQString( "</li>" ) ); mLogBrowser->setText( head + body + foot ); kapp->processEvents(); diff --git a/kaddressbook/printing/printprogress.h b/kaddressbook/printing/printprogress.h index fd2a494f8..83c6f3391 100644 --- a/kaddressbook/printing/printprogress.h +++ b/kaddressbook/printing/printprogress.h @@ -24,7 +24,7 @@ #ifndef PRINTPROGRESS_H #define PRINTPROGRESS_H -#include <qwidget.h> +#include <tqwidget.h> class QProgressBar; class QString; @@ -42,13 +42,13 @@ class PrintProgress : public QWidget Q_OBJECT public: - PrintProgress( QWidget *parent, const char *name = 0 ); + PrintProgress( TQWidget *parent, const char *name = 0 ); ~PrintProgress(); /** Add a message to the message log. Give the user something to admire :-) */ - void addMessage( const QString& ); + void addMessage( const TQString& ); /** Set the progress to a certain amount. Steps are from 0 to 100. @@ -56,10 +56,10 @@ class PrintProgress : public QWidget void setProgress( int ); private: - QStringList mMessages; + TQStringList mMessages; - QTextBrowser* mLogBrowser; - QProgressBar* mProgressBar; + TQTextBrowser* mLogBrowser; + TQProgressBar* mProgressBar; }; } diff --git a/kaddressbook/printing/printsortmode.cpp b/kaddressbook/printing/printsortmode.cpp index 49ae25557..215a5fa09 100644 --- a/kaddressbook/printing/printsortmode.cpp +++ b/kaddressbook/printing/printsortmode.cpp @@ -48,16 +48,16 @@ bool PrintSortMode::lesser( const KABC::Addressee &first, if ( !mSortField ) return false; - int result = QString::localeAwareCompare( mSortField->value( first ), + int result = TQString::localeAwareCompare( mSortField->value( first ), mSortField->value( second ) ); if ( result == 0 ) { - int givenNameResult = QString::localeAwareCompare( mGivenNameField->value( first ), + int givenNameResult = TQString::localeAwareCompare( mGivenNameField->value( first ), mGivenNameField->value( second ) ); if ( givenNameResult == 0 ) { - int familyNameResult = QString::localeAwareCompare( mFamilyNameField->value( first ), + int familyNameResult = TQString::localeAwareCompare( mFamilyNameField->value( first ), mFamilyNameField->value( second ) ); if ( familyNameResult == 0 ) { - result = QString::localeAwareCompare( mFormattedNameField->value( first ), + result = TQString::localeAwareCompare( mFormattedNameField->value( first ), mFormattedNameField->value( second ) ); } else result = familyNameResult; diff --git a/kaddressbook/printing/printstyle.cpp b/kaddressbook/printing/printstyle.cpp index a3cf537d4..90b196237 100644 --- a/kaddressbook/printing/printstyle.cpp +++ b/kaddressbook/printing/printstyle.cpp @@ -24,7 +24,7 @@ #include <kstandarddirs.h> #include <kdebug.h> -#include <qwidget.h> +#include <tqwidget.h> #include "printstyle.h" #include "printingwizard.h" @@ -33,7 +33,7 @@ using namespace KABPrinting; PrintStyle::PrintStyle( PrintingWizard* parent, const char* name ) - : QObject( parent, name ), mWizard( parent ), mSortField( 0 ) + : TQObject( parent, name ), mWizard( parent ), mSortField( 0 ) { } @@ -41,20 +41,20 @@ PrintStyle::~PrintStyle() { } -const QPixmap& PrintStyle::preview() +const TQPixmap& PrintStyle::preview() { return mPreview; } -void PrintStyle::setPreview( const QPixmap& image ) +void PrintStyle::setPreview( const TQPixmap& image ) { mPreview = image; } -bool PrintStyle::setPreview( const QString& fileName ) +bool PrintStyle::setPreview( const TQString& fileName ) { - QPixmap preview; - QString path = locate( "appdata", "printing/" + fileName ); + TQPixmap preview; + TQString path = locate( "appdata", "printing/" + fileName ); if ( path.isEmpty() ) { kdDebug(5720) << "PrintStyle::setPreview: preview not locatable." << endl; return false; @@ -74,7 +74,7 @@ PrintingWizard *PrintStyle::wizard() return mWizard; } -void PrintStyle::addPage( QWidget *page, const QString &title ) +void PrintStyle::addPage( TQWidget *page, const TQString &title ) { if ( mPageList.find( page ) == -1 ) { // not yet in the list mPageList.append( page ); @@ -84,7 +84,7 @@ void PrintStyle::addPage( QWidget *page, const QString &title ) void PrintStyle::showPages() { - QWidget *wdg = 0; + TQWidget *wdg = 0; int i = 0; for ( wdg = mPageList.first(); wdg; wdg = mPageList.next(), ++i ) { mWizard->addPage( wdg, mPageTitles[ i ] ); @@ -98,7 +98,7 @@ void PrintStyle::showPages() void PrintStyle::hidePages() { - for ( QWidget *wdg = mPageList.first(); wdg; wdg = mPageList.next() ) + for ( TQWidget *wdg = mPageList.first(); wdg; wdg = mPageList.next() ) mWizard->removePage( wdg ); } diff --git a/kaddressbook/printing/printstyle.h b/kaddressbook/printing/printstyle.h index 217b80b99..19dbf3bc5 100644 --- a/kaddressbook/printing/printstyle.h +++ b/kaddressbook/printing/printstyle.h @@ -24,9 +24,9 @@ #ifndef PRINTSTYLE_H #define PRINTSTYLE_H -#include <qwidget.h> -#include <qstringlist.h> -#include <qpixmap.h> +#include <tqwidget.h> +#include <tqstringlist.h> +#include <tqpixmap.h> #include <kabc/field.h> @@ -51,7 +51,7 @@ class PrintProgress; a basic impression on how it will look. Add this image to the printing folder (right here :-), and edit Makefile.am to have it installed along with kaddressbook. Load it using - setPreview(QString). + setPreview(TQString). Your print style is supposed to add its options as pages to the printing wizard. The method wizard() gives you a pointer to the wizard object. @@ -72,10 +72,10 @@ class PrintStyle : public QObject /** Reimplement this method to provide a preview of what will - be printed. It returns an invalid QPixmap by default, + be printed. It returns an invalid TQPixmap by default, resulting in a message that no preview is available. */ - const QPixmap& preview(); + const TQPixmap& preview(); /** Hide all style specific pages in the wizard. @@ -107,12 +107,12 @@ class PrintStyle : public QObject "printing". Give only the file name without any prefix as the parameter. */ - bool setPreview( const QString& fileName ); + bool setPreview( const TQString& fileName ); /** Set the preview image. */ - void setPreview( const QPixmap& image ); + void setPreview( const TQPixmap& image ); /** Set preferred sort options for this printing style. @@ -128,13 +128,13 @@ class PrintStyle : public QObject Add additional page to the wizard e.g. a configuration page for the style. */ - void addPage( QWidget *page, const QString &title ); + void addPage( TQWidget *page, const TQString &title ); private: PrintingWizard *mWizard; - QPixmap mPreview; - QPtrList<QWidget> mPageList; - QStringList mPageTitles; + TQPixmap mPreview; + TQPtrList<TQWidget> mPageList; + TQStringList mPageTitles; KABC::Field *mSortField; bool mSortType; @@ -159,7 +159,7 @@ class PrintStyleFactory Overload this method to provide a one-liner description for your print style. */ - virtual QString description() const = 0; + virtual TQString description() const = 0; protected: PrintingWizard* mParent; diff --git a/kaddressbook/printing/selectionpage.cpp b/kaddressbook/printing/selectionpage.cpp index bf6d71e00..3e8bde5f8 100644 --- a/kaddressbook/printing/selectionpage.cpp +++ b/kaddressbook/printing/selectionpage.cpp @@ -25,80 +25,80 @@ #include <kdialog.h> #include <klocale.h> -#include <qbuttongroup.h> -#include <qcombobox.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qstringlist.h> -#include <qwhatsthis.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqstringlist.h> +#include <tqwhatsthis.h> #include "selectionpage.h" -SelectionPage::SelectionPage( QWidget* parent, const char* name ) - : QWidget( parent, name ) +SelectionPage::SelectionPage( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { setCaption( i18n( "Choose Which Contacts to Print" ) ); - QVBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(), + TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Which contacts do you want to print?" ), this ); + TQLabel *label = new TQLabel( i18n( "Which contacts do you want to print?" ), this ); topLayout->addWidget( label ); - mButtonGroup = new QButtonGroup( this ); - mButtonGroup->setFrameShape( QButtonGroup::NoFrame ); + mButtonGroup = new TQButtonGroup( this ); + mButtonGroup->setFrameShape( TQButtonGroup::NoFrame ); mButtonGroup->setColumnLayout( 0, Qt::Vertical ); mButtonGroup->layout()->setSpacing( KDialog::spacingHint() ); mButtonGroup->layout()->setMargin( KDialog::marginHint() ); - QGridLayout *groupLayout = new QGridLayout( mButtonGroup->layout() ); + TQGridLayout *groupLayout = new TQGridLayout( mButtonGroup->layout() ); groupLayout->setAlignment( Qt::AlignTop ); - mUseWholeBook = new QRadioButton( i18n( "&All contacts" ), mButtonGroup ); + mUseWholeBook = new TQRadioButton( i18n( "&All contacts" ), mButtonGroup ); mUseWholeBook->setChecked( true ); - QWhatsThis::add( mUseWholeBook, i18n( "Print the entire address book" ) ); + TQWhatsThis::add( mUseWholeBook, i18n( "Print the entire address book" ) ); groupLayout->addWidget( mUseWholeBook, 0, 0 ); - mUseSelection = new QRadioButton( i18n( "&Selected contacts" ), mButtonGroup ); - QWhatsThis::add( mUseSelection, i18n( "Only print contacts selected in KAddressBook.\n" + mUseSelection = new TQRadioButton( i18n( "&Selected contacts" ), mButtonGroup ); + TQWhatsThis::add( mUseSelection, i18n( "Only print contacts selected in KAddressBook.\n" "This option is disabled if no contacts are selected." ) ); groupLayout->addWidget( mUseSelection, 1, 0 ); - mUseFilters = new QRadioButton( i18n( "Contacts matching &filter" ), mButtonGroup ); - QWhatsThis::add( mUseFilters, i18n( "Only print contacts matching the selected filter.\n" + mUseFilters = new TQRadioButton( i18n( "Contacts matching &filter" ), mButtonGroup ); + TQWhatsThis::add( mUseFilters, i18n( "Only print contacts matching the selected filter.\n" "This option is disabled if you have not defined any filters." ) ); groupLayout->addWidget( mUseFilters, 2, 0 ); - mUseCategories = new QRadioButton( i18n( "Category &members" ), mButtonGroup ); - QWhatsThis::add( mUseCategories, i18n( "Only print contacts who are members of a category that is checked on the list to the left.\n" + mUseCategories = new TQRadioButton( i18n( "Category &members" ), mButtonGroup ); + TQWhatsThis::add( mUseCategories, i18n( "Only print contacts who are members of a category that is checked on the list to the left.\n" "This option is disabled if you have no categories." ) ); groupLayout->addWidget( mUseCategories, 3, 0, Qt::AlignTop ); - mFiltersCombo = new QComboBox( false, mButtonGroup ); - QWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to print." ) ); + mFiltersCombo = new TQComboBox( false, mButtonGroup ); + TQWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to print." ) ); groupLayout->addWidget( mFiltersCombo, 2, 1 ); - mCategoriesView = new QListView( mButtonGroup ); + mCategoriesView = new TQListView( mButtonGroup ); mCategoriesView->addColumn( "" ); mCategoriesView->header()->hide(); - QWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to print." ) ); + TQWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to print." ) ); groupLayout->addWidget( mCategoriesView, 3, 1 ); topLayout->addWidget( mButtonGroup ); - connect( mFiltersCombo, SIGNAL( activated(int) ), SLOT( filterChanged(int) ) ); - connect( mCategoriesView, SIGNAL( clicked(QListViewItem*) ), SLOT( categoryClicked(QListViewItem*) ) ); + connect( mFiltersCombo, TQT_SIGNAL( activated(int) ), TQT_SLOT( filterChanged(int) ) ); + connect( mCategoriesView, TQT_SIGNAL( clicked(TQListViewItem*) ), TQT_SLOT( categoryClicked(TQListViewItem*) ) ); } SelectionPage::~SelectionPage() { } -void SelectionPage::setFilters( const QStringList& filters ) +void SelectionPage::setFilters( const TQStringList& filters ) { mFiltersCombo->clear(); mFiltersCombo->insertStringList( filters ); @@ -106,7 +106,7 @@ void SelectionPage::setFilters( const QStringList& filters ) mUseFilters->setEnabled( filters.count() > 0 ); } -QString SelectionPage::filter() const +TQString SelectionPage::filter() const { return mFiltersCombo->currentText(); } @@ -116,22 +116,22 @@ bool SelectionPage::useFilters() const return mUseFilters->isChecked(); } -void SelectionPage::setCategories( const QStringList& list ) +void SelectionPage::setCategories( const TQStringList& list ) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = list.begin(); it != list.end(); ++it ) - new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox ); + new TQCheckListItem( mCategoriesView, *it, TQCheckListItem::CheckBox ); mUseCategories->setEnabled( list.count() > 0 ); } -QStringList SelectionPage::categories() const +TQStringList SelectionPage::categories() const { - QStringList list; + TQStringList list; - QListViewItemIterator it( mCategoriesView ); + TQListViewItemIterator it( mCategoriesView ); for ( ; it.current(); ++it ) { - QCheckListItem *qcli = static_cast<QCheckListItem*>(it.current()); + TQCheckListItem *qcli = static_cast<TQCheckListItem*>(it.current()); if ( qcli->isOn() ) list.append( it.current()->text( 0 ) ); } @@ -159,9 +159,9 @@ void SelectionPage::filterChanged( int ) mUseFilters->setChecked( true ); } -void SelectionPage::categoryClicked( QListViewItem *i ) +void SelectionPage::categoryClicked( TQListViewItem *i ) { - QCheckListItem *qcli = static_cast<QCheckListItem*>( i ); + TQCheckListItem *qcli = static_cast<TQCheckListItem*>( i ); if ( i && qcli->isOn() ) mUseCategories->setChecked( true ); } diff --git a/kaddressbook/printing/selectionpage.h b/kaddressbook/printing/selectionpage.h index b4dab1f6c..457d7f679 100644 --- a/kaddressbook/printing/selectionpage.h +++ b/kaddressbook/printing/selectionpage.h @@ -24,7 +24,7 @@ #ifndef SELECTIONPAGE_H #define SELECTIONPAGE_H -#include <qwidget.h> +#include <tqwidget.h> class QButtonGroup; class QComboBox; @@ -37,15 +37,15 @@ class SelectionPage : public QWidget Q_OBJECT public: - SelectionPage( QWidget* parent = 0, const char* name = 0 ); + SelectionPage( TQWidget* parent = 0, const char* name = 0 ); ~SelectionPage(); - void setFilters( const QStringList& ); - QString filter() const; + void setFilters( const TQStringList& ); + TQString filter() const; bool useFilters() const; - void setCategories( const QStringList& ); - QStringList categories() const; + void setCategories( const TQStringList& ); + TQStringList categories() const; bool useCategories(); void setUseSelection( bool value ); @@ -53,16 +53,16 @@ class SelectionPage : public QWidget private slots: void filterChanged( int ); - void categoryClicked( QListViewItem * i ); + void categoryClicked( TQListViewItem * i ); private: - QButtonGroup* mButtonGroup; - QRadioButton* mUseCategories; - QRadioButton* mUseFilters; - QRadioButton* mUseWholeBook; - QRadioButton* mUseSelection; - QComboBox* mFiltersCombo; - QListView* mCategoriesView; + TQButtonGroup* mButtonGroup; + TQRadioButton* mUseCategories; + TQRadioButton* mUseFilters; + TQRadioButton* mUseWholeBook; + TQRadioButton* mUseSelection; + TQComboBox* mFiltersCombo; + TQListView* mCategoriesView; }; #endif // SELECTIONPAGE_H diff --git a/kaddressbook/printing/stylepage.cpp b/kaddressbook/printing/stylepage.cpp index 9e1be7bd1..88e2e71cf 100644 --- a/kaddressbook/printing/stylepage.cpp +++ b/kaddressbook/printing/stylepage.cpp @@ -22,11 +22,11 @@ without including the source code for Qt in the source distribution. */ -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpixmap.h> -#include <qradiobutton.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpixmap.h> +#include <tqradiobutton.h> #include <kcombobox.h> #include <kdialog.h> @@ -34,8 +34,8 @@ #include "stylepage.h" -StylePage::StylePage( KABC::AddressBook *ab, QWidget* parent, const char* name ) - : QWidget( parent, name ), mAddressBook( ab ) +StylePage::StylePage( KABC::AddressBook *ab, TQWidget* parent, const char* name ) + : TQWidget( parent, name ), mAddressBook( ab ) { initGUI(); @@ -44,14 +44,14 @@ StylePage::StylePage( KABC::AddressBook *ab, QWidget* parent, const char* name mSortTypeCombo->insertItem( i18n( "Ascending" ) ); mSortTypeCombo->insertItem( i18n( "Descending" ) ); - connect( mStyleCombo, SIGNAL( activated( int ) ), SIGNAL( styleChanged( int ) ) ); + connect( mStyleCombo, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( styleChanged( int ) ) ); } StylePage::~StylePage() { } -void StylePage::setPreview( const QPixmap &pixmap ) +void StylePage::setPreview( const TQPixmap &pixmap ) { if ( pixmap.isNull() ) mPreview->setText( i18n( "(No preview available.)" ) ); @@ -59,7 +59,7 @@ void StylePage::setPreview( const QPixmap &pixmap ) mPreview->setPixmap( pixmap ); } -void StylePage::addStyleName( const QString &name ) +void StylePage::addStyleName( const TQString &name ) { mStyleCombo->insertItem( name ); } @@ -112,27 +112,27 @@ void StylePage::initGUI() { setCaption( i18n( "Choose Printing Style" ) ); - QGridLayout *topLayout = new QGridLayout( this, 2, 2, KDialog::marginHint(), + TQGridLayout *topLayout = new TQGridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "What should the print look like?\n" + TQLabel *label = new TQLabel( i18n( "What should the print look like?\n" "KAddressBook has several printing styles, designed for different purposes.\n" "Choose the style that suits your needs below." ), this ); topLayout->addMultiCellWidget( label, 0, 0, 0, 1 ); - QButtonGroup *group = new QButtonGroup( i18n( "Sorting" ), this ); + TQButtonGroup *group = new TQButtonGroup( i18n( "Sorting" ), this ); group->setColumnLayout( 0, Qt::Vertical ); - QGridLayout *sortLayout = new QGridLayout( group->layout(), 2, 2, + TQGridLayout *sortLayout = new TQGridLayout( group->layout(), 2, 2, KDialog::spacingHint() ); sortLayout->setAlignment( Qt::AlignTop ); - label = new QLabel( i18n( "Criterion:" ), group ); + label = new TQLabel( i18n( "Criterion:" ), group ); sortLayout->addWidget( label, 0, 0 ); mFieldCombo = new KComboBox( false, group ); sortLayout->addWidget( mFieldCombo, 0, 1 ); - label = new QLabel( i18n( "Order:" ), group ); + label = new TQLabel( i18n( "Order:" ), group ); sortLayout->addWidget( label, 1, 0 ); mSortTypeCombo = new KComboBox( false, group ); @@ -140,20 +140,20 @@ void StylePage::initGUI() topLayout->addWidget( group, 1, 0 ); - group = new QButtonGroup( i18n( "Print Style" ), this ); + group = new TQButtonGroup( i18n( "Print Style" ), this ); group->setColumnLayout( 0, Qt::Vertical ); - QVBoxLayout *styleLayout = new QVBoxLayout( group->layout(), + TQVBoxLayout *styleLayout = new TQVBoxLayout( group->layout(), KDialog::spacingHint() ); mStyleCombo = new KComboBox( false, group ); styleLayout->addWidget( mStyleCombo ); - mPreview = new QLabel( group ); - QFont font( mPreview->font() ); + mPreview = new TQLabel( group ); + TQFont font( mPreview->font() ); font.setPointSize( 20 ); mPreview->setFont( font ); mPreview->setScaledContents( true ); - mPreview->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); + mPreview->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignCenter ) ); styleLayout->addWidget( mPreview ); topLayout->addWidget( group, 1, 1 ); diff --git a/kaddressbook/printing/stylepage.h b/kaddressbook/printing/stylepage.h index d84394979..961ddd84e 100644 --- a/kaddressbook/printing/stylepage.h +++ b/kaddressbook/printing/stylepage.h @@ -25,7 +25,7 @@ #ifndef STYLEPAGE_H #define STYLEPAGE_H -#include <qwidget.h> +#include <tqwidget.h> #include <kabc/addressbook.h> #include <kabc/field.h> @@ -40,19 +40,19 @@ class StylePage : public QWidget Q_OBJECT public: - StylePage( KABC::AddressBook *ab, QWidget* parent = 0, const char* name = 0 ); + StylePage( KABC::AddressBook *ab, TQWidget* parent = 0, const char* name = 0 ); ~StylePage(); /** * Set a preview image. If @ref pixmap is 'null' a text will * be displayed instead. */ - void setPreview( const QPixmap &pixmap ); + void setPreview( const TQPixmap &pixmap ); /** * Add a style name. */ - void addStyleName( const QString &name ); + void addStyleName( const TQString &name ); /** * Clear the style name list. @@ -93,7 +93,7 @@ class StylePage : public QWidget KComboBox *mFieldCombo; KComboBox *mSortTypeCombo; KComboBox *mStyleCombo; - QLabel *mPreview; + TQLabel *mPreview; KABC::AddressBook *mAddressBook; KABC::Field::List mFields; |