summaryrefslogtreecommitdiffstats
path: root/kaddressbook/printing
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-20 16:27:27 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-20 16:27:27 -0600
commit94273bcb909fac42ef9427e3d8a614cab8c29c66 (patch)
tree91b99186971ecb475db3ca41b1b12df24029e389 /kaddressbook/printing
parent41b65d69967ad0d35f8b4dd37ac63aad1cebdae9 (diff)
downloadtdepim-94273bcb909fac42ef9427e3d8a614cab8c29c66.tar.gz
tdepim-94273bcb909fac42ef9427e3d8a614cab8c29c66.zip
Rename KABC namespace
Diffstat (limited to 'kaddressbook/printing')
-rw-r--r--kaddressbook/printing/detailledstyle.cpp6
-rw-r--r--kaddressbook/printing/detailledstyle.h6
-rw-r--r--kaddressbook/printing/kabentrypainter.cpp26
-rw-r--r--kaddressbook/printing/kabentrypainter.h2
-rw-r--r--kaddressbook/printing/mikesstyle.cpp12
-rw-r--r--kaddressbook/printing/mikesstyle.h6
-rw-r--r--kaddressbook/printing/printingwizard.cpp14
-rw-r--r--kaddressbook/printing/printingwizard.h6
-rw-r--r--kaddressbook/printing/printsortmode.cpp16
-rw-r--r--kaddressbook/printing/printsortmode.h14
-rw-r--r--kaddressbook/printing/printstyle.cpp4
-rw-r--r--kaddressbook/printing/printstyle.h8
-rw-r--r--kaddressbook/printing/stylepage.cpp10
-rw-r--r--kaddressbook/printing/stylepage.h10
14 files changed, 70 insertions, 70 deletions
diff --git a/kaddressbook/printing/detailledstyle.cpp b/kaddressbook/printing/detailledstyle.cpp
index e1d48db56..41d6231e9 100644
--- a/kaddressbook/printing/detailledstyle.cpp
+++ b/kaddressbook/printing/detailledstyle.cpp
@@ -122,7 +122,7 @@ DetailledPrintStyle::~DetailledPrintStyle()
mPainter = 0;
}
-void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintProgress *progress )
+void DetailledPrintStyle::print( const TDEABC::Addressee::List &contacts, PrintProgress *progress )
{
mPrintProgress = progress;
@@ -239,7 +239,7 @@ void DetailledPrintStyle::print( const KABC::Addressee::List &contacts, PrintPro
config->sync();
}
-bool DetailledPrintStyle::printEntries( const KABC::Addressee::List &contacts,
+bool DetailledPrintStyle::printEntries( const TDEABC::Addressee::List &contacts,
KPrinter *printer,
TQPainter *painter,
const TQRect &window)
@@ -247,7 +247,7 @@ bool DetailledPrintStyle::printEntries( const KABC::Addressee::List &contacts,
TQRect brect;
int ypos = 0, count = 0;
- KABC::Addressee::List::ConstIterator it;
+ TDEABC::Addressee::List::ConstIterator it;
for ( it = contacts.begin(); it != contacts.end(); ++it ) {
if ( !(*it).isEmpty() ) {
// do a faked print to get the bounding rect:
diff --git a/kaddressbook/printing/detailledstyle.h b/kaddressbook/printing/detailledstyle.h
index c68568aa1..05f30bae4 100644
--- a/kaddressbook/printing/detailledstyle.h
+++ b/kaddressbook/printing/detailledstyle.h
@@ -42,12 +42,12 @@ class DetailledPrintStyle : public PrintStyle
DetailledPrintStyle( PrintingWizard *parent, const char *name = 0 );
~DetailledPrintStyle();
- void print( const KABC::Addressee::List &contacts, PrintProgress* );
+ void print( const TDEABC::Addressee::List &contacts, PrintProgress* );
protected:
- bool printEntries( const KABC::Addressee::List &contacts, KPrinter *printer,
+ bool printEntries( const TDEABC::Addressee::List &contacts, KPrinter *printer,
TQPainter *painter, const TQRect &window );
- bool printEntry( const KABC::Addressee &contact, const TQRect &window,
+ bool printEntry( const TDEABC::Addressee &contact, const TQRect &window,
TQPainter *painter, int top, bool fake, TQRect *brect );
private:
AppearancePage *mPageAppearance;
diff --git a/kaddressbook/printing/kabentrypainter.cpp b/kaddressbook/printing/kabentrypainter.cpp
index d973f810c..49247ce8a 100644
--- a/kaddressbook/printing/kabentrypainter.cpp
+++ b/kaddressbook/printing/kabentrypainter.cpp
@@ -148,7 +148,7 @@ int KABEntryPainter::hits( const TQRectList& list, const TQPoint &p )
return -1;
}
-bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
+bool KABEntryPainter::printAddressee( const TDEABC::Addressee &addr,
const TQRect &window, TQPainter *painter,
int top, bool fake, TQRect *brect )
{
@@ -169,7 +169,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
TQFontMetrics fmComment( mCommentFont );
int y = top;
- KABC::Address address;
+ TDEABC::Address address;
// this is used to prepare some fields for printing and decide about
// the layout later:
@@ -255,7 +255,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
}
// Telephones:
- const KABC::PhoneNumber::List phoneNumbers( addr.phoneNumbers() );
+ const TDEABC::PhoneNumber::List phoneNumbers( addr.phoneNumbers() );
if ( !phoneNumbers.isEmpty() && mShowPhones ) {
contents.push_back( &mPhoneRects );
TQStringList list;
@@ -264,7 +264,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
list.append( phoneNumbers.count() == 1 ? i18n( "Telephone:" )
: i18n( "Telephones:" ) );
- KABC::PhoneNumber::List::ConstIterator it;
+ TDEABC::PhoneNumber::List::ConstIterator it;
for ( it = phoneNumbers.begin(); it != phoneNumbers.end(); ++it ) {
line = (*it).typeLabel();
line += ": " + (*it).number();
@@ -354,7 +354,7 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
// ^^^^^ done with emails, telephone, URLs and talk addresses
// now print the addresses:
- KABC::Address::List addresses = addr.addresses();
+ TDEABC::Address::List addresses = addr.addresses();
if ( addresses.count() > 0 && mShowAddresses ) {
y += fmBody.lineSpacing() / 2;
painter->setFont( mHeadLineFont );
@@ -372,29 +372,29 @@ bool KABEntryPainter::printAddressee( const KABC::Addressee &addr,
y += fmBody.lineSpacing() / 4;
painter->setFont( mBodyFont );
- KABC::Address::List::ConstIterator it;
+ TDEABC::Address::List::ConstIterator it;
for ( it = addresses.begin(); it != addresses.end(); ++it ) {
address = *it;
switch ( address.type() ) {
- case KABC::Address::Dom:
+ case TDEABC::Address::Dom:
line1 = i18n( "Domestic Address" );
break;
- case KABC::Address::Intl:
+ case TDEABC::Address::Intl:
line1 = i18n( "International Address" );
break;
- case KABC::Address::Postal:
+ case TDEABC::Address::Postal:
line1 = i18n( "Postal Address" );
break;
- case KABC::Address::Parcel:
+ case TDEABC::Address::Parcel:
line1 = i18n( "Parcel Address" );
break;
- case KABC::Address::Home:
+ case TDEABC::Address::Home:
line1 = i18n( "Home Address" );
break;
- case KABC::Address::Work:
+ case TDEABC::Address::Work:
line1 = i18n( "Work Address" );
break;
- case KABC::Address::Pref:
+ case TDEABC::Address::Pref:
default:
line1 = i18n( "Preferred Address" );
}
diff --git a/kaddressbook/printing/kabentrypainter.h b/kaddressbook/printing/kabentrypainter.h
index f8fea4912..cd933b579 100644
--- a/kaddressbook/printing/kabentrypainter.h
+++ b/kaddressbook/printing/kabentrypainter.h
@@ -58,7 +58,7 @@ class KABEntryPainter
@returns false if some error happens, otherwise true.
*/
- bool printAddressee( const KABC::Addressee &addr, const TQRect &window,
+ bool printAddressee( const TDEABC::Addressee &addr, const TQRect &window,
TQPainter *p, int top = 0, bool fake = false,
TQRect *rect = 0 );
diff --git a/kaddressbook/printing/mikesstyle.cpp b/kaddressbook/printing/mikesstyle.cpp
index aa718dfd0..25b2e02e9 100644
--- a/kaddressbook/printing/mikesstyle.cpp
+++ b/kaddressbook/printing/mikesstyle.cpp
@@ -53,7 +53,7 @@ MikesStyle::~MikesStyle()
{
}
-void MikesStyle::print( const KABC::Addressee::List &contacts, PrintProgress *progress )
+void MikesStyle::print( const TDEABC::Addressee::List &contacts, PrintProgress *progress )
{
TQFont mFont;
TQFont mBoldFont;
@@ -71,7 +71,7 @@ void MikesStyle::print( const KABC::Addressee::List &contacts, PrintProgress *pr
TQPaintDeviceMetrics metrics( p.device() );
int height = 0;
- KABC::Addressee::List::ConstIterator it;
+ TDEABC::Addressee::List::ConstIterator it;
progress->addMessage( i18n( "Preparing" ) );
progress->addMessage( i18n( "Printing" ) );
@@ -136,7 +136,7 @@ TQString MikesStyle::trimString( const TQString &text, int width, TQFontMetrics
return trimmed;
}
-void MikesStyle::doPaint( TQPainter &painter, const KABC::Addressee &addr,
+void MikesStyle::doPaint( TQPainter &painter, const TDEABC::Addressee &addr,
int maxHeight, const TQFont &font, const TQFont &bFont )
{
TQFontMetrics fm( font );
@@ -164,7 +164,7 @@ void MikesStyle::doPaint( TQPainter &painter, const KABC::Addressee &addr,
// now the fields, in two halves
painter.setFont( font );
- KABC::Field::List fields = wizard()->addressBook()->fields();
+ TDEABC::Field::List fields = wizard()->addressBook()->fields();
int numFields = fields.count();
TQString label;
TQString value;
@@ -211,7 +211,7 @@ void MikesStyle::paintTagLine( TQPainter &p, const TQFont &font )
p.drawText( 0, fm.height(), text );
}
-int MikesStyle::calcHeight( const KABC::Addressee &addr,
+int MikesStyle::calcHeight( const TDEABC::Addressee &addr,
const TQFont &font, const TQFont &bFont )
{
TQFontMetrics fm( font );
@@ -220,7 +220,7 @@ int MikesStyle::calcHeight( const KABC::Addressee &addr,
int height = 0;
// get the fields
- KABC::Field::List fieldList = wizard()->addressBook()->fields();
+ TDEABC::Field::List fieldList = wizard()->addressBook()->fields();
int numFields = fieldList.count();
int halfHeight = 0;
diff --git a/kaddressbook/printing/mikesstyle.h b/kaddressbook/printing/mikesstyle.h
index f94dce309..fe1be4224 100644
--- a/kaddressbook/printing/mikesstyle.h
+++ b/kaddressbook/printing/mikesstyle.h
@@ -42,12 +42,12 @@ class MikesStyle : public PrintStyle
MikesStyle( PrintingWizard *parent, const char *name );
~MikesStyle();
- void print( const KABC::Addressee::List&, PrintProgress* );
+ void print( const TDEABC::Addressee::List&, PrintProgress* );
protected:
- void doPaint( TQPainter &painter, const KABC::Addressee &addr, int maxHeight,
+ void doPaint( TQPainter &painter, const TDEABC::Addressee &addr, int maxHeight,
const TQFont &font, const TQFont &bFont );
- int calcHeight( const KABC::Addressee &addr, const TQFont &font, const TQFont &bFont);
+ int calcHeight( const TDEABC::Addressee &addr, const TQFont &font, const TQFont &bFont);
void paintTagLine( TQPainter &p, const TQFont &font);
TQString trimString( const TQString &text, int width, TQFontMetrics &fm);
};
diff --git a/kaddressbook/printing/printingwizard.cpp b/kaddressbook/printing/printingwizard.cpp
index 9ee8fe4a6..eecf434c3 100644
--- a/kaddressbook/printing/printingwizard.cpp
+++ b/kaddressbook/printing/printingwizard.cpp
@@ -52,7 +52,7 @@
using namespace KABPrinting;
-PrintingWizard::PrintingWizard( KPrinter *printer, KABC::AddressBook* ab,
+PrintingWizard::PrintingWizard( KPrinter *printer, TDEABC::AddressBook* ab,
const TQStringList& selection, TQWidget *parent,
const char* name )
: KWizard( parent, name ), mPrinter( printer ), mAddressBook( ab ),
@@ -137,7 +137,7 @@ void PrintingWizard::slotStyleSelected( int index )
}
}
-KABC::AddressBook* PrintingWizard::addressBook()
+TDEABC::AddressBook* PrintingWizard::addressBook()
{
return mAddressBook;
}
@@ -157,12 +157,12 @@ void PrintingWizard::print()
// prepare list of contacts to print:
- KABC::AddresseeList list;
+ TDEABC::AddresseeList list;
if ( mStyle != 0 ) {
if ( mSelectionPage->useSelection() ) {
TQStringList::ConstIterator it;
for ( it = mSelection.begin(); it != mSelection.end(); ++it ) {
- KABC::Addressee addr = addressBook()->findByUid( *it );
+ TDEABC::Addressee addr = addressBook()->findByUid( *it );
if ( !addr.isEmpty() )
list.append( addr );
}
@@ -173,7 +173,7 @@ void PrintingWizard::print()
if ( (*filterIt).name() == mSelectionPage->filter() )
break;
- KABC::AddressBook::ConstIterator it;
+ TDEABC::AddressBook::ConstIterator it;
for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) {
if ( (*filterIt).filterAddressee( *it ) )
list.append( *it );
@@ -181,7 +181,7 @@ void PrintingWizard::print()
} else if ( mSelectionPage->useCategories() ) {
TQStringList categories = mSelectionPage->categories();
- KABC::AddressBook::ConstIterator it;
+ TDEABC::AddressBook::ConstIterator it;
for ( it = addressBook()->begin(); it != addressBook()->end(); ++it ) {
const TQStringList tmp( (*it).categories() );
TQStringList::ConstIterator tmpIt;
@@ -193,7 +193,7 @@ void PrintingWizard::print()
}
} else {
// create a string list of all entries:
- KABC::AddressBook::ConstIterator it;
+ TDEABC::AddressBook::ConstIterator it;
for ( it = addressBook()->begin(); it != addressBook()->end(); ++it )
list.append( *it );
}
diff --git a/kaddressbook/printing/printingwizard.h b/kaddressbook/printing/printingwizard.h
index 359b746fe..3d2d0b27e 100644
--- a/kaddressbook/printing/printingwizard.h
+++ b/kaddressbook/printing/printingwizard.h
@@ -57,7 +57,7 @@ class PrintingWizard : public KWizard
Construct a printing wizard. Give the addressbook instance to print.
*/
PrintingWizard( KPrinter *printer,
- KABC::AddressBook* ab,
+ TDEABC::AddressBook* ab,
const TQStringList& selection,
TQWidget *parent = 0, const char *name = 0 );
~PrintingWizard();
@@ -75,7 +75,7 @@ class PrintingWizard : public KWizard
/**
Retrieve the document object.
*/
- KABC::AddressBook *addressBook();
+ TDEABC::AddressBook *addressBook();
/**
Retrieve the printer to be used.
@@ -94,7 +94,7 @@ class PrintingWizard : public KWizard
TQPtrList<PrintStyle> mStyleList;
Filter::List mFilters;
KPrinter *mPrinter;
- KABC::AddressBook *mAddressBook;
+ TDEABC::AddressBook *mAddressBook;
TQStringList mSelection;
PrintStyle *mStyle;
diff --git a/kaddressbook/printing/printsortmode.cpp b/kaddressbook/printing/printsortmode.cpp
index 3e1af4203..edbb9acc9 100644
--- a/kaddressbook/printing/printsortmode.cpp
+++ b/kaddressbook/printing/printsortmode.cpp
@@ -27,23 +27,23 @@
#if KDE_IS_VERSION(3,3,91)
-PrintSortMode::PrintSortMode( KABC::Field *field, bool ascending )
+PrintSortMode::PrintSortMode( TDEABC::Field *field, bool ascending )
: mSortField( field ), mAscending( ascending )
{
- const KABC::Field::List fields = KABC::Field::allFields();
- KABC::Field::List::ConstIterator it;
+ const TDEABC::Field::List fields = TDEABC::Field::allFields();
+ TDEABC::Field::List::ConstIterator it;
for ( it = fields.begin(); it != fields.end(); ++it ) {
- if ( (*it)->label() == KABC::Addressee::givenNameLabel() )
+ if ( (*it)->label() == TDEABC::Addressee::givenNameLabel() )
mGivenNameField = *it;
- else if ( (*it)->label() == KABC::Addressee::familyNameLabel() )
+ else if ( (*it)->label() == TDEABC::Addressee::familyNameLabel() )
mFamilyNameField = *it;
- else if ( (*it)->label() == KABC::Addressee::formattedNameLabel() )
+ else if ( (*it)->label() == TDEABC::Addressee::formattedNameLabel() )
mFormattedNameField = *it;
}
}
-bool PrintSortMode::lesser( const KABC::Addressee &first,
- const KABC::Addressee &second ) const
+bool PrintSortMode::lesser( const TDEABC::Addressee &first,
+ const TDEABC::Addressee &second ) const
{
if ( !mSortField )
return false;
diff --git a/kaddressbook/printing/printsortmode.h b/kaddressbook/printing/printsortmode.h
index a764e6c74..fca9f6baf 100644
--- a/kaddressbook/printing/printsortmode.h
+++ b/kaddressbook/printing/printsortmode.h
@@ -30,18 +30,18 @@
#include <tdeabc/sortmode.h>
-class PrintSortMode : public KABC::SortMode
+class PrintSortMode : public TDEABC::SortMode
{
public:
- PrintSortMode( KABC::Field *field, bool ascending = true );
+ PrintSortMode( TDEABC::Field *field, bool ascending = true );
- virtual bool lesser( const KABC::Addressee&, const KABC::Addressee& ) const;
+ virtual bool lesser( const TDEABC::Addressee&, const TDEABC::Addressee& ) const;
private:
- KABC::Field *mSortField;
- KABC::Field *mGivenNameField;
- KABC::Field *mFamilyNameField;
- KABC::Field *mFormattedNameField;
+ TDEABC::Field *mSortField;
+ TDEABC::Field *mGivenNameField;
+ TDEABC::Field *mFamilyNameField;
+ TDEABC::Field *mFormattedNameField;
bool mAscending;
};
diff --git a/kaddressbook/printing/printstyle.cpp b/kaddressbook/printing/printstyle.cpp
index 9387db325..33ef9ab54 100644
--- a/kaddressbook/printing/printstyle.cpp
+++ b/kaddressbook/printing/printstyle.cpp
@@ -102,13 +102,13 @@ void PrintStyle::hidePages()
mWizard->removePage( wdg );
}
-void PrintStyle::setPreferredSortOptions( KABC::Field *field, bool ascending )
+void PrintStyle::setPreferredSortOptions( TDEABC::Field *field, bool ascending )
{
mSortField = field;
mSortType = ascending;
}
-KABC::Field* PrintStyle::preferredSortField()
+TDEABC::Field* PrintStyle::preferredSortField()
{
return mSortField;
}
diff --git a/kaddressbook/printing/printstyle.h b/kaddressbook/printing/printstyle.h
index 2c5ef51b5..9eeca876f 100644
--- a/kaddressbook/printing/printstyle.h
+++ b/kaddressbook/printing/printstyle.h
@@ -69,7 +69,7 @@ class PrintStyle : public TQObject
/**
Reimplement this method to actually print.
*/
- virtual void print( const KABC::Addressee::List &contacts, PrintProgress* ) = 0;
+ virtual void print( const TDEABC::Addressee::List &contacts, PrintProgress* ) = 0;
/**
Reimplement this method to provide a preview of what will
@@ -91,7 +91,7 @@ class PrintStyle : public TQObject
/**
Returns the preferred sort criterion field.
*/
- KABC::Field* preferredSortField();
+ TDEABC::Field* preferredSortField();
/**
Returns the preferred sort type.
@@ -118,7 +118,7 @@ class PrintStyle : public TQObject
/**
Set preferred sort options for this printing style.
*/
- void setPreferredSortOptions( KABC::Field *field, bool ascending = true );
+ void setPreferredSortOptions( TDEABC::Field *field, bool ascending = true );
/**
Return the wizard object.
@@ -137,7 +137,7 @@ class PrintStyle : public TQObject
TQPtrList<TQWidget> mPageList;
TQStringList mPageTitles;
- KABC::Field *mSortField;
+ TDEABC::Field *mSortField;
bool mSortType;
};
diff --git a/kaddressbook/printing/stylepage.cpp b/kaddressbook/printing/stylepage.cpp
index 0b67897d2..0df149315 100644
--- a/kaddressbook/printing/stylepage.cpp
+++ b/kaddressbook/printing/stylepage.cpp
@@ -34,7 +34,7 @@
#include "stylepage.h"
-StylePage::StylePage( KABC::AddressBook *ab, TQWidget* parent, const char* name )
+StylePage::StylePage( TDEABC::AddressBook *ab, TQWidget* parent, const char* name )
: TQWidget( parent, name ), mAddressBook( ab )
{
initGUI();
@@ -69,7 +69,7 @@ void StylePage::clearStyleNames()
mStyleCombo->clear();
}
-void StylePage::setSortField( KABC::Field *field )
+void StylePage::setSortField( TDEABC::Field *field )
{
mFieldCombo->setCurrentText( field->label() );
}
@@ -82,7 +82,7 @@ void StylePage::setSortAscending( bool value )
mSortTypeCombo->setCurrentItem( 1 );
}
-KABC::Field* StylePage::sortField()
+TDEABC::Field* StylePage::sortField()
{
if ( mFieldCombo->currentItem() == -1 )
return mFields[ 0 ];
@@ -102,8 +102,8 @@ void StylePage::initFieldCombo()
mFieldCombo->clear();
- mFields = mAddressBook->fields( KABC::Field::All );
- KABC::Field::List::ConstIterator it;
+ mFields = mAddressBook->fields( TDEABC::Field::All );
+ TDEABC::Field::List::ConstIterator it;
for ( it = mFields.begin(); it != mFields.end(); ++it )
mFieldCombo->insertItem( (*it)->label() );
}
diff --git a/kaddressbook/printing/stylepage.h b/kaddressbook/printing/stylepage.h
index 46fbc2d6e..9b6958f71 100644
--- a/kaddressbook/printing/stylepage.h
+++ b/kaddressbook/printing/stylepage.h
@@ -41,7 +41,7 @@ class StylePage : public TQWidget
public:
- StylePage( KABC::AddressBook *ab, TQWidget* parent = 0, const char* name = 0 );
+ StylePage( TDEABC::AddressBook *ab, TQWidget* parent = 0, const char* name = 0 );
~StylePage();
/**
@@ -63,12 +63,12 @@ class StylePage : public TQWidget
/**
* Set the sort criterion field.
*/
- void setSortField( KABC::Field *field );
+ void setSortField( TDEABC::Field *field );
/**
* Returns the sort criterion field.
*/
- KABC::Field* sortField();
+ TDEABC::Field* sortField();
/**
* Set the sort type.
@@ -96,8 +96,8 @@ class StylePage : public TQWidget
KComboBox *mStyleCombo;
TQLabel *mPreview;
- KABC::AddressBook *mAddressBook;
- KABC::Field::List mFields;
+ TDEABC::AddressBook *mAddressBook;
+ TDEABC::Field::List mFields;
};
#endif // STYLEPAGE_H