diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kaddressbook | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook')
199 files changed, 4274 insertions, 4274 deletions
diff --git a/kaddressbook/addresseditwidget.cpp b/kaddressbook/addresseditwidget.cpp index 54171c34e..26924ef8f 100644 --- a/kaddressbook/addresseditwidget.cpp +++ b/kaddressbook/addresseditwidget.cpp @@ -22,19 +22,19 @@ without including the source code for Qt in the source distribution. */ -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistbox.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qsignal.h> -#include <qstring.h> -#include <qtextedit.h> -#include <qtoolbutton.h> -#include <qtooltip.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistbox.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqsignal.h> +#include <tqstring.h> +#include <tqtextedit.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> #include <kaccelmanager.h> #include <kactivelabel.h> @@ -57,18 +57,18 @@ class TabPressEater : public QObject { public: - TabPressEater( QObject *parent ) - : QObject( parent, "TabPressEater" ) + TabPressEater( TQObject *parent ) + : TQObject( parent, "TabPressEater" ) { } protected: - bool eventFilter( QObject*, QEvent *event ) + bool eventFilter( TQObject*, TQEvent *event ) { - if ( event->type() == QEvent::KeyPress ) { - QKeyEvent *keyEvent = (QKeyEvent*)event; + if ( event->type() == TQEvent::KeyPress ) { + TQKeyEvent *keyEvent = (TQKeyEvent*)event; if ( keyEvent->key() == Qt::Key_Tab ) { - QApplication::sendEvent( parent(), event ); + TQApplication::sendEvent( parent(), event ); return true; } else return false; @@ -79,26 +79,26 @@ class TabPressEater : public QObject }; -AddressEditWidget::AddressEditWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +AddressEditWidget::AddressEditWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - QBoxLayout *layout = new QVBoxLayout( this, 4, 2 ); + TQBoxLayout *layout = new TQVBoxLayout( this, 4, 2 ); layout->setSpacing( KDialog::spacingHint() ); mTypeCombo = new AddressTypeCombo( mAddressList, this ); - connect( mTypeCombo, SIGNAL( activated( int ) ), - SLOT( updateAddressEdit() ) ); + connect( mTypeCombo, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( updateAddressEdit() ) ); layout->addWidget( mTypeCombo ); mAddressField = new KActiveLabel( this ); - mAddressField->setFrameStyle( QFrame::Panel | QFrame::Sunken ); + mAddressField->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); mAddressField->setMinimumHeight( 20 ); mAddressField->setAlignment( Qt::AlignTop ); mAddressField->setTextFormat( Qt::PlainText ); layout->addWidget( mAddressField ); - mEditButton = new QPushButton( i18n( "street/postal", "&Edit Addresses..." ), this ); - connect( mEditButton, SIGNAL( clicked() ), this, SLOT( edit() ) ); + mEditButton = new TQPushButton( i18n( "street/postal", "&Edit Addresses..." ), this ); + connect( mEditButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( edit() ) ); layout->addWidget( mEditButton ); } @@ -134,13 +134,13 @@ void AddressEditWidget::setAddresses( const KABC::Addressee &addr, // Insert types for existing numbers. mTypeCombo->insertTypeList( list ); - QValueList<int> defaultTypes; + TQValueList<int> defaultTypes; defaultTypes << KABC::Address::Home; defaultTypes << KABC::Address::Work; AddresseeConfig config( mAddressee ); - const QValueList<int> configList = config.noDefaultAddrTypes(); - QValueList<int>::ConstIterator it; + const TQValueList<int> configList = config.noDefaultAddrTypes(); + TQValueList<int>::ConstIterator it; for ( it = configList.begin(); it != configList.end(); ++it ) defaultTypes.remove( *it ); @@ -195,7 +195,7 @@ void AddressEditWidget::edit() } AddresseeConfig config( mAddressee ); - QValueList<int> configList; + TQValueList<int> configList; if ( !hasHome ) configList << KABC::Address::Home; if ( !hasWork ) @@ -229,17 +229,17 @@ void AddressEditWidget::updateAddressEdit() mAddressField->setText( a.formattedAddress( mAddressee.realName() ) ); } #else - QString text; + TQString text; if ( !a.street().isEmpty() ) text += a.street() + "\n"; if ( !a.postOfficeBox().isEmpty() ) text += a.postOfficeBox() + "\n"; - text += a.locality() + QString(" ") + a.region(); + text += a.locality() + TQString(" ") + a.region(); if ( !a.postalCode().isEmpty() ) - text += QString(", ") + a.postalCode(); + text += TQString(", ") + a.postalCode(); text += "\n"; @@ -257,7 +257,7 @@ void AddressEditWidget::updateAddressEdit() } AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, - int selected, QWidget *parent, + int selected, TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "street/postal", "Edit Address" ), Ok | Cancel, Ok, parent, name, true, true ), @@ -265,18 +265,18 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, { mAddressList = list; - QWidget *page = plainPage(); + TQWidget *page = plainPage(); - QGridLayout *topLayout = new QGridLayout( page, 8, 2 ); + TQGridLayout *topLayout = new TQGridLayout( page, 8, 2 ); topLayout->setSpacing( spacingHint() ); mTypeCombo = new AddressTypeCombo( mAddressList, page ); topLayout->addMultiCellWidget( mTypeCombo, 0, 0, 0, 1 ); - QLabel *label = new QLabel( i18n( "<streetLabel>:", "%1:" ).arg( KABC::Address::streetLabel() ), page ); + TQLabel *label = new TQLabel( i18n( "<streetLabel>:", "%1:" ).arg( KABC::Address::streetLabel() ), page ); label->setAlignment( Qt::AlignTop | Qt::AlignLeft ); topLayout->addWidget( label, 1, 0 ); - mStreetTextEdit = new QTextEdit( page ); + mStreetTextEdit = new TQTextEdit( page ); mStreetTextEdit->setTextFormat( Qt::PlainText ); label->setBuddy( mStreetTextEdit ); topLayout->addWidget( mStreetTextEdit, 1, 1 ); @@ -284,79 +284,79 @@ AddressEditDialog::AddressEditDialog( const KABC::Address::List &list, TabPressEater *eater = new TabPressEater( this ); mStreetTextEdit->installEventFilter( eater ); - label = new QLabel( i18n( "<postOfficeBoxLabel>:", "%1:" ).arg( KABC::Address::postOfficeBoxLabel() ), page ); + label = new TQLabel( i18n( "<postOfficeBoxLabel>:", "%1:" ).arg( KABC::Address::postOfficeBoxLabel() ), page ); topLayout->addWidget( label, 2 , 0 ); mPOBoxEdit = new KLineEdit( page ); label->setBuddy( mPOBoxEdit ); topLayout->addWidget( mPOBoxEdit, 2, 1 ); - label = new QLabel( i18n( "<localityLabel>:", "%1:" ).arg( KABC::Address::localityLabel() ), page ); + label = new TQLabel( i18n( "<localityLabel>:", "%1:" ).arg( KABC::Address::localityLabel() ), page ); topLayout->addWidget( label, 3, 0 ); mLocalityEdit = new KLineEdit( page ); label->setBuddy( mLocalityEdit ); topLayout->addWidget( mLocalityEdit, 3, 1 ); - label = new QLabel( i18n( "<regionLabel>:", "%1:" ).arg( KABC::Address::regionLabel() ), page ); + label = new TQLabel( i18n( "<regionLabel>:", "%1:" ).arg( KABC::Address::regionLabel() ), page ); topLayout->addWidget( label, 4, 0 ); mRegionEdit = new KLineEdit( page ); label->setBuddy( mRegionEdit ); topLayout->addWidget( mRegionEdit, 4, 1 ); - label = new QLabel( i18n( "<postalCodeLabel>:", "%1:" ).arg( KABC::Address::postalCodeLabel() ), page ); + label = new TQLabel( i18n( "<postalCodeLabel>:", "%1:" ).arg( KABC::Address::postalCodeLabel() ), page ); topLayout->addWidget( label, 5, 0 ); mPostalCodeEdit = new KLineEdit( page ); label->setBuddy( mPostalCodeEdit ); topLayout->addWidget( mPostalCodeEdit, 5, 1 ); - label = new QLabel( i18n( "<countryLabel>:", "%1:" ).arg( KABC::Address::countryLabel() ), page ); + label = new TQLabel( i18n( "<countryLabel>:", "%1:" ).arg( KABC::Address::countryLabel() ), page ); topLayout->addWidget( label, 6, 0 ); mCountryCombo = new KComboBox( page ); mCountryCombo->setEditable( true ); mCountryCombo->setDuplicatesEnabled( false ); #if KDE_IS_VERSION(3,3,0) - QPushButton *labelButton = new QPushButton( i18n( "Edit Label..." ), page ); + TQPushButton *labelButton = new TQPushButton( i18n( "Edit Label..." ), page ); topLayout->addMultiCellWidget( labelButton, 7, 7, 0, 1 ); - connect( labelButton, SIGNAL( clicked() ), SLOT( editLabel() ) ); + connect( labelButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editLabel() ) ); #endif fillCountryCombo(); label->setBuddy( mCountryCombo ); topLayout->addWidget( mCountryCombo, 6, 1 ); - mPreferredCheckBox = new QCheckBox( i18n( "street/postal", "This is the preferred address" ), page ); + mPreferredCheckBox = new TQCheckBox( i18n( "street/postal", "This is the preferred address" ), page ); topLayout->addMultiCellWidget( mPreferredCheckBox, 8, 8, 0, 1 ); KSeparator *sep = new KSeparator( KSeparator::HLine, page ); topLayout->addMultiCellWidget( sep, 9, 9, 0, 1 ); - QHBox *buttonBox = new QHBox( page ); + TQHBox *buttonBox = new TQHBox( page ); buttonBox->setSpacing( spacingHint() ); topLayout->addMultiCellWidget( buttonBox, 10, 10, 0, 1 ); - QPushButton *addButton = new QPushButton( i18n( "New..." ), buttonBox ); - connect( addButton, SIGNAL( clicked() ), SLOT( addAddress() ) ); + TQPushButton *addButton = new TQPushButton( i18n( "New..." ), buttonBox ); + connect( addButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addAddress() ) ); - mRemoveButton = new QPushButton( i18n( "Remove" ), buttonBox ); - connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeAddress() ) ); + mRemoveButton = new TQPushButton( i18n( "Remove" ), buttonBox ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeAddress() ) ); - mChangeTypeButton = new QPushButton( i18n( "Change Type..." ), buttonBox ); - connect( mChangeTypeButton, SIGNAL( clicked() ), SLOT( changeType() ) ); + mChangeTypeButton = new TQPushButton( i18n( "Change Type..." ), buttonBox ); + connect( mChangeTypeButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeType() ) ); mTypeCombo->updateTypes(); mTypeCombo->setCurrentItem( selected ); updateAddressEdits(); - connect( mTypeCombo, SIGNAL( activated( int ) ), - SLOT( updateAddressEdits() ) ); - connect( mStreetTextEdit, SIGNAL( textChanged() ), SLOT( modified() ) ); - connect( mPOBoxEdit, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); - connect( mLocalityEdit, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); - connect( mRegionEdit, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); - connect( mPostalCodeEdit, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); - connect( mCountryCombo, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); - connect( mPreferredCheckBox, SIGNAL( toggled( bool ) ), SLOT( modified() ) ); + connect( mTypeCombo, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( updateAddressEdits() ) ); + connect( mStreetTextEdit, TQT_SIGNAL( textChanged() ), TQT_SLOT( modified() ) ); + connect( mPOBoxEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) ); + connect( mLocalityEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) ); + connect( mRegionEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) ); + connect( mPostalCodeEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) ); + connect( mCountryCombo, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) ); + connect( mPreferredCheckBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( modified() ) ); KAcceleratorManager::manage( this ); @@ -437,7 +437,7 @@ void AddressEditDialog::editLabel() { #if KDE_IS_VERSION(3,3,0) bool ok = false; - QString result = KInputDialog::getMultiLineText( KABC::Address::labelLabel(), + TQString result = KInputDialog::getMultiLineText( KABC::Address::labelLabel(), KABC::Address::labelLabel(), mLabel, &ok, this ); if ( ok ) { @@ -504,7 +504,7 @@ void AddressEditDialog::saveAddress( KABC::Address &addr ) void AddressEditDialog::fillCountryCombo() { - QString country[] = { + TQString country[] = { i18n( "Afghanistan" ), i18n( "Albania" ), i18n( "Algeria" ), i18n( "American Samoa" ), i18n( "Andorra" ), i18n( "Angola" ), i18n( "Anguilla" ), i18n( "Antarctica" ), i18n( "Antigua and Barbuda" ), @@ -587,7 +587,7 @@ void AddressEditDialog::fillCountryCombo() "" }; - QStringList countries; + TQStringList countries; for ( int i = 0; !country[ i ].isEmpty(); ++i ) countries.append( country[ i ] ); @@ -599,14 +599,14 @@ void AddressEditDialog::fillCountryCombo() } -AddressTypeDialog::AddressTypeDialog( int type, QWidget *parent ) +AddressTypeDialog::AddressTypeDialog( int type, TQWidget *parent ) : KDialogBase( Plain, i18n( "street/postal", "Edit Address Type" ), Ok | Cancel, Ok, parent, "AddressTypeDialog" ) { - QWidget *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page ); + TQWidget *page = plainPage(); + TQVBoxLayout *layout = new TQVBoxLayout( page ); - mGroup = new QButtonGroup( 2, Horizontal, i18n( "street/postal", "Address Types" ), page ); + mGroup = new TQButtonGroup( 2, Horizontal, i18n( "street/postal", "Address Types" ), page ); layout->addWidget( mGroup ); mTypeList = KABC::Address::typeList(); @@ -614,10 +614,10 @@ AddressTypeDialog::AddressTypeDialog( int type, QWidget *parent ) KABC::Address::TypeList::ConstIterator it; for ( it = mTypeList.begin(); it != mTypeList.end(); ++it ) - new QCheckBox( KABC::Address::typeLabel( *it ), mGroup ); + new TQCheckBox( KABC::Address::typeLabel( *it ), mGroup ); for ( int i = 0; i < mGroup->count(); ++i ) { - QCheckBox *box = (QCheckBox*)mGroup->find( i ); + TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); box->setChecked( type & mTypeList[ i ] ); } } @@ -630,7 +630,7 @@ int AddressTypeDialog::type() const { int type = 0; for ( int i = 0; i < mGroup->count(); ++i ) { - QCheckBox *box = (QCheckBox*)mGroup->find( i ); + TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); if ( box->isChecked() ) type += mTypeList[ i ]; } @@ -645,30 +645,30 @@ int AddressTypeDialog::type() const class LocaleAwareString : public QString { public: - LocaleAwareString() : QString() + LocaleAwareString() : TQString() {} - LocaleAwareString( const QString &str ) : QString( str ) + LocaleAwareString( const TQString &str ) : TQString( str ) {} }; static bool operator<( const LocaleAwareString &s1, const LocaleAwareString &s2 ) { - return ( QString::localeAwareCompare( s1, s2 ) < 0 ); + return ( TQString::localeAwareCompare( s1, s2 ) < 0 ); } -QStringList AddressEditDialog::sortLocaleAware( const QStringList &list ) +TQStringList AddressEditDialog::sortLocaleAware( const TQStringList &list ) { - QValueList<LocaleAwareString> sortedList; + TQValueList<LocaleAwareString> sortedList; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = list.begin(); it != list.end(); ++it ) sortedList.append( LocaleAwareString( *it ) ); qHeapSort( sortedList ); - QStringList retval; - QValueList<LocaleAwareString>::ConstIterator retIt; + TQStringList retval; + TQValueList<LocaleAwareString>::ConstIterator retIt; for ( retIt = sortedList.begin(); retIt != sortedList.end(); ++retIt ) retval.append( *retIt ); diff --git a/kaddressbook/addresseditwidget.h b/kaddressbook/addresseditwidget.h index cf7703156..8c02ee681 100644 --- a/kaddressbook/addresseditwidget.h +++ b/kaddressbook/addresseditwidget.h @@ -24,7 +24,7 @@ #ifndef ADDRESSEDITWIDGET_H #define ADDRESSEDITWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include <kdialogbase.h> #include <kabc/address.h> @@ -54,7 +54,7 @@ class AddressEditWidget : public QWidget Q_OBJECT public: - AddressEditWidget( QWidget *parent, const char *name = 0 ); + AddressEditWidget( TQWidget *parent, const char *name = 0 ); ~AddressEditWidget(); KABC::Address::List addresses(); @@ -78,7 +78,7 @@ class AddressEditWidget : public QWidget private: AddressTypeCombo *mTypeCombo; - QPushButton *mEditButton; + TQPushButton *mEditButton; KActiveLabel *mAddressField; KABC::Address::List mAddressList; @@ -95,7 +95,7 @@ class AddressEditDialog : public KDialogBase public: AddressEditDialog( const KABC::Address::List &list, int selected, - QWidget *parent, const char *name = 0 ); + TQWidget *parent, const char *name = 0 ); ~AddressEditDialog(); KABC::Address::List addresses(); @@ -113,25 +113,25 @@ class AddressEditDialog : public KDialogBase private: void saveAddress( KABC::Address &addr ); void fillCountryCombo(); - QStringList sortLocaleAware( const QStringList& ); + TQStringList sortLocaleAware( const TQStringList& ); AddressTypeCombo *mTypeCombo; - QTextEdit *mStreetTextEdit; + TQTextEdit *mStreetTextEdit; KComboBox *mCountryCombo; KLineEdit *mRegionEdit; KLineEdit *mLocalityEdit; KLineEdit *mPostalCodeEdit; KLineEdit *mPOBoxEdit; - QCheckBox *mPreferredCheckBox; + TQCheckBox *mPreferredCheckBox; - QPushButton *mRemoveButton; - QPushButton *mChangeTypeButton; + TQPushButton *mRemoveButton; + TQPushButton *mChangeTypeButton; KABC::Address::List mAddressList; KABC::Address *mPreviousAddress; bool mChanged; - QString mLabel; + TQString mLabel; }; /** @@ -140,13 +140,13 @@ class AddressEditDialog : public KDialogBase class AddressTypeDialog : public KDialogBase { public: - AddressTypeDialog( int type, QWidget *parent ); + AddressTypeDialog( int type, TQWidget *parent ); ~AddressTypeDialog(); int type() const; private: - QButtonGroup *mGroup; + TQButtonGroup *mGroup; KABC::Address::TypeList mTypeList; }; diff --git a/kaddressbook/addresseeconfig.cpp b/kaddressbook/addresseeconfig.cpp index 830127ebe..9d5f1cf9b 100644 --- a/kaddressbook/addresseeconfig.cpp +++ b/kaddressbook/addresseeconfig.cpp @@ -62,7 +62,7 @@ bool AddresseeConfig::automaticNameParsing() KABPrefs::instance()->automaticNameParsing() ); } -void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types ) +void AddresseeConfig::setNoDefaultAddrTypes( const TQValueList<int> &types ) { KConfig config( "kaddressbook_addrconfig" ); config.setGroup( mAddressee.uid() ); @@ -70,14 +70,14 @@ void AddresseeConfig::setNoDefaultAddrTypes( const QValueList<int> &types ) config.sync(); } -QValueList<int> AddresseeConfig::noDefaultAddrTypes() const +TQValueList<int> AddresseeConfig::noDefaultAddrTypes() const { KConfig config( "kaddressbook_addrconfig" ); config.setGroup( mAddressee.uid() ); return config.readIntListEntry( "NoDefaultAddrTypes" ); } -void AddresseeConfig::setCustomFields( const QStringList &fields ) +void AddresseeConfig::setCustomFields( const TQStringList &fields ) { KConfig config( "kaddressbook_addrconfig" ); config.setGroup( mAddressee.uid() ); @@ -85,7 +85,7 @@ void AddresseeConfig::setCustomFields( const QStringList &fields ) config.sync(); } -QStringList AddresseeConfig::customFields() const +TQStringList AddresseeConfig::customFields() const { KConfig config( "kaddressbook_addrconfig" ); config.setGroup( mAddressee.uid() ); diff --git a/kaddressbook/addresseeconfig.h b/kaddressbook/addresseeconfig.h index 798d35e5a..b9d22589c 100644 --- a/kaddressbook/addresseeconfig.h +++ b/kaddressbook/addresseeconfig.h @@ -41,11 +41,11 @@ class AddresseeConfig void setAutomaticNameParsing( bool value ); bool automaticNameParsing(); - void setNoDefaultAddrTypes( const QValueList<int> &types ); - QValueList<int> noDefaultAddrTypes() const; + void setNoDefaultAddrTypes( const TQValueList<int> &types ); + TQValueList<int> noDefaultAddrTypes() const; - void setCustomFields( const QStringList &fields ); - QStringList customFields() const; + void setCustomFields( const TQStringList &fields ); + TQStringList customFields() const; void remove(); diff --git a/kaddressbook/addresseeeditorbase.h b/kaddressbook/addresseeeditorbase.h index 394223b13..25d5c1abe 100644 --- a/kaddressbook/addresseeeditorbase.h +++ b/kaddressbook/addresseeeditorbase.h @@ -26,15 +26,15 @@ #include <kabc/addressee.h> -#include <qwidget.h> +#include <tqwidget.h> class AddresseeEditorBase : public QWidget { Q_OBJECT public: - AddresseeEditorBase( QWidget *parent, const char *name = 0 ) - : QWidget( parent, name ) + AddresseeEditorBase( TQWidget *parent, const char *name = 0 ) + : TQWidget( parent, name ) { } diff --git a/kaddressbook/addresseeeditordialog.cpp b/kaddressbook/addresseeeditordialog.cpp index 8df8357a2..429d6b90e 100644 --- a/kaddressbook/addresseeeditordialog.cpp +++ b/kaddressbook/addresseeeditordialog.cpp @@ -21,8 +21,8 @@ without including the source code for Qt in the source distribution. */ -#include <qapplication.h> -#include <qlayout.h> +#include <tqapplication.h> +#include <tqlayout.h> #include <kdebug.h> #include <klocale.h> @@ -35,7 +35,7 @@ #include "addresseeeditordialog.h" AddresseeEditorDialog::AddresseeEditorDialog( KAB::Core *core, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : KDialogBase( KDialogBase::Plain, i18n( "Edit Contact" ), KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Apply, KDialogBase::Ok, parent, name, false ) @@ -46,23 +46,23 @@ AddresseeEditorDialog::AddresseeEditorDialog( KAB::Core *core, kdDebug(5720) << "AddresseeEditorDialog()" << endl; - QWidget *page = plainPage(); + TQWidget *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page ); + TQVBoxLayout *layout = new TQVBoxLayout( page ); if ( KABPrefs::instance()->editorType() == KABPrefs::SimpleEditor ) { mEditorWidget = new SimpleAddresseeEditor( page ); } else { mEditorWidget = new AddresseeEditorWidget( page ); } - connect( mEditorWidget, SIGNAL( modified() ), SLOT( widgetModified() ) ); + connect( mEditorWidget, TQT_SIGNAL( modified() ), TQT_SLOT( widgetModified() ) ); layout->addWidget( mEditorWidget ); enableButton( KDialogBase::Apply, false ); KConfig config( "kaddressbookrc" ); config.setGroup( "AddresseeEditor" ); - QSize defaultSize( 750, 570 ); + TQSize defaultSize( 750, 570 ); resize( config.readSizeEntry( "Size", &defaultSize ) ); } @@ -103,10 +103,10 @@ void AddresseeEditorDialog::slotApply() return; if ( mEditorWidget->dirty() ) { - QApplication::setOverrideCursor( Qt::waitCursor ); + TQApplication::setOverrideCursor( Qt::waitCursor ); mEditorWidget->save(); emit contactModified( mEditorWidget->addressee() ); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } enableButton( KDialogBase::Apply, false ); diff --git a/kaddressbook/addresseeeditordialog.h b/kaddressbook/addresseeeditordialog.h index 889dd655f..5427a588d 100644 --- a/kaddressbook/addresseeeditordialog.h +++ b/kaddressbook/addresseeeditordialog.h @@ -38,7 +38,7 @@ class AddresseeEditorDialog : public KDialogBase public: AddresseeEditorDialog( KAB::Core *core, - QWidget *parent, const char *name = 0 ); + TQWidget *parent, const char *name = 0 ); ~AddresseeEditorDialog(); void setAddressee( const KABC::Addressee& ); @@ -48,7 +48,7 @@ class AddresseeEditorDialog : public KDialogBase signals: void contactModified( const KABC::Addressee& ); - void editorDestroyed( const QString& ); + void editorDestroyed( const TQString& ); protected slots: virtual void slotApply(); diff --git a/kaddressbook/addresseeeditorextension.cpp b/kaddressbook/addresseeeditorextension.cpp index b98260a7e..3f7fc175e 100644 --- a/kaddressbook/addresseeeditorextension.cpp +++ b/kaddressbook/addresseeeditorextension.cpp @@ -21,7 +21,7 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> @@ -32,10 +32,10 @@ #include "addresseeeditorextension.h" -AddresseeEditorExtension::AddresseeEditorExtension( KAB::Core *core, QWidget *parent, const char *name ) +AddresseeEditorExtension::AddresseeEditorExtension( KAB::Core *core, TQWidget *parent, const char *name ) : KAB::ExtensionWidget( core, parent, name ) { - QVBoxLayout *layout = new QVBoxLayout( this ); + TQVBoxLayout *layout = new TQVBoxLayout( this ); if ( KABPrefs::instance()->editorType() == KABPrefs::SimpleEditor ) mAddresseeEditor = new SimpleAddresseeEditor( this ); @@ -63,12 +63,12 @@ void AddresseeEditorExtension::contactsSelectionChanged() mAddresseeEditor->setAddressee( selectedAddressees[ 0 ] ); } -QString AddresseeEditorExtension::title() const +TQString AddresseeEditorExtension::title() const { return i18n( "Contact Editor" ); } -QString AddresseeEditorExtension::identifier() const +TQString AddresseeEditorExtension::identifier() const { return "contact_editor"; } diff --git a/kaddressbook/addresseeeditorextension.h b/kaddressbook/addresseeeditorextension.h index 3eab5c134..ff4e3d657 100644 --- a/kaddressbook/addresseeeditorextension.h +++ b/kaddressbook/addresseeeditorextension.h @@ -32,7 +32,7 @@ class AddresseeEditorExtension : public KAB::ExtensionWidget Q_OBJECT public: - AddresseeEditorExtension( KAB::Core *core, QWidget *parent, const char *name = 0 ); + AddresseeEditorExtension( KAB::Core *core, TQWidget *parent, const char *name = 0 ); ~AddresseeEditorExtension(); /** @@ -44,12 +44,12 @@ class AddresseeEditorExtension : public KAB::ExtensionWidget This method should be reimplemented and return the i18ned title of this widget. */ - virtual QString title() const; + virtual TQString title() const; /** This method should be reimplemented and return a unique identifier. */ - virtual QString identifier() const; + virtual TQString identifier() const; private: AddresseeEditorBase *mAddresseeEditor; diff --git a/kaddressbook/addresseeeditorwidget.cpp b/kaddressbook/addresseeeditorwidget.cpp index 253c3b45b..631d1a3ac 100644 --- a/kaddressbook/addresseeeditorwidget.cpp +++ b/kaddressbook/addresseeeditorwidget.cpp @@ -21,16 +21,16 @@ without including the source code for Qt in the source distribution. */ -#include <qcheckbox.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qtabwidget.h> -#include <qtextedit.h> -#include <qtoolbutton.h> -#include <qtooltip.h> +#include <tqcheckbox.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> +#include <tqtabwidget.h> +#include <tqtextedit.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> #include <kabc/resource.h> #include <kabc/stdaddressbook.h> @@ -67,7 +67,7 @@ #include "addresseeeditorwidget.h" -AddresseeEditorWidget::AddresseeEditorWidget( QWidget *parent, const char *name ) +AddresseeEditorWidget::AddresseeEditorWidget( TQWidget *parent, const char *name ) : AddresseeEditorBase( parent, name ), mBlockSignals( false ), mReadOnly( false ) { @@ -103,7 +103,7 @@ void AddresseeEditorWidget::setAddressee( const KABC::Addressee &addr ) } else if ( res->inherits( "KPIM::ResourceABC" ) ) { KPIM::ResourceABC *resAbc = static_cast<KPIM::ResourceABC *>( res ); - QString subresource = resAbc->uidToResourceMap()[ addr.uid() ]; + TQString subresource = resAbc->uidToResourceMap()[ addr.uid() ]; if ( !subresource.isEmpty() ) readOnly |= !resAbc->subresourceWritable( subresource ); } @@ -118,16 +118,16 @@ const KABC::Addressee &AddresseeEditorWidget::addressee() return mAddressee; } -void AddresseeEditorWidget::textChanged( const QString& ) +void AddresseeEditorWidget::textChanged( const TQString& ) { emitModified(); } void AddresseeEditorWidget::initGUI() { - QVBoxLayout *layout = new QVBoxLayout( this ); + TQVBoxLayout *layout = new TQVBoxLayout( this ); - mTabWidget = new QTabWidget( this ); + mTabWidget = new TQTabWidget( this ); layout->addWidget( mTabWidget ); setupTab1(); @@ -135,39 +135,39 @@ void AddresseeEditorWidget::initGUI() setupAdditionalTabs(); setupCustomFieldsTabs(); - connect( mTabWidget, SIGNAL( currentChanged(QWidget*) ), - SLOT( pageChanged(QWidget*) ) ); + connect( mTabWidget, TQT_SIGNAL( currentChanged(TQWidget*) ), + TQT_SLOT( pageChanged(TQWidget*) ) ); } void AddresseeEditorWidget::setupTab1() { // This is the General tab - QWidget *tab1 = new QWidget( mTabWidget ); + TQWidget *tab1 = new TQWidget( mTabWidget ); - QGridLayout *layout = new QGridLayout( tab1, 11, 7 ); + TQGridLayout *layout = new TQGridLayout( tab1, 11, 7 ); layout->setMargin( KDialogBase::marginHint() ); layout->setSpacing( KDialogBase::spacingHint() ); - QLabel *label; + TQLabel *label; KSeparator* bar; - QPushButton *button; + TQPushButton *button; ////////////////////////////////// // Upper left group (person info) // Person icon - label = new QLabel( tab1 ); + label = new TQLabel( tab1 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, KIcon::SizeMedium ) ); layout->addMultiCellWidget( label, 0, 1, 0, 0 ); // First name - button = new QPushButton( i18n( "Edit Name..." ), tab1 ); - QToolTip::add( button, i18n( "Edit the contact's name" ) ); + button = new TQPushButton( i18n( "Edit Name..." ), tab1 ); + TQToolTip::add( button, i18n( "Edit the contact's name" ) ); mNameEdit = new KLineEdit( tab1, "mNameEdit" ); - connect( mNameEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( nameTextChanged( const QString& ) ) ); - connect( button, SIGNAL( clicked() ), SLOT( nameButtonClicked() ) ); + connect( mNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( nameTextChanged( const TQString& ) ) ); + connect( button, TQT_SIGNAL( clicked() ), TQT_SLOT( nameButtonClicked() ) ); mNameLabel = new KSqueezedTextLabel( tab1 ); if ( KABPrefs::instance()->automaticNameParsing() ) { @@ -181,25 +181,25 @@ void AddresseeEditorWidget::setupTab1() layout->addWidget( button, 0, 1 ); layout->addWidget( mNameEdit, 0, 2 ); layout->addWidget( mNameLabel, 0, 2 ); - label = new QLabel( i18n( "<roleLabel>:", "%1:" ).arg( KABC::Addressee::roleLabel() ), tab1 ); + label = new TQLabel( i18n( "<roleLabel>:", "%1:" ).arg( KABC::Addressee::roleLabel() ), tab1 ); mRoleEdit = new KLineEdit( tab1 ); - connect( mRoleEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mRoleEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mRoleEdit ); layout->addWidget( label, 1, 1 ); layout->addWidget( mRoleEdit, 1, 2 ); // Organization - label = new QLabel( i18n( "<organizationLabel>:", "%1:" ).arg( KABC::Addressee::organizationLabel() ), tab1 ); + label = new TQLabel( i18n( "<organizationLabel>:", "%1:" ).arg( KABC::Addressee::organizationLabel() ), tab1 ); mOrgEdit = new KLineEdit( tab1 ); label->setBuddy( mOrgEdit ); - connect( mOrgEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( organizationTextChanged( const QString& ) ) ); + connect( mOrgEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( organizationTextChanged( const TQString& ) ) ); layout->addWidget( label, 2, 1 ); layout->addWidget( mOrgEdit, 2, 2 ); // File as (formatted name) - label = new QLabel( i18n( "Formatted name:" ), tab1 ); + label = new TQLabel( i18n( "Formatted name:" ), tab1 ); mFormattedNameLabel = new KSqueezedTextLabel( tab1 ); layout->addWidget( label, 3, 1 ); layout->addWidget( mFormattedNameLabel, 3, 2 ); @@ -211,13 +211,13 @@ void AddresseeEditorWidget::setupTab1() ////////////////////////////////////// // Phone numbers (upper right) - label = new QLabel( tab1 ); + label = new TQLabel( tab1 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "kaddressbook", KIcon::Desktop, KIcon::SizeMedium ) ); layout->addMultiCellWidget( label, 0, 1, 3, 3 ); mPhoneEditWidget = new PhoneEditWidget( tab1 ); - connect( mPhoneEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); + connect( mPhoneEditWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) ); layout->addMultiCellWidget( mPhoneEditWidget, 0, 3, 4, 6 ); bar = new KSeparator( KSeparator::HLine, tab1 ); @@ -225,58 +225,58 @@ void AddresseeEditorWidget::setupTab1() ////////////////////////////////////// // Addresses (lower left) - label = new QLabel( tab1 ); + label = new TQLabel( tab1 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "kfm_home", KIcon::Desktop, KIcon::SizeMedium ) ); layout->addMultiCellWidget( label, 5, 6, 0, 0 ); mAddressEditWidget = new AddressEditWidget( tab1 ); - connect( mAddressEditWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); + connect( mAddressEditWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) ); layout->addMultiCellWidget( mAddressEditWidget, 5, 10, 1, 2 ); ////////////////////////////////////// // Email / Web (lower right) - label = new QLabel( tab1 ); + label = new TQLabel( tab1 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "email", KIcon::Desktop, KIcon::SizeMedium ) ); layout->addMultiCellWidget( label, 5, 6, 3, 3 ); mEmailWidget = new EmailEditWidget( tab1 ); - connect( mEmailWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); + connect( mEmailWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) ); layout->addMultiCellWidget( mEmailWidget, 5, 6, 4, 6 ); // add the separator bar = new KSeparator( KSeparator::HLine, tab1 ); layout->addMultiCellWidget( bar, 7, 7, 3, 6 ); - QHBoxLayout *homePageLayout = new QHBoxLayout( 0, 11, 7 ); + TQHBoxLayout *homePageLayout = new TQHBoxLayout( 0, 11, 7 ); - label = new QLabel( tab1 ); + label = new TQLabel( tab1 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "homepage", KIcon::Desktop, KIcon::SizeMedium ) ); homePageLayout->addWidget( label ); - label = new QLabel( i18n( "<urlLabel>:", "%1:" ).arg( KABC::Addressee::urlLabel() ), tab1 ); + label = new TQLabel( i18n( "<urlLabel>:", "%1:" ).arg( KABC::Addressee::urlLabel() ), tab1 ); mURLEdit = new KLineEdit( tab1 ); - connect( mURLEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mURLEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mURLEdit ); homePageLayout->addWidget( label ); homePageLayout->addWidget( mURLEdit ); layout->addMultiCellLayout( homePageLayout, 8, 8, 3, 6 ); - QHBoxLayout *blogLayout = new QHBoxLayout( 0, 11, 7 ); - label = new QLabel( i18n("Blog feed:"), tab1 ); + TQHBoxLayout *blogLayout = new TQHBoxLayout( 0, 11, 7 ); + label = new TQLabel( i18n("Blog feed:"), tab1 ); blogLayout->addWidget( label ); mBlogEdit = new KLineEdit( tab1 ); blogLayout->addWidget( mBlogEdit ); - connect( mBlogEdit, SIGNAL( textChanged( const QString & ) ), - SLOT( textChanged( const QString & ) ) ); + connect( mBlogEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( textChanged( const TQString & ) ) ); label->setBuddy( mBlogEdit ); layout->addMultiCellLayout( blogLayout, 9, 9, 4, 6 ); mIMWidget = new IMEditWidget( tab1, mAddressee ); - connect( mIMWidget, SIGNAL( modified() ), SLOT( emitModified() ) ); + connect( mIMWidget, TQT_SIGNAL( modified() ), TQT_SLOT( emitModified() ) ); layout->addMultiCellWidget( mIMWidget, 10, 10, 4, 6 ); layout->addColSpacing( 6, 50 ); @@ -285,20 +285,20 @@ void AddresseeEditorWidget::setupTab1() layout->addMultiCellWidget( bar, 11, 11, 0, 6 ); /////////////////////////////////////// - QHBox *categoryBox = new QHBox( tab1 ); + TQHBox *categoryBox = new TQHBox( tab1 ); categoryBox->setSpacing( KDialogBase::spacingHint() ); // Categories - mCategoryButton = new QPushButton( i18n( "Select Categories..." ), categoryBox ); - connect( mCategoryButton, SIGNAL( clicked() ), SLOT( selectCategories() ) ); + mCategoryButton = new TQPushButton( i18n( "Select Categories..." ), categoryBox ); + connect( mCategoryButton, TQT_SIGNAL( clicked() ), TQT_SLOT( selectCategories() ) ); mCategoryEdit = new KLineEdit( categoryBox ); mCategoryEdit->setReadOnly( true ); - connect( mCategoryEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mCategoryEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); mSecrecyWidget = new SecrecyWidget( categoryBox ); - connect( mSecrecyWidget, SIGNAL( changed() ), SLOT( emitModified() ) ); + connect( mSecrecyWidget, TQT_SIGNAL( changed() ), TQT_SLOT( emitModified() ) ); layout->addMultiCellWidget( categoryBox, 12, 12, 0, 6 ); @@ -311,69 +311,69 @@ void AddresseeEditorWidget::setupTab1() void AddresseeEditorWidget::setupTab2() { // This is the Details tab - QWidget *tab2 = new QWidget( mTabWidget ); + TQWidget *tab2 = new TQWidget( mTabWidget ); - QGridLayout *layout = new QGridLayout( tab2, 6, 6 ); + TQGridLayout *layout = new TQGridLayout( tab2, 6, 6 ); layout->setMargin( KDialogBase::marginHint() ); layout->setSpacing( KDialogBase::spacingHint() ); - QLabel *label; + TQLabel *label; KSeparator* bar; /////////////////////// // Office info // Department - label = new QLabel( tab2 ); + label = new TQLabel( tab2 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "folder", KIcon::Desktop, KIcon::SizeMedium ) ); layout->addMultiCellWidget( label, 0, 1, 0, 0 ); - label = new QLabel( i18n( "Department:" ), tab2 ); + label = new TQLabel( i18n( "Department:" ), tab2 ); layout->addWidget( label, 0, 1 ); mDepartmentEdit = new KLineEdit( tab2 ); - connect( mDepartmentEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mDepartmentEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mDepartmentEdit ); layout->addWidget( mDepartmentEdit, 0, 2 ); - label = new QLabel( i18n( "Office:" ), tab2 ); + label = new TQLabel( i18n( "Office:" ), tab2 ); layout->addWidget( label, 1, 1 ); mOfficeEdit = new KLineEdit( tab2 ); - connect( mOfficeEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mOfficeEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mOfficeEdit ); layout->addWidget( mOfficeEdit, 1, 2 ); - label = new QLabel( i18n( "Profession:" ), tab2 ); + label = new TQLabel( i18n( "Profession:" ), tab2 ); layout->addWidget( label, 2, 1 ); mProfessionEdit = new KLineEdit( tab2 ); - connect( mProfessionEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mProfessionEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mProfessionEdit ); layout->addWidget( mProfessionEdit, 2, 2 ); - label = new QLabel( i18n( "Manager\'s name:" ), tab2 ); + label = new TQLabel( i18n( "Manager\'s name:" ), tab2 ); layout->addWidget( label, 0, 3 ); mManagerEdit = new KPIM::AddresseeLineEdit( tab2 ); - connect( mManagerEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mManagerEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mManagerEdit ); layout->addMultiCellWidget( mManagerEdit, 0, 0, 4, 5 ); - label = new QLabel( i18n( "Assistant's name:" ), tab2 ); + label = new TQLabel( i18n( "Assistant's name:" ), tab2 ); layout->addWidget( label, 1, 3 ); mAssistantEdit = new KPIM::AddresseeLineEdit( tab2 ); - connect( mAssistantEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mAssistantEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mAssistantEdit ); layout->addMultiCellWidget( mAssistantEdit, 1, 1, 4, 5 ); - label = new QLabel( i18n( "<titleLabel>:", "%1:" ).arg( KABC::Addressee::titleLabel() ), tab2 ); + label = new TQLabel( i18n( "<titleLabel>:", "%1:" ).arg( KABC::Addressee::titleLabel() ), tab2 ); layout->addWidget( label, 2, 3 ); mTitleEdit = new KLineEdit( tab2 ); - connect( mTitleEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mTitleEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mTitleEdit ); layout->addMultiCellWidget( mTitleEdit, 2, 2, 4, 5 ); @@ -383,44 +383,44 @@ void AddresseeEditorWidget::setupTab2() ///////////////////////////////////////////////// // Personal info - label = new QLabel( tab2 ); + label = new TQLabel( tab2 ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop, KIcon::SizeMedium ) ); layout->addMultiCellWidget( label, 4, 5, 0, 0 ); - label = new QLabel( i18n( "Nickname:" ), tab2 ); + label = new TQLabel( i18n( "Nickname:" ), tab2 ); layout->addWidget( label, 4, 1 ); mNicknameEdit = new KLineEdit( tab2 ); - connect( mNicknameEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mNicknameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mNicknameEdit ); layout->addWidget( mNicknameEdit, 4, 2 ); - label = new QLabel( i18n( "Partner's name:" ), tab2 ); + label = new TQLabel( i18n( "Partner's name:" ), tab2 ); layout->addWidget( label, 5, 1 ); mSpouseEdit = new KPIM::AddresseeLineEdit( tab2 ); - connect( mSpouseEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + connect( mSpouseEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); label->setBuddy( mSpouseEdit ); layout->addWidget( mSpouseEdit, 5, 2 ); - label = new QLabel( i18n( "Birthdate:" ), tab2 ); + label = new TQLabel( i18n( "Birthdate:" ), tab2 ); layout->addWidget( label, 4, 3 ); mBirthdayPicker = new KDateEdit( tab2 ); - connect( mBirthdayPicker, SIGNAL( dateChanged( const QDate& ) ), - SLOT( dateChanged( const QDate& ) ) ); - connect( mBirthdayPicker, SIGNAL( textChanged( const QString& ) ), - SLOT( emitModified() ) ); + connect( mBirthdayPicker, TQT_SIGNAL( dateChanged( const TQDate& ) ), + TQT_SLOT( dateChanged( const TQDate& ) ) ); + connect( mBirthdayPicker, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( emitModified() ) ); label->setBuddy( mBirthdayPicker ); layout->addWidget( mBirthdayPicker, 4, 4 ); - label = new QLabel( i18n( "Anniversary:" ), tab2 ); + label = new TQLabel( i18n( "Anniversary:" ), tab2 ); layout->addWidget( label, 5, 3 ); mAnniversaryPicker = new KDateEdit( tab2 ); - connect( mAnniversaryPicker, SIGNAL( dateChanged( const QDate& ) ), - SLOT( dateChanged( const QDate& ) ) ); - connect( mAnniversaryPicker, SIGNAL( textChanged( const QString& ) ), - SLOT( emitModified() ) ); + connect( mAnniversaryPicker, TQT_SIGNAL( dateChanged( const TQDate& ) ), + TQT_SLOT( dateChanged( const TQDate& ) ) ); + connect( mAnniversaryPicker, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( emitModified() ) ); label->setBuddy( mAnniversaryPicker ); layout->addWidget( mAnniversaryPicker, 5, 4 ); @@ -429,13 +429,13 @@ void AddresseeEditorWidget::setupTab2() ////////////////////////////////////// // Notes - label = new QLabel( i18n( "Note:" ), tab2 ); + label = new TQLabel( i18n( "Note:" ), tab2 ); label->setAlignment( Qt::AlignTop | Qt::AlignLeft ); layout->addWidget( label, 7, 0 ); - mNoteEdit = new QTextEdit( tab2 ); - mNoteEdit->setWordWrap( QTextEdit::WidgetWidth ); + mNoteEdit = new TQTextEdit( tab2 ); + mNoteEdit->setWordWrap( TQTextEdit::WidgetWidth ); mNoteEdit->setMinimumSize( mNoteEdit->sizeHint() ); - connect( mNoteEdit, SIGNAL( textChanged() ), SLOT( emitModified() ) ); + connect( mNoteEdit, TQT_SIGNAL( textChanged() ), TQT_SLOT( emitModified() ) ); label->setBuddy( mNoteEdit ); layout->addMultiCellWidget( mNoteEdit, 7, 7, 1, 5 ); @@ -451,8 +451,8 @@ void AddresseeEditorWidget::setupAdditionalTabs() // create all tab pages and add the widgets for ( int i = 0; i < manager->count(); ++i ) { - QString pageIdentifier = manager->factory( i )->pageIdentifier(); - QString pageTitle = manager->factory( i )->pageTitle(); + TQString pageIdentifier = manager->factory( i )->pageIdentifier(); + TQString pageTitle = manager->factory( i )->pageTitle(); if ( pageIdentifier == "misc" ) pageTitle = i18n( "Misc" ); @@ -464,7 +464,7 @@ void AddresseeEditorWidget::setupAdditionalTabs() mTabWidget->addTab( page, pageTitle ); - connect( page, SIGNAL( changed() ), SLOT( emitModified() ) ); + connect( page, TQT_SIGNAL( changed() ), TQT_SLOT( emitModified() ) ); } KAB::ContactEditorWidget *widget @@ -475,17 +475,17 @@ void AddresseeEditorWidget::setupAdditionalTabs() } // query the layout update - QDictIterator<ContactEditorTabPage> it( mTabPages ); + TQDictIterator<ContactEditorTabPage> it( mTabPages ); for ( ; it.current(); ++it ) it.current()->updateLayout(); } void AddresseeEditorWidget::setupCustomFieldsTabs() { - QStringList activePages = KABPrefs::instance()->advancedCustomFields(); + TQStringList activePages = KABPrefs::instance()->advancedCustomFields(); - const QStringList list = KGlobal::dirs()->findAllResources( "data", "kaddressbook/contacteditorpages/*.ui", true, true ); - for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { + const TQStringList list = KGlobal::dirs()->findAllResources( "data", "kaddressbook/contacteditorpages/*.ui", true, true ); + for ( TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) { if ( activePages.find( (*it).mid( (*it).findRev('/') + 1 ) ) == activePages.end() ) continue; @@ -498,7 +498,7 @@ void AddresseeEditorWidget::setupCustomFieldsTabs() page->addWidget( wdg ); page->updateLayout(); - connect( page, SIGNAL( changed() ), SLOT( emitModified() ) ); + connect( page, TQT_SIGNAL( changed() ), TQT_SLOT( emitModified() ) ); } else delete page; } @@ -557,8 +557,8 @@ void AddresseeEditorWidget::load() mAddressEditWidget->setAddresses( mAddressee, mAddressee.addresses() ); mBirthdayPicker->setDate( mAddressee.birthday().date() ); - QString anniversaryStr = mAddressee.custom( "KADDRESSBOOK", "X-Anniversary" ); - QDate anniversary = (anniversaryStr.isEmpty() ? QDate() : QDate::fromString( anniversaryStr, Qt::ISODate )); + TQString anniversaryStr = mAddressee.custom( "KADDRESSBOOK", "X-Anniversary" ); + TQDate anniversary = (anniversaryStr.isEmpty() ? TQDate() : TQDate::fromString( anniversaryStr, Qt::ISODate )); mAnniversaryPicker->setDate( anniversary ); mNicknameEdit->setText( mAddressee.nickName() ); mCategoryEdit->setText( mAddressee.categories().join( "," ) ); @@ -574,7 +574,7 @@ void AddresseeEditorWidget::load() mProfessionEdit->setText( mAddressee.custom( "KADDRESSBOOK", "X-Profession" ) ); mTitleEdit->setText( mAddressee.title() ); - QDictIterator<ContactEditorTabPage> it( mTabPages ); + TQDictIterator<ContactEditorTabPage> it( mTabPages ); for ( ; it.current(); ++it ) it.current()->loadContact( &mAddressee ); @@ -599,7 +599,7 @@ void AddresseeEditorWidget::save() mAddressee.removeCustom( "KADDRESSBOOK", "X-Department" ); #endif - QString homepage = mURLEdit->text().stripWhiteSpace(); + TQString homepage = mURLEdit->text().stripWhiteSpace(); if ( homepage.isEmpty() ) mAddressee.setUrl( KURL() ); else { @@ -614,12 +614,12 @@ void AddresseeEditorWidget::save() mAddressee.setNote( mNoteEdit->text() ); if ( mBirthdayPicker->date().isValid() ) - mAddressee.setBirthday( QDateTime( mBirthdayPicker->date() ) ); + mAddressee.setBirthday( TQDateTime( mBirthdayPicker->date() ) ); else - mAddressee.setBirthday( QDateTime() ); + mAddressee.setBirthday( TQDateTime() ); mAddressee.setNickName( mNicknameEdit->text() ); - mAddressee.setCategories( QStringList::split( ",", mCategoryEdit->text() ) ); + mAddressee.setCategories( TQStringList::split( ",", mCategoryEdit->text() ) ); mAddressee.setSecrecy( mSecrecyWidget->secrecy() ); @@ -687,7 +687,7 @@ void AddresseeEditorWidget::save() ++addressIter ) mAddressee.insertAddress( *addressIter ); - QDictIterator<ContactEditorTabPage> it( mTabPages ); + TQDictIterator<ContactEditorTabPage> it( mTabPages ); for ( ; it.current(); ++it ) it.current()->storeContact( &mAddressee ); @@ -699,13 +699,13 @@ bool AddresseeEditorWidget::dirty() return mDirty; } -void AddresseeEditorWidget::nameTextChanged( const QString &text ) +void AddresseeEditorWidget::nameTextChanged( const TQString &text ) { // use the addressee class to parse the name for us AddresseeConfig config( mAddressee ); if ( config.automaticNameParsing() ) { if ( !mAddressee.formattedName().isEmpty() ) { - QString fn = mAddressee.formattedName(); + TQString fn = mAddressee.formattedName(); mAddressee.setNameFromString( text ); mAddressee.setFormattedName( fn ); } else { @@ -725,7 +725,7 @@ void AddresseeEditorWidget::nameTextChanged( const QString &text ) emitModified(); } -void AddresseeEditorWidget::organizationTextChanged( const QString &text ) +void AddresseeEditorWidget::organizationTextChanged( const TQString &text ) { AddresseeConfig config( mAddressee ); @@ -798,17 +798,17 @@ void AddresseeEditorWidget::selectCategories() // Show the category dialog if ( mCategorySelectDialog == 0 ) { mCategorySelectDialog = new KPIM::CategorySelectDialog( KABPrefs::instance(), this ); - connect( mCategorySelectDialog, SIGNAL( categoriesSelected( const QStringList& ) ), - this, SLOT( categoriesSelected( const QStringList& ) ) ); - connect( mCategorySelectDialog, SIGNAL( editCategories() ), - this, SLOT( editCategories() ) ); + connect( mCategorySelectDialog, TQT_SIGNAL( categoriesSelected( const TQStringList& ) ), + this, TQT_SLOT( categoriesSelected( const TQStringList& ) ) ); + connect( mCategorySelectDialog, TQT_SIGNAL( editCategories() ), + this, TQT_SLOT( editCategories() ) ); } - mCategorySelectDialog->setSelected( QStringList::split( ",", mCategoryEdit->text() ) ); + mCategorySelectDialog->setSelected( TQStringList::split( ",", mCategoryEdit->text() ) ); mCategorySelectDialog->exec(); } -void AddresseeEditorWidget::categoriesSelected( const QStringList &list ) +void AddresseeEditorWidget::categoriesSelected( const TQStringList &list ) { mCategoryEdit->setText( list.join( "," ) ); } @@ -817,8 +817,8 @@ void AddresseeEditorWidget::editCategories() { if ( mCategoryEditDialog == 0 ) { mCategoryEditDialog = new KPIM::CategoryEditDialog( KABPrefs::instance(), this ); - connect( mCategoryEditDialog, SIGNAL( categoryConfigChanged() ), - mCategorySelectDialog, SLOT( updateCategoryConfig() ) ); + connect( mCategoryEditDialog, TQT_SIGNAL( categoryConfigChanged() ), + mCategorySelectDialog, TQT_SLOT( updateCategoryConfig() ) ); } mCategoryEditDialog->exec(); @@ -834,7 +834,7 @@ void AddresseeEditorWidget::emitModified() emit modified(); } -void AddresseeEditorWidget::dateChanged( const QDate& ) +void AddresseeEditorWidget::dateChanged( const TQDate& ) { emitModified(); } @@ -844,7 +844,7 @@ void AddresseeEditorWidget::invalidDate() KMessageBox::sorry( this, i18n( "You must specify a valid date" ) ); } -void AddresseeEditorWidget::pageChanged( QWidget *wdg ) +void AddresseeEditorWidget::pageChanged( TQWidget *wdg ) { if ( wdg ) KAcceleratorManager::manage( wdg ); @@ -859,7 +859,7 @@ bool AddresseeEditorWidget::readyToClose() { bool ok = true; - QDate date = mBirthdayPicker->date(); + TQDate date = mBirthdayPicker->date(); if ( !date.isValid() && !mBirthdayPicker->currentText().isEmpty() ) { KMessageBox::error( this, i18n( "You have to enter a valid birthdate." ) ); ok = false; @@ -901,7 +901,7 @@ void AddresseeEditorWidget::setReadOnly( bool readOnly ) mAnniversaryPicker->setEnabled( !readOnly ); mNoteEdit->setReadOnly( mReadOnly ); - QDictIterator<ContactEditorTabPage> it( mTabPages ); + TQDictIterator<ContactEditorTabPage> it( mTabPages ); for ( ; it.current(); ++it ) it.current()->setReadOnly( readOnly ); } diff --git a/kaddressbook/addresseeeditorwidget.h b/kaddressbook/addresseeeditorwidget.h index 93917245b..36711773b 100644 --- a/kaddressbook/addresseeeditorwidget.h +++ b/kaddressbook/addresseeeditorwidget.h @@ -24,7 +24,7 @@ #ifndef ADDRESSEEEDITORWIDGET_H #define ADDRESSEEEDITORWIDGET_H -#include <qdatetime.h> +#include <tqdatetime.h> #include <kabc/addressee.h> #include <kdialogbase.h> @@ -68,7 +68,7 @@ class AddresseeEditorWidget : public AddresseeEditorBase Q_OBJECT public: - AddresseeEditorWidget( QWidget *parent, const char *name = 0 ); + AddresseeEditorWidget( TQWidget *parent, const char *name = 0 ); ~AddresseeEditorWidget(); void setAddressee( const KABC::Addressee& ); @@ -84,8 +84,8 @@ class AddresseeEditorWidget : public AddresseeEditorBase bool readyToClose(); protected slots: - void textChanged( const QString& ); - void pageChanged( QWidget *wdg ); + void textChanged( const TQString& ); + void pageChanged( TQWidget *wdg ); /** Emits the modified signal and sets the dirty flag. Any slot @@ -94,10 +94,10 @@ class AddresseeEditorWidget : public AddresseeEditorBase */ void emitModified(); - void dateChanged( const QDate& ); + void dateChanged( const TQDate& ); void invalidDate(); - void nameTextChanged( const QString& ); - void organizationTextChanged( const QString& ); + void nameTextChanged( const TQString& ); + void organizationTextChanged( const TQString& ); void nameBoxChanged(); void nameButtonClicked(); void selectCategories(); @@ -105,7 +105,7 @@ class AddresseeEditorWidget : public AddresseeEditorBase /** Called whenever the categories change in the categories dialog. */ - void categoriesSelected( const QStringList& ); + void categoriesSelected( const TQStringList& ); /** Edits which categories are available in the CategorySelectDialog. @@ -130,7 +130,7 @@ class AddresseeEditorWidget : public AddresseeEditorBase // GUI KPIM::CategorySelectDialog *mCategorySelectDialog; KPIM::CategoryEditDialog *mCategoryEditDialog; - QTabWidget *mTabWidget; + TQTabWidget *mTabWidget; // Tab1 KLineEdit *mNameEdit; @@ -143,7 +143,7 @@ class AddresseeEditorWidget : public AddresseeEditorBase PhoneEditWidget *mPhoneEditWidget; KLineEdit *mURLEdit; KLineEdit *mBlogEdit; - QPushButton *mCategoryButton; + TQPushButton *mCategoryButton; KLineEdit *mCategoryEdit; SecrecyWidget *mSecrecyWidget; KSqueezedTextLabel *mNameLabel; @@ -159,9 +159,9 @@ class AddresseeEditorWidget : public AddresseeEditorBase KPIM::AddresseeLineEdit *mSpouseEdit; KDateEdit *mBirthdayPicker; KDateEdit *mAnniversaryPicker; - QTextEdit *mNoteEdit; + TQTextEdit *mNoteEdit; - QDict<ContactEditorTabPage> mTabPages; + TQDict<ContactEditorTabPage> mTabPages; }; #endif diff --git a/kaddressbook/addresseeutil.cpp b/kaddressbook/addresseeutil.cpp index e84cfea09..d564a9cb1 100644 --- a/kaddressbook/addresseeutil.cpp +++ b/kaddressbook/addresseeutil.cpp @@ -29,23 +29,23 @@ #include "addresseeutil.h" -QString AddresseeUtil::addresseesToClipboard( const KABC::Addressee::List &list ) +TQString AddresseeUtil::addresseesToClipboard( const KABC::Addressee::List &list ) { KABC::VCardConverter converter; return converter.createVCards( list ); } -KABC::Addressee::List AddresseeUtil::clipboardToAddressees( const QString &data ) +KABC::Addressee::List AddresseeUtil::clipboardToAddressees( const TQString &data ) { KABC::VCardConverter converter; return converter.parseVCards( data ); } -QString AddresseeUtil::addresseesToEmails( const KABC::Addressee::List &addrList ) +TQString AddresseeUtil::addresseesToEmails( const KABC::Addressee::List &addrList ) { - QStringList emails; + TQStringList emails; KABC::Addressee::List::ConstIterator it; for ( it = addrList.begin(); it != addrList.end(); ++it ) diff --git a/kaddressbook/addresseeutil.h b/kaddressbook/addresseeutil.h index 1b67fcf35..31d750e3f 100644 --- a/kaddressbook/addresseeutil.h +++ b/kaddressbook/addresseeutil.h @@ -24,7 +24,7 @@ #ifndef ADDRESSEEUTIL_H #define ADDRESSEEUTIL_H -#include <qstring.h> +#include <tqstring.h> #include <kabc/addressee.h> /** @@ -44,19 +44,19 @@ class AddresseeUtil Same as above function, except that an entire list of KABC::Addressee objects will be converted to vCard and put in the string. */ - static QString addresseesToClipboard( const KABC::Addressee::List &addrList ); + static TQString addresseesToClipboard( const KABC::Addressee::List &addrList ); /** Convert a string from the clipboard into a list of addressee objects. If the clipboard text was not a valid vcard, an empty list will be returned. */ - static KABC::Addressee::List clipboardToAddressees( const QString &clipboard ); + static KABC::Addressee::List clipboardToAddressees( const TQString &clipboard ); /** Converts the list of addressee objects into a list of email addresses. */ - static QString addresseesToEmails( const KABC::Addressee::List &addrList ); + static TQString addresseesToEmails( const KABC::Addressee::List &addrList ); private: AddresseeUtil() {} diff --git a/kaddressbook/addviewdialog.cpp b/kaddressbook/addviewdialog.cpp index 68046359d..b42729e34 100644 --- a/kaddressbook/addviewdialog.cpp +++ b/kaddressbook/addviewdialog.cpp @@ -21,11 +21,11 @@ without including the source code for Qt in the source distribution. */ -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qradiobutton.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqradiobutton.h> #include <klocale.h> @@ -33,8 +33,8 @@ #include "addviewdialog.h" -AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, - QWidget *parent, const char *name ) +AddViewDialog::AddViewDialog( TQDict<ViewFactory> *viewFactoryDict, + TQWidget *parent, const char *name ) : KDialogBase( KDialogBase::Plain, i18n( "Add View" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, parent, name ), @@ -42,33 +42,33 @@ AddViewDialog::AddViewDialog( QDict<ViewFactory> *viewFactoryDict, { mTypeId = 0; - QWidget *page = plainPage(); + TQWidget *page = plainPage(); - QGridLayout *layout = new QGridLayout( page, 2, 2 ); + TQGridLayout *layout = new TQGridLayout( page, 2, 2 ); layout->setSpacing( spacingHint() ); layout->setRowStretch( 1, 1 ); layout->setColStretch( 1, 1 ); - QLabel *label = new QLabel( i18n( "View name:" ), page ); + TQLabel *label = new TQLabel( i18n( "View name:" ), page ); layout->addWidget( label, 0, 0 ); - mViewNameEdit = new QLineEdit( page ); - connect( mViewNameEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); + mViewNameEdit = new TQLineEdit( page ); + connect( mViewNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); layout->addWidget( mViewNameEdit, 0, 1 ); - mTypeGroup = new QButtonGroup( 0, Qt::Horizontal, i18n( "View Type" ), page ); - connect( mTypeGroup, SIGNAL( clicked( int ) ), this, SLOT( clicked( int ) ) ); + mTypeGroup = new TQButtonGroup( 0, Qt::Horizontal, i18n( "View Type" ), page ); + connect( mTypeGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( clicked( int ) ) ); layout->addMultiCellWidget( mTypeGroup, 1, 1, 0, 1 ); - QGridLayout *groupLayout = new QGridLayout( mTypeGroup->layout(), 3, 2 ); + TQGridLayout *groupLayout = new TQGridLayout( mTypeGroup->layout(), 3, 2 ); groupLayout->setSpacing( spacingHint() ); int row = 0; - QDictIterator<ViewFactory> iter( *mViewFactoryDict ); + TQDictIterator<ViewFactory> iter( *mViewFactoryDict ); for ( iter.toFirst(); iter.current(); ++iter ) { - QRadioButton *button = new QRadioButton( i18n((*iter)->type().utf8()), + TQRadioButton *button = new TQRadioButton( i18n((*iter)->type().utf8()), mTypeGroup, (*iter)->type().latin1() ); - label = new QLabel( (*iter)->description(), mTypeGroup ); + label = new TQLabel( (*iter)->description(), mTypeGroup ); label->setAlignment( Qt::WordBreak ); groupLayout->addWidget( button, row, 0, Qt::AlignTop ); @@ -86,12 +86,12 @@ AddViewDialog::~AddViewDialog() { } -QString AddViewDialog::viewName()const +TQString AddViewDialog::viewName()const { return mViewNameEdit->text(); } -QString AddViewDialog::viewType()const +TQString AddViewDialog::viewType()const { // we missuse the name property for storing the type return mTypeGroup->find( mTypeId )->name(); @@ -102,7 +102,7 @@ void AddViewDialog::clicked( int id ) mTypeId = id; } -void AddViewDialog::textChanged( const QString &text ) +void AddViewDialog::textChanged( const TQString &text ) { enableButton( KDialogBase::Ok, !text.isEmpty() ); } diff --git a/kaddressbook/addviewdialog.h b/kaddressbook/addviewdialog.h index 972f6ef3a..a3c956792 100644 --- a/kaddressbook/addviewdialog.h +++ b/kaddressbook/addviewdialog.h @@ -25,8 +25,8 @@ #define ADDVIEWDIALOG_H #include <kdialogbase.h> -#include <qdict.h> -#include <qstring.h> +#include <tqdict.h> +#include <tqstring.h> class QButtonGroup; class QLineEdit; @@ -43,13 +43,13 @@ class AddViewDialog : public KDialogBase Q_OBJECT public: - AddViewDialog( QDict<ViewFactory> *viewFactoryDict, QWidget *parent, + AddViewDialog( TQDict<ViewFactory> *viewFactoryDict, TQWidget *parent, const char *name = 0 ); ~AddViewDialog(); - QString viewName()const; + TQString viewName()const; - QString viewType()const ; + TQString viewType()const ; protected slots: /** @@ -60,12 +60,12 @@ class AddViewDialog : public KDialogBase /** Called when the user changes the text in the name of the view. */ - void textChanged( const QString &text ); + void textChanged( const TQString &text ); private: - QDict<ViewFactory> *mViewFactoryDict; - QLineEdit *mViewNameEdit; - QButtonGroup *mTypeGroup; + TQDict<ViewFactory> *mViewFactoryDict; + TQLineEdit *mViewNameEdit; + TQButtonGroup *mTypeGroup; int mTypeId; }; diff --git a/kaddressbook/advancedcustomfields.cpp b/kaddressbook/advancedcustomfields.cpp index ad630835f..b1788c509 100644 --- a/kaddressbook/advancedcustomfields.cpp +++ b/kaddressbook/advancedcustomfields.cpp @@ -23,15 +23,15 @@ without including the source code for Qt in the source distribution. */ -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qdatetimeedit.h> -#include <qlayout.h> -#include <qobjectlist.h> -#include <qspinbox.h> -#include <qregexp.h> -#include <qtextedit.h> -#include <qwidgetfactory.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqdatetimeedit.h> +#include <tqlayout.h> +#include <tqobjectlist.h> +#include <tqspinbox.h> +#include <tqregexp.h> +#include <tqtextedit.h> +#include <tqwidgetfactory.h> #include <kdatepicker.h> #include <kdatetimewidget.h> @@ -48,19 +48,19 @@ class KABCStorage : public KPIM::DesignerFields::Storage { public: - KABCStorage( KABC::Addressee *a, const QString &ns ) + KABCStorage( KABC::Addressee *a, const TQString &ns ) : mAddressee( a ), mNs( ns ) { } - QStringList keys() + TQStringList keys() { - QStringList keys; + TQStringList keys; - const QStringList customs = mAddressee->customs(); - QStringList::ConstIterator it; + const TQStringList customs = mAddressee->customs(); + TQStringList::ConstIterator it; for ( it = customs.begin(); it != customs.end(); ++it ) { - QString app, name, value; + TQString app, name, value; splitField( *it, app, name, value ); if ( app == mNs ) keys.append( name ); } @@ -68,24 +68,24 @@ class KABCStorage : public KPIM::DesignerFields::Storage return keys; } - QString read( const QString &key ) + TQString read( const TQString &key ) { return mAddressee->custom( mNs, key ); } - void write( const QString &key, const QString &value ) + void write( const TQString &key, const TQString &value ) { mAddressee->insertCustom( mNs, key, value ); } private: KABC::Addressee *mAddressee; - QString mNs; + TQString mNs; }; -AdvancedCustomFields::AdvancedCustomFields( const QString &uiFile, KABC::AddressBook *ab, - QWidget *parent, const char *name ) +AdvancedCustomFields::AdvancedCustomFields( const TQString &uiFile, KABC::AddressBook *ab, + TQWidget *parent, const char *name ) : KAB::ContactEditorWidget( ab, parent, name ) { initGUI( uiFile ); @@ -93,9 +93,9 @@ AdvancedCustomFields::AdvancedCustomFields( const QString &uiFile, KABC::Address void AdvancedCustomFields::loadContact( KABC::Addressee *addr ) { - QString ns; + TQString ns; if ( mFields->identifier().upper() == "KADDRESSBOOK" || - QRegExp( "^Form\\d\\d?$" ).search( mFields->identifier() ) >= 0 ) { + TQRegExp( "^Form\\d\\d?$" ).search( mFields->identifier() ) >= 0 ) { ns = "KADDRESSBOOK"; } else { ns = mFields->identifier(); @@ -107,9 +107,9 @@ void AdvancedCustomFields::loadContact( KABC::Addressee *addr ) void AdvancedCustomFields::storeContact( KABC::Addressee *addr ) { - QString ns; + TQString ns; if ( mFields->identifier().upper() == "KADDRESSBOOK" || - QRegExp( "^Form\\d\\d?$" ).search( mFields->identifier() ) >= 0 ) { + TQRegExp( "^Form\\d\\d?$" ).search( mFields->identifier() ) >= 0 ) { ns = "KADDRESSBOOK"; } else { ns = mFields->identifier(); @@ -124,23 +124,23 @@ void AdvancedCustomFields::setReadOnly( bool readOnly ) mFields->setReadOnly( readOnly ); } -void AdvancedCustomFields::initGUI( const QString &uiFile ) +void AdvancedCustomFields::initGUI( const TQString &uiFile ) { - QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(), + TQVBoxLayout *layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); mFields = new KPIM::DesignerFields( uiFile, this ); layout->addWidget( mFields ); - connect( mFields, SIGNAL( modified() ), SLOT( setModified() ) ); + connect( mFields, TQT_SIGNAL( modified() ), TQT_SLOT( setModified() ) ); } -QString AdvancedCustomFields::pageIdentifier() const +TQString AdvancedCustomFields::pageIdentifier() const { return mFields->identifier(); } -QString AdvancedCustomFields::pageTitle() const +TQString AdvancedCustomFields::pageTitle() const { return mFields->title(); } diff --git a/kaddressbook/advancedcustomfields.h b/kaddressbook/advancedcustomfields.h index b997ffb9f..26b462274 100644 --- a/kaddressbook/advancedcustomfields.h +++ b/kaddressbook/advancedcustomfields.h @@ -28,9 +28,9 @@ #include <klocale.h> -#include <qmap.h> -#include <qpair.h> -#include <qstringlist.h> +#include <tqmap.h> +#include <tqpair.h> +#include <tqstringlist.h> #include <libkdepim/designerfields.h> @@ -41,18 +41,18 @@ class AdvancedCustomFields : public KAB::ContactEditorWidget Q_OBJECT public: - AdvancedCustomFields( const QString &uiFile, KABC::AddressBook *ab, - QWidget *parent, const char *name = 0 ); + AdvancedCustomFields( const TQString &uiFile, KABC::AddressBook *ab, + TQWidget *parent, const char *name = 0 ); void loadContact( KABC::Addressee *addr ); void storeContact( KABC::Addressee *addr ); void setReadOnly( bool readOnly ); - QString pageIdentifier() const; - QString pageTitle() const; + TQString pageIdentifier() const; + TQString pageTitle() const; private: - void initGUI( const QString& ); + void initGUI( const TQString& ); KPIM::DesignerFields *mFields; }; diff --git a/kaddressbook/common/filter.cpp b/kaddressbook/common/filter.cpp index ccac46ef8..13e5f5fc7 100644 --- a/kaddressbook/common/filter.cpp +++ b/kaddressbook/common/filter.cpp @@ -29,12 +29,12 @@ #include "filter.h" Filter::Filter() - : mName( QString::null ), mMatchRule( Matching ), mEnabled( true ), + : mName( TQString::null ), mMatchRule( Matching ), mEnabled( true ), mInternal( false ), mIsEmpty( true ) { } -Filter::Filter( const QString &name ) +Filter::Filter( const TQString &name ) : mName( name ), mMatchRule( Matching ), mEnabled( true ), mInternal( false ), mIsEmpty( false ) { @@ -44,14 +44,14 @@ Filter::~Filter() { } -void Filter::setName( const QString &name ) +void Filter::setName( const TQString &name ) { mName = name; mIsEmpty = false; } -const QString &Filter::name() const +const TQString &Filter::name() const { return mName; } @@ -74,7 +74,7 @@ void Filter::apply( KABC::Addressee::List &addresseeList ) bool Filter::filterAddressee( const KABC::Addressee &a ) const { - QStringList::ConstIterator iter; + TQStringList::ConstIterator iter; iter = mCategoryList.begin(); // empty filter always matches @@ -109,14 +109,14 @@ bool Filter::isEnabled() const return mEnabled; } -void Filter::setCategories( const QStringList &list ) +void Filter::setCategories( const TQStringList &list ) { mCategoryList = list; mIsEmpty = false; } -const QStringList &Filter::categories() const +const TQStringList &Filter::categories() const { return mCategoryList; } @@ -139,7 +139,7 @@ void Filter::restore( KConfig *config ) mIsEmpty = false; } -void Filter::save( KConfig *config, const QString &baseGroup, Filter::List &list ) +void Filter::save( KConfig *config, const TQString &baseGroup, Filter::List &list ) { { KConfigGroupSaver s( config, baseGroup ); @@ -147,7 +147,7 @@ void Filter::save( KConfig *config, const QString &baseGroup, Filter::List &list // remove the old filters uint count = config->readNumEntry( "Count" ); for ( uint i = 0; i < count; ++i ) - config->deleteGroup( QString( "%1_%2" ).arg( baseGroup ).arg( i ) ); + config->deleteGroup( TQString( "%1_%2" ).arg( baseGroup ).arg( i ) ); } @@ -155,7 +155,7 @@ void Filter::save( KConfig *config, const QString &baseGroup, Filter::List &list Filter::List::Iterator iter; for ( iter = list.begin(); iter != list.end(); ++iter ) { if ( !(*iter).mInternal ) { - KConfigGroupSaver s( config, QString( "%1_%2" ).arg( baseGroup ) + KConfigGroupSaver s( config, TQString( "%1_%2" ).arg( baseGroup ) .arg( index ) ); (*iter).save( config ); index++; @@ -166,7 +166,7 @@ void Filter::save( KConfig *config, const QString &baseGroup, Filter::List &list config->writeEntry( "Count", index ); } -Filter::List Filter::restore( KConfig *config, const QString &baseGroup ) +Filter::List Filter::restore( KConfig *config, const TQString &baseGroup ) { Filter::List list; int count = 0; @@ -179,15 +179,15 @@ Filter::List Filter::restore( KConfig *config, const QString &baseGroup ) for ( int i = 0; i < count; i++ ) { { - KConfigGroupSaver s( config, QString( "%1_%2" ).arg( baseGroup ).arg( i ) ); + KConfigGroupSaver s( config, TQString( "%1_%2" ).arg( baseGroup ).arg( i ) ); f.restore( config ); } list.append( f ); } - const QStringList cats = KABPrefs::instance()->customCategories(); - for ( QStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it ) { + const TQStringList cats = KABPrefs::instance()->customCategories(); + for ( TQStringList::ConstIterator it = cats.begin(); it != cats.end(); ++it ) { Filter filter; filter.mName = *it; filter.mEnabled = true; diff --git a/kaddressbook/common/filter.h b/kaddressbook/common/filter.h index 9251c5c17..9f66699e0 100644 --- a/kaddressbook/common/filter.h +++ b/kaddressbook/common/filter.h @@ -24,9 +24,9 @@ #ifndef FILTER_H #define FILTER_H -#include <qstring.h> -#include <qstringlist.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> #include <kabc/addressee.h> #include <kconfig.h> @@ -39,23 +39,23 @@ class Filter { public: - typedef QValueList<Filter> List; + typedef TQValueList<Filter> List; enum MatchRule { Matching = 0, NotMatching = 1 }; Filter(); - Filter( const QString& name ); + Filter( const TQString& name ); ~Filter(); /** Set the name of the filter. */ - void setName( const QString &name ); + void setName( const TQString &name ); /** @return The name of the filter. */ - const QString &name() const; + const TQString &name() const; /** @return Whether the filter is an internal one. @@ -92,12 +92,12 @@ class Filter /** Set the list of categories. This list is used to filter addressees. */ - void setCategories( const QStringList &list ); + void setCategories( const TQStringList &list ); /** @return The list of categories. */ - const QStringList &categories() const; + const TQStringList &categories() const; /** Saves the filter to the config file. The group should already be set. @@ -118,7 +118,7 @@ class Filter will be append for each filter saved. @param list The list of filters to be saved. */ - static void save( KConfig *config, const QString &baseGroup, Filter::List &list ); + static void save( KConfig *config, const TQString &baseGroup, Filter::List &list ); /** Restores a list of filters from a config file. @@ -128,7 +128,7 @@ class Filter @return The list of filters. */ - static Filter::List restore( KConfig *config, const QString &baseGroup ); + static Filter::List restore( KConfig *config, const TQString &baseGroup ); /** Sets the filter rule. If the rule is Filter::Matching (default), @@ -149,8 +149,8 @@ class Filter bool isEmpty() const; private: - QString mName; - QStringList mCategoryList; + TQString mName; + TQStringList mCategoryList; MatchRule mMatchRule; bool mEnabled; bool mInternal; diff --git a/kaddressbook/common/kabprefs.cpp b/kaddressbook/common/kabprefs.cpp index e8402d562..cacb2dfd1 100644 --- a/kaddressbook/common/kabprefs.cpp +++ b/kaddressbook/common/kabprefs.cpp @@ -35,7 +35,7 @@ KABPrefs::KABPrefs() { KConfigSkeleton::setCurrentGroup( "General" ); - QStringList defaultMap; + TQStringList defaultMap; defaultMap << "http://maps.google.com/maps?f=q&hl=%1&q=%n,%l,%s"; addItemString( "LocationMapURL", mLocationMapURL, defaultMap[ 0 ] ); addItemStringList( "LocationMapURLs", mLocationMapURLs, defaultMap ); diff --git a/kaddressbook/common/kabprefs.h b/kaddressbook/common/kabprefs.h index 3c2db1522..688cab99f 100644 --- a/kaddressbook/common/kabprefs.h +++ b/kaddressbook/common/kabprefs.h @@ -24,7 +24,7 @@ #ifndef KABPREFS_H #define KABPREFS_H -#include <qstringlist.h> +#include <tqstringlist.h> #include <kdepimmacros.h> #include "kabprefs_base.h" @@ -40,34 +40,34 @@ class KDE_EXPORT KABPrefs : public KABPrefsBase void usrReadConfig(); void usrWriteConfig(); - void setLocationMapURL( const QString &locationMapURL ) + void setLocationMapURL( const TQString &locationMapURL ) { - if ( !isImmutable( QString::fromLatin1( "LocationMapURL" ) ) ) + if ( !isImmutable( TQString::fromLatin1( "LocationMapURL" ) ) ) mLocationMapURL = locationMapURL; } - QString locationMapURL() const + TQString locationMapURL() const { return mLocationMapURL; } - void setLocationMapURLs( const QStringList &locationMapURLs ) + void setLocationMapURLs( const TQStringList &locationMapURLs ) { - if ( !isImmutable( QString::fromLatin1( "LocationMapURLs" ) ) ) + if ( !isImmutable( TQString::fromLatin1( "LocationMapURLs" ) ) ) mLocationMapURLs = locationMapURLs; } - QStringList locationMapURLs() const + TQStringList locationMapURLs() const { return mLocationMapURLs; } - QStringList customCategories() const + TQStringList customCategories() const { return mCustomCategories; } - void setCustomCategories(const QStringList & s) + void setCustomCategories(const TQStringList & s) { mCustomCategories = s; } @@ -79,8 +79,8 @@ class KDE_EXPORT KABPrefs : public KABPrefsBase static KABPrefs *mInstance; - QString mLocationMapURL; - QStringList mLocationMapURLs; + TQString mLocationMapURL; + TQStringList mLocationMapURLs; }; #endif diff --git a/kaddressbook/common/locationmap.cpp b/kaddressbook/common/locationmap.cpp index 92bdfaab1..efae019c3 100644 --- a/kaddressbook/common/locationmap.cpp +++ b/kaddressbook/common/locationmap.cpp @@ -61,7 +61,7 @@ void LocationMap::showAddress( const KABC::Address &addr ) kapp->invokeBrowser( url.url() ); } -QString LocationMap::createUrl( const KABC::Address &addr ) +TQString LocationMap::createUrl( const KABC::Address &addr ) { /** This method makes substitutions for the following place holders: @@ -72,10 +72,10 @@ QString LocationMap::createUrl( const KABC::Address &addr ) %c country (in ISO format) */ - QString urlTemplate = KABPrefs::instance()->locationMapURL().arg( KGlobal::locale()->country() ); + TQString urlTemplate = KABPrefs::instance()->locationMapURL().arg( KGlobal::locale()->country() ); if ( urlTemplate.isEmpty() ) { KMessageBox::error( 0, i18n( "No service provider available for map lookup!\nPlease add one in the configuration dialog." ) ); - return QString::null; + return TQString::null; } #if KDE_VERSION >= 319 diff --git a/kaddressbook/common/locationmap.h b/kaddressbook/common/locationmap.h index 82300d9df..e8a790360 100644 --- a/kaddressbook/common/locationmap.h +++ b/kaddressbook/common/locationmap.h @@ -25,8 +25,8 @@ #define LOCATIONMAP_H #include <kabc/address.h> -#include <qobject.h> -#include <qstring.h> +#include <tqobject.h> +#include <tqstring.h> class LocationMap : public QObject { @@ -43,7 +43,7 @@ class LocationMap : public QObject LocationMap(); private: - QString createUrl( const KABC::Address& ); + TQString createUrl( const KABC::Address& ); static LocationMap *mSelf; }; diff --git a/kaddressbook/contacteditorwidgetmanager.cpp b/kaddressbook/contacteditorwidgetmanager.cpp index de21528cd..6a6a68d99 100644 --- a/kaddressbook/contacteditorwidgetmanager.cpp +++ b/kaddressbook/contacteditorwidgetmanager.cpp @@ -21,7 +21,7 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <kdialog.h> @@ -41,7 +41,7 @@ ContactEditorWidgetManager *ContactEditorWidgetManager::mSelf = 0; ContactEditorWidgetManager::ContactEditorWidgetManager() - : QObject( qApp ) + : TQObject( qApp ) { reload(); } @@ -53,7 +53,7 @@ ContactEditorWidgetManager::~ContactEditorWidgetManager() ContactEditorWidgetManager *ContactEditorWidgetManager::self() { - kdWarning( !kapp, 7520 ) << "No QApplication object available!" << endl; + kdWarning( !kapp, 7520 ) << "No TQApplication object available!" << endl; if ( !mSelf ) mSelf = new ContactEditorWidgetManager(); @@ -76,7 +76,7 @@ void ContactEditorWidgetManager::reload() mFactories.clear(); kdDebug(5720) << "ContactEditorWidgetManager::reload()" << endl; const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/ContactEditorWidget", - QString( "[X-KDE-KAddressBook-CEWPluginVersion] == %1" ).arg( KAB_CEW_PLUGIN_VERSION ) ); + TQString( "[X-KDE-KAddressBook-CEWPluginVersion] == %1" ).arg( KAB_CEW_PLUGIN_VERSION ) ); KTrader::OfferList::ConstIterator it; for ( it = plugins.begin(); it != plugins.end(); ++it ) { @@ -107,10 +107,10 @@ void ContactEditorWidgetManager::reload() /////////////////////////////////////////////////////////////////////////////// -ContactEditorTabPage::ContactEditorTabPage( QWidget *parent, const char *name ) - : QWidget( parent, name ) +ContactEditorTabPage::ContactEditorTabPage( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - mLayout = new QGridLayout( this, 0, 2, KDialog::marginHint(), + mLayout = new TQGridLayout( this, 0, 2, KDialog::marginHint(), KDialog::spacingHint() ); } @@ -118,7 +118,7 @@ void ContactEditorTabPage::addWidget( KAB::ContactEditorWidget *widget ) { if ( widget->logicalWidth() == 2 ) { mWidgets.prepend( widget ); - connect( widget, SIGNAL( changed() ), SIGNAL( changed() ) ); + connect( widget, TQT_SIGNAL( changed() ), TQT_SIGNAL( changed() ) ); return; } @@ -133,7 +133,7 @@ void ContactEditorTabPage::addWidget( KAB::ContactEditorWidget *widget ) } mWidgets.insert( ++it, widget ); - connect( widget, SIGNAL( changed() ), SIGNAL( changed() ) ); + connect( widget, TQT_SIGNAL( changed() ), TQT_SIGNAL( changed() ) ); } void ContactEditorTabPage::loadContact( KABC::Addressee *addr ) @@ -174,8 +174,8 @@ void ContactEditorTabPage::updateLayout() row += (*it)->logicalHeight(); if ( it != mWidgets.fromLast() ) { - QFrame *frame = new QFrame( this ); - frame->setFrameStyle( QFrame::HLine | QFrame::Sunken ); + TQFrame *frame = new TQFrame( this ); + frame->setFrameStyle( TQFrame::HLine | TQFrame::Sunken ); mLayout->addMultiCellWidget( frame, row, row, 0, 1 ); row++; } @@ -190,8 +190,8 @@ void ContactEditorTabPage::updateLayout() return; } else { mLayout->addMultiCellWidget( *it, row, row + leftHeight - 1, 0, 0 ); - QFrame *frame = new QFrame( this ); - frame->setFrameStyle( QFrame::HLine | QFrame::Sunken ); + TQFrame *frame = new TQFrame( this ); + frame->setFrameStyle( TQFrame::HLine | TQFrame::Sunken ); mLayout->addMultiCellWidget( frame, row + leftHeight, row + leftHeight, 0, 1 ); } diff --git a/kaddressbook/contacteditorwidgetmanager.h b/kaddressbook/contacteditorwidgetmanager.h index 9b0efbc15..8ffbd1832 100644 --- a/kaddressbook/contacteditorwidgetmanager.h +++ b/kaddressbook/contacteditorwidgetmanager.h @@ -24,7 +24,7 @@ #ifndef CONTACTEDITORWIDGETMANAGER_H #define CONTACTEDITORWIDGETMANAGER_H -#include <qwidget.h> +#include <tqwidget.h> #include "contacteditorwidget.h" @@ -58,7 +58,7 @@ class ContactEditorWidgetManager : public QObject private: void reload(); - QValueList<KAB::ContactEditorWidgetFactory*> mFactories; + TQValueList<KAB::ContactEditorWidgetFactory*> mFactories; static ContactEditorWidgetManager *mSelf; }; @@ -68,7 +68,7 @@ class ContactEditorTabPage : public QWidget Q_OBJECT public: - ContactEditorTabPage( QWidget *parent, const char *name = 0 ); + ContactEditorTabPage( TQWidget *parent, const char *name = 0 ); /** Adds a widget to the tab. @@ -106,7 +106,7 @@ class ContactEditorTabPage : public QWidget void changed(); private: - QGridLayout *mLayout; + TQGridLayout *mLayout; KAB::ContactEditorWidget::List mWidgets; }; diff --git a/kaddressbook/customfieldswidget.cpp b/kaddressbook/customfieldswidget.cpp index a2a6e7011..4fc41819c 100644 --- a/kaddressbook/customfieldswidget.cpp +++ b/kaddressbook/customfieldswidget.cpp @@ -21,14 +21,14 @@ without including the source code for Qt in the source distribution. */ -#include <qcheckbox.h> -#include <qdatetimeedit.h> -#include <qframe.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qvalidator.h> -#include <qspinbox.h> +#include <tqcheckbox.h> +#include <tqdatetimeedit.h> +#include <tqframe.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqvalidator.h> +#include <tqspinbox.h> #include <kaccelmanager.h> #include <kcombobox.h> @@ -42,35 +42,35 @@ #include "customfieldswidget.h" -AddFieldDialog::AddFieldDialog( QWidget *parent, const char *name ) +AddFieldDialog::AddFieldDialog( TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "Add Field" ), Ok | Cancel, Ok, parent, name, true, true ) { - QWidget *page = plainPage(); + TQWidget *page = plainPage(); - QGridLayout *layout = new QGridLayout( page, 3, 2, marginHint(), spacingHint() ); + TQGridLayout *layout = new TQGridLayout( page, 3, 2, marginHint(), spacingHint() ); - QLabel *label = new QLabel( i18n( "Title:" ), page ); + TQLabel *label = new TQLabel( i18n( "Title:" ), page ); layout->addWidget( label, 0, 0 ); mTitle = new KLineEdit( page ); - mTitle->setValidator( new QRegExpValidator( QRegExp( "([a-zA-Z]|\\d|-)+" ), mTitle ) ); + mTitle->setValidator( new TQRegExpValidator( TQRegExp( "([a-zA-Z]|\\d|-)+" ), mTitle ) ); label->setBuddy( mTitle ); layout->addWidget( mTitle, 0, 1 ); - label = new QLabel( i18n( "Type:" ), page ); + label = new TQLabel( i18n( "Type:" ), page ); layout->addWidget( label, 1, 0 ); mType = new KComboBox( page ); label->setBuddy( mType ); layout->addWidget( mType, 1, 1 ); - mGlobal = new QCheckBox( i18n( "Is available for all contacts" ), page ); + mGlobal = new TQCheckBox( i18n( "Is available for all contacts" ), page ); mGlobal->setChecked( true ); layout->addMultiCellWidget( mGlobal, 2, 2, 0, 1 ); - connect( mTitle, SIGNAL( textChanged( const QString& ) ), - this, SLOT( nameChanged( const QString& ) ) ); + connect( mTitle, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( nameChanged( const TQString& ) ) ); KAcceleratorManager::manage( this ); @@ -95,18 +95,18 @@ AddFieldDialog::AddFieldDialog( QWidget *parent, const char *name ) mTitle->setFocus(); } -QString AddFieldDialog::title() const +TQString AddFieldDialog::title() const { return mTitle->text(); } -QString AddFieldDialog::identifier() const +TQString AddFieldDialog::identifier() const { - QString id = mTitle->text().lower(); + TQString id = mTitle->text().lower(); return id.replace( ",", "_" ).replace( " ", "_" ); } -QString AddFieldDialog::type() const +TQString AddFieldDialog::type() const { return mTypeList[ mType->currentItem() ]; } @@ -116,79 +116,79 @@ bool AddFieldDialog::isGlobal() const return mGlobal->isChecked(); } -void AddFieldDialog::nameChanged( const QString &name ) +void AddFieldDialog::nameChanged( const TQString &name ) { enableButton( Ok, !name.isEmpty() ); } -FieldWidget::FieldWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +FieldWidget::FieldWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(), + TQVBoxLayout *layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - mGlobalLayout = new QVBoxLayout( layout, KDialog::spacingHint() ); + mGlobalLayout = new TQVBoxLayout( layout, KDialog::spacingHint() ); mGlobalLayout->setAlignment( Qt::AlignTop ); - mSeparator = new QFrame( this ); - mSeparator->setFrameStyle( QFrame::HLine | QFrame::Sunken ); + mSeparator = new TQFrame( this ); + mSeparator->setFrameStyle( TQFrame::HLine | TQFrame::Sunken ); mSeparator->hide(); layout->addWidget( mSeparator ); - mLocalLayout = new QVBoxLayout( layout, KDialog::spacingHint() ); + mLocalLayout = new TQVBoxLayout( layout, KDialog::spacingHint() ); mLocalLayout->setAlignment( Qt::AlignTop ); } -void FieldWidget::addField( const QString &identifier, const QString &title, - const QString &type, bool isGlobal ) +void FieldWidget::addField( const TQString &identifier, const TQString &title, + const TQString &type, bool isGlobal ) { FieldRecord record; record.mIdentifier = identifier; record.mTitle = title; - record.mLabel = new QLabel( title + ":", this ); + record.mLabel = new TQLabel( title + ":", this ); record.mGlobal = isGlobal; if ( type == "integer" ) { - QSpinBox *wdg = new QSpinBox( 0, 1000, 1, this ); + TQSpinBox *wdg = new TQSpinBox( 0, 1000, 1, this ); record.mWidget = wdg; - connect( wdg, SIGNAL( valueChanged( int ) ), - this, SIGNAL( changed() ) ); + connect( wdg, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SIGNAL( changed() ) ); } else if ( type == "boolean" ) { - QCheckBox *wdg = new QCheckBox( this ); + TQCheckBox *wdg = new TQCheckBox( this ); record.mWidget = wdg; - connect( wdg, SIGNAL( toggled( bool ) ), - this, SIGNAL( changed() ) ); + connect( wdg, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SIGNAL( changed() ) ); } else if ( type == "date" ) { QDateEdit *wdg = new QDateEdit( this ); record.mWidget = wdg; - connect( wdg, SIGNAL( valueChanged( const QDate& ) ), - this, SIGNAL( changed() ) ); + connect( wdg, TQT_SIGNAL( valueChanged( const TQDate& ) ), + this, TQT_SIGNAL( changed() ) ); } else if ( type == "time" ) { QTimeEdit *wdg = new QTimeEdit( this ); record.mWidget = wdg; - connect( wdg, SIGNAL( valueChanged( const QTime& ) ), - this, SIGNAL( changed() ) ); + connect( wdg, TQT_SIGNAL( valueChanged( const TQTime& ) ), + this, TQT_SIGNAL( changed() ) ); } else if ( type == "datetime" ) { QDateTimeEdit *wdg = new QDateTimeEdit( this ); record.mWidget = wdg; - connect( wdg, SIGNAL( valueChanged( const QDateTime& ) ), - this, SIGNAL( changed() ) ); + connect( wdg, TQT_SIGNAL( valueChanged( const TQDateTime& ) ), + this, TQT_SIGNAL( changed() ) ); } else if ( type == "text" ) { - QLineEdit *wdg = new QLineEdit( this ); + TQLineEdit *wdg = new TQLineEdit( this ); record.mWidget = wdg; - connect( wdg, SIGNAL( textChanged( const QString& ) ), - this, SIGNAL( changed() ) ); + connect( wdg, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SIGNAL( changed() ) ); } record.mLabel->show(); record.mWidget->show(); if ( isGlobal ) { - record.mLayout = new QHBoxLayout( mGlobalLayout ); + record.mLayout = new TQHBoxLayout( mGlobalLayout ); record.mLayout->addWidget( record.mLabel ); record.mLayout->addWidget( record.mWidget, Qt::AlignLeft ); } else { - record.mLayout = new QHBoxLayout( mLocalLayout ); + record.mLayout = new TQHBoxLayout( mLocalLayout ); record.mLayout->addWidget( record.mLabel ); record.mLayout->addWidget( record.mWidget, Qt::AlignLeft ); mSeparator->show(); @@ -199,7 +199,7 @@ void FieldWidget::addField( const QString &identifier, const QString &title, recalculateLayout(); } -void FieldWidget::removeField( const QString &identifier ) +void FieldWidget::removeField( const TQString &identifier ) { FieldRecordList::Iterator it; for ( it = mFieldList.begin(); it != mFieldList.end(); ++it ) { @@ -227,37 +227,37 @@ void FieldWidget::clearFields() { FieldRecordList::ConstIterator fieldIt; for ( fieldIt = mFieldList.begin(); fieldIt != mFieldList.end(); ++fieldIt ) { - if ( (*fieldIt).mWidget->isA( "QLineEdit" ) ) { - QLineEdit *wdg = static_cast<QLineEdit*>( (*fieldIt).mWidget ); - wdg->setText( QString() ); - } else if ( (*fieldIt).mWidget->isA( "QSpinBox" ) ) { - QSpinBox *wdg = static_cast<QSpinBox*>( (*fieldIt).mWidget ); + if ( (*fieldIt).mWidget->isA( "TQLineEdit" ) ) { + TQLineEdit *wdg = static_cast<TQLineEdit*>( (*fieldIt).mWidget ); + wdg->setText( TQString() ); + } else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) { + TQSpinBox *wdg = static_cast<TQSpinBox*>( (*fieldIt).mWidget ); wdg->setValue( 0 ); - } else if ( (*fieldIt).mWidget->isA( "QCheckBox" ) ) { - QCheckBox *wdg = static_cast<QCheckBox*>( (*fieldIt).mWidget ); + } else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) { + TQCheckBox *wdg = static_cast<TQCheckBox*>( (*fieldIt).mWidget ); wdg->setChecked( true ); } else if ( (*fieldIt).mWidget->isA( "QDateEdit" ) ) { QDateEdit *wdg = static_cast<QDateEdit*>( (*fieldIt).mWidget ); - wdg->setDate( QDate::currentDate() ); + wdg->setDate( TQDate::currentDate() ); } else if ( (*fieldIt).mWidget->isA( "QTimeEdit" ) ) { QTimeEdit *wdg = static_cast<QTimeEdit*>( (*fieldIt).mWidget ); - wdg->setTime( QTime::currentTime() ); + wdg->setTime( TQTime::currentTime() ); } else if ( (*fieldIt).mWidget->isA( "QDateTimeEdit" ) ) { QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( (*fieldIt).mWidget ); - wdg->setDateTime( QDateTime::currentDateTime() ); + wdg->setDateTime( TQDateTime::currentDateTime() ); } } } void FieldWidget::loadContact( KABC::Addressee *addr ) { - const QStringList customs = addr->customs(); + const TQStringList customs = addr->customs(); clearFields(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = customs.begin(); it != customs.end(); ++it ) { - QString app, name, value; + TQString app, name, value; splitField( *it, app, name, value ); if ( app != "KADDRESSBOOK" ) continue; @@ -265,24 +265,24 @@ void FieldWidget::loadContact( KABC::Addressee *addr ) FieldRecordList::ConstIterator fieldIt; for ( fieldIt = mFieldList.begin(); fieldIt != mFieldList.end(); ++fieldIt ) { if ( (*fieldIt).mIdentifier == name ) { - if ( (*fieldIt).mWidget->isA( "QLineEdit" ) ) { - QLineEdit *wdg = static_cast<QLineEdit*>( (*fieldIt).mWidget ); + if ( (*fieldIt).mWidget->isA( "TQLineEdit" ) ) { + TQLineEdit *wdg = static_cast<TQLineEdit*>( (*fieldIt).mWidget ); wdg->setText( value ); - } else if ( (*fieldIt).mWidget->isA( "QSpinBox" ) ) { - QSpinBox *wdg = static_cast<QSpinBox*>( (*fieldIt).mWidget ); + } else if ( (*fieldIt).mWidget->isA( "TQSpinBox" ) ) { + TQSpinBox *wdg = static_cast<TQSpinBox*>( (*fieldIt).mWidget ); wdg->setValue( value.toInt() ); - } else if ( (*fieldIt).mWidget->isA( "QCheckBox" ) ) { - QCheckBox *wdg = static_cast<QCheckBox*>( (*fieldIt).mWidget ); + } else if ( (*fieldIt).mWidget->isA( "TQCheckBox" ) ) { + TQCheckBox *wdg = static_cast<TQCheckBox*>( (*fieldIt).mWidget ); wdg->setChecked( value == "true" || value == "1" ); } else if ( (*fieldIt).mWidget->isA( "QDateEdit" ) ) { QDateEdit *wdg = static_cast<QDateEdit*>( (*fieldIt).mWidget ); - wdg->setDate( QDate::fromString( value, Qt::ISODate ) ); + wdg->setDate( TQDate::fromString( value, Qt::ISODate ) ); } else if ( (*fieldIt).mWidget->isA( "QTimeEdit" ) ) { QTimeEdit *wdg = static_cast<QTimeEdit*>( (*fieldIt).mWidget ); - wdg->setTime( QTime::fromString( value, Qt::ISODate ) ); + wdg->setTime( TQTime::fromString( value, Qt::ISODate ) ); } else if ( (*fieldIt).mWidget->isA( "QDateTimeEdit" ) ) { QDateTimeEdit *wdg = static_cast<QDateTimeEdit*>( (*fieldIt).mWidget ); - wdg->setDateTime( QDateTime::fromString( value, Qt::ISODate ) ); + wdg->setDateTime( TQDateTime::fromString( value, Qt::ISODate ) ); } } } @@ -293,15 +293,15 @@ void FieldWidget::storeContact( KABC::Addressee *addr ) { FieldRecordList::ConstIterator it; for ( it = mFieldList.begin(); it != mFieldList.end(); ++it ) { - QString value; - if ( (*it).mWidget->isA( "QLineEdit" ) ) { - QLineEdit *wdg = static_cast<QLineEdit*>( (*it).mWidget ); + TQString value; + if ( (*it).mWidget->isA( "TQLineEdit" ) ) { + TQLineEdit *wdg = static_cast<TQLineEdit*>( (*it).mWidget ); value = wdg->text(); - } else if ( (*it).mWidget->isA( "QSpinBox" ) ) { - QSpinBox *wdg = static_cast<QSpinBox*>( (*it).mWidget ); - value = QString::number( wdg->value() ); - } else if ( (*it).mWidget->isA( "QCheckBox" ) ) { - QCheckBox *wdg = static_cast<QCheckBox*>( (*it).mWidget ); + } else if ( (*it).mWidget->isA( "TQSpinBox" ) ) { + TQSpinBox *wdg = static_cast<TQSpinBox*>( (*it).mWidget ); + value = TQString::number( wdg->value() ); + } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) { + TQCheckBox *wdg = static_cast<TQCheckBox*>( (*it).mWidget ); value = ( wdg->isChecked() ? "true" : "false" ); } else if ( (*it).mWidget->isA( "QDateEdit" ) ) { QDateEdit *wdg = static_cast<QDateEdit*>( (*it).mWidget ); @@ -350,15 +350,15 @@ void FieldWidget::recalculateLayout() } CustomFieldsWidget::CustomFieldsWidget( KABC::AddressBook *ab, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : KAB::ContactEditorWidget( ab, parent, name ) { initGUI(); - connect( mAddButton, SIGNAL( clicked() ), this, SLOT( addField() ) ); - connect( mRemoveButton, SIGNAL( clicked() ), this, SLOT( removeField() ) ); + connect( mAddButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addField() ) ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( removeField() ) ); - connect( mFieldWidget, SIGNAL( changed() ), this, SLOT( setModified() ) ); + connect( mFieldWidget, TQT_SIGNAL( changed() ), this, TQT_SLOT( setModified() ) ); } void CustomFieldsWidget::loadContact( KABC::Addressee *addr ) @@ -368,7 +368,7 @@ void CustomFieldsWidget::loadContact( KABC::Addressee *addr ) mFieldWidget->removeLocalFields(); AddresseeConfig addrConfig( mAddressee ); - QStringList fields = addrConfig.customFields(); + TQStringList fields = addrConfig.customFields(); if ( !fields.isEmpty() ) { for ( uint i = 0; i < fields.count(); i += 3 ) { @@ -424,14 +424,14 @@ void CustomFieldsWidget::removeField() { const FieldRecordList list = mFieldWidget->fields(); - QStringList fields; + TQStringList fields; FieldRecordList::ConstIterator it; for ( it = list.begin(); it != list.end(); ++it ) fields.append( (*it).mTitle ); bool ok; - QString title = KInputDialog::getItem( i18n( "Remove Field" ), + TQString title = KInputDialog::getItem( i18n( "Remove Field" ), i18n( "Select the field you want to remove:" ), fields, 0, false, &ok, this ); @@ -457,21 +457,21 @@ void CustomFieldsWidget::removeField() void CustomFieldsWidget::initGUI() { - QGridLayout *layout = new QGridLayout( this, 2, 3, KDialog::marginHint(), + TQGridLayout *layout = new TQGridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint() ); mFieldWidget = new FieldWidget( this ); layout->addMultiCellWidget( mFieldWidget, 0, 0, 0, 2 ); - mAddButton = new QPushButton( i18n( "Add Field..." ), this ); + mAddButton = new TQPushButton( i18n( "Add Field..." ), this ); layout->addWidget( mAddButton, 1, 1, Qt::AlignRight ); - mRemoveButton = new QPushButton( i18n( "Remove Field..." ), this ); + mRemoveButton = new TQPushButton( i18n( "Remove Field..." ), this ); mRemoveButton->setEnabled( false ); layout->addWidget( mRemoveButton, 1, 2, Qt::AlignRight ); // load global fields - QStringList globalFields = KABPrefs::instance()->globalCustomFields(); + TQStringList globalFields = KABPrefs::instance()->globalCustomFields(); if ( globalFields.isEmpty() ) return; @@ -483,9 +483,9 @@ void CustomFieldsWidget::initGUI() } } -QStringList CustomFieldsWidget::marshallFields( bool global ) const +TQStringList CustomFieldsWidget::marshallFields( bool global ) const { - QStringList retval; + TQStringList retval; const FieldRecordList list = mFieldWidget->fields(); FieldRecordList::ConstIterator it; @@ -494,10 +494,10 @@ QStringList CustomFieldsWidget::marshallFields( bool global ) const retval.append( (*it).mIdentifier ); retval.append( (*it).mTitle ); - QString type = "text"; - if ( (*it).mWidget->isA( "QSpinBox" ) ) { + TQString type = "text"; + if ( (*it).mWidget->isA( "TQSpinBox" ) ) { type = "integer"; - } else if ( (*it).mWidget->isA( "QCheckBox" ) ) { + } else if ( (*it).mWidget->isA( "TQCheckBox" ) ) { type = "boolean"; } else if ( (*it).mWidget->isA( "QDateEdit" ) ) { type = "date"; @@ -505,7 +505,7 @@ QStringList CustomFieldsWidget::marshallFields( bool global ) const type = "time"; } else if ( (*it).mWidget->isA( "QDateTimeEdit" ) ) { type = "datetime"; - } else if ( (*it).mWidget->isA( "QLineEdit" ) ) { + } else if ( (*it).mWidget->isA( "TQLineEdit" ) ) { type = "text"; } @@ -517,11 +517,11 @@ QStringList CustomFieldsWidget::marshallFields( bool global ) const } -void splitField( const QString &str, QString &app, QString &name, QString &value ) +void splitField( const TQString &str, TQString &app, TQString &name, TQString &value ) { int colon = str.find( ':' ); if ( colon != -1 ) { - QString tmp = str.left( colon ); + TQString tmp = str.left( colon ); value = str.mid( colon + 1 ); int dash = tmp.find( '-' ); diff --git a/kaddressbook/customfieldswidget.h b/kaddressbook/customfieldswidget.h index 6ee10a39a..19e962027 100644 --- a/kaddressbook/customfieldswidget.h +++ b/kaddressbook/customfieldswidget.h @@ -28,11 +28,11 @@ #include <kdialogbase.h> #include <klocale.h> -#include <qmap.h> -#include <qpair.h> -#include <qstringlist.h> -#include <qvaluevector.h> -#include <qwidget.h> +#include <tqmap.h> +#include <tqpair.h> +#include <tqstringlist.h> +#include <tqvaluevector.h> +#include <tqwidget.h> #include "contacteditorwidget.h" @@ -47,39 +47,39 @@ class KComboBox; class KLineEdit; typedef struct { - QString mIdentifier; - QString mTitle; + TQString mIdentifier; + TQString mTitle; bool mGlobal; - QLabel *mLabel; - QWidget *mWidget; - QHBoxLayout *mLayout; + TQLabel *mLabel; + TQWidget *mWidget; + TQHBoxLayout *mLayout; } FieldRecord; -typedef QValueList<FieldRecord> FieldRecordList; +typedef TQValueList<FieldRecord> FieldRecordList; class AddFieldDialog : public KDialogBase { Q_OBJECT public: - AddFieldDialog( QWidget *parent, const char *name = 0 ); + AddFieldDialog( TQWidget *parent, const char *name = 0 ); - QString title() const; - QString identifier() const; - QString type() const; + TQString title() const; + TQString identifier() const; + TQString type() const; bool isGlobal() const; private slots: - void nameChanged( const QString& ); + void nameChanged( const TQString& ); private: KLineEdit *mTitle; KComboBox *mType; - QCheckBox *mGlobal; + TQCheckBox *mGlobal; - QValueVector<QString> mTypeList; - QValueVector<QString> mTypeName; + TQValueVector<TQString> mTypeList; + TQValueVector<TQString> mTypeName; }; class FieldWidget : public QWidget @@ -87,12 +87,12 @@ class FieldWidget : public QWidget Q_OBJECT public: - FieldWidget( QWidget *parent, const char *name = 0 ); + FieldWidget( TQWidget *parent, const char *name = 0 ); - void addField( const QString &identifier, const QString &title, - const QString &type, bool isGlobal ); + void addField( const TQString &identifier, const TQString &title, + const TQString &type, bool isGlobal ); - void removeField( const QString &identifier ); + void removeField( const TQString &identifier ); void loadContact( KABC::Addressee *addr ); void storeContact( KABC::Addressee *addr ); @@ -109,9 +109,9 @@ class FieldWidget : public QWidget private: void recalculateLayout(); - QVBoxLayout *mGlobalLayout; - QVBoxLayout *mLocalLayout; - QFrame *mSeparator; + TQVBoxLayout *mGlobalLayout; + TQVBoxLayout *mLocalLayout; + TQFrame *mSeparator; FieldRecordList mFieldList; }; @@ -121,7 +121,7 @@ class CustomFieldsWidget : public KAB::ContactEditorWidget Q_OBJECT public: - CustomFieldsWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + CustomFieldsWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); void loadContact( KABC::Addressee *addr ); void storeContact( KABC::Addressee *addr ); @@ -134,11 +134,11 @@ class CustomFieldsWidget : public KAB::ContactEditorWidget private: void initGUI(); - QStringList marshallFields( bool ) const; + TQStringList marshallFields( bool ) const; - QPushButton *mAddButton; - QPushButton *mRemoveButton; - QGridLayout *mLayout; + TQPushButton *mAddButton; + TQPushButton *mRemoveButton; + TQGridLayout *mLayout; FieldWidget *mFieldWidget; @@ -148,15 +148,15 @@ class CustomFieldsWidget : public KAB::ContactEditorWidget class CustomFieldsWidgetFactory : public KAB::ContactEditorWidgetFactory { public: - KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) + KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) { return new CustomFieldsWidget( ab, parent, name ); } - QString pageTitle() const { return i18n( "Custom Fields" ); } - QString pageIdentifier() const { return "custom_fields"; } + TQString pageTitle() const { return i18n( "Custom Fields" ); } + TQString pageIdentifier() const { return "custom_fields"; } }; -void splitField( const QString&, QString&, QString&, QString& ); +void splitField( const TQString&, TQString&, TQString&, TQString& ); #endif diff --git a/kaddressbook/distributionlisteditor.cpp b/kaddressbook/distributionlisteditor.cpp index a18b5493f..1c57a134b 100644 --- a/kaddressbook/distributionlisteditor.cpp +++ b/kaddressbook/distributionlisteditor.cpp @@ -37,47 +37,47 @@ #include <klocale.h> #include <kmessagebox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qsignalmapper.h> -#include <qtoolbutton.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqsignalmapper.h> +#include <tqtoolbutton.h> class KPIM::DistributionListEditor::EditorWidgetPrivate { public: - QScrollView* scrollView; - QSignalMapper* mapper; + TQScrollView* scrollView; + TQSignalMapper* mapper; KABC::AddressBook* addressBook; - QString distListUid; - QLabel* nameLabel; - QLabel* memberListLabel; + TQString distListUid; + TQLabel* nameLabel; + TQLabel* memberListLabel; KLineEdit* nameLineEdit; - QWidget* memberListWidget; - QVBoxLayout* addresseeLayout; - QValueList<KPIM::DistributionListEditor::Line*> addressees; + TQWidget* memberListWidget; + TQVBoxLayout* addresseeLayout; + TQValueList<KPIM::DistributionListEditor::Line*> addressees; KPIM::DistributionList distributionList; KPIM::DistributionListEditor::Line* addLineForEntry( const KPIM::DistributionList::Entry& entry ); int lastLineId; }; -KPIM::DistributionListEditor::Line::Line( KABC::AddressBook* book, QWidget* parent ) : QWidget( parent ), m_addressBook( book ) +KPIM::DistributionListEditor::Line::Line( KABC::AddressBook* book, TQWidget* parent ) : TQWidget( parent ), m_addressBook( book ) { Q_ASSERT( m_addressBook ); - QBoxLayout* layout = new QHBoxLayout( this ); + TQBoxLayout* layout = new TQHBoxLayout( this ); layout->setSpacing( KDialog::spacingHint() ); m_lineEdit = new KPIM::DistributionListEditor::LineEdit( this ); - connect( m_lineEdit, SIGNAL( textChanged( const QString& ) ), - this, SLOT( textChanged( const QString& ) ) ); + connect( m_lineEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( textChanged( const TQString& ) ) ); layout->addWidget( m_lineEdit ); - m_clearButton = new QToolButton( this ); + m_clearButton = new TQToolButton( this ); m_clearButton->setIconSet( KApplication::reverseLayout() ? SmallIconSet("locationbar_erase") : SmallIconSet( "clear_left" ) ); m_clearButton->setEnabled( false ); layout->addWidget( m_clearButton ); - connect( m_clearButton, SIGNAL( clicked() ), m_lineEdit, SLOT( clear() ) ); + connect( m_clearButton, TQT_SIGNAL( clicked() ), m_lineEdit, TQT_SLOT( clear() ) ); } -void KPIM::DistributionListEditor::Line::textChanged( const QString& text ) +void KPIM::DistributionListEditor::Line::textChanged( const TQString& text ) { m_clearButton->setEnabled( !text.isEmpty() ); if ( text.isEmpty() ) @@ -97,7 +97,7 @@ void KPIM::DistributionListEditor::Line::setEntry( const KPIM::DistributionList: m_lineEdit->setText( m_initialText ); } -KABC::Addressee KPIM::DistributionListEditor::Line::findAddressee( const QString& name, const QString& email ) const +KABC::Addressee KPIM::DistributionListEditor::Line::findAddressee( const TQString& name, const TQString& email ) const { if ( name.isEmpty() && email.isEmpty() ) return KABC::Addressee(); @@ -125,9 +125,9 @@ KABC::Addressee KPIM::DistributionListEditor::Line::findAddressee( const QString KPIM::DistributionList::Entry KPIM::DistributionListEditor::Line::entry() const { - const QString text = m_lineEdit->text(); - QString name; - QString email; + const TQString text = m_lineEdit->text(); + TQString name; + TQString email; KPIM::getNameAndMail(m_lineEdit->text(), name, email ); KPIM::DistributionList::Entry res; @@ -139,34 +139,34 @@ KPIM::DistributionList::Entry KPIM::DistributionListEditor::Line::entry() const } if ( res.addressee.isEmpty() ) res.addressee = findAddressee( name, email ); - res.email = res.addressee.preferredEmail() != email ? email : QString(); + res.email = res.addressee.preferredEmail() != email ? email : TQString(); return res; } -KPIM::DistributionListEditor::LineEdit::LineEdit( QWidget* parent ) : KPIM::AddresseeLineEdit( parent ) +KPIM::DistributionListEditor::LineEdit::LineEdit( TQWidget* parent ) : KPIM::AddresseeLineEdit( parent ) { } -KPIM::DistributionListEditor::EditorWidget::EditorWidget( KABC::AddressBook* book, QWidget* parent ) - : KDialogBase( parent, /*name=*/0, /*modal=*/ true, /*caption=*/QString(), KDialogBase::Ok|KDialogBase::Cancel ), d( new DistributionListEditor::EditorWidgetPrivate ) +KPIM::DistributionListEditor::EditorWidget::EditorWidget( KABC::AddressBook* book, TQWidget* parent ) + : KDialogBase( parent, /*name=*/0, /*modal=*/ true, /*caption=*/TQString(), KDialogBase::Ok|KDialogBase::Cancel ), d( new DistributionListEditor::EditorWidgetPrivate ) { d->addressBook = book; Q_ASSERT( d->addressBook ); d->lastLineId = 0; - d->mapper = new QSignalMapper( this ); - connect( d->mapper, SIGNAL( mapped( int ) ), - this, SLOT( lineTextChanged( int ) ) ); + d->mapper = new TQSignalMapper( this ); + connect( d->mapper, TQT_SIGNAL( mapped( int ) ), + this, TQT_SLOT( lineTextChanged( int ) ) ); setCaption( i18n( "Edit Distribution List" ) ); - QWidget* main = new QWidget( this ); - QVBoxLayout* mainLayout = new QVBoxLayout( main ); + TQWidget* main = new TQWidget( this ); + TQVBoxLayout* mainLayout = new TQVBoxLayout( main ); mainLayout->setMargin( KDialog::marginHint() ); mainLayout->setSpacing( KDialog::spacingHint() ); - QHBoxLayout* nameLayout = new QHBoxLayout; + TQHBoxLayout* nameLayout = new QHBoxLayout; nameLayout->setSpacing( KDialog::spacingHint() ); - d->nameLabel = new QLabel( main ); + d->nameLabel = new TQLabel( main ); d->nameLabel->setText( i18n( "Name:" ) ); nameLayout->addWidget( d->nameLabel ); @@ -176,27 +176,27 @@ KPIM::DistributionListEditor::EditorWidget::EditorWidget( KABC::AddressBook* boo mainLayout->addLayout( nameLayout ); mainLayout->addSpacing( 30 ); - d->memberListLabel = new QLabel( main ); + d->memberListLabel = new TQLabel( main ); d->memberListLabel->setText( i18n( "Distribution list members:" ) ); mainLayout->addWidget( d->memberListLabel ); - d->scrollView = new QScrollView( main ); - d->scrollView->setFrameShape( QFrame::NoFrame ); + d->scrollView = new TQScrollView( main ); + d->scrollView->setFrameShape( TQFrame::NoFrame ); mainLayout->addWidget( d->scrollView ); - d->memberListWidget = new QWidget( d->scrollView->viewport() ); - d->memberListWidget->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ); - QVBoxLayout* memberLayout = new QVBoxLayout( d->memberListWidget ); + d->memberListWidget = new TQWidget( d->scrollView->viewport() ); + d->memberListWidget->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding ); + TQVBoxLayout* memberLayout = new TQVBoxLayout( d->memberListWidget ); d->addresseeLayout = new QVBoxLayout; d->addresseeLayout->setSpacing( KDialog::spacingHint() ); memberLayout->addItem( d->addresseeLayout ); memberLayout->addStretch(); d->scrollView->addChild( d->memberListWidget ); - d->scrollView->setResizePolicy( QScrollView::AutoOneFit ); + d->scrollView->setResizePolicy( TQScrollView::AutoOneFit ); setMainWidget( main ); KPIM::DistributionListEditor::Line* const last = d->addLineForEntry( KPIM::DistributionList::Entry() ); - const QSize hint = sizeHint(); + const TQSize hint = sizeHint(); resize( hint.width() * 1.5, hint.height() ); } @@ -219,7 +219,7 @@ void KPIM::DistributionListEditor::EditorWidget::setDistributionList( const KPIM d->nameLineEdit->setText( list.name() ); using KPIM::DistributionListEditor::Line; - typedef QValueList<Line*>::ConstIterator ListIterator; + typedef TQValueList<Line*>::ConstIterator ListIterator; for ( ListIterator it = d->addressees.begin(), end = d->addressees.end(); it != end; ++it ) { delete *it; @@ -243,8 +243,8 @@ KPIM::DistributionListEditor::Line* KPIM::DistributionListEditor::EditorWidgetPr line->setEntry( entry ); addresseeLayout->addWidget( line ); addressees.append( line ); - QObject::connect( line, SIGNAL( textChanged() ), - mapper, SLOT( map() ) ); + TQObject::connect( line, TQT_SIGNAL( textChanged() ), + mapper, TQT_SLOT( map() ) ); mapper->setMapping( line, ++lastLineId ); line->setShown( true ); return line; @@ -252,7 +252,7 @@ KPIM::DistributionListEditor::Line* KPIM::DistributionListEditor::EditorWidgetPr void KPIM::DistributionListEditor::EditorWidget::slotOk() { - const QString name = d->nameLineEdit->text(); + const TQString name = d->nameLineEdit->text(); const KPIM::DistributionList existing = KPIM::DistributionList::findByName( d->addressBook, name ); if ( !existing.isEmpty() && existing.uid() != d->distListUid ) { @@ -263,7 +263,7 @@ void KPIM::DistributionListEditor::EditorWidget::slotOk() KPIM::DistributionList list; list.setUid( d->distListUid.isNull() ? KApplication::randomString( 10 ) :d->distListUid ); list.setName( name ); - typedef QValueList<KPIM::DistributionListEditor::Line*>::ConstIterator ListIterator; + typedef TQValueList<KPIM::DistributionListEditor::Line*>::ConstIterator ListIterator; for ( ListIterator it = d->addressees.begin(), end = d->addressees.end(); it != end; ++it ) { const KPIM::DistributionList::Entry entry = (*it)->entry(); diff --git a/kaddressbook/distributionlisteditor.h b/kaddressbook/distributionlisteditor.h index 193ff83f1..7c5121094 100644 --- a/kaddressbook/distributionlisteditor.h +++ b/kaddressbook/distributionlisteditor.h @@ -40,7 +40,7 @@ class EditorWidget : public KDialogBase { Q_OBJECT public: - explicit EditorWidget( KABC::AddressBook* book, QWidget* parent = 0 ); + explicit EditorWidget( KABC::AddressBook* book, TQWidget* parent = 0 ); ~EditorWidget(); void setDistributionList( const KPIM::DistributionList& list ); diff --git a/kaddressbook/distributionlisteditor_p.h b/kaddressbook/distributionlisteditor_p.h index e8708698f..61573ae97 100644 --- a/kaddressbook/distributionlisteditor_p.h +++ b/kaddressbook/distributionlisteditor_p.h @@ -26,8 +26,8 @@ #include <libkdepim/addresseelineedit.h> #include <libkdepim/distributionlist.h> -#include <qpushbutton.h> -#include <qstring.h> +#include <tqpushbutton.h> +#include <tqstring.h> class QToolButton; @@ -43,7 +43,7 @@ class LineEdit : public KPIM::AddresseeLineEdit { Q_OBJECT public: - explicit LineEdit( QWidget* parent = 0 ); + explicit LineEdit( TQWidget* parent = 0 ); }; @@ -51,7 +51,7 @@ class Line : public QWidget { Q_OBJECT public: - explicit Line( KABC::AddressBook* book, QWidget* parent = 0 ); + explicit Line( KABC::AddressBook* book, TQWidget* parent = 0 ); void setEntry( const KPIM::DistributionList::Entry& entry ); KPIM::DistributionList::Entry entry() const; @@ -62,16 +62,16 @@ signals: void textChanged(); private: - KABC::Addressee findAddressee( const QString& name, const QString& email ) const; + KABC::Addressee findAddressee( const TQString& name, const TQString& email ) const; private slots: - void textChanged( const QString& ); + void textChanged( const TQString& ); private: - QString m_uid; - QString m_initialText; + TQString m_uid; + TQString m_initialText; LineEdit* m_lineEdit; - QToolButton* m_clearButton; + TQToolButton* m_clearButton; KABC::AddressBook* m_addressBook; }; diff --git a/kaddressbook/distributionlistentryview.cpp b/kaddressbook/distributionlistentryview.cpp index 2db13f808..8e421a760 100644 --- a/kaddressbook/distributionlistentryview.cpp +++ b/kaddressbook/distributionlistentryview.cpp @@ -12,55 +12,55 @@ #include <klocale.h> #include <kurllabel.h> -#include <qbuttongroup.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qstringlist.h> -#include <qvbuttongroup.h> - -KAB::DistributionListEntryView::DistributionListEntryView( KAB::Core* core, QWidget* parent ) : QWidget( parent ), m_core( core ), m_emailGroup( 0 ) +#include <tqbuttongroup.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqstringlist.h> +#include <tqvbuttongroup.h> + +KAB::DistributionListEntryView::DistributionListEntryView( KAB::Core* core, TQWidget* parent ) : TQWidget( parent ), m_core( core ), m_emailGroup( 0 ) { - m_mainLayout = new QVBoxLayout( this ); + m_mainLayout = new TQVBoxLayout( this ); m_mainLayout->setSpacing( KDialog::spacingHint() ); m_mainLayout->setMargin( KDialog::marginHint() ); - QBoxLayout* headerLayout = new QHBoxLayout; + TQBoxLayout* headerLayout = new QHBoxLayout; headerLayout->setSpacing( KDialog::spacingHint() * 3 ); - m_imageLabel = new QLabel( this ); + m_imageLabel = new TQLabel( this ); m_imageLabel->setAutoResize( true ); headerLayout->addWidget( m_imageLabel, 0, Qt::AlignTop ); - m_addresseeLabel = new QLabel( this ); + m_addresseeLabel = new TQLabel( this ); headerLayout->addWidget( m_addresseeLabel, 0, Qt::AlignTop ); headerLayout->addStretch(); m_mainLayout->addItem( headerLayout ); - QBoxLayout* distLayout = new QHBoxLayout; + TQBoxLayout* distLayout = new QHBoxLayout; distLayout->setSpacing( KDialog::spacingHint() ); - QLabel* distLabel = new QLabel( this ); + TQLabel* distLabel = new TQLabel( this ); distLabel->setText( i18n( "<b>Distribution list:</b>" ) ); distLabel->setAlignment( Qt::SingleLine ); distLayout->addWidget( distLabel ); m_distListLabel = new KURLLabel( this ); distLabel->setBuddy( m_distListLabel ); - connect( m_distListLabel, SIGNAL( leftClickedURL( const QString& ) ), - this, SIGNAL( distributionListClicked( const QString& ) ) ); + connect( m_distListLabel, TQT_SIGNAL( leftClickedURL( const TQString& ) ), + this, TQT_SIGNAL( distributionListClicked( const TQString& ) ) ); distLayout->addWidget( m_distListLabel ); distLayout->addStretch(); m_mainLayout->addItem( distLayout ); - QLabel* emailLabel = new QLabel( this ); + TQLabel* emailLabel = new TQLabel( this ); emailLabel->setText( i18n( "<b>Email address to use in this list:</b>" ) ); emailLabel->setAlignment( Qt::SingleLine ); m_mainLayout->addWidget( emailLabel ); - QBoxLayout* emailLayout = new QHBoxLayout; + TQBoxLayout* emailLayout = new QHBoxLayout; emailLayout->setSpacing( KDialog::spacingHint() ); emailLayout->addSpacing( 30 ); @@ -69,9 +69,9 @@ KAB::DistributionListEntryView::DistributionListEntryView( KAB::Core* core, QWid emailLayout->addStretch(); m_mainLayout->addItem( emailLayout ); - QBoxLayout* resourceLayout = new QHBoxLayout; + TQBoxLayout* resourceLayout = new QHBoxLayout; resourceLayout->setSpacing( KDialog::spacingHint() ); - m_resourceLabel = new QLabel( this ); + m_resourceLabel = new TQLabel( this ); resourceLayout->addWidget( m_resourceLabel ); resourceLayout->addStretch(); @@ -81,7 +81,7 @@ KAB::DistributionListEntryView::DistributionListEntryView( KAB::Core* core, QWid void KAB::DistributionListEntryView::emailButtonClicked( int id ) { - const QString email = m_idToEmail[ id ]; + const TQString email = m_idToEmail[ id ]; if ( m_entry.email == email ) return; m_list.removeEntry( m_entry.addressee, m_entry.email ); @@ -103,34 +103,34 @@ void KAB::DistributionListEntryView::setEntry( const KPIM::DistributionList& lis delete m_emailGroup; m_emailGroup = 0; - QPixmap pixmap; + TQPixmap pixmap; pixmap.convertFromImage( m_entry.addressee.photo().data() ); m_imageLabel->setPixmap( pixmap.isNull() ? KGlobal::iconLoader()->loadIcon( "personal", KIcon::Desktop ) : pixmap ); m_addresseeLabel->setText( i18n( "Formatted name, role, organization", "<qt><h2>%1</h2><p>%2<br/>%3</p></qt>" ).arg( m_entry.addressee.formattedName(), m_entry.addressee.role(), m_entry.addressee.organization() ) ); m_distListLabel->setURL( m_list.name() ); m_distListLabel->setText( m_list.name() ); - m_resourceLabel->setText( i18n( "<b>Address book:</b> %1" ).arg( m_entry.addressee.resource() ? m_entry.addressee.resource()->resourceName() : QString() ) ); + m_resourceLabel->setText( i18n( "<b>Address book:</b> %1" ).arg( m_entry.addressee.resource() ? m_entry.addressee.resource()->resourceName() : TQString() ) ); m_resourceLabel->setAlignment( Qt::SingleLine ); - m_emailGroup = new QVButtonGroup( this ); + m_emailGroup = new TQVButtonGroup( this ); m_emailGroup->setFlat( true ); m_emailGroup->setExclusive( true ); - m_emailGroup->setFrameShape( QFrame::NoFrame ); + m_emailGroup->setFrameShape( TQFrame::NoFrame ); - const QString preferred = m_entry.email.isNull() ? m_entry.addressee.preferredEmail() : m_entry.email; - const QStringList mails = m_entry.addressee.emails(); + const TQString preferred = m_entry.email.isNull() ? m_entry.addressee.preferredEmail() : m_entry.email; + const TQStringList mails = m_entry.addressee.emails(); m_idToEmail.clear(); - for ( QStringList::ConstIterator it = mails.begin(); it != mails.end(); ++it ) + for ( TQStringList::ConstIterator it = mails.begin(); it != mails.end(); ++it ) { - QRadioButton* button = new QRadioButton( m_emailGroup ); + TQRadioButton* button = new TQRadioButton( m_emailGroup ); button->setText( *it ); m_idToEmail.insert( m_emailGroup->insert( button ), *it ); if ( *it == preferred ) button->setChecked( true ); button->setShown( true ); } - connect( m_emailGroup, SIGNAL( clicked( int ) ), - this, SLOT( emailButtonClicked( int ) ) ); + connect( m_emailGroup, TQT_SIGNAL( clicked( int ) ), + this, TQT_SLOT( emailButtonClicked( int ) ) ); m_radioLayout->addWidget( m_emailGroup, 0, 0 ); m_emailGroup->setShown( true ); m_mainLayout->invalidate(); diff --git a/kaddressbook/distributionlistentryview.h b/kaddressbook/distributionlistentryview.h index 1fbf9f2d7..e3d9b8625 100644 --- a/kaddressbook/distributionlistentryview.h +++ b/kaddressbook/distributionlistentryview.h @@ -3,9 +3,9 @@ #include <libkdepim/distributionlist.h> -#include <qmap.h> -#include <qstring.h> -#include <qwidget.h> +#include <tqmap.h> +#include <tqstring.h> +#include <tqwidget.h> class QBoxLayout; class QButtonGroup; @@ -26,31 +26,31 @@ class DistributionListEntryView : public QWidget Q_OBJECT public: - explicit DistributionListEntryView( KAB::Core* core, QWidget* parent = 0 ); + explicit DistributionListEntryView( KAB::Core* core, TQWidget* parent = 0 ); void setEntry( const KPIM::DistributionList& list, const KPIM::DistributionList::Entry& entry ); public slots: void clear(); signals: - void distributionListClicked( const QString& ); + void distributionListClicked( const TQString& ); private slots: void emailButtonClicked( int id ); private: - QMap<int, QString> m_idToEmail; + TQMap<int, TQString> m_idToEmail; KAB::Core* m_core; KPIM::DistributionList m_list; KPIM::DistributionList::Entry m_entry; - QGridLayout* m_radioLayout; - QBoxLayout* m_mainLayout; - QButtonGroup* m_emailGroup; - QLabel* m_addresseeLabel; + TQGridLayout* m_radioLayout; + TQBoxLayout* m_mainLayout; + TQButtonGroup* m_emailGroup; + TQLabel* m_addresseeLabel; KURLLabel* m_distListLabel; - QLabel* m_imageLabel; - QLabel* m_resourceLabel; - QMap<int, QString> m_indexToIdentifier; + TQLabel* m_imageLabel; + TQLabel* m_resourceLabel; + TQMap<int, TQString> m_indexToIdentifier; }; } diff --git a/kaddressbook/distributionlistpicker.cpp b/kaddressbook/distributionlistpicker.cpp index c2eb3ee00..a43c76d0a 100644 --- a/kaddressbook/distributionlistpicker.cpp +++ b/kaddressbook/distributionlistpicker.cpp @@ -35,32 +35,32 @@ #include <klocale.h> #include <kmessagebox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qvalidator.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqvalidator.h> -KPIM::DistributionListPickerDialog::DistributionListPickerDialog( KABC::AddressBook* book, QWidget* parent ) : KDialogBase( parent, 0, true, QString(), Ok | Cancel | User1 ), m_book( book ) +KPIM::DistributionListPickerDialog::DistributionListPickerDialog( KABC::AddressBook* book, TQWidget* parent ) : KDialogBase( parent, 0, true, TQString(), Ok | Cancel | User1 ), m_book( book ) { Q_ASSERT( m_book ); setModal( true ); enableButton( Ok, false ); setButtonText( User1, i18n( "Add New Distribution List" ) ); - QWidget* main = new QWidget( this ); - QGridLayout* layout = new QGridLayout( main ); + TQWidget* main = new TQWidget( this ); + TQGridLayout* layout = new TQGridLayout( main ); layout->setSpacing( KDialog::spacingHint() ); - m_label = new QLabel( main ); + m_label = new TQLabel( main ); layout->addWidget( m_label, 0, 0 ); m_listBox = new KListBox( main ); layout->addWidget( m_listBox, 1, 0 ); - connect( m_listBox, SIGNAL( highlighted( const QString& ) ), - this, SLOT( entrySelected( const QString& ) ) ); - connect( m_listBox, SIGNAL( selected( const QString& ) ), - this, SLOT( entrySelected( const QString& ) ) ); + connect( m_listBox, TQT_SIGNAL( highlighted( const TQString& ) ), + this, TQT_SLOT( entrySelected( const TQString& ) ) ); + connect( m_listBox, TQT_SIGNAL( selected( const TQString& ) ), + this, TQT_SLOT( entrySelected( const TQString& ) ) ); setMainWidget( main ); #ifdef KDEPIM_NEW_DISTRLISTS - typedef QValueList<KPIM::DistributionList> DistListList; + typedef TQValueList<KPIM::DistributionList> DistListList; const DistListList lists = KPIM::DistributionList::allDistributionLists( m_book ); for ( DistListList::ConstIterator it = lists.begin(); it != lists.end(); ++it ) { @@ -69,12 +69,12 @@ KPIM::DistributionListPickerDialog::DistributionListPickerDialog( KABC::AddressB #endif } -void KPIM::DistributionListPickerDialog::entrySelected( const QString& name ) +void KPIM::DistributionListPickerDialog::entrySelected( const TQString& name ) { actionButton( Ok )->setEnabled( !name.isNull() ); } -void KPIM::DistributionListPickerDialog::setLabelText( const QString& text ) +void KPIM::DistributionListPickerDialog::setLabelText( const TQString& text ) { m_label->setText( text ); } @@ -82,9 +82,9 @@ void KPIM::DistributionListPickerDialog::setLabelText( const QString& text ) void KPIM::DistributionListPickerDialog::slotUser1() { #ifdef KDEPIM_NEW_DISTRLISTS - const QValueList<KPIM::DistributionList> lists = KPIM::DistributionList::allDistributionLists( m_book ); - QStringList listNames; - for ( QValueList<KPIM::DistributionList>::ConstIterator it = lists.begin(); it != lists.end(); ++it ) + const TQValueList<KPIM::DistributionList> lists = KPIM::DistributionList::allDistributionLists( m_book ); + TQStringList listNames; + for ( TQValueList<KPIM::DistributionList>::ConstIterator it = lists.begin(); it != lists.end(); ++it ) { listNames += (*it).name(); } @@ -92,8 +92,8 @@ void KPIM::DistributionListPickerDialog::slotUser1() bool validName = false; do { - QRegExpValidator validator( QRegExp( "\\S+.*" ), 0 ); - const QString name = KInputDialog::getText( i18n( "Enter Name" ), i18n( "Enter a name for the new distribution list:" ), QString(), 0, this, 0, &validator ).stripWhiteSpace(); + TQRegExpValidator validator( TQRegExp( "\\S+.*" ), 0 ); + const TQString name = KInputDialog::getText( i18n( "Enter Name" ), i18n( "Enter a name for the new distribution list:" ), TQString(), 0, this, 0, &validator ).stripWhiteSpace(); if ( name.isEmpty() ) return; @@ -107,7 +107,7 @@ void KPIM::DistributionListPickerDialog::slotUser1() m_book->insertAddressee( list ); m_listBox->insertItem( name ); - QListBoxItem* item = m_listBox->findItem( name ); + TQListBoxItem* item = m_listBox->findItem( name ); m_listBox->setSelected( item, true ); } else @@ -122,18 +122,18 @@ void KPIM::DistributionListPickerDialog::slotUser1() void KPIM::DistributionListPickerDialog::slotOk() { - QListBoxItem* item = m_listBox->selectedItem(); - m_selectedDistributionList = item ? item->text() : QString(); + TQListBoxItem* item = m_listBox->selectedItem(); + m_selectedDistributionList = item ? item->text() : TQString(); KDialogBase::slotOk(); } void KPIM::DistributionListPickerDialog::slotCancel() { - m_selectedDistributionList = QString(); + m_selectedDistributionList = TQString(); KDialogBase::slotCancel(); } -QString KPIM::DistributionListPickerDialog::selectedDistributionList() const +TQString KPIM::DistributionListPickerDialog::selectedDistributionList() const { return m_selectedDistributionList; } diff --git a/kaddressbook/distributionlistpicker.h b/kaddressbook/distributionlistpicker.h index 0081fc62f..f5309c135 100644 --- a/kaddressbook/distributionlistpicker.h +++ b/kaddressbook/distributionlistpicker.h @@ -25,7 +25,7 @@ #include <kdialogbase.h> -#include <qstring.h> +#include <tqstring.h> class KListBox; @@ -39,10 +39,10 @@ class DistributionListPickerDialog : public KDialogBase { Q_OBJECT public: - explicit DistributionListPickerDialog( KABC::AddressBook* book, QWidget* parent = 0 ); - QString selectedDistributionList() const; + explicit DistributionListPickerDialog( KABC::AddressBook* book, TQWidget* parent = 0 ); + TQString selectedDistributionList() const; - void setLabelText( const QString& text ); + void setLabelText( const TQString& text ); private slots: @@ -55,13 +55,13 @@ private slots: //override void slotUser1(); - void entrySelected( const QString& name ); + void entrySelected( const TQString& name ); private: KABC::AddressBook* m_book; - QLabel* m_label; + TQLabel* m_label; KListBox* m_listBox; - QString m_selectedDistributionList; + TQString m_selectedDistributionList; }; } //namespace KPIM diff --git a/kaddressbook/editors/cryptowidget.cpp b/kaddressbook/editors/cryptowidget.cpp index d2d5917f9..45a5efbaf 100644 --- a/kaddressbook/editors/cryptowidget.cpp +++ b/kaddressbook/editors/cryptowidget.cpp @@ -35,13 +35,13 @@ #include <kiconloader.h> #include <klocale.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qvgroupbox.h> -#include <qhbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqvgroupbox.h> +#include <tqhbox.h> #include "cryptowidget.h" @@ -58,81 +58,81 @@ CryptoWidgetFactory::CryptoWidgetFactory() KGlobal::iconLoader()->addAppDir( "libkleopatra" ); } -QString CryptoWidgetFactory::pageTitle() const +TQString CryptoWidgetFactory::pageTitle() const { return i18n( "Crypto Settings" ); } -QString CryptoWidgetFactory::pageIdentifier() const +TQString CryptoWidgetFactory::pageIdentifier() const { return "crypto"; } -CryptoWidget::CryptoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) +CryptoWidget::CryptoWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::ContactEditorWidget( ab, parent, name ), mReadOnly( false ) { - QGridLayout *topLayout = new QGridLayout( this, 2, 5, KDialog::marginHint(), + TQGridLayout *topLayout = new TQGridLayout( this, 2, 5, KDialog::marginHint(), KDialog::spacingHint() ); topLayout->setColStretch( 1, 1 ); topLayout->setRowStretch( 4, 1 ); - QVGroupBox* protGB = new QVGroupBox( i18n( "Allowed Protocols" ), this ); + TQVGroupBox* protGB = new TQVGroupBox( i18n( "Allowed Protocols" ), this ); topLayout->addMultiCellWidget( protGB, 0, 0, 0, 1 ); uint msgFormat = 1; for ( uint i = 0 ; i < NumberOfProtocols ; ++i ) { Kleo::CryptoMessageFormat f = static_cast<Kleo::CryptoMessageFormat>( msgFormat ); - mProtocolCB[ i ] = new QCheckBox( Kleo::cryptoMessageFormatToLabel( f ), protGB ); - connect( mProtocolCB[i], SIGNAL( clicked() ), this, SLOT( setModified() ) ); + mProtocolCB[ i ] = new TQCheckBox( Kleo::cryptoMessageFormatToLabel( f ), protGB ); + connect( mProtocolCB[i], TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) ); // Iterating over a bitfield means *2 every time msgFormat *= 2; } - QLabel* l = new QLabel( i18n( "Preferred OpenPGP encryption key:" ), this ); + TQLabel* l = new TQLabel( i18n( "Preferred OpenPGP encryption key:" ), this ); topLayout->addWidget( l, 1, 0 ); mPgpKey = new Kleo::EncryptionKeyRequester( true, Kleo::EncryptionKeyRequester::OpenPGP, this ); topLayout->addWidget( mPgpKey, 1, 1 ); - l = new QLabel( i18n( "Preferred S/MIME encryption certificate:" ), this ); + l = new TQLabel( i18n( "Preferred S/MIME encryption certificate:" ), this ); topLayout->addWidget( l, 2, 0 ); mSmimeCert = new Kleo::EncryptionKeyRequester( true, Kleo::EncryptionKeyRequester::SMIME, this ); topLayout->addWidget( mSmimeCert, 2, 1 ); - QGroupBox* box = new QVGroupBox( i18n( "Message Preference" ), this ); + TQGroupBox* box = new TQVGroupBox( i18n( "Message Preference" ), this ); topLayout->addMultiCellWidget( box, 3, 3, 0, 1 ); // Send preferences/sign (see certmanager/lib/kleo/enum.h) - QHBox* hbox = new QHBox( box ); + TQHBox* hbox = new TQHBox( box ); - l = new QLabel( i18n( "Sign:" ), hbox ); + l = new TQLabel( i18n( "Sign:" ), hbox ); - mSignPref = new QComboBox( false, hbox ); + mSignPref = new TQComboBox( false, hbox ); for ( unsigned int i = Kleo::UnknownSigningPreference; i < Kleo::MaxSigningPreference ; ++i ) mSignPref->insertItem( Kleo::signingPreferenceToLabel( static_cast<Kleo::SigningPreference>( i ) ) ); // Send preferences/encrypt (see certmanager/lib/kleo/enum.h) - hbox = new QHBox( box ); + hbox = new TQHBox( box ); - l = new QLabel( i18n("Encrypt:"), hbox ); + l = new TQLabel( i18n("Encrypt:"), hbox ); - mCryptPref = new QComboBox( false, hbox ); + mCryptPref = new TQComboBox( false, hbox ); for ( unsigned int i = Kleo::UnknownPreference; i < Kleo::MaxEncryptionPreference ; ++i ) mCryptPref->insertItem( Kleo::encryptionPreferenceToLabel( static_cast<Kleo::EncryptionPreference>( i ) ) ); // Emit "changed()" signal - connect( mSignPref, SIGNAL( activated(int) ), this, SLOT( setModified() ) ); - connect( mCryptPref, SIGNAL( activated(int) ), this, SLOT( setModified() ) ); + connect( mSignPref, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( setModified() ) ); + connect( mCryptPref, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( setModified() ) ); // Not optimal, but KeyRequester doesn't emit any signals when the key changes - connect( mPgpKey->eraseButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) ); - connect( mPgpKey->dialogButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) ); - connect( mSmimeCert->eraseButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) ); - connect( mSmimeCert->dialogButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) ); + connect( mPgpKey->eraseButton(), TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) ); + connect( mPgpKey->dialogButton(), TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) ); + connect( mSmimeCert->eraseButton(), TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) ); + connect( mSmimeCert->dialogButton(), TQT_SIGNAL( clicked() ), this, TQT_SLOT( setModified() ) ); } CryptoWidget::~CryptoWidget() @@ -144,7 +144,7 @@ void CryptoWidget::loadContact( KABC::Addressee *addr ) bool blocked = signalsBlocked(); blockSignals( true ); - QStringList lst = QStringList::split( ',', addr->custom( "KADDRESSBOOK", + TQStringList lst = TQStringList::split( ',', addr->custom( "KADDRESSBOOK", "CRYPTOPROTOPREF" ) ); uint cryptoFormats = Kleo::stringListToCryptoMessageFormats( lst ); @@ -161,8 +161,8 @@ void CryptoWidget::loadContact( KABC::Addressee *addr ) // We dont use the contents of addr->key(...) because we want just a ref. // to the key/cert. stored elsewhere. - mPgpKey->setFingerprints( QStringList::split( ",", addr->custom( "KADDRESSBOOK", "OPENPGPFP" ) ) ); - mSmimeCert->setFingerprints( QStringList::split( ",", addr->custom( "KADDRESSBOOK", "SMIMEFP" ) ) ); + mPgpKey->setFingerprints( TQStringList::split( ",", addr->custom( "KADDRESSBOOK", "OPENPGPFP" ) ) ); + mSmimeCert->setFingerprints( TQStringList::split( ",", addr->custom( "KADDRESSBOOK", "SMIMEFP" ) ) ); blockSignals( blocked ); } @@ -176,7 +176,7 @@ void CryptoWidget::storeContact( KABC::Addressee *addr ) cryptoFormats |= msgFormat; } - QStringList lst = Kleo::cryptoMessageFormatsToStringList( cryptoFormats ); + TQStringList lst = Kleo::cryptoMessageFormatsToStringList( cryptoFormats ); if ( !lst.isEmpty() ) addr->insertCustom( "KADDRESSBOOK", "CRYPTOPROTOPREF", lst.join( "," ) ); else @@ -198,8 +198,8 @@ void CryptoWidget::storeContact( KABC::Addressee *addr ) else addr->removeCustom( "KADDRESSBOOK", "CRYPTOENCRYPTPREF" ); - QStringList pfp = mPgpKey->fingerprints(); - QStringList sfp = mSmimeCert->fingerprints(); + TQStringList pfp = mPgpKey->fingerprints(); + TQStringList sfp = mSmimeCert->fingerprints(); if ( !pfp.isEmpty() ) addr->insertCustom( "KADDRESSBOOK", "OPENPGPFP", pfp.join( "," ) ); diff --git a/kaddressbook/editors/cryptowidget.h b/kaddressbook/editors/cryptowidget.h index de2c7bfcc..559279855 100644 --- a/kaddressbook/editors/cryptowidget.h +++ b/kaddressbook/editors/cryptowidget.h @@ -38,7 +38,7 @@ class CryptoWidget : public KAB::ContactEditorWidget Q_OBJECT public: - CryptoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + CryptoWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); ~CryptoWidget(); void loadContact( KABC::Addressee *addr ); @@ -47,9 +47,9 @@ class CryptoWidget : public KAB::ContactEditorWidget private: enum { NumberOfProtocols = 4 }; - QCheckBox* mProtocolCB[NumberOfProtocols]; - QComboBox* mSignPref; - QComboBox* mCryptPref; + TQCheckBox* mProtocolCB[NumberOfProtocols]; + TQComboBox* mSignPref; + TQComboBox* mCryptPref; Kleo::KeyRequester* mPgpKey; Kleo::KeyRequester* mSmimeCert; bool mReadOnly; @@ -59,13 +59,13 @@ class CryptoWidgetFactory : public KAB::ContactEditorWidgetFactory { public: CryptoWidgetFactory(); - KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) + KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) { return new CryptoWidget( ab, parent, name ); } - QString pageTitle() const; - QString pageIdentifier() const; + TQString pageTitle() const; + TQString pageIdentifier() const; }; #endif diff --git a/kaddressbook/editors/imaddresswidget.cpp b/kaddressbook/editors/imaddresswidget.cpp index 3d2af677e..097b092c0 100644 --- a/kaddressbook/editors/imaddresswidget.cpp +++ b/kaddressbook/editors/imaddresswidget.cpp @@ -21,10 +21,10 @@ with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qlabel.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqlabel.h> #include <kdebug.h> #include <kiconloader.h> @@ -33,7 +33,7 @@ #include "imaddresswidget.h" -IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols ) +IMAddressWidget::IMAddressWidget( TQWidget *parent, TQValueList<KPluginInfo *> protocols ) : IMAddressBase( parent ) { mProtocols = protocols; @@ -41,8 +41,8 @@ IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> pro init(); } -IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols, - KPluginInfo *protocol, const QString& address, +IMAddressWidget::IMAddressWidget( TQWidget *parent, TQValueList<KPluginInfo *> protocols, + KPluginInfo *protocol, const TQString& address, const IMContext& context ) : IMAddressBase( parent ) { @@ -52,23 +52,23 @@ IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> pro populateProtocols(); cmbProtocol->setCurrentItem( mProtocols.findIndex( protocol ) ); - edtAddress->setText( address.section( QChar( 0xE120 ), 0, 0 ) ); - edtNetwork->setText( address.section( QChar( 0xE120 ), 1 ) ); + edtAddress->setText( address.section( TQChar( 0xE120 ), 0, 0 ) ); + edtNetwork->setText( address.section( TQChar( 0xE120 ), 1 ) ); init(); } void IMAddressWidget::init() { - connect( cmbProtocol, SIGNAL( activated( const QString& ) ), - this, SLOT( slotProtocolChanged() ) ); - connect( edtAddress, SIGNAL( textChanged( const QString& ) ), - this, SLOT( slotAddressChanged( const QString& ) ) ); + connect( cmbProtocol, TQT_SIGNAL( activated( const TQString& ) ), + this, TQT_SLOT( slotProtocolChanged() ) ); + connect( edtAddress, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( slotAddressChanged( const TQString& ) ) ); slotProtocolChanged(); } -void IMAddressWidget::slotAddressChanged( const QString &text ) +void IMAddressWidget::slotAddressChanged( const TQString &text ) { emit inValidState( !text.stripWhiteSpace().isEmpty() ); } @@ -105,12 +105,12 @@ IMContext IMAddressWidget::context() const return context; } -QString IMAddressWidget::address() const +TQString IMAddressWidget::address() const { // The protocol irc is a special case and hard coded in. // It's not nice, but the simplest way that I can see. if ( protocol()->name() == "IRC" && !edtNetwork->text().stripWhiteSpace().isEmpty() ) - return edtAddress->text().stripWhiteSpace() + QChar( 0xE120 ) + edtNetwork->text().stripWhiteSpace(); + return edtAddress->text().stripWhiteSpace() + TQChar( 0xE120 ) + edtNetwork->text().stripWhiteSpace(); else return edtAddress->text().stripWhiteSpace(); } @@ -118,7 +118,7 @@ QString IMAddressWidget::address() const void IMAddressWidget::populateProtocols() { // insert the protocols in order - QValueList<KPluginInfo *>::ConstIterator it; + TQValueList<KPluginInfo *>::ConstIterator it; for ( it = mProtocols.begin(); it != mProtocols.end(); ++it ) cmbProtocol->insertItem( SmallIcon( (*it)->icon() ), (*it)->name() ); } diff --git a/kaddressbook/editors/imaddresswidget.h b/kaddressbook/editors/imaddresswidget.h index 29d93b13f..11ee5f454 100644 --- a/kaddressbook/editors/imaddresswidget.h +++ b/kaddressbook/editors/imaddresswidget.h @@ -24,7 +24,7 @@ #ifndef IMADDRESSWIDGET_H #define IMADDRESSWIDGET_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "imaddressbase.h" #include "imeditorwidget.h" @@ -44,15 +44,15 @@ class IMAddressWidget : public IMAddressBase Q_OBJECT public: - IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols); - IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols, - KPluginInfo *protocol, const QString& address, + IMAddressWidget( TQWidget *parent, TQValueList<KPluginInfo *> protocols); + IMAddressWidget( TQWidget *parent, TQValueList<KPluginInfo *> protocols, + KPluginInfo *protocol, const TQString& address, const IMContext& context = Any ); KPluginInfo * protocol() const; IMContext context() const; - QString address() const ; - QValueList<KPluginInfo *> mProtocols; + TQString address() const ; + TQValueList<KPluginInfo *> mProtocols; signals: void inValidState( bool ); @@ -65,7 +65,7 @@ class IMAddressWidget : public IMAddressBase protected slots: void slotProtocolChanged(); - void slotAddressChanged( const QString &text ); + void slotAddressChanged( const TQString &text ); private: void init(); diff --git a/kaddressbook/editors/imeditorwidget.cpp b/kaddressbook/editors/imeditorwidget.cpp index f61e06386..0da0feb03 100644 --- a/kaddressbook/editors/imeditorwidget.cpp +++ b/kaddressbook/editors/imeditorwidget.cpp @@ -22,12 +22,12 @@ without including the source code for Qt in the source distribution. */ -#include <qlistview.h> -#include <qstringlist.h> -#include <qvbox.h> -#include <qlayout.h> -#include <qfont.h> -#include <qpainter.h> +#include <tqlistview.h> +#include <tqstringlist.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqfont.h> +#include <tqpainter.h> #include <kdialogbase.h> #include <kdebug.h> @@ -44,7 +44,7 @@ IMAddressLVI::IMAddressLVI( KListView *parent, KPluginInfo *protocol, - const QString &address, const IMContext &context ) + const TQString &address, const IMContext &context ) : KListViewItem( parent ) { setProtocol( protocol ); @@ -63,11 +63,11 @@ bool IMAddressLVI::preferred() const return mPreferred; } -void IMAddressLVI::paintCell( QPainter *p, const QColorGroup &cg, +void IMAddressLVI::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ) { if ( mPreferred ) { - QFont font = p->font(); + TQFont font = p->font(); font.setBold( true ); p->setFont( font ); } @@ -75,15 +75,15 @@ void IMAddressLVI::paintCell( QPainter *p, const QColorGroup &cg, KListViewItem::paintCell( p, cg, column, width, alignment ); } -void IMAddressLVI::setAddress( const QString &address ) +void IMAddressLVI::setAddress( const TQString &address ) { // irc uses 0xE120 to seperate the nick and the server group. - QString serverOrGroup = address.section( QChar( 0xE120 ), 1 ); + TQString serverOrGroup = address.section( TQChar( 0xE120 ), 1 ); if ( serverOrGroup.isEmpty() ) setText( 1, address ); else { - QString nickname = address.section( QChar( 0xE120 ), 0, 0 ); + TQString nickname = address.section( TQChar( 0xE120 ), 0, 0 ); setText( 1, i18n( "<nickname> on <server>","%1 on %2" ) .arg( nickname ).arg( serverOrGroup ) ); } @@ -128,7 +128,7 @@ IMContext IMAddressLVI::context() const return mContext; } -QString IMAddressLVI::address() const +TQString IMAddressLVI::address() const { return mAddress; } @@ -140,7 +140,7 @@ void IMAddressLVI::activate() /*===========================================================================*/ -IMEditorWidget::IMEditorWidget( QWidget *parent, const QString &preferredIM, const char *name ) +IMEditorWidget::IMEditorWidget( TQWidget *parent, const TQString &preferredIM, const char *name ) : KDialogBase( parent, name, false, i18n( "Edit Instant Messenging Address" ), Help | Ok | Cancel, Ok, false ), mReadOnly( false ) @@ -148,14 +148,14 @@ IMEditorWidget::IMEditorWidget( QWidget *parent, const QString &preferredIM, con mWidget = new IMEditorBase( this ); setMainWidget( mWidget ); - connect( mWidget->btnAdd, SIGNAL( clicked() ), SLOT( slotAdd() ) ); - connect( mWidget->btnEdit, SIGNAL( clicked() ), SLOT( slotEdit() ) ); - connect( mWidget->btnDelete, SIGNAL( clicked() ), SLOT( slotDelete() ) ); - connect( mWidget->btnSetStandard, SIGNAL( clicked()), SLOT( slotSetStandard() ) ); - connect( mWidget->lvAddresses, SIGNAL( selectionChanged() ), SLOT( slotUpdateButtons() ) ); + connect( mWidget->btnAdd, TQT_SIGNAL( clicked() ), TQT_SLOT( slotAdd() ) ); + connect( mWidget->btnEdit, TQT_SIGNAL( clicked() ), TQT_SLOT( slotEdit() ) ); + connect( mWidget->btnDelete, TQT_SIGNAL( clicked() ), TQT_SLOT( slotDelete() ) ); + connect( mWidget->btnSetStandard, TQT_SIGNAL( clicked()), TQT_SLOT( slotSetStandard() ) ); + connect( mWidget->lvAddresses, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotUpdateButtons() ) ); - connect( mWidget->lvAddresses, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int ) ), - SLOT( slotEdit() ) ); + connect( mWidget->lvAddresses, TQT_SIGNAL( doubleClicked( TQListViewItem*, const TQPoint&, int ) ), + TQT_SLOT( slotEdit() ) ); setHelp( "managing-contacts-im-addresses" ); @@ -166,26 +166,26 @@ IMEditorWidget::IMEditorWidget( QWidget *parent, const QString &preferredIM, con //mWidget->btnUp->setEnabled( false ); //mWidget->btnDown->setEnabled( false ); mPreferred = preferredIM; - mPreferred = mPreferred.replace( " on ", QString( QChar( 0xE120 ) ), true ); - mProtocols = KPluginInfo::fromServices( KTrader::self()->query( QString::fromLatin1( "KABC/IMProtocol" ) ) ); + mPreferred = mPreferred.replace( " on ", TQString( TQChar( 0xE120 ) ), true ); + mProtocols = KPluginInfo::fromServices( KTrader::self()->query( TQString::fromLatin1( "KABC/IMProtocol" ) ) ); // order the protocols by putting them in a qmap, then sorting the set of keys and recreating the list - QMap<QString, KPluginInfo *> protocolMap; - QValueList<KPluginInfo *>::ConstIterator it; - QValueList<KPluginInfo *> sorted; + TQMap<TQString, KPluginInfo *> protocolMap; + TQValueList<KPluginInfo *>::ConstIterator it; + TQValueList<KPluginInfo *> sorted; for ( it = mProtocols.begin(); it != mProtocols.end(); ++it ) protocolMap.insert( (*it)->name(), (*it) ); - QStringList keys = protocolMap.keys(); + TQStringList keys = protocolMap.keys(); keys.sort(); - QStringList::ConstIterator keyIt = keys.begin(); - QStringList::ConstIterator end = keys.end(); + TQStringList::ConstIterator keyIt = keys.begin(); + TQStringList::ConstIterator end = keys.end(); for ( ; keyIt != end; ++keyIt ) sorted.append( protocolMap[*keyIt] ); mProtocols = sorted; } -QValueList<KPluginInfo *> IMEditorWidget::availableProtocols() const +TQValueList<KPluginInfo *> IMEditorWidget::availableProtocols() const { return mProtocols; } @@ -196,21 +196,21 @@ void IMEditorWidget::loadContact( KABC::Addressee *addr ) mWidget->lvAddresses->clear(); // see README for details of how Evolution stores IM addresses (differently) - const QStringList customs = addr->customs(); + const TQStringList customs = addr->customs(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; bool isSet = false; for ( it = customs.begin(); it != customs.end(); ++it ) { - QString app, name, value; + TQString app, name, value; splitField( *it, app, name, value ); - if ( app.startsWith( QString::fromLatin1( "messaging/" ) ) ) { - if ( name == QString::fromLatin1( "All" ) ) { + if ( app.startsWith( TQString::fromLatin1( "messaging/" ) ) ) { + if ( name == TQString::fromLatin1( "All" ) ) { KPluginInfo *protocol = protocolFromString( app ); if ( protocol ) { - QStringList addresses = QStringList::split( QChar( 0xE000 ), value ); - QStringList::iterator end = addresses.end(); - for ( QStringList::ConstIterator it = addresses.begin(); it != end; ++it ) { + TQStringList addresses = TQStringList::split( TQChar( 0xE000 ), value ); + TQStringList::iterator end = addresses.end(); + for ( TQStringList::ConstIterator it = addresses.begin(); it != end; ++it ) { IMAddressLVI *imaddresslvi = new IMAddressLVI( mWidget->lvAddresses, protocol, *it, Any/*, false*/ ); if ( !isSet && (*it).stripWhiteSpace().lower() == mPreferred.stripWhiteSpace().lower() ) { imaddresslvi->setPreferred( true ); @@ -231,10 +231,10 @@ void IMEditorWidget::storeContact( KABC::Addressee *addr ) { // for each changed protocol, write a new custom field containing the current set of // addresses - QValueList<KPluginInfo *>::ConstIterator protocolIt; + TQValueList<KPluginInfo *>::ConstIterator protocolIt; for ( protocolIt = mChangedProtocols.begin(); protocolIt != mChangedProtocols.end(); ++protocolIt ) { - QStringList lst; - QListViewItemIterator addressIt( mWidget->lvAddresses ); + TQStringList lst; + TQListViewItemIterator addressIt( mWidget->lvAddresses ); while ( addressIt.current() ) { IMAddressLVI* currentAddress = static_cast<IMAddressLVI*>( *addressIt ); if ( currentAddress->protocol() == *protocolIt ) @@ -242,11 +242,11 @@ void IMEditorWidget::storeContact( KABC::Addressee *addr ) ++addressIt; } - QString addrBookField = (*protocolIt)->property( "X-KDE-InstantMessagingKABCField" ).toString(); + TQString addrBookField = (*protocolIt)->property( "X-KDE-InstantMessagingKABCField" ).toString(); if ( !lst.isEmpty() ) - addr->insertCustom( addrBookField, QString::fromLatin1( "All" ), lst.join( QChar( 0xE000 ) ) ); + addr->insertCustom( addrBookField, TQString::fromLatin1( "All" ), lst.join( TQChar( 0xE000 ) ) ); else - addr->removeCustom( addrBookField, QString::fromLatin1( "All" ) ); + addr->removeCustom( addrBookField, TQString::fromLatin1( "All" ) ); } } @@ -258,11 +258,11 @@ void IMEditorWidget::setReadOnly( bool readOnly ) void IMEditorWidget::slotSetStandard() { - QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected ); + TQListViewItemIterator it( mWidget->lvAddresses, TQListViewItemIterator::Selected ); // Just set the first one selected as standard if ( IMAddressLVI *current = static_cast<IMAddressLVI*>( it.current() ) ) { - QListViewItemIterator it2( mWidget->lvAddresses ); + TQListViewItemIterator it2( mWidget->lvAddresses ); while ( it2.current() ) { IMAddressLVI *item = static_cast<IMAddressLVI*>( it2.current() ); @@ -289,7 +289,7 @@ void IMEditorWidget::slotSetStandard() void IMEditorWidget::slotUpdateButtons() { int num_selected = 0; - QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected ); + TQListViewItemIterator it( mWidget->lvAddresses, TQListViewItemIterator::Selected ); while ( it.current() ) { ++num_selected; if ( num_selected > 1 ) @@ -336,11 +336,11 @@ void IMEditorWidget::slotAdd() IMAddressWidget *addressWid = new IMAddressWidget( &addDialog, mProtocols ); addDialog.enableButtonOK( false ); - connect( addressWid, SIGNAL( inValidState( bool ) ), - &addDialog, SLOT( enableButtonOK( bool ) ) ); + connect( addressWid, TQT_SIGNAL( inValidState( bool ) ), + &addDialog, TQT_SLOT( enableButtonOK( bool ) ) ); addDialog.setMainWidget( addressWid ); - if ( addDialog.exec() == QDialog::Accepted ) { + if ( addDialog.exec() == TQDialog::Accepted ) { // add the new item IMAddressLVI *imaddresslvi = new IMAddressLVI( mWidget->lvAddresses, addressWid->protocol(), addressWid->address() /*, addressWid->context() */ ); @@ -362,7 +362,7 @@ void IMEditorWidget::slotAdd() void IMEditorWidget::slotEdit() { - QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected ); + TQListViewItemIterator it( mWidget->lvAddresses, TQListViewItemIterator::Selected ); // Just edit the first one selected. if ( IMAddressLVI *current = static_cast<IMAddressLVI*>( it.current() ) ) { @@ -370,11 +370,11 @@ void IMEditorWidget::slotEdit() KDialogBase::Ok | KDialogBase::Cancel ); IMAddressWidget *addressWid = new IMAddressWidget( &editDialog, mProtocols, current->protocol(), current->address(), current->context() ) ; - connect( addressWid, SIGNAL( inValidState( bool ) ), - &editDialog, SLOT( enableButtonOK( bool ) ) ); + connect( addressWid, TQT_SIGNAL( inValidState( bool ) ), + &editDialog, TQT_SLOT( enableButtonOK( bool ) ) ); editDialog.setMainWidget( addressWid ); - if ( editDialog.exec() == QDialog::Accepted ) { + if ( editDialog.exec() == TQDialog::Accepted ) { bool modified = false; if ( addressWid->address() != current->address() ) { modified = true; @@ -409,7 +409,7 @@ void IMEditorWidget::slotDelete() int num_selected = 0; { - QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected ); + TQListViewItemIterator it( mWidget->lvAddresses, TQListViewItemIterator::Selected ); while ( it.current() ) { num_selected++; ++it; @@ -424,7 +424,7 @@ void IMEditorWidget::slotDelete() i18n( "Confirm Delete" ), KStdGuiItem::del() ) != KMessageBox::Continue ) return; - QListViewItemIterator it( mWidget->lvAddresses ); + TQListViewItemIterator it( mWidget->lvAddresses ); bool deletedPreferred = false; while( it.current() ) { if ( it.current()->isSelected() ) { @@ -452,16 +452,16 @@ void IMEditorWidget::slotDelete() setModified( true ); } -QString IMEditorWidget::preferred() const +TQString IMEditorWidget::preferred() const { - QString retval( mPreferred ); - return retval.replace( QChar( 0xE120 ), " on " ); + TQString retval( mPreferred ); + return retval.replace( TQChar( 0xE120 ), " on " ); } -KPluginInfo * IMEditorWidget::protocolFromString( const QString &fieldValue ) const +KPluginInfo * IMEditorWidget::protocolFromString( const TQString &fieldValue ) const { - QValueList<KPluginInfo *>::ConstIterator it; + TQValueList<KPluginInfo *>::ConstIterator it; KPluginInfo * protocol = 0; for ( it = mProtocols.begin(); it != mProtocols.end(); ++it ) { if ( (*it)->property( "X-KDE-InstantMessagingKABCField" ).toString() == fieldValue ) { @@ -473,11 +473,11 @@ KPluginInfo * IMEditorWidget::protocolFromString( const QString &fieldValue ) co return protocol; } -void IMEditorWidget::splitField( const QString &str, QString &app, QString &name, QString &value ) +void IMEditorWidget::splitField( const TQString &str, TQString &app, TQString &name, TQString &value ) { int colon = str.find( ':' ); if ( colon != -1 ) { - QString tmp = str.left( colon ); + TQString tmp = str.left( colon ); value = str.mid( colon + 1 ); int dash = tmp.find( '-' ); diff --git a/kaddressbook/editors/imeditorwidget.h b/kaddressbook/editors/imeditorwidget.h index 441db257b..0184ccca4 100644 --- a/kaddressbook/editors/imeditorwidget.h +++ b/kaddressbook/editors/imeditorwidget.h @@ -25,7 +25,7 @@ #ifndef IMEDITORWIDGET_H #define IMEDITORWIDGET_H -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <klistview.h> #include <kdialogbase.h> @@ -51,15 +51,15 @@ class IMEditorWidget : public KDialogBase Q_OBJECT public: - IMEditorWidget( QWidget *parent, const QString &preferredIM, const char *name = 0 ); + IMEditorWidget( TQWidget *parent, const TQString &preferredIM, const char *name = 0 ); ~IMEditorWidget() {}; void loadContact( KABC::Addressee *addr ); void storeContact( KABC::Addressee *addr ); void setReadOnly( bool readOnly ); - QValueList<KPluginInfo *> availableProtocols() const; + TQValueList<KPluginInfo *> availableProtocols() const; bool isModified() const; - QString preferred() const; + TQString preferred() const; protected slots: void slotUpdateButtons(); @@ -72,23 +72,23 @@ class IMEditorWidget : public KDialogBase /** * Helper method to split the contents of an addressbook field up */ - static void splitField( const QString &str, QString &app, QString &name, QString &value ); + static void splitField( const TQString &str, TQString &app, TQString &name, TQString &value ); /** * Find a protocol that matches the KABC key, or 0 if none found */ - KPluginInfo * protocolFromString( const QString &fieldValue ) const; + KPluginInfo * protocolFromString( const TQString &fieldValue ) const; private: bool mReadOnly; bool mModified; - QString mPreferred; + TQString mPreferred; IMEditorBase *mWidget; void setModified( bool modified ); // Used to track changed protocols to reduce KABC writes - QValueList<KPluginInfo *> mChangedProtocols; - QValueList<KPluginInfo *> mProtocols; + TQValueList<KPluginInfo *> mChangedProtocols; + TQValueList<KPluginInfo *> mProtocols; }; /** @@ -100,28 +100,28 @@ class IMAddressLVI : public KListViewItem { public: IMAddressLVI( KListView *parent, KPluginInfo * protocol, - const QString &address, const IMContext &context = Any ); + const TQString &address, const IMContext &context = Any ); - void setAddress( const QString &address ); + void setAddress( const TQString &address ); void setProtocol( KPluginInfo * protocol ); void setContext( const IMContext &context ); void activate(); KPluginInfo * protocol() const; - QString address() const; + TQString address() const; IMContext context() const; void setPreferred( bool preferred ); bool preferred() const; protected: - virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment ); + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ); private: KPluginInfo * mProtocol; bool mPreferred; IMContext mContext; - QString mAddress; + TQString mAddress; }; #endif diff --git a/kaddressbook/emaileditwidget.cpp b/kaddressbook/emaileditwidget.cpp index 8fc857f7e..6d52c90ba 100644 --- a/kaddressbook/emaileditwidget.cpp +++ b/kaddressbook/emaileditwidget.cpp @@ -21,15 +21,15 @@ without including the source code for Qt in the source distribution. */ -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qvalidator.h> -#include <qstring.h> -#include <qtoolbutton.h> -#include <qtooltip.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqvalidator.h> +#include <tqstring.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> #include <kaccelmanager.h> #include <kconfig.h> @@ -48,9 +48,9 @@ class EmailValidator : public QRegExpValidator { public: EmailValidator() - : QRegExpValidator( 0, "EmailValidator" ) + : TQRegExpValidator( 0, "EmailValidator" ) { - QRegExp rx( ".*@.*\\.[A-Za-z]+" ); + TQRegExp rx( ".*@.*\\.[A-Za-z]+" ); setRegExp( rx ); } }; @@ -58,54 +58,54 @@ class EmailValidator : public QRegExpValidator class EmailItem : public QListBoxText { public: - EmailItem( QListBox *parent, const QString &text, bool preferred ) - : QListBoxText( parent, text ), mPreferred( preferred ) + EmailItem( TQListBox *parent, const TQString &text, bool preferred ) + : TQListBoxText( parent, text ), mPreferred( preferred ) {} void setPreferred( bool preferred ) { mPreferred = preferred; } bool preferred() const { return mPreferred; } - void setText( const QString &text ) + void setText( const TQString &text ) { - QListBoxText::setText( text ); + TQListBoxText::setText( text ); } protected: - virtual void paint( QPainter *p ) + virtual void paint( TQPainter *p ) { if ( mPreferred ) { - QFont font = p->font(); + TQFont font = p->font(); font.setBold( true ); p->setFont( font ); } - QListBoxText::paint( p ); + TQListBoxText::paint( p ); } private: bool mPreferred; }; -EmailEditWidget::EmailEditWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +EmailEditWidget::EmailEditWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - 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( "Email:" ), this ); + TQLabel *label = new TQLabel( i18n( "Email:" ), this ); topLayout->addWidget( label, 0, 0 ); mEmailEdit = new KLineEdit( this ); mEmailEdit->setValidator( new EmailValidator ); - connect( mEmailEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); - connect( mEmailEdit, SIGNAL( textChanged( const QString& ) ), - SIGNAL( modified() ) ); + connect( mEmailEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); + connect( mEmailEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SIGNAL( modified() ) ); label->setBuddy( mEmailEdit ); topLayout->addWidget( mEmailEdit, 0, 1 ); - mEditButton = new QPushButton( i18n( "Edit Email Addresses..." ), this); - connect( mEditButton, SIGNAL( clicked() ), SLOT( edit() ) ); + mEditButton = new TQPushButton( i18n( "Edit Email Addresses..." ), this); + connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) ); topLayout->addMultiCellWidget( mEditButton, 1, 1, 0, 1 ); topLayout->activate(); @@ -121,7 +121,7 @@ void EmailEditWidget::setReadOnly( bool readOnly ) mEditButton->setEnabled( !readOnly ); } -void EmailEditWidget::setEmails( const QStringList &list ) +void EmailEditWidget::setEmails( const TQStringList &list ) { mEmailList = list; @@ -134,7 +134,7 @@ void EmailEditWidget::setEmails( const QStringList &list ) mEmailEdit->blockSignals( blocked ); } -QStringList EmailEditWidget::emails() +TQStringList EmailEditWidget::emails() { if ( mEmailEdit->text().isEmpty() ) { if ( mEmailList.count() > 0 ) @@ -162,7 +162,7 @@ void EmailEditWidget::edit() } } -void EmailEditWidget::textChanged( const QString &text ) +void EmailEditWidget::textChanged( const TQString &text ) { if ( mEmailList.count() > 0 ) mEmailList.remove( mEmailList.begin() ); @@ -171,51 +171,51 @@ void EmailEditWidget::textChanged( const QString &text ) } -EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent, +EmailEditDialog::EmailEditDialog( const TQStringList &list, TQWidget *parent, const char *name ) : KDialogBase( KDialogBase::Plain, i18n( "Edit Email Addresses" ), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Help, parent, name, true ) { - QWidget *page = plainPage(); + TQWidget *page = plainPage(); - QGridLayout *topLayout = new QGridLayout( page, 4, 3, 0, spacingHint() ); + TQGridLayout *topLayout = new TQGridLayout( page, 4, 3, 0, spacingHint() ); - mEmailListBox = new QListBox( page ); + mEmailListBox = new TQListBox( page ); // Make sure there is room for the scrollbar mEmailListBox->setMinimumHeight( mEmailListBox->sizeHint().height() + 30 ); - connect( mEmailListBox, SIGNAL( highlighted( int ) ), - SLOT( selectionChanged( int ) ) ); - connect( mEmailListBox, SIGNAL( selected( int ) ), - SLOT( edit() ) ); + connect( mEmailListBox, TQT_SIGNAL( highlighted( int ) ), + TQT_SLOT( selectionChanged( int ) ) ); + connect( mEmailListBox, TQT_SIGNAL( selected( int ) ), + TQT_SLOT( edit() ) ); topLayout->addMultiCellWidget( mEmailListBox, 0, 3, 0, 1 ); - mAddButton = new QPushButton( i18n( "Add..." ), page ); - connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) ); + mAddButton = new TQPushButton( i18n( "Add..." ), page ); + connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) ); topLayout->addWidget( mAddButton, 0, 2 ); - mEditButton = new QPushButton( i18n( "Edit..." ), page ); - connect( mEditButton, SIGNAL( clicked() ), SLOT( edit() ) ); + mEditButton = new TQPushButton( i18n( "Edit..." ), page ); + connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) ); topLayout->addWidget( mEditButton, 1, 2 ); - mRemoveButton = new QPushButton( i18n( "Remove" ), page ); - connect( mRemoveButton, SIGNAL( clicked() ), SLOT( remove() ) ); + mRemoveButton = new TQPushButton( i18n( "Remove" ), page ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) ); topLayout->addWidget( mRemoveButton, 2, 2 ); - mStandardButton = new QPushButton( i18n( "Set Standard" ), page ); - connect( mStandardButton, SIGNAL( clicked() ), SLOT( standard() ) ); + mStandardButton = new TQPushButton( i18n( "Set Standard" ), page ); + connect( mStandardButton, TQT_SIGNAL( clicked() ), TQT_SLOT( standard() ) ); topLayout->addWidget( mStandardButton, 3, 2 ); topLayout->activate(); - QStringList items = list; + TQStringList items = list; if ( items.remove( "" ) > 0 ) mChanged = true; else mChanged = false; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; bool preferred = true; for ( it = items.begin(); it != items.end(); ++it ) { new EmailItem( mEmailListBox, *it, preferred ); @@ -226,16 +226,16 @@ EmailEditDialog::EmailEditDialog( const QStringList &list, QWidget *parent, selectionChanged( -1 ); KAcceleratorManager::manage( this ); - setInitialSize( QSize( 400, 200 ) ); + setInitialSize( TQSize( 400, 200 ) ); } EmailEditDialog::~EmailEditDialog() { } -QStringList EmailEditDialog::emails() const +TQStringList EmailEditDialog::emails() const { - QStringList emails; + TQStringList emails; for ( uint i = 0; i < mEmailListBox->count(); ++i ) { EmailItem *item = static_cast<EmailItem*>( mEmailListBox->item( i ) ); @@ -253,8 +253,8 @@ void EmailEditDialog::add() EmailValidator *validator = new EmailValidator; bool ok = false; - QString email = KInputDialog::getText( i18n( "Add Email" ), i18n( "New Email:" ), - QString::null, &ok, this, "EmailEditDialog", + TQString email = KInputDialog::getText( i18n( "Add Email" ), i18n( "New Email:" ), + TQString::null, &ok, this, "EmailEditDialog", validator ); if ( !ok ) @@ -278,7 +278,7 @@ void EmailEditDialog::edit() int editPos = mEmailListBox->currentItem(); - QString email = KInputDialog::getText( i18n( "Edit Email" ), i18n( "Email:" ), + TQString email = KInputDialog::getText( i18n( "Edit Email" ), i18n( "Email:" ), mEmailListBox->text( editPos ), &ok, this, "EmailEditDialog", validator ); @@ -300,10 +300,10 @@ void EmailEditDialog::edit() void EmailEditDialog::remove() { - QString address = mEmailListBox->currentText(); + TQString address = mEmailListBox->currentText(); - QString text = i18n( "<qt>Are you sure that you want to remove the email address <b>%1</b>?</qt>" ).arg( address ); - QString caption = i18n( "Confirm Remove" ); + TQString text = i18n( "<qt>Are you sure that you want to remove the email address <b>%1</b>?</qt>" ).arg( address ); + TQString caption = i18n( "Confirm Remove" ); if ( KMessageBox::warningContinueCancel( this, text, caption, KGuiItem( i18n("&Delete"), "editdelete") ) == KMessageBox::Continue) { EmailItem *item = static_cast<EmailItem*>( mEmailListBox->item( mEmailListBox->currentItem() ) ); diff --git a/kaddressbook/emaileditwidget.h b/kaddressbook/emaileditwidget.h index a8cef6761..ee9ec0119 100644 --- a/kaddressbook/emaileditwidget.h +++ b/kaddressbook/emaileditwidget.h @@ -46,11 +46,11 @@ class EmailEditWidget : public QWidget Q_OBJECT public: - EmailEditWidget( QWidget *parent, const char *name = 0 ); + EmailEditWidget( TQWidget *parent, const char *name = 0 ); ~EmailEditWidget(); - void setEmails( const QStringList &list ); - QStringList emails(); + void setEmails( const TQStringList &list ); + TQStringList emails(); void setReadOnly( bool readOnly ); @@ -59,12 +59,12 @@ class EmailEditWidget : public QWidget private slots: void edit(); - void textChanged( const QString& ); + void textChanged( const TQString& ); private: KLineEdit *mEmailEdit; - QPushButton *mEditButton; - QStringList mEmailList; + TQPushButton *mEditButton; + TQStringList mEmailList; }; class EmailEditDialog : public KDialogBase @@ -72,11 +72,11 @@ class EmailEditDialog : public KDialogBase Q_OBJECT public: - EmailEditDialog( const QStringList &list, QWidget *parent, + EmailEditDialog( const TQStringList &list, TQWidget *parent, const char *name = 0 ); ~EmailEditDialog(); - QStringList emails() const; + TQStringList emails() const; bool changed() const; protected slots: @@ -87,11 +87,11 @@ class EmailEditDialog : public KDialogBase void selectionChanged( int ); private: - QListBox *mEmailListBox; - QPushButton *mAddButton; - QPushButton *mRemoveButton; - QPushButton *mEditButton; - QPushButton *mStandardButton; + TQListBox *mEmailListBox; + TQPushButton *mAddButton; + TQPushButton *mRemoveButton; + TQPushButton *mEditButton; + TQPushButton *mStandardButton; bool mChanged; }; diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp index 121c6a1c7..93da52d0e 100644 --- a/kaddressbook/extensionmanager.cpp +++ b/kaddressbook/extensionmanager.cpp @@ -27,12 +27,12 @@ #include <klocale.h> #include <ktrader.h> -#include <qlayout.h> -#include <qobjectlist.h> -#include <qsignalmapper.h> -#include <qsplitter.h> -#include <qtimer.h> -#include <qwidgetstack.h> +#include <tqlayout.h> +#include <tqobjectlist.h> +#include <tqsignalmapper.h> +#include <tqsplitter.h> +#include <tqtimer.h> +#include <tqwidgetstack.h> #include "addresseeeditorextension.h" #include "core.h" @@ -44,15 +44,15 @@ ExtensionData::ExtensionData() : action( 0 ), widget( 0 ), weight( 0 ), isDetail { } -ExtensionManager::ExtensionManager( QWidget* extensionBar, QWidgetStack* detailsStack, KAB::Core *core, QObject *parent, +ExtensionManager::ExtensionManager( TQWidget* extensionBar, TQWidgetStack* detailsStack, KAB::Core *core, TQObject *parent, const char *name ) - : QObject( parent, name ), mExtensionBar( extensionBar ), mCore( core ), + : TQObject( parent, name ), mExtensionBar( extensionBar ), mCore( core ), mMapper( 0 ), mDetailsStack( detailsStack ), mActiveDetailsWidget( 0 ) { Q_ASSERT( mExtensionBar ); - QVBoxLayout* layout = new QVBoxLayout( mExtensionBar ); - mSplitter = new QSplitter( mExtensionBar ); - mSplitter->setOrientation( QSplitter::Vertical ); + TQVBoxLayout* layout = new TQVBoxLayout( mExtensionBar ); + mSplitter = new TQSplitter( mExtensionBar ); + mSplitter->setOrientation( TQSplitter::Vertical ); layout->addWidget( mSplitter ); createExtensionWidgets(); @@ -60,7 +60,7 @@ ExtensionManager::ExtensionManager( QWidget* extensionBar, QWidgetStack* details mActionCollection = new KActionCollection( this, "ActionCollection" ); extensionBar->setShown( false ); - QTimer::singleShot( 0, this, SLOT( createActions() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( createActions() ) ); } ExtensionManager::~ExtensionManager() @@ -70,9 +70,9 @@ ExtensionManager::~ExtensionManager() void ExtensionManager::restoreSettings() { - const QStringList activeExtensions = KABPrefs::instance()->activeExtensions(); + const TQStringList activeExtensions = KABPrefs::instance()->activeExtensions(); - typedef QMap<QString, ExtensionData>::ConstIterator ConstIterator; + typedef TQMap<TQString, ExtensionData>::ConstIterator ConstIterator; for ( ConstIterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) { if ( activeExtensions.contains( it.data().identifier ) ) { KToggleAction *action = static_cast<KToggleAction*>( it.data().action ); @@ -81,7 +81,7 @@ void ExtensionManager::restoreSettings() setExtensionActive( it.data().identifier, true ); } } - const QValueList<int> sizes = KABPrefs::instance()->extensionsSplitterSizes(); + const TQValueList<int> sizes = KABPrefs::instance()->extensionsSplitterSizes(); mSplitter->setSizes( sizes ); } @@ -107,13 +107,13 @@ bool ExtensionManager::isQuickEditVisible() const void ExtensionManager::setSelectionChanged() { - for ( QStringList::ConstIterator it = mActiveExtensions.begin(), end = mActiveExtensions.end(); it != end; ++it ) { + for ( TQStringList::ConstIterator it = mActiveExtensions.begin(), end = mActiveExtensions.end(); it != end; ++it ) { if ( mExtensionMap.contains( *it ) && mExtensionMap[*it].widget ) mExtensionMap[*it].widget->contactsSelectionChanged(); } } -void ExtensionManager::activationToggled( const QString &extid ) +void ExtensionManager::activationToggled( const TQString &extid ) { if ( !mExtensionMap.contains( extid ) ) return; @@ -122,7 +122,7 @@ void ExtensionManager::activationToggled( const QString &extid ) setExtensionActive( extid, activated ); } -void ExtensionManager::setExtensionActive( const QString& extid, bool active ) +void ExtensionManager::setExtensionActive( const TQString& extid, bool active ) { if ( !mExtensionMap.contains( extid ) ) return; @@ -161,16 +161,16 @@ void ExtensionManager::createActions() mActionList.setAutoDelete( false ); delete mMapper; - mMapper = new QSignalMapper( this, "SignalMapper" ); - connect( mMapper, SIGNAL( mapped( const QString& ) ), - this, SLOT( activationToggled( const QString& ) ) ); + mMapper = new TQSignalMapper( this, "SignalMapper" ); + connect( mMapper, TQT_SIGNAL( mapped( const TQString& ) ), + this, TQT_SLOT( activationToggled( const TQString& ) ) ); ExtensionData::List::ConstIterator it; - for ( QMap<QString, ExtensionData>::Iterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) { + for ( TQMap<TQString, ExtensionData>::Iterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) { ExtensionData& data = it.data(); - data.action = new KToggleAction( data.title, 0, mMapper, SLOT( map() ), + data.action = new KToggleAction( data.title, 0, mMapper, TQT_SLOT( map() ), mActionCollection, - QString( data.identifier + "_extension" ).latin1() ); + TQString( data.identifier + "_extension" ).latin1() ); mMapper->setMapping( data.action, data.identifier ); mActionList.append( data.action ); @@ -182,7 +182,7 @@ void ExtensionManager::createActions() mCore->guiClient()->plugActionList( "extensions_list", mActionList ); } -QWidget* ExtensionManager::activeDetailsWidget() const +TQWidget* ExtensionManager::activeDetailsWidget() const { return mActiveDetailsWidget; } @@ -190,7 +190,7 @@ QWidget* ExtensionManager::activeDetailsWidget() const void ExtensionManager::createExtensionWidgets() { // clean up - for ( QMap<QString, ExtensionData>::ConstIterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) { + for ( TQMap<TQString, ExtensionData>::ConstIterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) { delete it.data().widget; } mExtensionMap.clear(); @@ -202,10 +202,10 @@ void ExtensionManager::createExtensionWidgets() wdg = new AddresseeEditorExtension( mCore, mDetailsStack ); wdg->hide(); - connect( wdg, SIGNAL( modified( const KABC::Addressee::List& ) ), - SIGNAL( modified( const KABC::Addressee::List& ) ) ); - connect( wdg, SIGNAL( deleted( const QStringList& ) ), - SIGNAL( deleted( const QStringList& ) ) ); + connect( wdg, TQT_SIGNAL( modified( const KABC::Addressee::List& ) ), + TQT_SIGNAL( modified( const KABC::Addressee::List& ) ) ); + connect( wdg, TQT_SIGNAL( deleted( const TQStringList& ) ), + TQT_SIGNAL( deleted( const TQStringList& ) ) ); ExtensionData data; data.identifier = wdg->identifier(); @@ -217,7 +217,7 @@ void ExtensionManager::createExtensionWidgets() // load the other extensions const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/Extension", - QString( "[X-KDE-KAddressBook-ExtensionPluginVersion] == %1" ).arg( KAB_EXTENSIONWIDGET_PLUGIN_VERSION ) ); + TQString( "[X-KDE-KAddressBook-ExtensionPluginVersion] == %1" ).arg( KAB_EXTENSIONWIDGET_PLUGIN_VERSION ) ); KTrader::OfferList::ConstIterator it; for ( it = plugins.begin(); it != plugins.end(); ++it ) { @@ -239,10 +239,10 @@ void ExtensionManager::createExtensionWidgets() if ( wdg->identifier() == "distribution_list_editor_ng" ) mSplitter->moveToFirst( wdg ); wdg->hide(); - connect( wdg, SIGNAL( modified( const KABC::Addressee::List& ) ), - SIGNAL( modified( const KABC::Addressee::List& ) ) ); - connect( wdg, SIGNAL( deleted( const QStringList& ) ), - SIGNAL( deleted( const QStringList& ) ) ); + connect( wdg, TQT_SIGNAL( modified( const KABC::Addressee::List& ) ), + TQT_SIGNAL( modified( const KABC::Addressee::List& ) ) ); + connect( wdg, TQT_SIGNAL( deleted( const TQStringList& ) ), + TQT_SIGNAL( deleted( const TQStringList& ) ) ); ExtensionData data; data.identifier = wdg->identifier(); diff --git a/kaddressbook/extensionmanager.h b/kaddressbook/extensionmanager.h index 5ecc725b3..44cf24c36 100644 --- a/kaddressbook/extensionmanager.h +++ b/kaddressbook/extensionmanager.h @@ -26,10 +26,10 @@ #include "extensionwidget.h" -#include <qwidget.h> -#include <qmap.h> -#include <qptrlist.h> -#include <qstringlist.h> +#include <tqwidget.h> +#include <tqmap.h> +#include <tqptrlist.h> +#include <tqstringlist.h> class QSignalMapper; class QWidgetStack; @@ -43,12 +43,12 @@ class ExtensionData { public: ExtensionData(); - typedef QValueList<ExtensionData> List; + typedef TQValueList<ExtensionData> List; KToggleAction* action; KAB::ExtensionWidget *widget; - QString identifier; - QString title; + TQString identifier; + TQString title; int weight; bool isDetailsExtension; }; @@ -58,7 +58,7 @@ class ExtensionManager : public QObject Q_OBJECT public: - ExtensionManager( QWidget *extensionBar, QWidgetStack *detailsStack, KAB::Core *core, QObject *parent, const char *name = 0 ); + ExtensionManager( TQWidget *extensionBar, TQWidgetStack *detailsStack, KAB::Core *core, TQObject *parent, const char *name = 0 ); ~ExtensionManager(); /** @@ -82,7 +82,7 @@ class ExtensionManager : public QObject */ bool isQuickEditVisible() const; - QWidget *activeDetailsWidget() const; + TQWidget *activeDetailsWidget() const; public slots: void setSelectionChanged(); @@ -90,29 +90,29 @@ class ExtensionManager : public QObject signals: - void detailsWidgetActivated( QWidget* widget ); - void detailsWidgetDeactivated( QWidget* widget ); + void detailsWidgetActivated( TQWidget* widget ); + void detailsWidgetDeactivated( TQWidget* widget ); void modified( const KABC::Addressee::List& ); - void deleted( const QStringList& ); + void deleted( const TQStringList& ); private slots: - void activationToggled( const QString &extid ); + void activationToggled( const TQString &extid ); private: void createExtensionWidgets(); - void setExtensionActive( const QString &extid, bool active ); + void setExtensionActive( const TQString &extid, bool active ); private: - QWidget *mExtensionBar; + TQWidget *mExtensionBar; KAB::Core *mCore; - QMap<QString, ExtensionData> mExtensionMap; - QStringList mActiveExtensions; - QSignalMapper *mMapper; - QPtrList<KAction> mActionList; + TQMap<TQString, ExtensionData> mExtensionMap; + TQStringList mActiveExtensions; + TQSignalMapper *mMapper; + TQPtrList<KAction> mActionList; KActionCollection *mActionCollection; - QSplitter *mSplitter; - QWidgetStack *mDetailsStack; - QWidget *mActiveDetailsWidget; + TQSplitter *mSplitter; + TQWidgetStack *mDetailsStack; + TQWidget *mActiveDetailsWidget; }; #endif diff --git a/kaddressbook/features/distributionlistngwidget.cpp b/kaddressbook/features/distributionlistngwidget.cpp index fee8377a6..08ef3e4cd 100644 --- a/kaddressbook/features/distributionlistngwidget.cpp +++ b/kaddressbook/features/distributionlistngwidget.cpp @@ -35,23 +35,23 @@ #include <klocale.h> #include <kpopupmenu.h> -#include <qevent.h> -#include <qguardedptr.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpoint.h> -#include <qtimer.h> -#include <qpushbutton.h> -#include <qtooltip.h> - -KAB::DistributionListNg::ListBox::ListBox( QWidget* parent ) : KListBox( parent ) +#include <tqevent.h> +#include <tqguardedptr.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpoint.h> +#include <tqtimer.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> + +KAB::DistributionListNg::ListBox::ListBox( TQWidget* parent ) : KListBox( parent ) { setAcceptDrops( true ); } -void KAB::DistributionListNg::ListBox::dragMoveEvent( QDragMoveEvent *event ) +void KAB::DistributionListNg::ListBox::dragMoveEvent( TQDragMoveEvent *event ) { - QListBoxItem *item = itemAt( event->pos() ); + TQListBoxItem *item = itemAt( event->pos() ); if ( !item ) { event->ignore(); } @@ -60,18 +60,18 @@ void KAB::DistributionListNg::ListBox::dragMoveEvent( QDragMoveEvent *event ) } } -void KAB::DistributionListNg::ListBox::dragEnterEvent( QDragEnterEvent *event ) +void KAB::DistributionListNg::ListBox::dragEnterEvent( TQDragEnterEvent *event ) { KListBox::dragEnterEvent( event ); } -void KAB::DistributionListNg::ListBox::dropEvent( QDropEvent *event ) +void KAB::DistributionListNg::ListBox::dropEvent( TQDropEvent *event ) { - QListBoxItem *item = itemAt( event->pos() ); + TQListBoxItem *item = itemAt( event->pos() ); if ( !item || index( item ) == 0 ) return; - QString vcards; + TQString vcards; if ( !KVCardDrag::decode( event, vcards ) ) return; @@ -85,12 +85,12 @@ namespace DistributionListNg { class Factory : public KAB::ExtensionFactory { public: - KAB::ExtensionWidget *extension( KAB::Core *core, QWidget *parent, const char *name ) + KAB::ExtensionWidget *extension( KAB::Core *core, TQWidget *parent, const char *name ) { return new KAB::DistributionListNg::MainWidget( core, parent, name ); } - QString identifier() const + TQString identifier() const { return "distribution_list_editor"; } @@ -106,76 +106,76 @@ extern "C" { } } -QString KAB::DistributionListNg::MainWidget::title() const +TQString KAB::DistributionListNg::MainWidget::title() const { return i18n( "Distribution List Editor NG" ); } -QString KAB::DistributionListNg::MainWidget::identifier() const +TQString KAB::DistributionListNg::MainWidget::identifier() const { return "distribution_list_editor_ng"; } -KAB::DistributionListNg::MainWidget::MainWidget( KAB::Core *core, QWidget *parent, const char *name ) : KAB::ExtensionWidget( core, parent, name ) +KAB::DistributionListNg::MainWidget::MainWidget( KAB::Core *core, TQWidget *parent, const char *name ) : KAB::ExtensionWidget( core, parent, name ) { - QVBoxLayout *layout = new QVBoxLayout( this ); + TQVBoxLayout *layout = new TQVBoxLayout( this ); layout->setSpacing( KDialog::spacingHint() ); - QHBoxLayout *buttonLayout = new QHBoxLayout(); + TQHBoxLayout *buttonLayout = new TQHBoxLayout(); layout->addLayout( buttonLayout ); - QLabel *label = new QLabel( this ); + TQLabel *label = new TQLabel( this ); label->setText( i18n( "Distribution Lists" ) ); buttonLayout->addWidget( label ); buttonLayout->addStretch( 1 ); - mAddButton = new QPushButton( this ); + mAddButton = new TQPushButton( this ); mAddButton->setIconSet( SmallIconSet( "add" ) ); - QToolTip::add( mAddButton, i18n( "Add distribution list" ) ); - connect( mAddButton, SIGNAL(clicked()), core, SLOT(newDistributionList()) ); + TQToolTip::add( mAddButton, i18n( "Add distribution list" ) ); + connect( mAddButton, TQT_SIGNAL(clicked()), core, TQT_SLOT(newDistributionList()) ); buttonLayout->addWidget( mAddButton ); - mEditButton = new QPushButton( this ); + mEditButton = new TQPushButton( this ); mEditButton->setIconSet( SmallIconSet( "edit" ) ); - QToolTip::add( mEditButton, i18n( "Edit distribution list" ) ); - connect( mEditButton, SIGNAL(clicked()), this, SLOT(editSelectedDistributionList()) ); + TQToolTip::add( mEditButton, i18n( "Edit distribution list" ) ); + connect( mEditButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(editSelectedDistributionList()) ); buttonLayout->addWidget( mEditButton ); - mRemoveButton = new QPushButton( this ); + mRemoveButton = new TQPushButton( this ); mRemoveButton->setIconSet( SmallIconSet( "remove" ) ); - QToolTip::add( mRemoveButton, i18n( "Remove distribution list" ) ); - connect( mRemoveButton, SIGNAL(clicked()), this, SLOT(deleteSelectedDistributionList()) ); + TQToolTip::add( mRemoveButton, i18n( "Remove distribution list" ) ); + connect( mRemoveButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteSelectedDistributionList()) ); buttonLayout->addWidget( mRemoveButton ); mListBox = new ListBox( this ); - connect( mListBox, SIGNAL( contextMenuRequested( QListBoxItem*, const QPoint& ) ), - this, SLOT( contextMenuRequested( QListBoxItem*, const QPoint& ) ) ); - connect( mListBox, SIGNAL( dropped( const QString &, const KABC::Addressee::List & ) ), - this, SLOT( contactsDropped( const QString &, const KABC::Addressee::List & ) ) ); - connect( mListBox, SIGNAL( highlighted( int ) ), - this, SLOT( itemSelected( int ) ) ); + connect( mListBox, TQT_SIGNAL( contextMenuRequested( TQListBoxItem*, const TQPoint& ) ), + this, TQT_SLOT( contextMenuRequested( TQListBoxItem*, const TQPoint& ) ) ); + connect( mListBox, TQT_SIGNAL( dropped( const TQString &, const KABC::Addressee::List & ) ), + this, TQT_SLOT( contactsDropped( const TQString &, const KABC::Addressee::List & ) ) ); + connect( mListBox, TQT_SIGNAL( highlighted( int ) ), + this, TQT_SLOT( itemSelected( int ) ) ); layout->addWidget( mListBox ); - connect( core, SIGNAL( contactsUpdated() ), - this, SLOT( updateEntries() ) ); - connect( core->addressBook(), SIGNAL( addressBookChanged( AddressBook* ) ), - this, SLOT( updateEntries() ) ); + connect( core, TQT_SIGNAL( contactsUpdated() ), + this, TQT_SLOT( updateEntries() ) ); + connect( core->addressBook(), TQT_SIGNAL( addressBookChanged( AddressBook* ) ), + this, TQT_SLOT( updateEntries() ) ); // When contacts are changed, update both distr list combo and contents of displayed distr list - connect( core, SIGNAL( contactsUpdated() ), - this, SLOT( updateEntries() ) ); + connect( core, TQT_SIGNAL( contactsUpdated() ), + this, TQT_SLOT( updateEntries() ) ); - QTimer::singleShot( 0, this, SLOT( updateEntries() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( updateEntries() ) ); } -void KAB::DistributionListNg::MainWidget::contextMenuRequested( QListBoxItem *item, const QPoint &point ) +void KAB::DistributionListNg::MainWidget::contextMenuRequested( TQListBoxItem *item, const TQPoint &point ) { - QGuardedPtr<KPopupMenu> menu = new KPopupMenu( this ); - menu->insertItem( i18n( "New Distribution List..." ), core(), SLOT( newDistributionList() ) ); + TQGuardedPtr<KPopupMenu> menu = new KPopupMenu( this ); + menu->insertItem( i18n( "New Distribution List..." ), core(), TQT_SLOT( newDistributionList() ) ); if ( item ) { - menu->insertItem( i18n( "Edit..." ), this, SLOT( editSelectedDistributionList() ) ); - menu->insertItem( i18n( "Delete" ), this, SLOT( deleteSelectedDistributionList() ) ); + menu->insertItem( i18n( "Edit..." ), this, TQT_SLOT( editSelectedDistributionList() ) ); + menu->insertItem( i18n( "Delete" ), this, TQT_SLOT( deleteSelectedDistributionList() ) ); } menu->exec( point ); delete menu; @@ -183,7 +183,7 @@ void KAB::DistributionListNg::MainWidget::contextMenuRequested( QListBoxItem *it void KAB::DistributionListNg::MainWidget::editSelectedDistributionList() { - const QListBoxItem* const item = mListBox->selectedItem(); + const TQListBoxItem* const item = mListBox->selectedItem(); if ( !item ) return; core()->editDistributionList( item->text() ); @@ -191,8 +191,8 @@ void KAB::DistributionListNg::MainWidget::editSelectedDistributionList() void KAB::DistributionListNg::MainWidget::deleteSelectedDistributionList() { - const QListBoxItem* const item = mListBox->selectedItem(); - const QString name = item ? item->text() : QString(); + const TQListBoxItem* const item = mListBox->selectedItem(); + const TQString name = item ? item->text() : TQString(); if ( name.isNull() ) return; const KPIM::DistributionList list = KPIM::DistributionList::findByName( @@ -202,7 +202,7 @@ void KAB::DistributionListNg::MainWidget::deleteSelectedDistributionList() core()->deleteDistributionLists( name ); } -void KAB::DistributionListNg::MainWidget::contactsDropped( const QString &listName, const KABC::Addressee::List &addressees ) +void KAB::DistributionListNg::MainWidget::contactsDropped( const TQString &listName, const KABC::Addressee::List &addressees ) { if ( addressees.isEmpty() ) return; @@ -228,7 +228,7 @@ void KAB::DistributionListNg::MainWidget::changed( const KABC::Addressee& dist ) void KAB::DistributionListNg::MainWidget::updateEntries() { const bool hadSelection = mListBox->selectedItem() != 0; - const QStringList newEntries = core()->distributionListNames(); + const TQStringList newEntries = core()->distributionListNames(); if ( !mCurrentEntries.isEmpty() && newEntries == mCurrentEntries ) return; mCurrentEntries = newEntries; @@ -241,7 +241,7 @@ void KAB::DistributionListNg::MainWidget::updateEntries() void KAB::DistributionListNg::MainWidget::itemSelected( int index ) { - core()->setSelectedDistributionList( index == 0 ? QString() : mListBox->item( index )->text() ); + core()->setSelectedDistributionList( index == 0 ? TQString() : mListBox->item( index )->text() ); mEditButton->setEnabled( index > 0 ); mRemoveButton->setEnabled( index > 0 ); } diff --git a/kaddressbook/features/distributionlistngwidget.h b/kaddressbook/features/distributionlistngwidget.h index 4a174dd83..0bfa3d29d 100644 --- a/kaddressbook/features/distributionlistngwidget.h +++ b/kaddressbook/features/distributionlistngwidget.h @@ -29,7 +29,7 @@ #include <klistbox.h> -#include <qstringlist.h> +#include <tqstringlist.h> class QDragEnterEvent; class QDragMoveEvent; @@ -48,19 +48,19 @@ class ListBox : public KListBox { Q_OBJECT public: - ListBox( QWidget* parent = 0 ); + ListBox( TQWidget* parent = 0 ); signals: - void dropped( const QString &listName, const KABC::Addressee::List &addressees ); + void dropped( const TQString &listName, const KABC::Addressee::List &addressees ); protected: //override - void dragEnterEvent( QDragEnterEvent *event ); + void dragEnterEvent( TQDragEnterEvent *event ); //override - void dragMoveEvent( QDragMoveEvent *event ); + void dragMoveEvent( TQDragMoveEvent *event ); //override - void dropEvent( QDropEvent *event ); + void dropEvent( TQDropEvent *event ); }; class MainWidget : public KAB::ExtensionWidget @@ -68,13 +68,13 @@ class MainWidget : public KAB::ExtensionWidget Q_OBJECT public: - explicit MainWidget( KAB::Core *core, QWidget *parent = 0, const char *name = 0 ); + explicit MainWidget( KAB::Core *core, TQWidget *parent = 0, const char *name = 0 ); //impl - QString title() const; + TQString title() const; //impl - QString identifier() const; + TQString identifier() const; private: @@ -85,17 +85,17 @@ private slots: void deleteSelectedDistributionList(); void editSelectedDistributionList(); - void contextMenuRequested( QListBoxItem *item, const QPoint &point ); + void contextMenuRequested( TQListBoxItem *item, const TQPoint &point ); void updateEntries(); void itemSelected( int index ); - void contactsDropped( const QString &listName, const KABC::Addressee::List &addressees ); + void contactsDropped( const TQString &listName, const KABC::Addressee::List &addressees ); private: ListBox *mListBox; - QStringList mCurrentEntries; - QPushButton *mAddButton; - QPushButton *mEditButton; - QPushButton *mRemoveButton; + TQStringList mCurrentEntries; + TQPushButton *mAddButton; + TQPushButton *mEditButton; + TQPushButton *mRemoveButton; }; } // namespace DistributionListNg diff --git a/kaddressbook/features/distributionlistwidget.cpp b/kaddressbook/features/distributionlistwidget.cpp index 9c322d6f6..93a00bdfa 100644 --- a/kaddressbook/features/distributionlistwidget.cpp +++ b/kaddressbook/features/distributionlistwidget.cpp @@ -22,13 +22,13 @@ #include "distributionlistwidget.h" -#include <qbuttongroup.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qradiobutton.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> #include <kaccelmanager.h> #include <kconfig.h> @@ -55,12 +55,12 @@ typedef KABC::DistributionList DistributionList; class DistributionListFactory : public KAB::ExtensionFactory { public: - KAB::ExtensionWidget *extension( KAB::Core *core, QWidget *parent, const char *name ) + KAB::ExtensionWidget *extension( KAB::Core *core, TQWidget *parent, const char *name ) { return new DistributionListWidget( core, parent, name ); } - QString identifier() const + TQString identifier() const { return "distribution_list_editor"; } @@ -82,15 +82,15 @@ class DeletePressedCatcher : public QObject { public: DeletePressedCatcher( DistributionListWidget *parent ) - : QObject( parent, "DeletePressedCatcher" ), mWidget( parent ) + : TQObject( parent, "DeletePressedCatcher" ), mWidget( parent ) { } protected: - bool eventFilter( QObject*, QEvent *event ) + bool eventFilter( TQObject*, TQEvent *event ) { - if ( event->type() == QEvent::AccelOverride ) { - QKeyEvent *keyEvent = (QKeyEvent*)event; + if ( event->type() == TQEvent::AccelOverride ) { + TQKeyEvent *keyEvent = (TQKeyEvent*)event; if ( keyEvent->key() == Qt::Key_Delete ) { keyEvent->accept(); mWidget->removeContact(); @@ -110,8 +110,8 @@ class ContactItem : public QListViewItem { public: ContactItem( DistributionListView *parent, const KABC::Addressee &addressee, - const QString &email = QString::null ) : - QListViewItem( parent ), + const TQString &email = TQString::null ) : + TQListViewItem( parent ), mAddressee( addressee ), mEmail( email ) { @@ -130,47 +130,47 @@ class ContactItem : public QListViewItem return mAddressee; } - QString email() const + TQString email() const { return mEmail; } protected: - bool acceptDrop( const QMimeSource* ) + bool acceptDrop( const TQMimeSource* ) { return true; } private: KABC::Addressee mAddressee; - QString mEmail; + TQString mEmail; }; -DistributionListWidget::DistributionListWidget( KAB::Core *core, QWidget *parent, +DistributionListWidget::DistributionListWidget( KAB::Core *core, TQWidget *parent, const char *name ) : KAB::ExtensionWidget( core, parent, name ) #ifndef KDEPIM_NEW_DISTRLISTS , mManager( 0 ) #endif { - QGridLayout *topLayout = new QGridLayout( this, 3, 4, KDialog::marginHint(), + TQGridLayout *topLayout = new TQGridLayout( this, 3, 4, KDialog::marginHint(), KDialog::spacingHint() ); - mNameCombo = new QComboBox( this ); + mNameCombo = new TQComboBox( this ); topLayout->addWidget( mNameCombo, 0, 0 ); - connect( mNameCombo, SIGNAL( activated( int ) ), SLOT( updateContactView() ) ); + connect( mNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( updateContactView() ) ); - mCreateListButton = new QPushButton( i18n( "New List..." ), this ); + mCreateListButton = new TQPushButton( i18n( "New List..." ), this ); topLayout->addWidget( mCreateListButton, 0, 1 ); - connect( mCreateListButton, SIGNAL( clicked() ), SLOT( createList() ) ); + connect( mCreateListButton, TQT_SIGNAL( clicked() ), TQT_SLOT( createList() ) ); - mEditListButton = new QPushButton( i18n( "Rename List..." ), this ); + mEditListButton = new TQPushButton( i18n( "Rename List..." ), this ); topLayout->addWidget( mEditListButton, 0, 2 ); - connect( mEditListButton, SIGNAL( clicked() ), SLOT( editList() ) ); + connect( mEditListButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editList() ) ); - mRemoveListButton = new QPushButton( i18n( "Remove List" ), this ); + mRemoveListButton = new TQPushButton( i18n( "Remove List" ), this ); topLayout->addWidget( mRemoveListButton, 0, 3 ); - connect( mRemoveListButton, SIGNAL( clicked() ), SLOT( removeList() ) ); + connect( mRemoveListButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeList() ) ); mContactView = new DistributionListView( this ); mContactView->addColumn( i18n( "Name" ) ); @@ -180,44 +180,44 @@ DistributionListWidget::DistributionListWidget( KAB::Core *core, QWidget *parent mContactView->setAllColumnsShowFocus( true ); mContactView->setFullWidth( true ); topLayout->addMultiCellWidget( mContactView, 1, 1, 0, 3 ); - connect( mContactView, SIGNAL( selectionChanged() ), - SLOT( selectionContactViewChanged() ) ); - connect( mContactView, SIGNAL( dropped( QDropEvent*, QListViewItem* ) ), - SLOT( dropped( QDropEvent*, QListViewItem* ) ) ); + connect( mContactView, TQT_SIGNAL( selectionChanged() ), + TQT_SLOT( selectionContactViewChanged() ) ); + connect( mContactView, TQT_SIGNAL( dropped( TQDropEvent*, TQListViewItem* ) ), + TQT_SLOT( dropped( TQDropEvent*, TQListViewItem* ) ) ); - mAddContactButton = new QPushButton( i18n( "Add Contact" ), this ); + mAddContactButton = new TQPushButton( i18n( "Add Contact" ), this ); mAddContactButton->setEnabled( false ); topLayout->addWidget( mAddContactButton, 2, 0 ); - connect( mAddContactButton, SIGNAL( clicked() ), SLOT( addContact() ) ); + connect( mAddContactButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addContact() ) ); - mEntryCountLabel = new QLabel( this ); + mEntryCountLabel = new TQLabel( this ); topLayout->addWidget( mEntryCountLabel, 2, 1 ); - mChangeEmailButton = new QPushButton( i18n( "Change Email..." ), this ); + mChangeEmailButton = new TQPushButton( i18n( "Change Email..." ), this ); topLayout->addWidget( mChangeEmailButton, 2, 2 ); - connect( mChangeEmailButton, SIGNAL( clicked() ), SLOT( changeEmail() ) ); + connect( mChangeEmailButton, TQT_SIGNAL( clicked() ), TQT_SLOT( changeEmail() ) ); - mRemoveContactButton = new QPushButton( i18n( "Remove Contact" ), this ); + mRemoveContactButton = new TQPushButton( i18n( "Remove Contact" ), this ); topLayout->addWidget( mRemoveContactButton, 2, 3 ); - connect( mRemoveContactButton, SIGNAL( clicked() ), SLOT( removeContact() ) ); + connect( mRemoveContactButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeContact() ) ); #ifdef KDEPIM_NEW_DISTRLISTS // When contacts are changed, update both distr list combo and contents of displayed distr list - connect( core, SIGNAL( contactsUpdated() ), - this, SLOT( updateNameCombo() ) ); + connect( core, TQT_SIGNAL( contactsUpdated() ), + this, TQT_SLOT( updateNameCombo() ) ); #else mManager = new KABC::DistributionListManager( core->addressBook() ); - connect( KABC::DistributionListWatcher::self(), SIGNAL( changed() ), - this, SLOT( updateNameCombo() ) ); + connect( KABC::DistributionListWatcher::self(), TQT_SIGNAL( changed() ), + this, TQT_SLOT( updateNameCombo() ) ); #endif - connect( core->addressBook(), SIGNAL( addressBookChanged( AddressBook* ) ), - this, SLOT( updateNameCombo() ) ); + connect( core->addressBook(), TQT_SIGNAL( addressBookChanged( AddressBook* ) ), + this, TQT_SLOT( updateNameCombo() ) ); updateNameCombo(); - QObject *catcher = new DeletePressedCatcher( this ); + TQObject *catcher = new DeletePressedCatcher( this ); installEventFilter( catcher ); mContactView->installEventFilter( catcher ); @@ -252,7 +252,7 @@ void DistributionListWidget::selectionContactViewChanged() mRemoveContactButton->setEnabled( state ); } -bool DistributionListWidget::alreadyExists( const QString& distrListName ) const +bool DistributionListWidget::alreadyExists( const TQString& distrListName ) const { #ifdef KDEPIM_NEW_DISTRLISTS return core()->distributionListNames().contains( distrListName ); @@ -263,9 +263,9 @@ bool DistributionListWidget::alreadyExists( const QString& distrListName ) const void DistributionListWidget::createList() { - QString newName = KInputDialog::getText( i18n( "New Distribution List" ), + TQString newName = KInputDialog::getText( i18n( "New Distribution List" ), i18n( "Please enter name:" ), - QString::null, 0, this ); + TQString::null, 0, this ); if ( newName.isEmpty() ) return; @@ -301,9 +301,9 @@ void DistributionListWidget::createList() void DistributionListWidget::editList() { - const QString oldName = mNameCombo->currentText(); + const TQString oldName = mNameCombo->currentText(); - const QString newName = KInputDialog::getText( i18n( "Rename Distribution List" ), + const TQString newName = KInputDialog::getText( i18n( "Rename Distribution List" ), i18n( "Please enter name:" ), oldName, 0, this ); @@ -344,7 +344,7 @@ void DistributionListWidget::removeList() { int result = KMessageBox::warningContinueCancel( this, i18n( "<qt>Delete distribution list <b>%1</b>?</qt>" ) .arg( mNameCombo->currentText() ), - QString::null, KGuiItem( i18n("Delete"), "editdelete") ); + TQString::null, KGuiItem( i18n("Delete"), "editdelete") ); if ( result != KMessageBox::Continue ) return; @@ -447,7 +447,7 @@ void DistributionListWidget::changeEmail() return; bool canceled = false; - const QString email = EmailSelector::getEmail( contactItem->addressee().emails(), + const TQString email = EmailSelector::getEmail( contactItem->addressee().emails(), contactItem->email(), this, canceled); if( canceled) return; @@ -513,10 +513,10 @@ void DistributionListWidget::updateNameCombo() int pos = mNameCombo->currentItem(); mNameCombo->clear(); #ifdef KDEPIM_NEW_DISTRLISTS - const QStringList names = core()->distributionListNames(); + const TQStringList names = core()->distributionListNames(); #else mManager->load(); - const QStringList names = mManager->listNames(); + const TQStringList names = mManager->listNames(); #endif mNameCombo->insertStringList( names ); mNameCombo->setCurrentItem( QMIN( pos, (int)names.count() - 1 ) ); @@ -524,7 +524,7 @@ void DistributionListWidget::updateNameCombo() updateContactView(); } -void DistributionListWidget::dropEvent( QDropEvent *e ) +void DistributionListWidget::dropEvent( TQDropEvent *e ) { if ( mNameCombo->count() == 0 ) return; @@ -541,7 +541,7 @@ void DistributionListWidget::dropEvent( QDropEvent *e ) KABC::DistributionList& dist = *list; #endif - QString vcards; + TQString vcards; if ( KVCardDrag::decode( e, vcards ) ) { KABC::VCardConverter converter; const KABC::Addressee::List lst = converter.parseVCards( vcards ); @@ -563,17 +563,17 @@ void DistributionListWidget::contactsSelectionChanged() mAddContactButton->setEnabled( contactsSelected() && mNameCombo->count() > 0 ); } -QString DistributionListWidget::title() const +TQString DistributionListWidget::title() const { return i18n( "Distribution List Editor" ); } -QString DistributionListWidget::identifier() const +TQString DistributionListWidget::identifier() const { return "distribution_list_editor"; } -void DistributionListWidget::dropped( QDropEvent *e, QListViewItem* ) +void DistributionListWidget::dropped( TQDropEvent *e, TQListViewItem* ) { dropEvent( e ); } @@ -590,7 +590,7 @@ void DistributionListWidget::changed() } #endif -DistributionListView::DistributionListView( QWidget *parent, const char* name ) +DistributionListView::DistributionListView( TQWidget *parent, const char* name ) : KListView( parent, name ) { setDragEnabled( true ); @@ -598,66 +598,66 @@ DistributionListView::DistributionListView( QWidget *parent, const char* name ) setAllColumnsShowFocus( true ); } -void DistributionListView::dragEnterEvent( QDragEnterEvent* e ) +void DistributionListView::dragEnterEvent( TQDragEnterEvent* e ) { - bool canDecode = QTextDrag::canDecode( e ); + bool canDecode = TQTextDrag::canDecode( e ); e->accept( canDecode ); } -void DistributionListView::viewportDragMoveEvent( QDragMoveEvent *e ) +void DistributionListView::viewportDragMoveEvent( TQDragMoveEvent *e ) { - bool canDecode = QTextDrag::canDecode( e ); + bool canDecode = TQTextDrag::canDecode( e ); e->accept( canDecode ); } -void DistributionListView::viewportDropEvent( QDropEvent *e ) +void DistributionListView::viewportDropEvent( TQDropEvent *e ) { emit dropped( e, 0 ); } -void DistributionListView::dropEvent( QDropEvent *e ) +void DistributionListView::dropEvent( TQDropEvent *e ) { emit dropped( e, 0 ); } -EmailSelector::EmailSelector( const QStringList &emails, - const QString ¤t, QWidget *parent ) +EmailSelector::EmailSelector( const TQStringList &emails, + const TQString ¤t, TQWidget *parent ) : KDialogBase( KDialogBase::Plain, i18n("Select Email Address"), Ok|Cancel, Ok, parent ) { - QFrame *topFrame = plainPage(); - QBoxLayout *topLayout = new QVBoxLayout( topFrame ); + TQFrame *topFrame = plainPage(); + TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); - mButtonGroup = new QButtonGroup( 1, Horizontal, i18n("Email Addresses"), + mButtonGroup = new TQButtonGroup( 1, Horizontal, i18n("Email Addresses"), topFrame ); mButtonGroup->setRadioButtonExclusive( true ); topLayout->addWidget( mButtonGroup ); - QRadioButton *button = new QRadioButton( i18n("Preferred address"), mButtonGroup ); + TQRadioButton *button = new TQRadioButton( i18n("Preferred address"), mButtonGroup ); button->setDown( true ); mEmailMap.insert( mButtonGroup->id( button ), "" ); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = emails.begin(); it != emails.end(); ++it ) { - button = new QRadioButton( *it, mButtonGroup ); + button = new TQRadioButton( *it, mButtonGroup ); mEmailMap.insert( mButtonGroup->id( button ), *it ); if ( (*it) == current ) button->setDown( true ); } } -QString EmailSelector::selected() const +TQString EmailSelector::selected() const { - QButton *button = mButtonGroup->selected(); + TQButton *button = mButtonGroup->selected(); if ( button ) return mEmailMap[ mButtonGroup->id( button ) ]; - return QString::null; + return TQString::null; } -QString EmailSelector::getEmail( const QStringList &emails, - const QString ¤t, QWidget *parent, bool &canceled ) +TQString EmailSelector::getEmail( const TQStringList &emails, + const TQString ¤t, TQWidget *parent, bool &canceled ) { EmailSelector dlg( emails, current, parent ); if(dlg.exec()) @@ -666,7 +666,7 @@ QString EmailSelector::getEmail( const QStringList &emails, return dlg.selected(); } canceled = true; - return QString(); + return TQString(); } diff --git a/kaddressbook/features/distributionlistwidget.h b/kaddressbook/features/distributionlistwidget.h index d52a06ab0..4ee5e76ad 100644 --- a/kaddressbook/features/distributionlistwidget.h +++ b/kaddressbook/features/distributionlistwidget.h @@ -50,17 +50,17 @@ class DistributionListWidget : public KAB::ExtensionWidget Q_OBJECT public: - DistributionListWidget( KAB::Core*, QWidget *parent, const char *name = 0 ); + DistributionListWidget( KAB::Core*, TQWidget *parent, const char *name = 0 ); virtual ~DistributionListWidget(); void contactsSelectionChanged(); - QString title() const; - QString identifier() const; + TQString title() const; + TQString identifier() const; public slots: void save(); - void dropped( QDropEvent*, QListViewItem* ); + void dropped( TQDropEvent*, TQListViewItem* ); void removeContact(); @@ -80,25 +80,25 @@ class DistributionListWidget : public KAB::ExtensionWidget #else void changed(); #endif - bool alreadyExists( const QString& distrListName ) const; + bool alreadyExists( const TQString& distrListName ) const; protected: - void dropEvent( QDropEvent* ); + void dropEvent( TQDropEvent* ); private: - QComboBox *mNameCombo; - QLabel *mEntryCountLabel; + TQComboBox *mNameCombo; + TQLabel *mEntryCountLabel; DistributionListView *mContactView; #ifndef KDEPIM_NEW_DISTRLISTS KABC::DistributionListManager *mManager; #endif - QPushButton *mCreateListButton; - QPushButton *mEditListButton; - QPushButton *mRemoveListButton; - QPushButton *mChangeEmailButton; - QPushButton *mAddContactButton; - QPushButton *mRemoveContactButton; + TQPushButton *mCreateListButton; + TQPushButton *mEditListButton; + TQPushButton *mRemoveListButton; + TQPushButton *mChangeEmailButton; + TQPushButton *mAddContactButton; + TQPushButton *mRemoveContactButton; }; /** @@ -109,13 +109,13 @@ class DistributionListView : public KListView Q_OBJECT public: - DistributionListView( QWidget *parent, const char* name = 0 ); + DistributionListView( TQWidget *parent, const char* name = 0 ); protected: - void dragEnterEvent( QDragEnterEvent *e ); - void dropEvent( QDropEvent *e ); - void viewportDragMoveEvent( QDragMoveEvent *e ); - void viewportDropEvent( QDropEvent *e ); + void dragEnterEvent( TQDragEnterEvent *e ); + void dropEvent( TQDropEvent *e ); + void viewportDragMoveEvent( TQDragMoveEvent *e ); + void viewportDropEvent( TQDropEvent *e ); }; /** @@ -124,17 +124,17 @@ class DistributionListView : public KListView class EmailSelector : public KDialogBase { public: - EmailSelector( const QStringList &emails, const QString ¤t, - QWidget *parent ); + EmailSelector( const TQStringList &emails, const TQString ¤t, + TQWidget *parent ); - QString selected() const; + TQString selected() const; - static QString getEmail( const QStringList &emails, const QString ¤t, - QWidget *parent, bool &canceled ); + static TQString getEmail( const TQStringList &emails, const TQString ¤t, + TQWidget *parent, bool &canceled ); private: - QButtonGroup *mButtonGroup; - QMap<int, QString> mEmailMap; + TQButtonGroup *mButtonGroup; + TQMap<int, TQString> mEmailMap; }; #endif diff --git a/kaddressbook/features/resourceselection.cpp b/kaddressbook/features/resourceselection.cpp index dcd40dc12..d6edba25e 100644 --- a/kaddressbook/features/resourceselection.cpp +++ b/kaddressbook/features/resourceselection.cpp @@ -21,13 +21,13 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qtimer.h> -#include <qlabel.h> -#include <qheader.h> -#include <qtooltip.h> +#include <tqlayout.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqtimer.h> +#include <tqlabel.h> +#include <tqheader.h> +#include <tqtooltip.h> #include <kabc/resource.h> #include <kdialog.h> @@ -58,7 +58,7 @@ class ResourceItem : public QCheckListItem { public: ResourceItem( KListView *parent, KABC::Resource *resource ) - : QCheckListItem( parent, resource->resourceName(), CheckBox ), + : TQCheckListItem( parent, resource->resourceName(), CheckBox ), mResource( resource ), mChecked( false ), mIsSubresource( false ), mSubItemsCreated( false ), mResourceIdentifier() @@ -69,8 +69,8 @@ class ResourceItem : public QCheckListItem } ResourceItem( KPIM::ResourceABC *resourceABC, ResourceItem* parent, - const QString& resourceIdent ) - : QCheckListItem( parent, resourceABC->subresourceLabel( resourceIdent ), CheckBox ), + const TQString& resourceIdent ) + : TQCheckListItem( parent, resourceABC->subresourceLabel( resourceIdent ), CheckBox ), mResource( resourceABC ), mChecked( false ), mIsSubresource( true ), mSubItemsCreated( false ), mResourceIdentifier( resourceIdent ) @@ -89,7 +89,7 @@ class ResourceItem : public QCheckListItem } bool checked() const { return mChecked; } KABC::Resource *resource() const { return mResource; } - QString resourceIdentifier() const { return mResourceIdentifier; } + TQString resourceIdentifier() const { return mResourceIdentifier; } bool isSubResource() const { return mIsSubresource; } virtual void stateChange( bool active ); @@ -99,21 +99,21 @@ class ResourceItem : public QCheckListItem bool mChecked; const bool mIsSubresource; bool mSubItemsCreated; - const QString mResourceIdentifier; + const TQString mResourceIdentifier; }; // Comes from korganizer/resourceview.cpp void ResourceItem::createSubresourceItems() { KPIM::ResourceABC* res = dynamic_cast<KPIM::ResourceABC *>( mResource ); - QStringList subresources; + TQStringList subresources; if ( res ) subresources = res->subresources(); if ( !subresources.isEmpty() ) { setOpen( true ); setExpandable( true ); // This resource has subresources - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = subresources.begin(); it != subresources.end(); ++it ) { (void)new ResourceItem( res, this, *it ); } @@ -134,7 +134,7 @@ void ResourceItem::stateChange( bool active ) //// -ResourceSelection::ResourceSelection( KAB::Core *core, QWidget *parent, const char *name ) +ResourceSelection::ResourceSelection( KAB::Core *core, TQWidget *parent, const char *name ) : KAB::ExtensionWidget( core, parent, name ), mManager( 0 ) { initGUI(); @@ -142,49 +142,49 @@ ResourceSelection::ResourceSelection( KAB::Core *core, QWidget *parent, const ch AddressBookWrapper *wrapper = static_cast<AddressBookWrapper*>( core->addressBook() ); mManager = wrapper->getResourceManager(); - connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) ); - connect( mEditButton, SIGNAL( clicked() ), SLOT( edit() ) ); - connect( mRemoveButton, SIGNAL( clicked() ), SLOT( remove() ) ); + connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) ); + connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) ); - connect( mListView, SIGNAL( clicked( QListViewItem* ) ), - SLOT( currentChanged( QListViewItem* ) ) ); + connect( mListView, TQT_SIGNAL( clicked( TQListViewItem* ) ), + TQT_SLOT( currentChanged( TQListViewItem* ) ) ); - connect( mListView, SIGNAL( contextMenuRequested ( QListViewItem *, - const QPoint &, int ) ), - SLOT( contextMenuRequested( QListViewItem *, const QPoint &, + connect( mListView, TQT_SIGNAL( contextMenuRequested ( TQListViewItem *, + const TQPoint &, int ) ), + TQT_SLOT( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ) ); - QTimer::singleShot( 0, this, SLOT( updateView() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( updateView() ) ); } ResourceSelection::~ResourceSelection() { } -void ResourceSelection::contextMenuRequested ( QListViewItem *i, - const QPoint &pos, int ) +void ResourceSelection::contextMenuRequested ( TQListViewItem *i, + const TQPoint &pos, int ) { ResourceItem *item = static_cast<ResourceItem *>( i ); - QPopupMenu *menu = new QPopupMenu( this ); - connect( menu, SIGNAL( aboutToHide() ), menu, SLOT( deleteLater() ) ); + TQPopupMenu *menu = new TQPopupMenu( this ); + connect( menu, TQT_SIGNAL( aboutToHide() ), menu, TQT_SLOT( deleteLater() ) ); if ( item ) { int reloadId = menu->insertItem( i18n("Re&load"), this, - SLOT( reloadResource() ) ); + TQT_SLOT( reloadResource() ) ); menu->setItemEnabled( reloadId, item->resource()->isActive() ); int saveId = menu->insertItem( i18n("&Save"), this, - SLOT( saveResource() ) ); + TQT_SLOT( saveResource() ) ); menu->setItemEnabled( saveId, item->resource()->isActive() ); menu->insertSeparator(); -// menu->insertItem( i18n("Show &Info"), this, SLOT( showInfo() ) ); +// menu->insertItem( i18n("Show &Info"), this, TQT_SLOT( showInfo() ) ); - menu->insertItem( i18n("&Edit..."), this, SLOT( edit() ) ); - menu->insertItem( i18n("&Remove"), this, SLOT( remove() ) ); + menu->insertItem( i18n("&Edit..."), this, TQT_SLOT( edit() ) ); + menu->insertItem( i18n("&Remove"), this, TQT_SLOT( remove() ) ); menu->insertSeparator(); } - menu->insertItem( i18n("&Add..."), this, SLOT( add() ) ); + menu->insertItem( i18n("&Add..."), this, TQT_SLOT( add() ) ); menu->popup( pos ); } @@ -215,33 +215,33 @@ void ResourceSelection::showInfo() ResourceItem *item = selectedItem(); if ( !item ) return; -// QString txt = "<qt>" + item->resource()->infoText() + "</qt>"; +// TQString txt = "<qt>" + item->resource()->infoText() + "</qt>"; // KMessageBox::information( this, txt ); } -QString ResourceSelection::title() const +TQString ResourceSelection::title() const { return i18n( "Address Books" ); } -QString ResourceSelection::identifier() const +TQString ResourceSelection::identifier() const { return "resourceselection"; } void ResourceSelection::add() { - QStringList types = mManager->resourceTypeNames(); - QStringList descs = mManager->resourceTypeDescriptions(); + TQStringList types = mManager->resourceTypeNames(); + TQStringList descs = mManager->resourceTypeDescriptions(); bool ok = false; - QString desc = KInputDialog::getItem( i18n( "Add Address Book" ), + TQString desc = KInputDialog::getItem( i18n( "Add Address Book" ), i18n( "Please select type of the new address book:" ), descs, 0, false, &ok, this ); if ( !ok ) return; - QString type = types[ descs.findIndex( desc ) ]; + TQString type = types[ descs.findIndex( desc ) ]; // Create new resource KABC::Resource *resource = mManager->createResource( type ); @@ -254,7 +254,7 @@ void ResourceSelection::add() resource->setResourceName( i18n( "%1 address book" ).arg( type ) ); resource->setAddressBook(core()->addressBook()); - KRES::ConfigDialog dlg( this, QString( "contact" ), resource ); + KRES::ConfigDialog dlg( this, TQString( "contact" ), resource ); if ( dlg.exec() ) { core()->addressBook()->addResource( resource ); @@ -279,7 +279,7 @@ void ResourceSelection::edit() // thus keep their data rather than their pointer KABC::Resource *resource = item->resource(); - KRES::ConfigDialog dlg( this, QString( "contact" ), resource ); + KRES::ConfigDialog dlg( this, TQString( "contact" ), resource ); if ( dlg.exec() ) { mManager->change( resource ); @@ -311,7 +311,7 @@ void ResourceSelection::remove() updateView(); } -void ResourceSelection::currentChanged( QListViewItem *item ) +void ResourceSelection::currentChanged( TQListViewItem *item ) { ResourceItem *resItem = static_cast<ResourceItem*>( item ); bool state = (resItem && !resItem->isSubResource() ); @@ -367,28 +367,28 @@ void ResourceSelection::updateView() KPIM::ResourceABC* resource = dynamic_cast<KPIM::ResourceABC *>( *it ); if ( resource ) { disconnect( resource, 0, this, 0 ); - connect( resource, SIGNAL( signalSubresourceAdded( KPIM::ResourceABC *, - const QString &, const QString & ) ), - SLOT( slotSubresourceAdded( KPIM::ResourceABC *, - const QString &, const QString & ) ) ); - - connect( resource, SIGNAL( signalSubresourceRemoved( KPIM::ResourceABC *, - const QString &, const QString & ) ), - SLOT( slotSubresourceRemoved( KPIM::ResourceABC *, - const QString &, const QString & ) ) ); - - connect( resource, SIGNAL( signalSubresourceChanged( KPIM::ResourceABC *, - const QString &, const QString & ) ), - SLOT( slotSubresourceChanged( KPIM::ResourceABC *, - const QString &, const QString & ) ) ); - - //connect( resource, SIGNAL( resourceSaved( KPIM::ResourceABC * ) ), - // SLOT( closeResource( KPIM::ResourceABC * ) ) ); + connect( resource, TQT_SIGNAL( signalSubresourceAdded( KPIM::ResourceABC *, + const TQString &, const TQString & ) ), + TQT_SLOT( slotSubresourceAdded( KPIM::ResourceABC *, + const TQString &, const TQString & ) ) ); + + connect( resource, TQT_SIGNAL( signalSubresourceRemoved( KPIM::ResourceABC *, + const TQString &, const TQString & ) ), + TQT_SLOT( slotSubresourceRemoved( KPIM::ResourceABC *, + const TQString &, const TQString & ) ) ); + + connect( resource, TQT_SIGNAL( signalSubresourceChanged( KPIM::ResourceABC *, + const TQString &, const TQString & ) ), + TQT_SLOT( slotSubresourceChanged( KPIM::ResourceABC *, + const TQString &, const TQString & ) ) ); + + //connect( resource, TQT_SIGNAL( resourceSaved( KPIM::ResourceABC * ) ), + // TQT_SLOT( closeResource( KPIM::ResourceABC * ) ) ); item->createSubresourceItems(); } } - QListViewItemIterator itemIt( mListView ); + TQListViewItemIterator itemIt( mListView ); while ( itemIt.current() ) { ResourceItem *item = static_cast<ResourceItem*>( itemIt.current() ); if ( item->resource()->identifier() == mLastResource ) { @@ -405,11 +405,11 @@ void ResourceSelection::updateView() // Add a new entry void ResourceSelection::slotSubresourceAdded( KPIM::ResourceABC *resource, - const QString& /*type*/, - const QString& subResource ) + const TQString& /*type*/, + const TQString& subResource ) { kdDebug(5720) << k_funcinfo << resource->resourceName() << " " << subResource << endl; - QListViewItem *i = mListView->findItem( resource->resourceName(), 0 ); + TQListViewItem *i = mListView->findItem( resource->resourceName(), 0 ); if ( !i ) // Not found return; @@ -426,8 +426,8 @@ void ResourceSelection::slotSubresourceAdded( KPIM::ResourceABC *resource, // Remove an entry void ResourceSelection::slotSubresourceRemoved( KPIM::ResourceABC* resource, - const QString& /*type*/, - const QString& subResource ) + const TQString& /*type*/, + const TQString& subResource ) { ResourceItem *item = findSubResourceItem( resource, subResource ); delete item; @@ -437,8 +437,8 @@ void ResourceSelection::slotSubresourceRemoved( KPIM::ResourceABC* resource, // change an entry void ResourceSelection::slotSubresourceChanged( KPIM::ResourceABC* resource, - const QString& type, - const QString& subResource ) + const TQString& type, + const TQString& subResource ) { kdDebug(5720) << resource->resourceName() << subResource; @@ -463,14 +463,14 @@ ResourceItem* ResourceSelection::selectedItem() const } ResourceItem* ResourceSelection::findSubResourceItem( KPIM::ResourceABC *resource, - const QString &subResource ) + const TQString &subResource ) { - QListViewItemIterator parentIt( mListView ); + TQListViewItemIterator parentIt( mListView ); for ( ; *parentIt; ++parentIt ) { if ( static_cast<ResourceItem*>(*parentIt)->resource() != resource ) continue; - QListViewItemIterator childIt( *parentIt ); + TQListViewItemIterator childIt( *parentIt ); for ( ; *childIt; ++childIt ) { ResourceItem *item = static_cast<ResourceItem*>(*childIt); if ( item->resourceIdentifier() == subResource ) @@ -483,30 +483,30 @@ ResourceItem* ResourceSelection::findSubResourceItem( KPIM::ResourceABC *resourc void ResourceSelection::initGUI() { - QBoxLayout *topLayout = new QVBoxLayout( this ); + TQBoxLayout *topLayout = new TQVBoxLayout( this ); topLayout->setSpacing( KDialog::spacingHint() ); - QBoxLayout *buttonLayout = new QHBoxLayout(); + TQBoxLayout *buttonLayout = new TQHBoxLayout(); buttonLayout->setSpacing( KDialog::spacingHint() ); topLayout->addLayout( buttonLayout ); - QLabel *abLabel = new QLabel( i18n( "Address Books" ), this ); + TQLabel *abLabel = new TQLabel( i18n( "Address Books" ), this ); buttonLayout->addWidget( abLabel ); buttonLayout->addStretch( 1 ); - mAddButton = new QPushButton( this ); + mAddButton = new TQPushButton( this ); mAddButton->setIconSet( SmallIconSet( "add" ) ); - QToolTip::add( mAddButton, i18n( "Add addressbook" ) ); + TQToolTip::add( mAddButton, i18n( "Add addressbook" ) ); buttonLayout->addWidget( mAddButton ); - mEditButton = new QPushButton( this ); + mEditButton = new TQPushButton( this ); mEditButton->setIconSet( SmallIconSet( "edit" ) ); mEditButton->setEnabled( false ); - QToolTip::add( mEditButton, i18n( "Edit addressbook settings" ) ); + TQToolTip::add( mEditButton, i18n( "Edit addressbook settings" ) ); buttonLayout->addWidget( mEditButton ); - mRemoveButton = new QPushButton( this ); + mRemoveButton = new TQPushButton( this ); mRemoveButton->setIconSet( SmallIconSet( "remove" ) ); mRemoveButton->setEnabled( false ); - QToolTip::add( mRemoveButton, i18n( "Remove addressbook" ) ); + TQToolTip::add( mRemoveButton, i18n( "Remove addressbook" ) ); buttonLayout->addWidget( mRemoveButton ); mListView = new KListView( this ); @@ -519,12 +519,12 @@ void ResourceSelection::initGUI() class ResourceSelectionFactory : public KAB::ExtensionFactory { public: - KAB::ExtensionWidget *extension( KAB::Core *core, QWidget *parent, const char *name ) + KAB::ExtensionWidget *extension( KAB::Core *core, TQWidget *parent, const char *name ) { return new ResourceSelection( core, parent, name ); } - QString identifier() const + TQString identifier() const { return "resourceselection"; } diff --git a/kaddressbook/features/resourceselection.h b/kaddressbook/features/resourceselection.h index a2eff8c13..831cc4a55 100644 --- a/kaddressbook/features/resourceselection.h +++ b/kaddressbook/features/resourceselection.h @@ -40,11 +40,11 @@ class ResourceSelection : public KAB::ExtensionWidget Q_OBJECT public: - ResourceSelection( KAB::Core*, QWidget *parent, const char *name ); + ResourceSelection( KAB::Core*, TQWidget *parent, const char *name ); virtual ~ResourceSelection(); - QString title() const; - QString identifier() const; + TQString title() const; + TQString identifier() const; void contactsSelectionChanged() {}; @@ -52,21 +52,21 @@ class ResourceSelection : public KAB::ExtensionWidget void add(); void edit(); void remove(); - void currentChanged( QListViewItem* ); + void currentChanged( TQListViewItem* ); void updateView(); void slotSubresourceAdded( KPIM::ResourceABC *resource, - const QString& /*type*/, - const QString& subResource ); + const TQString& /*type*/, + const TQString& subResource ); void slotSubresourceRemoved( KPIM::ResourceABC* /*resource*/, - const QString& /*type*/, - const QString& subResource ); + const TQString& /*type*/, + const TQString& subResource ); void slotSubresourceChanged( KPIM::ResourceABC* /*resource*/, - const QString& /*type*/, - const QString& subResource ); + const TQString& /*type*/, + const TQString& subResource ); - void contextMenuRequested ( QListViewItem *i, const QPoint &pos, int ); + void contextMenuRequested ( TQListViewItem *i, const TQPoint &pos, int ); void showInfo(); @@ -77,14 +77,14 @@ class ResourceSelection : public KAB::ExtensionWidget void initGUI(); ResourceItem* selectedItem() const; - ResourceItem* findSubResourceItem( KPIM::ResourceABC *resource, const QString &subResource ); + ResourceItem* findSubResourceItem( KPIM::ResourceABC *resource, const TQString &subResource ); KListView *mListView; - QPushButton *mAddButton; - QPushButton *mEditButton; - QPushButton *mRemoveButton; + TQPushButton *mAddButton; + TQPushButton *mEditButton; + TQPushButton *mRemoveButton; - QString mLastResource; + TQString mLastResource; KRES::Manager<KABC::Resource> *mManager; }; diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp index 40c0f077c..2b6607376 100644 --- a/kaddressbook/filtereditdialog.cpp +++ b/kaddressbook/filtereditdialog.cpp @@ -21,17 +21,17 @@ without including the source code for Qt in the source distribution. */ -#include <qbuttongroup.h> -#include <qhbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qregexp.h> -#include <qstring.h> -#include <qtoolbutton.h> -#include <qtooltip.h> -#include <qwidget.h> +#include <tqbuttongroup.h> +#include <tqhbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqregexp.h> +#include <tqstring.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> +#include <tqwidget.h> #include <kapplication.h> #include <kbuttonbox.h> @@ -45,17 +45,17 @@ #include "kabprefs.h" #include "filtereditdialog.h" -FilterEditDialog::FilterEditDialog( QWidget *parent, const char *name ) +FilterEditDialog::FilterEditDialog( TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "Edit Address Book Filter" ), Help | Ok | Cancel, Ok, parent, name, false, true ) { initGUI(); - const QStringList cats = KABPrefs::instance()->customCategories(); + const TQStringList cats = KABPrefs::instance()->customCategories(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = cats.begin(); it != cats.end(); ++it ) - mCategoriesView->insertItem( new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox ) ); + mCategoriesView->insertItem( new TQCheckListItem( mCategoriesView, *it, TQCheckListItem::CheckBox ) ); filterNameTextChanged( mNameEdit->text() ); } @@ -68,11 +68,11 @@ void FilterEditDialog::setFilter( const Filter &filter ) { mNameEdit->setText( filter.name() ); - QStringList categories = filter.categories(); - QListViewItem *item = mCategoriesView->firstChild(); + TQStringList categories = filter.categories(); + TQListViewItem *item = mCategoriesView->firstChild(); while ( item != 0 ) { if ( categories.contains( item->text( 0 ) ) ) { - QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); + TQCheckListItem *checkItem = static_cast<TQCheckListItem*>( item ); checkItem->setOn( true ); } @@ -91,10 +91,10 @@ Filter FilterEditDialog::filter() filter.setName( mNameEdit->text() ); - QStringList categories; - QListViewItem *item = mCategoriesView->firstChild(); + TQStringList categories; + TQListViewItem *item = mCategoriesView->firstChild(); while ( item != 0 ) { - QCheckListItem *checkItem = static_cast<QCheckListItem*>( item ); + TQCheckListItem *checkItem = static_cast<TQCheckListItem*>( item ); if ( checkItem->isOn() ) categories.append( item->text( 0 ) ); @@ -114,44 +114,44 @@ void FilterEditDialog::initGUI() { resize( 490, 300 ); - QWidget *page = plainPage(); - QLabel *label; + TQWidget *page = plainPage(); + TQLabel *label; - QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() ); + TQGridLayout *topLayout = new TQGridLayout( page, 3, 2, 0, spacingHint() ); - label = new QLabel( i18n( "Name:" ), page ); + label = new TQLabel( i18n( "Name:" ), page ); mNameEdit = new KLineEdit( page ); mNameEdit->setFocus(); topLayout->addWidget( label, 0, 0 ); topLayout->addWidget( mNameEdit, 0, 1 ); - connect( mNameEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( filterNameTextChanged( const QString&) ) ); + connect( mNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( filterNameTextChanged( const TQString&) ) ); mCategoriesView = new KListView( page ); mCategoriesView->addColumn( i18n( "Category" ) ); mCategoriesView->setFullWidth( true ); topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 ); - mMatchRuleGroup = new QButtonGroup( page ); + mMatchRuleGroup = new TQButtonGroup( page ); mMatchRuleGroup->setExclusive( true ); - QBoxLayout *gbLayout = new QVBoxLayout( mMatchRuleGroup ); + TQBoxLayout *gbLayout = new TQVBoxLayout( mMatchRuleGroup ); gbLayout->setSpacing( KDialog::spacingHint() ); gbLayout->setMargin( KDialog::marginHint() ); - QRadioButton *radio = new QRadioButton( i18n( "Show only contacts matching the selected categories" ), mMatchRuleGroup ); + TQRadioButton *radio = new TQRadioButton( i18n( "Show only contacts matching the selected categories" ), mMatchRuleGroup ); radio->setChecked( true ); mMatchRuleGroup->insert( radio ); gbLayout->addWidget( radio ); - radio = new QRadioButton( i18n( "Show all contacts except those matching the selected categories" ), mMatchRuleGroup ); + radio = new TQRadioButton( i18n( "Show all contacts except those matching the selected categories" ), mMatchRuleGroup ); mMatchRuleGroup->insert( radio ); gbLayout->addWidget( radio ); topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 ); } -void FilterEditDialog::filterNameTextChanged( const QString &text ) +void FilterEditDialog::filterNameTextChanged( const TQString &text ) { enableButtonOK( !text.isEmpty() ); } @@ -161,7 +161,7 @@ void FilterEditDialog::slotHelp() kapp->invokeHelp( "using-filters" ); } -FilterDialog::FilterDialog( QWidget *parent, const char *name ) +FilterDialog::FilterDialog( TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "Edit Address Book Filters" ), Ok | Cancel, Ok, parent, name, false, true ) { @@ -242,7 +242,7 @@ void FilterDialog::refresh() mFilterListBox->insertItem( (*it).name() ); } -void FilterDialog::selectionChanged( QListBoxItem *item ) +void FilterDialog::selectionChanged( TQListBoxItem *item ) { bool state = ( item != 0 ); @@ -254,22 +254,22 @@ void FilterDialog::initGUI() { resize( 330, 200 ); - QWidget *page = plainPage(); + TQWidget *page = plainPage(); - QGridLayout *topLayout = new QGridLayout( page, 1, 2, 0, spacingHint() ); + TQGridLayout *topLayout = new TQGridLayout( page, 1, 2, 0, spacingHint() ); mFilterListBox = new KListBox( page ); topLayout->addWidget( mFilterListBox, 0, 0 ); - connect( mFilterListBox, SIGNAL( selectionChanged( QListBoxItem * ) ), - SLOT( selectionChanged( QListBoxItem * ) ) ); - connect( mFilterListBox, SIGNAL( doubleClicked ( QListBoxItem * ) ), - SLOT( edit() ) ); + connect( mFilterListBox, TQT_SIGNAL( selectionChanged( TQListBoxItem * ) ), + TQT_SLOT( selectionChanged( TQListBoxItem * ) ) ); + connect( mFilterListBox, TQT_SIGNAL( doubleClicked ( TQListBoxItem * ) ), + TQT_SLOT( edit() ) ); KButtonBox *buttonBox = new KButtonBox( page, Vertical ); - buttonBox->addButton( i18n( "&Add..." ), this, SLOT( add() ) ); - mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, SLOT( edit() ) ); + buttonBox->addButton( i18n( "&Add..." ), this, TQT_SLOT( add() ) ); + mEditButton = buttonBox->addButton( i18n( "&Edit..." ), this, TQT_SLOT( edit() ) ); mEditButton->setEnabled( false ); - mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, SLOT( remove() ) ); + mRemoveButton = buttonBox->addButton( i18n( "&Remove" ), this, TQT_SLOT( remove() ) ); mRemoveButton->setEnabled( false ); buttonBox->layout(); diff --git a/kaddressbook/filtereditdialog.h b/kaddressbook/filtereditdialog.h index b61c36ca7..b52966b64 100644 --- a/kaddressbook/filtereditdialog.h +++ b/kaddressbook/filtereditdialog.h @@ -42,7 +42,7 @@ class FilterDialog : public KDialogBase Q_OBJECT public: - FilterDialog( QWidget *parent, const char *name = 0 ); + FilterDialog( TQWidget *parent, const char *name = 0 ); ~FilterDialog(); void setFilters( const Filter::List &list ); @@ -52,7 +52,7 @@ class FilterDialog : public KDialogBase void add(); void edit(); void remove(); - void selectionChanged( QListBoxItem* ); + void selectionChanged( TQListBoxItem* ); private: void initGUI(); @@ -62,23 +62,23 @@ class FilterDialog : public KDialogBase Filter::List mInternalFilterList; KListBox *mFilterListBox; - QPushButton *mAddButton; - QPushButton *mEditButton; - QPushButton *mRemoveButton; + TQPushButton *mAddButton; + TQPushButton *mEditButton; + TQPushButton *mRemoveButton; }; class FilterEditDialog : public KDialogBase { Q_OBJECT public: - FilterEditDialog( QWidget *parent, const char *name = 0 ); + FilterEditDialog( TQWidget *parent, const char *name = 0 ); ~FilterEditDialog(); void setFilter( const Filter &filter ); Filter filter(); protected slots: - void filterNameTextChanged( const QString& ); + void filterNameTextChanged( const TQString& ); void slotHelp(); private: @@ -88,9 +88,9 @@ class FilterEditDialog : public KDialogBase KLineEdit *mNameEdit; KListView *mCategoriesView; - QButtonGroup *mMatchRuleGroup; - QPushButton *mEditButton; - QPushButton *mRemoveButton; + TQButtonGroup *mMatchRuleGroup; + TQPushButton *mEditButton; + TQPushButton *mRemoveButton; }; #endif diff --git a/kaddressbook/filterselectionwidget.cpp b/kaddressbook/filterselectionwidget.cpp index ddd4fa2f2..c963024d0 100644 --- a/kaddressbook/filterselectionwidget.cpp +++ b/kaddressbook/filterselectionwidget.cpp @@ -21,7 +21,7 @@ without including the source code for Qt in the source distribution. */ -#include <qlabel.h> +#include <tqlabel.h> #include <kcombobox.h> #include <kdialog.h> @@ -29,17 +29,17 @@ #include "filterselectionwidget.h" -FilterSelectionWidget::FilterSelectionWidget( QWidget *parent, const char *name ) - : QHBox( parent, name ) +FilterSelectionWidget::FilterSelectionWidget( TQWidget *parent, const char *name ) + : TQHBox( parent, name ) { setSpacing( KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Filter:" ), this, "kde toolbar widget" ); + TQLabel *label = new TQLabel( i18n( "Filter:" ), this, "kde toolbar widget" ); mFilterCombo = new KComboBox( this ); label->setBuddy( mFilterCombo ); - connect( mFilterCombo, SIGNAL( activated( int ) ), - this, SIGNAL( filterActivated( int ) ) ); + connect( mFilterCombo, TQT_SIGNAL( activated( int ) ), + this, TQT_SIGNAL( filterActivated( int ) ) ); } FilterSelectionWidget::~FilterSelectionWidget() @@ -56,7 +56,7 @@ void FilterSelectionWidget::setCurrentItem( int index ) mFilterCombo->setCurrentItem( index ); } -void FilterSelectionWidget::setItems( const QStringList &names ) +void FilterSelectionWidget::setItems( const TQStringList &names ) { mFilterCombo->clear(); mFilterCombo->insertStringList( names ); diff --git a/kaddressbook/filterselectionwidget.h b/kaddressbook/filterselectionwidget.h index fcae42fc1..bedb27111 100644 --- a/kaddressbook/filterselectionwidget.h +++ b/kaddressbook/filterselectionwidget.h @@ -24,7 +24,7 @@ #ifndef FILTERSELECTIONWIDGET_H #define FILTERSELECTIONWIDGET_H -#include <qhbox.h> +#include <tqhbox.h> class KComboBox; @@ -38,10 +38,10 @@ class FilterSelectionWidget : public QHBox Q_OBJECT public: - FilterSelectionWidget( QWidget *parent, const char *name = 0 ); + FilterSelectionWidget( TQWidget *parent, const char *name = 0 ); ~FilterSelectionWidget(); - void setItems( const QStringList &names ); + void setItems( const TQStringList &names ); int currentItem() const; void setCurrentItem( int index ); diff --git a/kaddressbook/freebusywidget.cpp b/kaddressbook/freebusywidget.cpp index d06a0ebd9..9bda32491 100644 --- a/kaddressbook/freebusywidget.cpp +++ b/kaddressbook/freebusywidget.cpp @@ -21,8 +21,8 @@ without including the source code for Qt in the source distribution. */ -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <kdialog.h> #include <klocale.h> @@ -32,21 +32,21 @@ #include "freebusywidget.h" -FreeBusyWidget::FreeBusyWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) +FreeBusyWidget::FreeBusyWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::ContactEditorWidget( ab, parent, name ) { - QHBoxLayout *layout = new QHBoxLayout( this, KDialog::marginHint(), + TQHBoxLayout *layout = new TQHBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Location of Free/Busy information:" ), this ); + TQLabel *label = new TQLabel( i18n( "Location of Free/Busy information:" ), this ); layout->addWidget( label ); mURL = new KURLRequester( this ); label->setBuddy( mURL ); layout->addWidget( mURL ); - connect( mURL, SIGNAL( textChanged( const QString& ) ), - this, SLOT( setModified() ) ); + connect( mURL, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( setModified() ) ); } FreeBusyWidget::~FreeBusyWidget() diff --git a/kaddressbook/freebusywidget.h b/kaddressbook/freebusywidget.h index 99d32320d..a33365697 100644 --- a/kaddressbook/freebusywidget.h +++ b/kaddressbook/freebusywidget.h @@ -33,7 +33,7 @@ class FreeBusyWidget : public KAB::ContactEditorWidget Q_OBJECT public: - FreeBusyWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + FreeBusyWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); ~FreeBusyWidget(); void loadContact( KABC::Addressee *addr ); @@ -50,12 +50,12 @@ class FreeBusyWidget : public KAB::ContactEditorWidget class FreeBusyWidgetFactory : public KAB::ContactEditorWidgetFactory { public: - KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) + KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) { return new FreeBusyWidget( ab, parent, name ); } - QString pageIdentifier() const { return "misc"; } + TQString pageIdentifier() const { return "misc"; } }; #endif diff --git a/kaddressbook/geowidget.cpp b/kaddressbook/geowidget.cpp index 3563f118e..40631147b 100644 --- a/kaddressbook/geowidget.cpp +++ b/kaddressbook/geowidget.cpp @@ -30,39 +30,39 @@ #include <knuminput.h> #include <kstandarddirs.h> -#include <qcheckbox.h> -#include <qfile.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistbox.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpushbutton.h> -#include <qregexp.h> -#include <qstring.h> +#include <tqcheckbox.h> +#include <tqfile.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistbox.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpushbutton.h> +#include <tqregexp.h> +#include <tqstring.h> #include "geowidget.h" -GeoWidget::GeoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) +GeoWidget::GeoWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::ContactEditorWidget( ab, parent, name ), mReadOnly( false ) { - QLabel *label = 0; + TQLabel *label = 0; - QGridLayout *topLayout = new QGridLayout( this, 4, 3 ); + TQGridLayout *topLayout = new TQGridLayout( this, 4, 3 ); topLayout->setMargin( KDialog::marginHint() ); topLayout->setSpacing( KDialog::spacingHint() ); - label = new QLabel( this ); + label = new TQLabel( this ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "package_network", KIcon::Desktop, KIcon::SizeMedium ) ); label->setAlignment( Qt::AlignTop ); topLayout->addMultiCellWidget( label, 0, 3, 0, 0 ); - mGeoIsValid = new QCheckBox( i18n( "Use geo data" ), this ); + mGeoIsValid = new TQCheckBox( i18n( "Use geo data" ), this ); topLayout->addMultiCellWidget( mGeoIsValid, 0, 0, 1, 2 ); - label = new QLabel( i18n( "Latitude:" ), this ); + label = new TQLabel( i18n( "Latitude:" ), this ); topLayout->addWidget( label, 1, 1 ); mLatitudeBox = new KDoubleSpinBox( -90, 90, 1, 0, 6, this ); @@ -71,7 +71,7 @@ GeoWidget::GeoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) topLayout->addWidget( mLatitudeBox, 1, 2 ); label->setBuddy( mLatitudeBox ); - label = new QLabel( i18n( "Longitude:" ), this ); + label = new TQLabel( i18n( "Longitude:" ), this ); topLayout->addWidget( label, 2, 1 ); mLongitudeBox = new KDoubleSpinBox( -180, 180, 1, 0, 6, this ); @@ -80,25 +80,25 @@ GeoWidget::GeoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) topLayout->addWidget( mLongitudeBox, 2, 2 ); label->setBuddy( mLongitudeBox ); - mExtendedButton = new QPushButton( i18n( "Edit Geo Data..." ), this ); + mExtendedButton = new TQPushButton( i18n( "Edit Geo Data..." ), this ); mExtendedButton->setEnabled( false ); topLayout->addMultiCellWidget( mExtendedButton, 3, 3, 1, 2 ); - connect( mLatitudeBox, SIGNAL( valueChanged( double ) ), - SLOT( setModified() ) ); - connect( mLongitudeBox, SIGNAL( valueChanged( double ) ), - SLOT( setModified() ) ); - connect( mExtendedButton, SIGNAL( clicked() ), - SLOT( editGeoData() ) ); - - connect( mGeoIsValid, SIGNAL( toggled( bool ) ), - mLatitudeBox, SLOT( setEnabled( bool ) ) ); - connect( mGeoIsValid, SIGNAL( toggled( bool ) ), - mLongitudeBox, SLOT( setEnabled( bool ) ) ); - connect( mGeoIsValid, SIGNAL( toggled( bool ) ), - mExtendedButton, SLOT( setEnabled( bool ) ) ); - connect( mGeoIsValid, SIGNAL( toggled( bool ) ), - SLOT( setModified() ) ); + connect( mLatitudeBox, TQT_SIGNAL( valueChanged( double ) ), + TQT_SLOT( setModified() ) ); + connect( mLongitudeBox, TQT_SIGNAL( valueChanged( double ) ), + TQT_SLOT( setModified() ) ); + connect( mExtendedButton, TQT_SIGNAL( clicked() ), + TQT_SLOT( editGeoData() ) ); + + connect( mGeoIsValid, TQT_SIGNAL( toggled( bool ) ), + mLatitudeBox, TQT_SLOT( setEnabled( bool ) ) ); + connect( mGeoIsValid, TQT_SIGNAL( toggled( bool ) ), + mLongitudeBox, TQT_SLOT( setEnabled( bool ) ) ); + connect( mGeoIsValid, TQT_SIGNAL( toggled( bool ) ), + mExtendedButton, TQT_SLOT( setEnabled( bool ) ) ); + connect( mGeoIsValid, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( setModified() ) ); } GeoWidget::~GeoWidget() @@ -157,14 +157,14 @@ void GeoWidget::editGeoData() -GeoDialog::GeoDialog( QWidget *parent, const char *name ) +GeoDialog::GeoDialog( TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "Geo Data Input" ), Ok | Cancel, Ok, parent, name, true, true ), mUpdateSexagesimalInput( true ) { - QFrame *page = plainPage(); + TQFrame *page = plainPage(); - QGridLayout *topLayout = new QGridLayout( page, 2, 2, marginHint(), + TQGridLayout *topLayout = new TQGridLayout( page, 2, 2, marginHint(), spacingHint() ); topLayout->setRowStretch( 1, 1 ); @@ -174,24 +174,24 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) mCityCombo = new KComboBox( page ); topLayout->addWidget( mCityCombo, 0, 1 ); - QGroupBox *sexagesimalGroup = new QGroupBox( 0, Vertical, i18n( "Sexagesimal" ), page ); - QGridLayout *sexagesimalLayout = new QGridLayout( sexagesimalGroup->layout(), + TQGroupBox *sexagesimalGroup = new TQGroupBox( 0, Vertical, i18n( "Sexagesimal" ), page ); + TQGridLayout *sexagesimalLayout = new TQGridLayout( sexagesimalGroup->layout(), 2, 5, spacingHint() ); - QLabel *label = new QLabel( i18n( "Latitude:" ), sexagesimalGroup ); + TQLabel *label = new TQLabel( i18n( "Latitude:" ), sexagesimalGroup ); sexagesimalLayout->addWidget( label, 0, 0 ); - mLatDegrees = new QSpinBox( 0, 90, 1, sexagesimalGroup ); + mLatDegrees = new TQSpinBox( 0, 90, 1, sexagesimalGroup ); mLatDegrees->setSuffix( "°" ); mLatDegrees->setWrapping( false ); label->setBuddy( mLatDegrees ); sexagesimalLayout->addWidget( mLatDegrees, 0, 1 ); - mLatMinutes = new QSpinBox( 0, 59, 1, sexagesimalGroup ); + mLatMinutes = new TQSpinBox( 0, 59, 1, sexagesimalGroup ); mLatMinutes->setSuffix( "'" ); sexagesimalLayout->addWidget( mLatMinutes, 0, 2 ); - mLatSeconds = new QSpinBox( 0, 59, 1, sexagesimalGroup ); + mLatSeconds = new TQSpinBox( 0, 59, 1, sexagesimalGroup ); mLatSeconds->setSuffix( "\"" ); sexagesimalLayout->addWidget( mLatSeconds, 0, 3 ); @@ -200,19 +200,19 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) mLatDirection->insertItem( i18n( "South" ) ); sexagesimalLayout->addWidget( mLatDirection, 0, 4 ); - label = new QLabel( i18n( "Longitude:" ), sexagesimalGroup ); + label = new TQLabel( i18n( "Longitude:" ), sexagesimalGroup ); sexagesimalLayout->addWidget( label, 1, 0 ); - mLongDegrees = new QSpinBox( 0, 180, 1, sexagesimalGroup ); + mLongDegrees = new TQSpinBox( 0, 180, 1, sexagesimalGroup ); mLongDegrees->setSuffix( "°" ); label->setBuddy( mLongDegrees ); sexagesimalLayout->addWidget( mLongDegrees, 1, 1 ); - mLongMinutes = new QSpinBox( 0, 59, 1, sexagesimalGroup ); + mLongMinutes = new TQSpinBox( 0, 59, 1, sexagesimalGroup ); mLongMinutes->setSuffix( "'" ); sexagesimalLayout->addWidget( mLongMinutes, 1, 2 ); - mLongSeconds = new QSpinBox( 0, 59, 1, sexagesimalGroup ); + mLongSeconds = new TQSpinBox( 0, 59, 1, sexagesimalGroup ); mLongSeconds->setSuffix( "\"" ); sexagesimalLayout->addWidget( mLongSeconds, 1, 3 ); @@ -225,26 +225,26 @@ GeoDialog::GeoDialog( QWidget *parent, const char *name ) loadCityList(); - connect( mMapWidget, SIGNAL( changed() ), - SLOT( geoMapChanged() ) ); - connect( mCityCombo, SIGNAL( activated( int ) ), - SLOT( cityInputChanged() ) ); - connect( mLatDegrees, SIGNAL( valueChanged( int ) ), - SLOT( sexagesimalInputChanged() ) ); - connect( mLatMinutes, SIGNAL( valueChanged( int ) ), - SLOT( sexagesimalInputChanged() ) ); - connect( mLatSeconds, SIGNAL( valueChanged( int ) ), - SLOT( sexagesimalInputChanged() ) ); - connect( mLatDirection, SIGNAL( activated( int ) ), - SLOT( sexagesimalInputChanged() ) ); - connect( mLongDegrees, SIGNAL( valueChanged( int ) ), - SLOT( sexagesimalInputChanged() ) ); - connect( mLongMinutes, SIGNAL( valueChanged( int ) ), - SLOT( sexagesimalInputChanged() ) ); - connect( mLongSeconds, SIGNAL( valueChanged( int ) ), - SLOT( sexagesimalInputChanged() ) ); - connect( mLongDirection, SIGNAL( activated( int ) ), - SLOT( sexagesimalInputChanged() ) ); + connect( mMapWidget, TQT_SIGNAL( changed() ), + TQT_SLOT( geoMapChanged() ) ); + connect( mCityCombo, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( cityInputChanged() ) ); + connect( mLatDegrees, TQT_SIGNAL( valueChanged( int ) ), + TQT_SLOT( sexagesimalInputChanged() ) ); + connect( mLatMinutes, TQT_SIGNAL( valueChanged( int ) ), + TQT_SLOT( sexagesimalInputChanged() ) ); + connect( mLatSeconds, TQT_SIGNAL( valueChanged( int ) ), + TQT_SLOT( sexagesimalInputChanged() ) ); + connect( mLatDirection, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( sexagesimalInputChanged() ) ); + connect( mLongDegrees, TQT_SIGNAL( valueChanged( int ) ), + TQT_SLOT( sexagesimalInputChanged() ) ); + connect( mLongMinutes, TQT_SIGNAL( valueChanged( int ) ), + TQT_SLOT( sexagesimalInputChanged() ) ); + connect( mLongSeconds, TQT_SIGNAL( valueChanged( int ) ), + TQT_SLOT( sexagesimalInputChanged() ) ); + connect( mLongDirection, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( sexagesimalInputChanged() ) ); KAcceleratorManager::manage( this ); } @@ -380,14 +380,14 @@ void GeoDialog::loadCityList() mCityCombo->clear(); mGeoDataMap.clear(); - QFile file( locate( "data", "kaddressbook/zone.tab" ) ); + TQFile file( locate( "data", "kaddressbook/zone.tab" ) ); if ( file.open( IO_ReadOnly ) ) { - QTextStream s( &file ); + TQTextStream s( &file ); - QString line, country; - QRegExp coord( "[+-]\\d+[+-]\\d+" ); - QRegExp name( "[^\\s]+/[^\\s]+" ); + TQString line, country; + TQRegExp coord( "[+-]\\d+[+-]\\d+" ); + TQRegExp name( "[^\\s]+/[^\\s]+" ); int pos; while ( !s.eof() ) { @@ -396,7 +396,7 @@ void GeoDialog::loadCityList() continue; country = line.left( 2 ); - QString c, n; + TQString c, n; pos = coord.search( line, 0 ); if ( pos >= 0 ) c = line.mid( pos, coord.matchedLength() ); @@ -421,7 +421,7 @@ void GeoDialog::loadCityList() } } } - QStringList items( mGeoDataMap.keys() ); + TQStringList items( mGeoDataMap.keys() ); items.prepend( i18n( "Undefined" ) ); mCityCombo->insertStringList( items ); @@ -429,11 +429,11 @@ void GeoDialog::loadCityList() } } -double GeoDialog::calculateCoordinate( const QString &coordinate ) const +double GeoDialog::calculateCoordinate( const TQString &coordinate ) const { int neg; int d = 0, m = 0, s = 0; - QString str = coordinate; + TQString str = coordinate; neg = str.left( 1 ) == "-"; str.remove( 0, 1 ); @@ -469,7 +469,7 @@ double GeoDialog::calculateCoordinate( const QString &coordinate ) const int GeoDialog::nearestCity( double x, double y ) const { - QMap<QString, GeoData>::ConstIterator it; + TQMap<TQString, GeoData>::ConstIterator it; int pos = 0; for ( it = mGeoDataMap.begin(); it != mGeoDataMap.end(); ++it, ++pos ) { double dist = ( (*it).longitude - x ) * ( (*it).longitude - x ) + @@ -482,8 +482,8 @@ int GeoDialog::nearestCity( double x, double y ) const } -GeoMapWidget::GeoMapWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 ) +GeoMapWidget::GeoMapWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), mLatitude( 0 ), mLongitude( 0 ) { setBackgroundMode( NoBackground ); @@ -516,7 +516,7 @@ double GeoMapWidget::longitude()const return mLongitude; } -void GeoMapWidget::mousePressEvent( QMouseEvent *event ) +void GeoMapWidget::mousePressEvent( TQMouseEvent *event ) { double latMid = height() / 2; double longMid = width() / 2; @@ -530,19 +530,19 @@ void GeoMapWidget::mousePressEvent( QMouseEvent *event ) emit changed(); } -void GeoMapWidget::paintEvent( QPaintEvent* ) +void GeoMapWidget::paintEvent( TQPaintEvent* ) { uint w = width(); uint h = height(); - QPixmap pm( w, h ); - QPainter p; + TQPixmap pm( w, h ); + TQPainter p; p.begin( &pm, this ); - p.setPen( QColor( 255, 0, 0 ) ); - p.setBrush( QColor( 255, 0, 0 ) ); + p.setPen( TQColor( 255, 0, 0 ) ); + p.setBrush( TQColor( 255, 0, 0 ) ); - QPixmap world( locate( "data", "kaddressbook/pics/world.jpg" ) ); + TQPixmap world( locate( "data", "kaddressbook/pics/world.jpg" ) ); p.drawPixmap( 0, 0, world ); double latMid = h / 2; diff --git a/kaddressbook/geowidget.h b/kaddressbook/geowidget.h index 85140849e..70b677232 100644 --- a/kaddressbook/geowidget.h +++ b/kaddressbook/geowidget.h @@ -45,7 +45,7 @@ class QPushButton; typedef struct { double latitude; double longitude; - QString country; + TQString country; } GeoData; class GeoWidget : public KAB::ContactEditorWidget @@ -53,7 +53,7 @@ class GeoWidget : public KAB::ContactEditorWidget Q_OBJECT public: - GeoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + GeoWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); ~GeoWidget(); void loadContact( KABC::Addressee *addr ); @@ -68,8 +68,8 @@ class GeoWidget : public KAB::ContactEditorWidget KDoubleSpinBox *mLatitudeBox; KDoubleSpinBox *mLongitudeBox; - QCheckBox *mGeoIsValid; - QPushButton *mExtendedButton; + TQCheckBox *mGeoIsValid; + TQPushButton *mExtendedButton; bool mReadOnly; }; @@ -79,7 +79,7 @@ class GeoDialog : public KDialogBase Q_OBJECT public: - GeoDialog( QWidget *parent, const char *name = 0 ); + GeoDialog( TQWidget *parent, const char *name = 0 ); ~GeoDialog(); void setLatitude( double latitude ); @@ -97,25 +97,25 @@ class GeoDialog : public KDialogBase private: void loadCityList(); - double calculateCoordinate( const QString& ) const; + double calculateCoordinate( const TQString& ) const; int nearestCity( double, double ) const; GeoMapWidget *mMapWidget; KComboBox *mCityCombo; - QSpinBox *mLatDegrees; - QSpinBox *mLatMinutes; - QSpinBox *mLatSeconds; + TQSpinBox *mLatDegrees; + TQSpinBox *mLatMinutes; + TQSpinBox *mLatSeconds; KComboBox *mLatDirection; - QSpinBox *mLongDegrees; - QSpinBox *mLongMinutes; - QSpinBox *mLongSeconds; + TQSpinBox *mLongDegrees; + TQSpinBox *mLongMinutes; + TQSpinBox *mLongSeconds; KComboBox *mLongDirection; double mLatitude; double mLongitude; - QMap<QString, GeoData> mGeoDataMap; + TQMap<TQString, GeoData> mGeoDataMap; bool mUpdateSexagesimalInput; }; @@ -124,7 +124,7 @@ class GeoMapWidget : public QWidget Q_OBJECT public: - GeoMapWidget( QWidget *parent, const char *name = 0 ); + GeoMapWidget( TQWidget *parent, const char *name = 0 ); ~GeoMapWidget(); void setLatitude( double latitude ); @@ -137,8 +137,8 @@ class GeoMapWidget : public QWidget void changed(); protected: - virtual void mousePressEvent( QMouseEvent* ); - virtual void paintEvent( QPaintEvent* ); + virtual void mousePressEvent( TQMouseEvent* ); + virtual void paintEvent( TQPaintEvent* ); private: double mLatitude; @@ -148,12 +148,12 @@ class GeoMapWidget : public QWidget class GeoWidgetFactory : public KAB::ContactEditorWidgetFactory { public: - KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) + KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) { return new GeoWidget( ab, parent, name ); } - QString pageIdentifier() const { return "misc"; } + TQString pageIdentifier() const { return "misc"; } }; #endif diff --git a/kaddressbook/imagewidget.cpp b/kaddressbook/imagewidget.cpp index ad0fad55e..ddacc2cd1 100644 --- a/kaddressbook/imagewidget.cpp +++ b/kaddressbook/imagewidget.cpp @@ -34,35 +34,35 @@ #include <kurldrag.h> #include <libkdepim/kpixmapregionselectordialog.h> -#include <qapplication.h> -#include <qdragobject.h> -#include <qeventloop.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpixmap.h> -#include <qpopupmenu.h> +#include <tqapplication.h> +#include <tqdragobject.h> +#include <tqeventloop.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpixmap.h> +#include <tqpopupmenu.h> #include <unistd.h> #include "imagewidget.h" -ImageLoader::ImageLoader( QWidget *parent ) - : QObject( 0, "ImageLoader" ), mParent( parent ) +ImageLoader::ImageLoader( TQWidget *parent ) + : TQObject( 0, "ImageLoader" ), mParent( parent ) { } KABC::Picture ImageLoader::loadPicture( const KURL &url, bool *ok ) { KABC::Picture picture; - QString tempFile; + TQString tempFile; if ( url.isEmpty() ) return picture; (*ok) = false; - QImage image; + TQImage image; if ( url.isLocalFile() ) { image.load( url.path() ); picture.setData( image ); @@ -80,9 +80,9 @@ KABC::Picture ImageLoader::loadPicture( const KURL &url, bool *ok ) return picture; } - QPixmap pixmap = picture.data(); + TQPixmap pixmap = picture.data(); - QPixmap selectedPixmap = KPIM::KPixmapRegionSelectorDialog::getSelectedImage( pixmap, 100, 140, mParent ); + TQPixmap selectedPixmap = KPIM::KPixmapRegionSelectorDialog::getSelectedImage( pixmap, 100, 140, mParent ); if ( selectedPixmap.isNull() ) { (*ok) = false; return picture; @@ -103,13 +103,13 @@ KABC::Picture ImageLoader::loadPicture( const KURL &url, bool *ok ) } -ImageButton::ImageButton( const QString &title, QWidget *parent ) - : QPushButton( title, parent ), +ImageButton::ImageButton( const TQString &title, TQWidget *parent ) + : TQPushButton( title, parent ), mReadOnly( false ), mImageLoader( 0 ) { setAcceptDrops( true ); - connect( this, SIGNAL( clicked() ), SLOT( load() ) ); + connect( this, TQT_SIGNAL( clicked() ), TQT_SLOT( load() ) ); } void ImageButton::setReadOnly( bool readOnly ) @@ -136,7 +136,7 @@ void ImageButton::setImageLoader( ImageLoader *loader ) void ImageButton::startDrag() { if ( !mPicture.data().isNull() ) { - QImageDrag *drag = new QImageDrag( mPicture.data(), this ); + TQImageDrag *drag = new TQImageDrag( mPicture.data(), this ); drag->dragCopy(); } } @@ -149,35 +149,35 @@ void ImageButton::updateGUI() setPixmap( mPicture.data() ); } -void ImageButton::dragEnterEvent( QDragEnterEvent *event ) +void ImageButton::dragEnterEvent( TQDragEnterEvent *event ) { bool accepted = false; - if ( QImageDrag::canDecode( event ) ) + if ( TQImageDrag::canDecode( event ) ) accepted = true; - if ( QUriDrag::canDecode( event ) ) + if ( TQUriDrag::canDecode( event ) ) accepted = true; event->accept( accepted ); } -void ImageButton::dropEvent( QDropEvent *event ) +void ImageButton::dropEvent( TQDropEvent *event ) { if ( mReadOnly ) return; - if ( QImageDrag::canDecode( event ) ) { - QPixmap pm; + if ( TQImageDrag::canDecode( event ) ) { + TQPixmap pm; - if ( QImageDrag::decode( event, pm ) ) { + if ( TQImageDrag::decode( event, pm ) ) { mPicture.setData( pm.convertToImage() ); updateGUI(); emit changed(); } } - if ( QUriDrag::canDecode( event ) ) { + if ( TQUriDrag::canDecode( event ) ) { KURL::List urls; if ( KURLDrag::decode( event, urls ) ) { if ( urls.isEmpty() ) { // oops, no data @@ -198,13 +198,13 @@ void ImageButton::dropEvent( QDropEvent *event ) } } -void ImageButton::mousePressEvent( QMouseEvent *event ) +void ImageButton::mousePressEvent( TQMouseEvent *event ) { mDragStartPos = event->pos(); - QPushButton::mousePressEvent( event ); + TQPushButton::mousePressEvent( event ); } -void ImageButton::mouseMoveEvent( QMouseEvent *event ) +void ImageButton::mouseMoveEvent( TQMouseEvent *event ) { if ( (event->state() & LeftButton) && (event->pos() - mDragStartPos).manhattanLength() > @@ -213,16 +213,16 @@ void ImageButton::mouseMoveEvent( QMouseEvent *event ) } } -void ImageButton::contextMenuEvent( QContextMenuEvent *event ) +void ImageButton::contextMenuEvent( TQContextMenuEvent *event ) { - QPopupMenu menu( this ); - menu.insertItem( i18n( "Reset" ), this, SLOT( clear() ) ); + TQPopupMenu menu( this ); + menu.insertItem( i18n( "Reset" ), this, TQT_SLOT( clear() ) ); menu.exec( event->globalPos() ); } void ImageButton::load() { - KURL url = KFileDialog::getOpenURL( QString(), KImageIO::pattern(), this ); + KURL url = KFileDialog::getOpenURL( TQString(), KImageIO::pattern(), this ); if ( url.isValid() ) { if ( mImageLoader ) { bool ok = false; @@ -244,16 +244,16 @@ void ImageButton::clear() emit changed(); } -ImageBaseWidget::ImageBaseWidget( const QString &title, - QWidget *parent, const char *name ) - : QWidget( parent, name ), mReadOnly( false ) +ImageBaseWidget::ImageBaseWidget( const TQString &title, + TQWidget *parent, const char *name ) + : TQWidget( parent, name ), mReadOnly( false ) { mImageLoader = new ImageLoader( this ); - QVBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(), + TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - QGroupBox *box = new QGroupBox( 0, Qt::Vertical, title, this ); - QVBoxLayout *layout = new QVBoxLayout( box->layout(), KDialog::spacingHint() ); + TQGroupBox *box = new TQGroupBox( 0, Qt::Vertical, title, this ); + TQVBoxLayout *layout = new TQVBoxLayout( box->layout(), KDialog::spacingHint() ); mImageButton = new ImageButton( i18n( "Picture" ), box ); mImageButton->setFixedSize( 100, 140 ); @@ -262,7 +262,7 @@ ImageBaseWidget::ImageBaseWidget( const QString &title, topLayout->addWidget( box ); - connect( mImageButton, SIGNAL( changed() ), SIGNAL( changed() ) ); + connect( mImageButton, TQT_SIGNAL( changed() ), TQT_SIGNAL( changed() ) ); } ImageBaseWidget::~ImageBaseWidget() @@ -288,10 +288,10 @@ KABC::Picture ImageBaseWidget::image() const } -ImageWidget::ImageWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) +ImageWidget::ImageWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::ContactEditorWidget( ab, parent, name ) { - QHBoxLayout *layout = new QHBoxLayout( this, KDialog::marginHint(), + TQHBoxLayout *layout = new TQHBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); mPhotoWidget = new ImageBaseWidget( KABC::Addressee::photoLabel(), this ); @@ -300,8 +300,8 @@ ImageWidget::ImageWidget( KABC::AddressBook *ab, QWidget *parent, const char *na mLogoWidget = new ImageBaseWidget( KABC::Addressee::logoLabel(), this ); layout->addWidget( mLogoWidget ); - connect( mPhotoWidget, SIGNAL( changed() ), SLOT( setModified() ) ); - connect( mLogoWidget, SIGNAL( changed() ), SLOT( setModified() ) ); + connect( mPhotoWidget, TQT_SIGNAL( changed() ), TQT_SLOT( setModified() ) ); + connect( mLogoWidget, TQT_SIGNAL( changed() ), TQT_SLOT( setModified() ) ); } void ImageWidget::loadContact( KABC::Addressee *addr ) diff --git a/kaddressbook/imagewidget.h b/kaddressbook/imagewidget.h index 02a3577c1..82c8426f3 100644 --- a/kaddressbook/imagewidget.h +++ b/kaddressbook/imagewidget.h @@ -24,8 +24,8 @@ #ifndef IMAGEWIDGET_H #define IMAGEWIDGET_H -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <kabc/picture.h> #include <kdialogbase.h> @@ -40,13 +40,13 @@ class ImageLoader : public QObject Q_OBJECT public: - ImageLoader( QWidget *parent ); + ImageLoader( TQWidget *parent ); KABC::Picture loadPicture( const KURL &url, bool *ok ); private: KABC::Picture mPicture; - QWidget *mParent; + TQWidget *mParent; }; /** @@ -57,7 +57,7 @@ class ImageButton : public QPushButton Q_OBJECT public: - ImageButton( const QString &title, QWidget *parent ); + ImageButton( const TQString &title, TQWidget *parent ); void setReadOnly( bool readOnly ); @@ -71,11 +71,11 @@ class ImageButton : public QPushButton void urlDropped( const KURL& ); protected: - virtual void dragEnterEvent( QDragEnterEvent *event ); - virtual void dropEvent( QDropEvent *event ); - virtual void mouseMoveEvent( QMouseEvent *event ); - virtual void mousePressEvent( QMouseEvent *event ); - virtual void contextMenuEvent( QContextMenuEvent *event ); + virtual void dragEnterEvent( TQDragEnterEvent *event ); + virtual void dropEvent( TQDropEvent *event ); + virtual void mouseMoveEvent( TQMouseEvent *event ); + virtual void mousePressEvent( TQMouseEvent *event ); + virtual void contextMenuEvent( TQContextMenuEvent *event ); private slots: void load(); @@ -86,7 +86,7 @@ class ImageButton : public QPushButton void updateGUI(); bool mReadOnly; - QPoint mDragStartPos; + TQPoint mDragStartPos; KABC::Picture mPicture; ImageLoader *mImageLoader; @@ -98,7 +98,7 @@ class ImageBaseWidget : public QWidget Q_OBJECT public: - ImageBaseWidget( const QString &title, QWidget *parent, const char *name = 0 ); + ImageBaseWidget( const TQString &title, TQWidget *parent, const char *name = 0 ); ~ImageBaseWidget(); /** @@ -126,7 +126,7 @@ class ImageBaseWidget : public QWidget class ImageWidget : public KAB::ContactEditorWidget { public: - ImageWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + ImageWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); void loadContact( KABC::Addressee *addr ); void storeContact( KABC::Addressee *addr ); @@ -142,12 +142,12 @@ class ImageWidget : public KAB::ContactEditorWidget class ImageWidgetFactory : public KAB::ContactEditorWidgetFactory { public: - KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) + KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) { return new ImageWidget( ab, parent, name ); } - QString pageIdentifier() const { return "misc"; } + TQString pageIdentifier() const { return "misc"; } }; #endif diff --git a/kaddressbook/imeditwidget.cpp b/kaddressbook/imeditwidget.cpp index 7e663d25f..11827f89a 100644 --- a/kaddressbook/imeditwidget.cpp +++ b/kaddressbook/imeditwidget.cpp @@ -21,14 +21,14 @@ without including the source code for Qt in the source distribution. */ -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qtoolbutton.h> -#include <qtooltip.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> #include <kaccelmanager.h> #include <kconfig.h> @@ -43,25 +43,25 @@ #include "imeditwidget.h" #include "imeditorwidget.h" -IMEditWidget::IMEditWidget( QWidget *parent, KABC::Addressee &addr, const char *name ) - : QWidget( parent, name ), mAddressee(addr) +IMEditWidget::IMEditWidget( TQWidget *parent, KABC::Addressee &addr, const char *name ) + : TQWidget( parent, name ), mAddressee(addr) { - 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( "IM address:" ), this ); + TQLabel *label = new TQLabel( i18n( "IM address:" ), this ); topLayout->addWidget( label, 0, 0 ); mIMEdit = new KLineEdit( this ); - connect( mIMEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); - connect( mIMEdit, SIGNAL( textChanged( const QString& ) ), - SIGNAL( modified() ) ); + connect( mIMEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); + connect( mIMEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SIGNAL( modified() ) ); label->setBuddy( mIMEdit ); topLayout->addWidget( mIMEdit, 0, 1 ); - mEditButton = new QPushButton( i18n( "Edit IM Addresses..." ), this); - connect( mEditButton, SIGNAL( clicked() ), SLOT( edit() ) ); + mEditButton = new TQPushButton( i18n( "Edit IM Addresses..." ), this); + connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( edit() ) ); topLayout->addMultiCellWidget( mEditButton, 1, 1, 0, 1 ); topLayout->activate(); @@ -77,14 +77,14 @@ void IMEditWidget::setReadOnly( bool readOnly ) mReadOnly = readOnly; // mEditButton->setEnabled( !readOnly ); } -void IMEditWidget::setPreferredIM( const QString &addr ) +void IMEditWidget::setPreferredIM( const TQString &addr ) { bool blocked = mIMEdit->signalsBlocked(); mIMEdit->blockSignals( true ); mIMEdit->setText( addr ); mIMEdit->blockSignals( blocked ); } -void IMEditWidget::setIMs( const QStringList &list ) +void IMEditWidget::setIMs( const TQStringList &list ) { mIMList = list; @@ -97,7 +97,7 @@ void IMEditWidget::setIMs( const QStringList &list ) mIMEdit->blockSignals( blocked ); } -QStringList IMEditWidget::ims() +TQStringList IMEditWidget::ims() { if ( mIMEdit->text().isEmpty() ) { if ( mIMList.count() > 0 ) @@ -111,7 +111,7 @@ QStringList IMEditWidget::ims() return mIMList; } -QString IMEditWidget::preferredIM() +TQString IMEditWidget::preferredIM() { return mIMEdit->text(); } @@ -132,7 +132,7 @@ void IMEditWidget::edit() } } -void IMEditWidget::textChanged( const QString &text ) +void IMEditWidget::textChanged( const TQString &text ) { if ( mIMList.count() > 0 ) mIMList.remove( mIMList.begin() ); diff --git a/kaddressbook/imeditwidget.h b/kaddressbook/imeditwidget.h index 8a20b9b2d..2252981ca 100644 --- a/kaddressbook/imeditwidget.h +++ b/kaddressbook/imeditwidget.h @@ -46,14 +46,14 @@ class IMEditWidget : public QWidget Q_OBJECT public: - IMEditWidget(QWidget *parent, KABC::Addressee &addr, const char *name = 0 ); + IMEditWidget(TQWidget *parent, KABC::Addressee &addr, const char *name = 0 ); ~IMEditWidget(); - void setIMs( const QStringList &list ); - QStringList ims(); + void setIMs( const TQStringList &list ); + TQStringList ims(); - void setPreferredIM( const QString &addr ); - QString preferredIM(); + void setPreferredIM( const TQString &addr ); + TQString preferredIM(); void setReadOnly( bool readOnly ); signals: @@ -61,12 +61,12 @@ class IMEditWidget : public QWidget private slots: void edit(); - void textChanged( const QString& ); + void textChanged( const TQString& ); private: KLineEdit *mIMEdit; - QPushButton *mEditButton; - QStringList mIMList; + TQPushButton *mEditButton; + TQStringList mIMList; bool mReadOnly; KABC::Addressee &mAddressee; }; diff --git a/kaddressbook/incsearchwidget.cpp b/kaddressbook/incsearchwidget.cpp index e435d100f..479f79c73 100644 --- a/kaddressbook/incsearchwidget.cpp +++ b/kaddressbook/incsearchwidget.cpp @@ -21,14 +21,14 @@ without including the source code for Qt in the source distribution. */ -#include <qapplication.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtimer.h> -#include <qtoolbutton.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqapplication.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtimer.h> +#include <tqtoolbutton.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> #include <kdialog.h> #include <kiconloader.h> @@ -37,54 +37,54 @@ #include "incsearchwidget.h" -IncSearchWidget::IncSearchWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +IncSearchWidget::IncSearchWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - QHBoxLayout *layout = new QHBoxLayout( this, 2, KDialog::spacingHint() ); + TQHBoxLayout *layout = new TQHBoxLayout( this, 2, KDialog::spacingHint() ); - QToolButton *button = new QToolButton( this ); - button->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ); - button->setPixmap( SmallIcon( QApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) ); - button->setAccel( QKeySequence( CTRL+ALT+Key_S ) ); + TQToolButton *button = new TQToolButton( this ); + button->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ); + button->setPixmap( SmallIcon( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase" ) ); + button->setAccel( TQKeySequence( CTRL+ALT+Key_S ) ); button->setAutoRaise( true ); - QToolTip::add( button, i18n( "Reset" ) ); + TQToolTip::add( button, i18n( "Reset" ) ); layout->addWidget( button ); - QLabel *label = new QLabel( i18n( "Search:" ), this, "kde toolbar widget" ); - label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight ); + TQLabel *label = new TQLabel( i18n( "Search:" ), this, "kde toolbar widget" ); + label->setAlignment( TQLabel::AlignVCenter | TQLabel::AlignRight ); layout->addWidget( label ); mSearchText = new KLineEdit( this ); - mSearchText->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Preferred ); - QWhatsThis::add( mSearchText, i18n( "The incremental search<p>Enter some text here will start the search for the contact, which matches the search pattern best. The part of the contact, which will be used for matching, depends on the field selection." ) ); + mSearchText->setSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred ); + TQWhatsThis::add( mSearchText, i18n( "The incremental search<p>Enter some text here will start the search for the contact, which matches the search pattern best. The part of the contact, which will be used for matching, depends on the field selection." ) ); label->setBuddy( mSearchText ); layout->addWidget( mSearchText ); - label = new QLabel( i18n( "as in 'Search in:'", "&in:" ), this, "kde toolbar widget" ); - label->setAlignment( QLabel::AlignVCenter | QLabel::AlignRight ); + label = new TQLabel( i18n( "as in 'Search in:'", "&in:" ), this, "kde toolbar widget" ); + label->setAlignment( TQLabel::AlignVCenter | TQLabel::AlignRight ); layout->addWidget( label ); - mFieldCombo = new QComboBox( false, this ); + mFieldCombo = new TQComboBox( false, this ); layout->addWidget( mFieldCombo ); label->setBuddy(mFieldCombo); - QToolTip::add( mFieldCombo, i18n( "Select incremental search field" ) ); - QWhatsThis::add( mFieldCombo, i18n( "Here you can choose the field, which shall be used for incremental search." ) ); + TQToolTip::add( mFieldCombo, i18n( "Select incremental search field" ) ); + TQWhatsThis::add( mFieldCombo, i18n( "Here you can choose the field, which shall be used for incremental search." ) ); - mInputTimer = new QTimer( this ); + mInputTimer = new TQTimer( this ); - connect( mInputTimer, SIGNAL( timeout() ), - SLOT( timeout() ) ); - connect( mSearchText, SIGNAL( textChanged( const QString& ) ), - SLOT( announceDoSearch() ) ); - connect( mSearchText, SIGNAL( returnPressed() ), - SLOT( announceDoSearch() ) ); - connect( mFieldCombo, SIGNAL( activated( const QString& ) ), - SLOT( announceDoSearch() ) ); - connect( button, SIGNAL( clicked() ), - mSearchText, SLOT( clear() ) ); - connect( button, SIGNAL( clicked() ), - SLOT( announceDoSearch() ) ); + connect( mInputTimer, TQT_SIGNAL( timeout() ), + TQT_SLOT( timeout() ) ); + connect( mSearchText, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( announceDoSearch() ) ); + connect( mSearchText, TQT_SIGNAL( returnPressed() ), + TQT_SLOT( announceDoSearch() ) ); + connect( mFieldCombo, TQT_SIGNAL( activated( const TQString& ) ), + TQT_SLOT( announceDoSearch() ) ); + connect( button, TQT_SIGNAL( clicked() ), + mSearchText, TQT_SLOT( clear() ) ); + connect( button, TQT_SIGNAL( clicked() ), + TQT_SLOT( announceDoSearch() ) ); initFields(); @@ -157,7 +157,7 @@ void IncSearchWidget::clear() mSearchText->clear(); } -void IncSearchWidget::keyPressEvent( QKeyEvent *event ) +void IncSearchWidget::keyPressEvent( TQKeyEvent *event ) { if ( event->key() == Qt::Key_Up ) { event->accept(); diff --git a/kaddressbook/incsearchwidget.h b/kaddressbook/incsearchwidget.h index c4eb1936f..f1ef00f45 100644 --- a/kaddressbook/incsearchwidget.h +++ b/kaddressbook/incsearchwidget.h @@ -24,7 +24,7 @@ #ifndef INCSEARCHWIDGET_H #define INCSEARCHWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include <kabc/field.h> @@ -37,7 +37,7 @@ class IncSearchWidget : public QWidget Q_OBJECT public: - IncSearchWidget( QWidget *parent, const char *name = 0 ); + IncSearchWidget( TQWidget *parent, const char *name = 0 ); ~IncSearchWidget(); KABC::Field::List currentFields() const; @@ -53,7 +53,7 @@ class IncSearchWidget : public QWidget widget is changed. You can get the sorting field by @ref currentField. */ - void doSearch( const QString& text ); + void doSearch( const TQString& text ); /** Emitted when the up key is pressed. @@ -73,16 +73,16 @@ class IncSearchWidget : public QWidget void timeout(); protected: - virtual void keyPressEvent( QKeyEvent* ); + virtual void keyPressEvent( TQKeyEvent* ); private: void initFields(); - QComboBox* mFieldCombo; + TQComboBox* mFieldCombo; KLineEdit* mSearchText; KABC::Field::List mFieldList; KABC::Field::List mViewFields; - QTimer* mInputTimer; + TQTimer* mInputTimer; }; #endif diff --git a/kaddressbook/interfaces/configurewidget.cpp b/kaddressbook/interfaces/configurewidget.cpp index 518a29538..f82b757fd 100644 --- a/kaddressbook/interfaces/configurewidget.cpp +++ b/kaddressbook/interfaces/configurewidget.cpp @@ -27,9 +27,9 @@ using namespace KAB; -ConfigureWidget::ConfigureWidget( KABC::AddressBook *ab, QWidget *parent, +ConfigureWidget::ConfigureWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) - : QWidget( parent, name ), mAddressBook( ab ) + : TQWidget( parent, name ), mAddressBook( ab ) { } diff --git a/kaddressbook/interfaces/configurewidget.h b/kaddressbook/interfaces/configurewidget.h index 601adce97..0ce35e5c7 100644 --- a/kaddressbook/interfaces/configurewidget.h +++ b/kaddressbook/interfaces/configurewidget.h @@ -24,7 +24,7 @@ #ifndef KAB_CONFIGUREWIDGET_H #define KAB_CONFIGUREWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include <kconfig.h> #include <kdepimmacros.h> @@ -38,7 +38,7 @@ namespace KAB { class KDE_EXPORT ConfigureWidget : public QWidget { public: - ConfigureWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + ConfigureWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); ~ConfigureWidget(); /** diff --git a/kaddressbook/interfaces/contacteditorwidget.cpp b/kaddressbook/interfaces/contacteditorwidget.cpp index 366087c62..45b38ef3e 100644 --- a/kaddressbook/interfaces/contacteditorwidget.cpp +++ b/kaddressbook/interfaces/contacteditorwidget.cpp @@ -26,8 +26,8 @@ using namespace KAB; ContactEditorWidget::ContactEditorWidget( KABC::AddressBook *ab, - QWidget *parent, const char *name ) - : QWidget( parent, name ), mAddressBook( ab ), mModified( false ) + TQWidget *parent, const char *name ) + : TQWidget( parent, name ), mAddressBook( ab ), mModified( false ) { } diff --git a/kaddressbook/interfaces/contacteditorwidget.h b/kaddressbook/interfaces/contacteditorwidget.h index 4b80b44f4..28a376e77 100644 --- a/kaddressbook/interfaces/contacteditorwidget.h +++ b/kaddressbook/interfaces/contacteditorwidget.h @@ -24,7 +24,7 @@ #ifndef KAB_CONTACTEDITORWIDGET_H #define KAB_CONTACTEDITORWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include <kabc/addressbook.h> #include <klibloader.h> @@ -39,9 +39,9 @@ class KDE_EXPORT ContactEditorWidget : public QWidget Q_OBJECT public: - typedef QValueList<ContactEditorWidget*> List; + typedef TQValueList<ContactEditorWidget*> List; - ContactEditorWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + ContactEditorWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); ~ContactEditorWidget(); /** @@ -116,23 +116,23 @@ class KDE_EXPORT ContactEditorWidget : public QWidget class ContactEditorWidgetFactory : public KLibFactory { public: - virtual ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, + virtual ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ) = 0; /** Returns the i18ned title of this tab page. */ - virtual QString pageTitle() const { return ""; } + virtual TQString pageTitle() const { return ""; } /** Returns the identifier of the tab page where the widget shall belong to. */ - virtual QString pageIdentifier() const = 0; + virtual TQString pageIdentifier() const = 0; protected: - virtual QObject* createObject( QObject*, const char*, const char*, - const QStringList & ) + virtual TQObject* createObject( TQObject*, const char*, const char*, + const TQStringList & ) { return 0; } diff --git a/kaddressbook/interfaces/core.cpp b/kaddressbook/interfaces/core.cpp index 6c8e10910..7f7d10481 100644 --- a/kaddressbook/interfaces/core.cpp +++ b/kaddressbook/interfaces/core.cpp @@ -25,8 +25,8 @@ using namespace KAB; -Core::Core( KXMLGUIClient *client, QObject *parent, const char *name ) - : QObject( parent, name ), mGUIClient( client ) +Core::Core( KXMLGUIClient *client, TQObject *parent, const char *name ) + : TQObject( parent, name ), mGUIClient( client ) { } diff --git a/kaddressbook/interfaces/core.h b/kaddressbook/interfaces/core.h index 276b20d61..1897a0bd1 100644 --- a/kaddressbook/interfaces/core.h +++ b/kaddressbook/interfaces/core.h @@ -30,7 +30,7 @@ #include <libkdepim/distributionlist.h> #endif -#include <qobject.h> +#include <tqobject.h> #include <kabc/field.h> #include <kcommand.h> @@ -57,7 +57,7 @@ class KDE_EXPORT Core : public QObject Q_OBJECT public: - Core( KXMLGUIClient *client, QObject *parent, const char *name = 0 ); + Core( KXMLGUIClient *client, TQObject *parent, const char *name = 0 ); /** Returns a pointer to the StdAddressBook of the application. @@ -88,33 +88,33 @@ class KDE_EXPORT Core : public QObject /** Returns the uid list of the currently selected contacts. */ - virtual QStringList selectedUIDs() const = 0; + virtual TQStringList selectedUIDs() const = 0; /** Displays a ResourceSelectDialog and returns the selected resource or a null pointer if no resource was selected by the user. */ - virtual KABC::Resource *requestResource( QWidget *parent ) = 0; + virtual KABC::Resource *requestResource( TQWidget *parent ) = 0; /** Returns the parent widget. */ - virtual QWidget *widget() const = 0; + virtual TQWidget *widget() const = 0; /** Deletes given contacts from the address book. @param uids The uids of the contacts, which shall be deleted. */ - virtual void deleteContacts( const QStringList &uids ) = 0; + virtual void deleteContacts( const TQStringList &uids ) = 0; /** Deletes given contacts from the address book. @param uids The uids of the contacts, which shall be deleted. */ - virtual void deleteDistributionLists( const QStringList &uids ) = 0; + virtual void deleteDistributionLists( const TQStringList &uids ) = 0; #ifdef KDEPIM_NEW_DISTRLISTS /** @@ -126,13 +126,13 @@ class KDE_EXPORT Core : public QObject /** Returns the name of all the distribution lists. */ - virtual QStringList distributionListNames() const = 0; + virtual TQStringList distributionListNames() const = 0; /** sets the distribution list to display. If null, the regular address book is to be displayed. */ - virtual void setSelectedDistributionList( const QString &name ) = 0; + virtual void setSelectedDistributionList( const TQString &name ) = 0; #endif //// This class isn't part of interfaces/, so this method here isn't really useful @@ -151,12 +151,12 @@ class KDE_EXPORT Core : public QObject /** Is called whenever a contact is selected in the view. */ - virtual void setContactSelected( const QString &uid ) = 0; + virtual void setContactSelected( const TQString &uid ) = 0; /** DCOP METHOD: Adds the given email address to address book. */ - virtual void addEmail( const QString& addr ) = 0; + virtual void addEmail( const TQString& addr ) = 0; /** DCOP METHOD: Imports the vCard, located at the given url. @@ -166,7 +166,7 @@ class KDE_EXPORT Core : public QObject /** DCOP METHOD: Imports the given vCard. */ - virtual void importVCardFromData( const QString& vCard ) = 0; + virtual void importVCardFromData( const TQString& vCard ) = 0; /** DCOP METHOD: Opens contact editor to input a new contact. @@ -182,17 +182,17 @@ class KDE_EXPORT Core : public QObject DCOP METHOD: Returns the name of the contact, that matches the given phone number. */ - virtual QString getNameByPhone( const QString& phone ) = 0; + virtual TQString getNameByPhone( const TQString& phone ) = 0; /** Shows an edit dialog for the given uid. */ - virtual void editContact( const QString &uid = QString::null ) = 0; + virtual void editContact( const TQString &uid = TQString::null ) = 0; /** Shows an edit dialog for the given distribution list */ - virtual void editDistributionList( const QString &name ) = 0; + virtual void editDistributionList( const TQString &name ) = 0; private: KXMLGUIClient *mGUIClient; diff --git a/kaddressbook/interfaces/extensionwidget.cpp b/kaddressbook/interfaces/extensionwidget.cpp index b70291583..8c98e5e0f 100644 --- a/kaddressbook/interfaces/extensionwidget.cpp +++ b/kaddressbook/interfaces/extensionwidget.cpp @@ -27,9 +27,9 @@ using namespace KAB; -ExtensionWidget::ExtensionWidget( Core *core, QWidget *parent, +ExtensionWidget::ExtensionWidget( Core *core, TQWidget *parent, const char *name ) - : QWidget( parent, name ), mCore( core ) + : TQWidget( parent, name ), mCore( core ) { } @@ -51,9 +51,9 @@ KABC::Addressee::List ExtensionWidget::selectedContacts() { KABC::Addressee::List list; - const QStringList uids = mCore->selectedUIDs(); - QStringList::ConstIterator it; - const QStringList::ConstIterator endIt = uids.end(); + const TQStringList uids = mCore->selectedUIDs(); + TQStringList::ConstIterator it; + const TQStringList::ConstIterator endIt = uids.end(); for ( it = uids.begin(); it != endIt; ++it ) list.append( mCore->addressBook()->findByUid( *it ) ); diff --git a/kaddressbook/interfaces/extensionwidget.h b/kaddressbook/interfaces/extensionwidget.h index 076defad2..52ee946ca 100644 --- a/kaddressbook/interfaces/extensionwidget.h +++ b/kaddressbook/interfaces/extensionwidget.h @@ -24,7 +24,7 @@ #ifndef KAB_EXTENSIONWIDGET_H #define KAB_EXTENSIONWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include <kabc/addressbook.h> #include <klibloader.h> @@ -41,7 +41,7 @@ class KDE_EXPORT ExtensionWidget : public QWidget Q_OBJECT public: - ExtensionWidget( Core *core, QWidget *parent, const char *name = 0 ); + ExtensionWidget( Core *core, TQWidget *parent, const char *name = 0 ); ~ExtensionWidget(); /** @@ -70,16 +70,16 @@ class KDE_EXPORT ExtensionWidget : public QWidget This method should be reimplemented and return the i18ned title of this widget. */ - virtual QString title() const = 0; + virtual TQString title() const = 0; /** This method should be reimplemented and return a unique identifier. */ - virtual QString identifier() const = 0; + virtual TQString identifier() const = 0; signals: void modified( const KABC::Addressee::List &list ); - void deleted( const QStringList& uidList ); + void deleted( const TQStringList& uidList ); private: KAB::Core *mCore; @@ -91,10 +91,10 @@ class KDE_EXPORT ExtensionWidget : public QWidget class ExtensionFactory : public KLibFactory { public: - virtual ExtensionWidget *extension( KAB::Core *core, QWidget *parent, + virtual ExtensionWidget *extension( KAB::Core *core, TQWidget *parent, const char *name = 0 ) = 0; - virtual ConfigureWidget *configureWidget( QWidget*, const char* = 0 ) + virtual ConfigureWidget *configureWidget( TQWidget*, const char* = 0 ) { return 0; } @@ -105,11 +105,11 @@ class ExtensionFactory : public KLibFactory This method should return the same identifier like the config widget. */ - virtual QString identifier() const = 0; + virtual TQString identifier() const = 0; protected: - virtual QObject* createObject( QObject*, const char*, const char*, - const QStringList & ) + virtual TQObject* createObject( TQObject*, const char*, const char*, + const TQStringList & ) { return 0; } diff --git a/kaddressbook/interfaces/xxport.cpp b/kaddressbook/interfaces/xxport.cpp index 0e9e515c2..53be55197 100644 --- a/kaddressbook/interfaces/xxport.cpp +++ b/kaddressbook/interfaces/xxport.cpp @@ -21,8 +21,8 @@ without including the source code for Qt in the source distribution. */ -#include <qmap.h> -#include <qsignalmapper.h> +#include <tqmap.h> +#include <tqsignalmapper.h> #include <kaction.h> #include <kinstance.h> @@ -35,25 +35,25 @@ using namespace KAB; class XXPort::XXPortPrivate { public: - QSignalMapper *mExportMapper; - QSignalMapper *mImportMapper; + TQSignalMapper *mExportMapper; + TQSignalMapper *mImportMapper; KApplication *mKApp; }; -XXPort::XXPort( KABC::AddressBook *ab, QWidget *parent, +XXPort::XXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) - : QObject( parent, name ), mAddressBook( ab ), mParentWidget( parent ), + : TQObject( parent, name ), mAddressBook( ab ), mParentWidget( parent ), d( new XXPortPrivate ) { setInstance( new KInstance( "kaddressbook" ) ); - d->mExportMapper = new QSignalMapper( this ); - d->mImportMapper = new QSignalMapper( this ); + d->mExportMapper = new TQSignalMapper( this ); + d->mImportMapper = new TQSignalMapper( this ); - connect( d->mExportMapper, SIGNAL( mapped( const QString& ) ), - SLOT( slotExportActivated( const QString& ) ) ); - connect( d->mImportMapper, SIGNAL( mapped( const QString& ) ), - SLOT( slotImportActivated( const QString& ) ) ); + connect( d->mExportMapper, TQT_SIGNAL( mapped( const TQString& ) ), + TQT_SLOT( slotExportActivated( const TQString& ) ) ); + connect( d->mImportMapper, TQT_SIGNAL( mapped( const TQString& ) ), + TQT_SLOT( slotImportActivated( const TQString& ) ) ); } XXPort::~XXPort() @@ -62,34 +62,34 @@ XXPort::~XXPort() d = 0; } -bool XXPort::exportContacts( const KABC::AddresseeList&, const QString& ) +bool XXPort::exportContacts( const KABC::AddresseeList&, const TQString& ) { // do nothing return false; } -KABC::AddresseeList XXPort::importContacts( const QString& ) const +KABC::AddresseeList XXPort::importContacts( const TQString& ) const { // do nothing return KABC::AddresseeList(); } -void XXPort::createImportAction( const QString &label, const QString &data ) +void XXPort::createImportAction( const TQString &label, const TQString &data ) { - QString id = "file_import_" + identifier() + ( data.isEmpty() ? QString( "" ) : "_" + data ); - KAction *action = new KAction( label, 0, d->mImportMapper, SLOT( map() ), actionCollection(), id.latin1() ); + TQString id = "file_import_" + identifier() + ( data.isEmpty() ? TQString( "" ) : "_" + data ); + KAction *action = new KAction( label, 0, d->mImportMapper, TQT_SLOT( map() ), actionCollection(), id.latin1() ); - d->mImportMapper->setMapping( action, ( data.isEmpty() ? QString( "<empty>" ) : data ) ); + d->mImportMapper->setMapping( action, ( data.isEmpty() ? TQString( "<empty>" ) : data ) ); setXMLFile( identifier() + "_xxportui.rc" ); } -void XXPort::createExportAction( const QString &label, const QString &data ) +void XXPort::createExportAction( const TQString &label, const TQString &data ) { - QString id = "file_export_" + identifier() + ( data.isEmpty() ? QString( "" ) : "_" + data ); - KAction *action = new KAction( label, 0, d->mExportMapper, SLOT( map() ), actionCollection(), id.latin1() ); + TQString id = "file_export_" + identifier() + ( data.isEmpty() ? TQString( "" ) : "_" + data ); + KAction *action = new KAction( label, 0, d->mExportMapper, TQT_SLOT( map() ), actionCollection(), id.latin1() ); - d->mExportMapper->setMapping( action, ( data.isEmpty() ? QString( "<empty>" ) : data ) ); + d->mExportMapper->setMapping( action, ( data.isEmpty() ? TQString( "<empty>" ) : data ) ); setXMLFile( identifier() + "_xxportui.rc" ); } @@ -99,7 +99,7 @@ KABC::AddressBook *XXPort::addressBook() const return mAddressBook; } -QWidget *XXPort::parentWidget() const +TQWidget *XXPort::parentWidget() const { return mParentWidget; } @@ -115,14 +115,14 @@ void XXPort::processEvents() const d->mKApp->processEvents(); } -void XXPort::slotExportActivated( const QString &data ) +void XXPort::slotExportActivated( const TQString &data ) { - emit exportActivated( identifier(), ( data == "<empty>" ? QString::null : data ) ); + emit exportActivated( identifier(), ( data == "<empty>" ? TQString::null : data ) ); } -void XXPort::slotImportActivated( const QString &data ) +void XXPort::slotImportActivated( const TQString &data ) { - emit importActivated( identifier(), ( data == "<empty>" ? QString::null : data ) ); + emit importActivated( identifier(), ( data == "<empty>" ? TQString::null : data ) ); } #include "xxport.moc" diff --git a/kaddressbook/interfaces/xxport.h b/kaddressbook/interfaces/xxport.h index 098688b94..29b54acc1 100644 --- a/kaddressbook/interfaces/xxport.h +++ b/kaddressbook/interfaces/xxport.h @@ -24,7 +24,7 @@ #ifndef KAB_XXPORT_H #define KAB_XXPORT_H -#include <qobject.h> +#include <tqobject.h> #include <kabc/addressbook.h> #include <kabc/addresseelist.h> @@ -45,7 +45,7 @@ class KApplication; */ #define K_EXPORT_KADDRESSBOOK_XXFILTER_CATALOG( libname, XXPortClass, catalog ) \ class KDE_NO_EXPORT localXXPortFactory : public KAB::XXPortFactory { \ - KAB::XXPort *xxportObject( KABC::AddressBook *ab, QWidget *parent, const char *name ) \ + KAB::XXPort *xxportObject( KABC::AddressBook *ab, TQWidget *parent, const char *name ) \ { const char *cat = catalog; \ if (cat) KGlobal::locale()->insertCatalogue(cat); \ return new XXPortClass( ab, parent, name ); \ @@ -65,19 +65,19 @@ class KApplication; namespace KAB { -class KDE_EXPORT XXPort : public QObject, virtual public KXMLGUIClient +class KDE_EXPORT XXPort : public TQObject, virtual public KXMLGUIClient { Q_OBJECT public: - XXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + XXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); ~XXPort(); /** Returns the unique identifier of this xxport modul, it should be the lowercase name of the import/export format e.g. 'vcard' */ - virtual QString identifier() const = 0; + virtual TQString identifier() const = 0; /** Reimplement this method if the XXPortManager shall @@ -95,7 +95,7 @@ class KDE_EXPORT XXPort : public QObject, virtual public KXMLGUIClient Processes outstanding KApplication events. It should be called occasionally when the import/export filter is busy performing a long operation (e.g. reading from slow external devices). - @see: QApplication::processEvents() + @see: TQApplication::processEvents() */ void processEvents() const; @@ -103,12 +103,12 @@ class KDE_EXPORT XXPort : public QObject, virtual public KXMLGUIClient /** Reimplement this method for exporting the contacts. */ - virtual bool exportContacts( const KABC::AddresseeList &list, const QString& identifier ); + virtual bool exportContacts( const KABC::AddresseeList &list, const TQString& identifier ); /** Reimplement this method for importing the contacts. */ - virtual KABC::AddresseeList importContacts( const QString& identifier ) const; + virtual KABC::AddresseeList importContacts( const TQString& identifier ) const; signals: /** @@ -116,25 +116,25 @@ class KDE_EXPORT XXPort : public QObject, virtual public KXMLGUIClient The parameter contains the @ref identifier() for unique identification. */ - void exportActivated( const QString&, const QString& ); + void exportActivated( const TQString&, const TQString& ); /** Emitted whenever the import action is activated. The parameter contains the @ref identifier() for unique identification. */ - void importActivated( const QString&, const QString& ); + void importActivated( const TQString&, const TQString& ); protected: /** Create the import action. The identifier is passed in the import slot. */ - void createImportAction( const QString &label, const QString &identifier = QString::null ); + void createImportAction( const TQString &label, const TQString &identifier = TQString::null ); /** Create the export action. The identifier is passed in the export slot. */ - void createExportAction( const QString &label, const QString &identifier = QString::null ); + void createExportAction( const TQString &label, const TQString &identifier = TQString::null ); /** Returns a pointer to the address book object. @@ -145,15 +145,15 @@ class KDE_EXPORT XXPort : public QObject, virtual public KXMLGUIClient Returns a pointer to the parent widget. It can be used as parent for message boxes. */ - QWidget *parentWidget() const; + TQWidget *parentWidget() const; private slots: - void slotImportActivated( const QString& ); - void slotExportActivated( const QString& ); + void slotImportActivated( const TQString& ); + void slotExportActivated( const TQString& ); private: KABC::AddressBook *mAddressBook; - QWidget *mParentWidget; + TQWidget *mParentWidget; class XXPortPrivate; XXPortPrivate *d; @@ -162,12 +162,12 @@ class KDE_EXPORT XXPort : public QObject, virtual public KXMLGUIClient class XXPortFactory : public KLibFactory { public: - virtual XXPort *xxportObject( KABC::AddressBook *ab, QWidget *parent, + virtual XXPort *xxportObject( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ) = 0; protected: - virtual QObject* createObject( QObject*, const char*, const char*, - const QStringList & ) + virtual TQObject* createObject( TQObject*, const char*, const char*, + const TQStringList & ) { return 0; } diff --git a/kaddressbook/jumpbuttonbar.cpp b/kaddressbook/jumpbuttonbar.cpp index 1c8eddbad..baa84ce23 100644 --- a/kaddressbook/jumpbuttonbar.cpp +++ b/kaddressbook/jumpbuttonbar.cpp @@ -21,13 +21,13 @@ without including the source code for Qt in the source distribution. */ -#include <qapplication.h> -#include <qbuttongroup.h> -#include <qevent.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qstring.h> -#include <qstyle.h> +#include <tqapplication.h> +#include <tqbuttongroup.h> +#include <tqevent.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqstring.h> +#include <tqstyle.h> #include <kabc/addressbook.h> #include <kabc/field.h> @@ -42,41 +42,41 @@ class JumpButton : public QPushButton { public: - JumpButton( const QString &firstChar, const QString &lastChar, - QWidget *parent ); + JumpButton( const TQString &firstChar, const TQString &lastChar, + TQWidget *parent ); - QString firstChar() const { return mChar; } + TQString firstChar() const { return mChar; } private: - QString mChar; + TQString mChar; }; -JumpButton::JumpButton( const QString &firstChar, const QString &lastChar, - QWidget *parent ) - : QPushButton( "", parent ), mChar( firstChar ) +JumpButton::JumpButton( const TQString &firstChar, const TQString &lastChar, + TQWidget *parent ) + : TQPushButton( "", parent ), mChar( firstChar ) { setToggleButton( true ); if ( !lastChar.isEmpty() ) - setText( QString( "%1 - %2" ).arg( firstChar.upper() ).arg( lastChar.upper() ) ); + setText( TQString( "%1 - %2" ).arg( firstChar.upper() ).arg( lastChar.upper() ) ); else setText( firstChar.upper() ); } -JumpButtonBar::JumpButtonBar( KAB::Core *core, QWidget *parent, const char *name ) - : QWidget( parent, name ), mCore( core ) +JumpButtonBar::JumpButtonBar( KAB::Core *core, TQWidget *parent, const char *name ) + : TQWidget( parent, name ), mCore( core ) { setMinimumSize( 1, 1 ); - QVBoxLayout *layout = new QVBoxLayout( this, 0, 0 ); + TQVBoxLayout *layout = new TQVBoxLayout( this, 0, 0 ); layout->setAlignment( Qt::AlignTop ); layout->setAutoAdd( true ); - layout->setResizeMode( QLayout::FreeResize ); + layout->setResizeMode( TQLayout::FreeResize ); - mGroupBox = new QButtonGroup( 1, Qt::Horizontal, this ); + mGroupBox = new TQButtonGroup( 1, Qt::Horizontal, this ); mGroupBox->setExclusive( true ); mGroupBox->layout()->setSpacing( 0 ); mGroupBox->layout()->setMargin( 0 ); - mGroupBox->setFrameStyle( QFrame::NoFrame ); + mGroupBox->setFrameStyle( TQFrame::NoFrame ); } JumpButtonBar::~JumpButtonBar() @@ -92,21 +92,21 @@ void JumpButtonBar::updateButtons() mButtons.clear(); mButtons.setAutoDelete( false ); - QStringList characters; + TQStringList characters; // calculate how many buttons are possible - QFontMetrics fm = fontMetrics(); - QPushButton *btn = new QPushButton( "", this ); + TQFontMetrics fm = fontMetrics(); + TQPushButton *btn = new TQPushButton( "", this ); btn->hide(); - QSize buttonSize = style().sizeFromContents( QStyle::CT_PushButton, btn, + TQSize buttonSize = style().sizeFromContents( TQStyle::CT_PushButton, btn, fm.size( ShowPrefix, "X - X") ). - expandedTo( QApplication::globalStrut() ); + expandedTo( TQApplication::globalStrut() ); delete btn; int buttonHeight = buttonSize.height() + 8; uint possibleButtons = (height() / buttonHeight) - 1; - QString character; + TQString character; KABC::AddressBook *ab = mCore->addressBook(); KABC::AddressBook::Iterator it; for ( it = ab->begin(); it != ab->end(); ++it ) { @@ -130,9 +130,9 @@ void JumpButtonBar::updateButtons() if ( characters.count() <= possibleButtons ) { // at first the easy case: all buttons fits in window for ( uint i = 0; i < characters.count(); ++i ) { - JumpButton *button = new JumpButton( characters[ i ], QString::null, + JumpButton *button = new JumpButton( characters[ i ], TQString::null, mGroupBox ); - connect( button, SIGNAL( clicked() ), this, SLOT( letterClicked() ) ); + connect( button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( letterClicked() ) ); mButtons.append( button ); button->show(); } @@ -150,20 +150,20 @@ void JumpButtonBar::updateButtons() continue; if ( characters.count() - current <= possibleButtons - i ) { JumpButton *button = new JumpButton( characters[ current ], - QString::null, mGroupBox ); - connect( button, SIGNAL( clicked() ), this, SLOT( letterClicked() ) ); + TQString::null, mGroupBox ); + connect( button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( letterClicked() ) ); mButtons.append( button ); button->show(); current++; } else { int pos = ( current + offset >= (int)characters.count() ? characters.count() - 1 : current + offset - 1 ); - QString range; + TQString range; for ( int j = current; j < pos + 1; ++j ) range.append( characters[ j ] ); JumpButton *button = new JumpButton( characters[ current ], characters[ pos ], mGroupBox ); - connect( button, SIGNAL( clicked() ), this, SLOT( letterClicked() ) ); + connect( button, TQT_SIGNAL( clicked() ), this, TQT_SLOT( letterClicked() ) ); mButtons.append( button ); button->show(); current = ( i + 1 ) * offset; @@ -177,7 +177,7 @@ void JumpButtonBar::updateButtons() mGroupBox->setButton( 0 ); int maxWidth = 0; - QPushButton *button; + TQPushButton *button; for ( button = mButtons.first(); button; button = mButtons.next() ) maxWidth = QMAX( maxWidth, button->sizeHint().width() ); @@ -187,12 +187,12 @@ void JumpButtonBar::updateButtons() void JumpButtonBar::letterClicked() { JumpButton *button = (JumpButton*)sender(); - QString character = button->firstChar(); + TQString character = button->firstChar(); emit jumpToLetter( character ); } -void JumpButtonBar::resizeEvent( QResizeEvent* ) +void JumpButtonBar::resizeEvent( TQResizeEvent* ) { updateButtons(); } @@ -201,37 +201,37 @@ class SortContainer { public: SortContainer() {} - SortContainer( const QString &string ) + SortContainer( const TQString &string ) : mString( string ) { } bool operator< ( const SortContainer &cnt ) { - return ( QString::localeAwareCompare( mString, cnt.mString ) < 0 ); + return ( TQString::localeAwareCompare( mString, cnt.mString ) < 0 ); } - QString data() const + TQString data() const { return mString; } private: - QString mString; + TQString mString; }; -void JumpButtonBar::sortListLocaleAware( QStringList &list ) +void JumpButtonBar::sortListLocaleAware( TQStringList &list ) { - QValueList<SortContainer> sortList; + TQValueList<SortContainer> sortList; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = list.begin(); it != list.end(); ++it ) sortList.append( SortContainer( *it ) ); qHeapSort( sortList ); list.clear(); - QValueList<SortContainer>::ConstIterator sortIt; + TQValueList<SortContainer>::ConstIterator sortIt; for ( sortIt = sortList.begin(); sortIt != sortList.end(); ++sortIt ) list.append( (*sortIt).data() ); } diff --git a/kaddressbook/jumpbuttonbar.h b/kaddressbook/jumpbuttonbar.h index 850b51b48..b092a7587 100644 --- a/kaddressbook/jumpbuttonbar.h +++ b/kaddressbook/jumpbuttonbar.h @@ -24,10 +24,10 @@ #ifndef JUMPBUTTONBAR_H #define JUMPBUTTONBAR_H -#include <qsizepolicy.h> -#include <qwidget.h> -#include <qptrlist.h> -#include <qstringlist.h> +#include <tqsizepolicy.h> +#include <tqwidget.h> +#include <tqptrlist.h> +#include <tqstringlist.h> class QButtonGroup; class QResizeEvent; @@ -49,7 +49,7 @@ class JumpButtonBar : public QWidget Q_OBJECT public: - JumpButtonBar( KAB::Core *core, QWidget *parent, const char *name = 0 ); + JumpButtonBar( KAB::Core *core, TQWidget *parent, const char *name = 0 ); ~JumpButtonBar(); public slots: @@ -59,21 +59,21 @@ class JumpButtonBar : public QWidget /** Emitted whenever a letter is selected by the user. */ - void jumpToLetter( const QString &character ); + void jumpToLetter( const TQString &character ); protected slots: void letterClicked(); protected: - virtual void resizeEvent( QResizeEvent* ); + virtual void resizeEvent( TQResizeEvent* ); private: - void sortListLocaleAware( QStringList &list ); + void sortListLocaleAware( TQStringList &list ); KAB::Core *mCore; - QButtonGroup *mGroupBox; - QPtrList<QPushButton> mButtons; + TQButtonGroup *mGroupBox; + TQPtrList<TQPushButton> mButtons; }; #endif diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 449357d16..e15854768 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -23,17 +23,17 @@ // Needed for ugly hack, to be removed in 4.0 #include <unistd.h> // for usleep -#include <qeventloop.h> - -#include <qclipboard.h> -#include <qdir.h> -#include <qfile.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qptrlist.h> -#include <qwidgetstack.h> -#include <qregexp.h> -#include <qvbox.h> +#include <tqeventloop.h> + +#include <tqclipboard.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqptrlist.h> +#include <tqwidgetstack.h> +#include <tqregexp.h> +#include <tqvbox.h> #include <kabc/addresseelist.h> #include <kabc/errorhandler.h> @@ -90,20 +90,20 @@ #include "kabcore.h" -KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, - const QString &file, const char *name ) +KABCore::KABCore( KXMLGUIClient *client, bool readWrite, TQWidget *parent, + const TQString &file, const char *name ) : KAB::Core( client, parent, name ), mStatusBar( 0 ), mViewManager( 0 ), mExtensionManager( 0 ), mJumpButtonBar( 0 ), mCategorySelectDialog( 0 ), mCategoryEditDialog( 0 ), mLdapSearchDialog( 0 ), mReadWrite( readWrite ), mModified( false ) { - mWidget = new QWidget( parent, name ); + mWidget = new TQWidget( parent, name ); mIsPart = !parent->isA( "KAddressBookMain" ); - mAddressBookChangedTimer = new QTimer( this ); - connect( mAddressBookChangedTimer, SIGNAL( timeout() ), - this, SLOT( addressBookChanged() ) ); + mAddressBookChangedTimer = new TQTimer( this ); + connect( mAddressBookChangedTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( addressBookChanged() ) ); if ( file.isEmpty() ) { mAddressBook = KABC::StdAddressBook::self( true ); @@ -140,49 +140,49 @@ KABCore::KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, mSearchManager = new KAB::SearchManager( mAddressBook, parent ); - connect( mSearchManager, SIGNAL( contactsUpdated() ), - this, SLOT( slotContactsUpdated() ) ); + connect( mSearchManager, TQT_SIGNAL( contactsUpdated() ), + this, TQT_SLOT( slotContactsUpdated() ) ); initGUI(); - connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ), - SLOT( delayedAddressBookChanged() ) ); - connect( mAddressBook, SIGNAL( loadingFinished( Resource* ) ), - SLOT( delayedAddressBookChanged() ) ); + connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook* ) ), + TQT_SLOT( delayedAddressBookChanged() ) ); + connect( mAddressBook, TQT_SIGNAL( loadingFinished( Resource* ) ), + TQT_SLOT( delayedAddressBookChanged() ) ); mIncSearchWidget->setFocus(); - connect( mViewManager, SIGNAL( selected( const QString& ) ), - SLOT( setContactSelected( const QString& ) ) ); - connect( mViewManager, SIGNAL( executed( const QString& ) ), - SLOT( editContact( const QString& ) ) ); - connect( mViewManager, SIGNAL( modified() ), - SLOT( setModified() ) ); - connect( mViewManager, SIGNAL( urlDropped( const KURL& ) ), - mXXPortManager, SLOT( importVCard( const KURL& ) ) ); - connect( mViewManager, SIGNAL( viewFieldsChanged() ), - SLOT( updateIncSearchWidget() ) ); - connect( mExtensionManager, SIGNAL( modified( const KABC::Addressee::List& ) ), - this, SLOT( extensionModified( const KABC::Addressee::List& ) ) ); - connect( mExtensionManager, SIGNAL( deleted( const QStringList& ) ), - this, SLOT( extensionDeleted( const QStringList& ) ) ); - - connect( mXXPortManager, SIGNAL( modified() ), - SLOT( setModified() ) ); - - connect( mDetailsViewer, SIGNAL( highlightedMessage( const QString& ) ), - SLOT( detailsHighlighted( const QString& ) ) ); - - connect( mIncSearchWidget, SIGNAL( scrollUp() ), - mViewManager, SLOT( scrollUp() ) ); - connect( mIncSearchWidget, SIGNAL( scrollDown() ), - mViewManager, SLOT( scrollDown() ) ); + connect( mViewManager, TQT_SIGNAL( selected( const TQString& ) ), + TQT_SLOT( setContactSelected( const TQString& ) ) ); + connect( mViewManager, TQT_SIGNAL( executed( const TQString& ) ), + TQT_SLOT( editContact( const TQString& ) ) ); + connect( mViewManager, TQT_SIGNAL( modified() ), + TQT_SLOT( setModified() ) ); + connect( mViewManager, TQT_SIGNAL( urlDropped( const KURL& ) ), + mXXPortManager, TQT_SLOT( importVCard( const KURL& ) ) ); + connect( mViewManager, TQT_SIGNAL( viewFieldsChanged() ), + TQT_SLOT( updateIncSearchWidget() ) ); + connect( mExtensionManager, TQT_SIGNAL( modified( const KABC::Addressee::List& ) ), + this, TQT_SLOT( extensionModified( const KABC::Addressee::List& ) ) ); + connect( mExtensionManager, TQT_SIGNAL( deleted( const TQStringList& ) ), + this, TQT_SLOT( extensionDeleted( const TQStringList& ) ) ); + + connect( mXXPortManager, TQT_SIGNAL( modified() ), + TQT_SLOT( setModified() ) ); + + connect( mDetailsViewer, TQT_SIGNAL( highlightedMessage( const TQString& ) ), + TQT_SLOT( detailsHighlighted( const TQString& ) ) ); + + connect( mIncSearchWidget, TQT_SIGNAL( scrollUp() ), + mViewManager, TQT_SLOT( scrollUp() ) ); + connect( mIncSearchWidget, TQT_SIGNAL( scrollDown() ), + mViewManager, TQT_SLOT( scrollDown() ) ); mAddressBookService = new KAddressBookService( this ); mCommandHistory = new KCommandHistory( actionCollection(), true ); - connect( mCommandHistory, SIGNAL( commandExecuted() ), - mSearchManager, SLOT( reload() ) ); + connect( mCommandHistory, TQT_SIGNAL( commandExecuted() ), + mSearchManager, TQT_SLOT( reload() ) ); mSearchManager->reload(); @@ -218,14 +218,14 @@ void KABCore::restoreSettings() updateIncSearchWidget(); mIncSearchWidget->setCurrentItem( KABPrefs::instance()->currentIncSearchField() ); - QValueList<int> splitterSize = KABPrefs::instance()->detailsSplitter(); + TQValueList<int> splitterSize = KABPrefs::instance()->detailsSplitter(); if ( splitterSize.count() == 0 ) { splitterSize.append( 360 ); splitterSize.append( 260 ); } mDetailsSplitter->setSizes( splitterSize ); - const QValueList<int> leftSplitterSizes = KABPrefs::instance()->leftSplitter(); + const TQValueList<int> leftSplitterSizes = KABPrefs::instance()->leftSplitter(); if ( !leftSplitterSizes.isEmpty() ) mLeftSplitter->setSizes( leftSplitterSizes ); } @@ -263,17 +263,17 @@ KABC::Field *KABCore::currentSortField() const return mViewManager->currentSortField(); } -QStringList KABCore::selectedUIDs() const +TQStringList KABCore::selectedUIDs() const { return mViewManager->selectedUids(); } -KABC::Resource *KABCore::requestResource( QWidget *parent ) +KABC::Resource *KABCore::requestResource( TQWidget *parent ) { - QPtrList<KABC::Resource> kabcResources = addressBook()->resources(); + TQPtrList<KABC::Resource> kabcResources = addressBook()->resources(); - QPtrList<KRES::Resource> kresResources; - QPtrListIterator<KABC::Resource> resIt( kabcResources ); + TQPtrList<KRES::Resource> kresResources; + TQPtrListIterator<KABC::Resource> resIt( kabcResources ); KABC::Resource *resource; while ( ( resource = resIt.current() ) != 0 ) { ++resIt; @@ -287,7 +287,7 @@ KABC::Resource *KABCore::requestResource( QWidget *parent ) return static_cast<KABC::Resource*>( res ); // upcast } -QWidget *KABCore::widget() const +TQWidget *KABCore::widget() const { return mWidget; } @@ -326,7 +326,7 @@ KStatusBar *KABCore::statusBar() const return mStatusBar; } -void KABCore::setContactSelected( const QString &uid ) +void KABCore::setContactSelected( const TQString &uid ) { // Avoid crash on exit if ( !mAddressBook ) { @@ -369,7 +369,7 @@ void KABCore::setContactSelected( const QString &uid ) if ( res->inherits( "KPIM::ResourceABC" ) ) { KPIM::ResourceABC *resAbc = static_cast<KPIM::ResourceABC *>( res ); - QString subresource = resAbc->uidToResourceMap()[ ( *addrIt ).uid() ]; + TQString subresource = resAbc->uidToResourceMap()[ ( *addrIt ).uid() ]; if ( !subresource.isEmpty() && !resAbc->subresourceWritable( subresource ) ) { writable = false; break; @@ -383,9 +383,9 @@ void KABCore::setContactSelected( const QString &uid ) KABC::Resource *res = mAddressBook->resources().first(); if ( res->inherits( "KPIM::ResourceABC" ) ) { KPIM::ResourceABC *resAbc = static_cast<KPIM::ResourceABC *>( res ); - const QStringList subresources = resAbc->subresources(); + const TQStringList subresources = resAbc->subresources(); int writeables = 0; - for ( QStringList::ConstIterator it = subresources.begin(); it != subresources.end(); ++it ) { + for ( TQStringList::ConstIterator it = subresources.begin(); it != subresources.end(); ++it ) { if ( resAbc->subresourceActive(*it) && resAbc->subresourceWritable(*it) ) { writeables++; } @@ -412,7 +412,7 @@ void KABCore::setContactSelected( const QString &uid ) mActionMerge->setEnabled( ( list.size() == 2 ) && writable ); if ( mReadWrite ) { - QClipboard *cb = QApplication::clipboard(); + QClipboard *cb = TQApplication::clipboard(); list = AddresseeUtil::clipboardToAddressees( cb->text() ); mActionPaste->setEnabled( !list.isEmpty() ); } @@ -424,58 +424,58 @@ void KABCore::sendMail() sendMail( mViewManager->selectedEmails().join( ", " ) ); } -void KABCore::sendMail( const QString& email ) +void KABCore::sendMail( const TQString& email ) { kapp->invokeMailer( email, "" ); } void KABCore::mailVCard() { - QStringList uids = mViewManager->selectedUids(); + TQStringList uids = mViewManager->selectedUids(); if ( !uids.isEmpty() ) mailVCard( uids ); } -void KABCore::mailVCard( const QStringList &uids ) +void KABCore::mailVCard( const TQStringList &uids ) { KABTools::mailVCards( uids, mAddressBook ); } void KABCore::startChat() { - QStringList uids = mViewManager->selectedUids(); + TQStringList uids = mViewManager->selectedUids(); if ( !uids.isEmpty() ) mKIMProxy->chatWithContact( uids.first() ); } -void KABCore::browse( const QString& url ) +void KABCore::browse( const TQString& url ) { kapp->invokeBrowser( url ); } void KABCore::selectAllContacts() { - mViewManager->setSelected( QString::null, true ); + mViewManager->setSelected( TQString::null, true ); } void KABCore::deleteContacts() { - QStringList uidList = mViewManager->selectedUids(); + TQStringList uidList = mViewManager->selectedUids(); deleteContacts( uidList ); } -void KABCore::deleteDistributionLists( const QStringList & names ) +void KABCore::deleteDistributionLists( const TQStringList & names ) { if ( names.isEmpty() ) return; if ( KMessageBox::warningContinueCancelList( mWidget, i18n( "Do you really want to delete this distribution list?", "Do you really want to delete these %n distribution lists?", names.count() ), - names, QString::null, KStdGuiItem::del() ) == KMessageBox::Cancel ) + names, TQString::null, KStdGuiItem::del() ) == KMessageBox::Cancel ) return; - QStringList uids; - for ( QStringList::ConstIterator it = names.begin(); it != names.end(); ++it ) { + TQStringList uids; + for ( TQStringList::ConstIterator it = names.begin(); it != names.end(); ++it ) { uids.append( KPIM::DistributionList::findByName( mAddressBook, *it ).uid() ); } DeleteCommand *command = new DeleteCommand( mAddressBook, uids ); @@ -483,12 +483,12 @@ void KABCore::deleteDistributionLists( const QStringList & names ) setModified( true ); } -void KABCore::deleteContacts( const QStringList &uids ) +void KABCore::deleteContacts( const TQStringList &uids ) { if ( uids.count() > 0 ) { - QStringList names; - QStringList::ConstIterator it = uids.begin(); - const QStringList::ConstIterator endIt( uids.end() ); + TQStringList names; + TQStringList::ConstIterator it = uids.begin(); + const TQStringList::ConstIterator endIt( uids.end() ); while ( it != endIt ) { KABC::Addressee addr = mAddressBook->findByUid( *it ); names.append( addr.realName().isEmpty() ? addr.preferredEmail() : addr.realName() ); @@ -497,14 +497,14 @@ void KABCore::deleteContacts( const QStringList &uids ) if ( KMessageBox::warningContinueCancelList( mWidget, i18n( "Do you really want to delete this contact?", "Do you really want to delete these %n contacts?", uids.count() ), - names, QString::null, KStdGuiItem::del() ) == KMessageBox::Cancel ) + names, TQString::null, KStdGuiItem::del() ) == KMessageBox::Cancel ) return; DeleteCommand *command = new DeleteCommand( mAddressBook, uids ); mCommandHistory->addCommand( command ); // now if we deleted anything, refresh - setContactSelected( QString::null ); + setContactSelected( TQString::null ); setModified( true ); } } @@ -513,17 +513,17 @@ void KABCore::copyContacts() { KABC::Addressee::List addrList = mViewManager->selectedAddressees(); - QString clipText = AddresseeUtil::addresseesToClipboard( addrList ); + TQString clipText = AddresseeUtil::addresseesToClipboard( addrList ); kdDebug(5720) << "KABCore::copyContacts: " << clipText << endl; - QClipboard *cb = QApplication::clipboard(); + QClipboard *cb = TQApplication::clipboard(); cb->setText( clipText ); } void KABCore::cutContacts() { - QStringList uidList = mViewManager->selectedUids(); + TQStringList uidList = mViewManager->selectedUids(); if ( uidList.size() > 0 ) { CutCommand *command = new CutCommand( mAddressBook, uidList ); @@ -535,7 +535,7 @@ void KABCore::cutContacts() void KABCore::pasteContacts() { - QClipboard *cb = QApplication::clipboard(); + QClipboard *cb = TQApplication::clipboard(); KABC::Addressee::List list = AddresseeUtil::clipboardToAddressees( cb->text() ); @@ -570,7 +570,7 @@ void KABCore::mergeContacts() KABC::Addressee::List::Iterator it = list.begin(); const KABC::Addressee::List::Iterator endIt( list.end() ); KABC::Addressee origAddr = *it; - QStringList uids; + TQStringList uids; ++it; while ( it != endIt ) { uids.append( (*it).uid() ); @@ -596,20 +596,20 @@ void KABCore::setWhoAmI() return; } - QString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); - if ( KMessageBox::questionYesNo( mWidget, text.arg( addrList[ 0 ].assembledName() ), QString::null, i18n("Use"), i18n("Do Not Use") ) == KMessageBox::Yes ) + TQString text( i18n( "<qt>Do you really want to use <b>%1</b> as your new personal contact?</qt>" ) ); + if ( KMessageBox::questionYesNo( mWidget, text.arg( addrList[ 0 ].assembledName() ), TQString::null, i18n("Use"), i18n("Do Not Use") ) == KMessageBox::Yes ) static_cast<KABC::StdAddressBook*>( KABC::StdAddressBook::self( true ) )->setWhoAmI( addrList[ 0 ] ); } -void KABCore::incrementalTextSearch( const QString& text ) +void KABCore::incrementalTextSearch( const TQString& text ) { - setContactSelected( QString::null ); + setContactSelected( TQString::null ); mSearchManager->search( text, mIncSearchWidget->currentFields() ); } -void KABCore::incrementalJumpButtonSearch( const QString& character ) +void KABCore::incrementalJumpButtonSearch( const TQString& character ) { - mViewManager->setSelected( QString::null, false ); + mViewManager->setSelected( TQString::null, false ); KABC::AddresseeList list = mSearchManager->contacts(); KABC::Field *field = mViewManager->currentSortField(); @@ -667,7 +667,7 @@ void KABCore::contactModified( const KABC::Addressee &addr ) void KABCore::newDistributionList() { #ifdef KDEPIM_NEW_DISTRLISTS - QString name = i18n( "New Distribution List" ); + TQString name = i18n( "New Distribution List" ); const KPIM::DistributionList distList = KPIM::DistributionList::findByName( addressBook(), name ); if ( !distList.isEmpty() ) { bool foundUnused = false; @@ -707,9 +707,9 @@ void KABCore::newContact() dialog->show(); } -void KABCore::addEmail( const QString &aStr ) +void KABCore::addEmail( const TQString &aStr ) { - QString fullName, email; + TQString fullName, email; KABC::Addressee::parseEmailAddress( aStr, fullName, email ); @@ -717,7 +717,7 @@ void KABCore::addEmail( const QString &aStr ) // This ugly hack will be removed in 4.0 // addressbook may not be reloaded yet, as done asynchronously sometimes, so wait while ( !mAddressBook->loadingHasFinished() ) { - QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput ); + TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); // use sleep here to reduce cpu usage usleep( 100 ); } @@ -725,7 +725,7 @@ void KABCore::addEmail( const QString &aStr ) // Try to lookup the addressee matching the email address bool found = false; - QStringList emailList; + TQStringList emailList; KABC::AddressBook::Iterator it; const KABC::AddressBook::Iterator endIt( mAddressBook->end() ); for ( it = mAddressBook->begin(); !found && (it != endIt); ++it ) { @@ -753,20 +753,20 @@ void KABCore::importVCard( const KURL &url ) mXXPortManager->importVCard( url ); } -void KABCore::importVCardFromData( const QString &vCard ) +void KABCore::importVCardFromData( const TQString &vCard ) { mXXPortManager->importVCardFromData( vCard ); } -void KABCore::editContact( const QString &uid ) +void KABCore::editContact( const TQString &uid ) { if ( mExtensionManager->isQuickEditVisible() ) return; // First, locate the contact entry - QString localUID = uid; + TQString localUID = uid; if ( localUID.isNull() ) { - QStringList uidList = mViewManager->selectedUids(); + TQStringList uidList = mViewManager->selectedUids(); if ( uidList.count() > 0 ) localUID = *( uidList.at( 0 ) ); } @@ -775,7 +775,7 @@ void KABCore::editContact( const QString &uid ) // for calls with given uid, as done from commandline and DCOP // addressbook may not be reloaded yet, as done asynchronously, so wait else while ( !mAddressBook->loadingHasFinished() ) { - QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput ); + TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); // use sleep here to reduce cpu usage usleep( 100 ); } @@ -806,18 +806,18 @@ void KABCore::editContact( const QString &uid ) void KABCore::copySelectedContactToResource() { - storeContactIn( QString(), true /*copy*/); + storeContactIn( TQString(), true /*copy*/); } void KABCore::moveSelectedContactToResource() { - storeContactIn( QString(), false /*copy*/); + storeContactIn( TQString(), false /*copy*/); } -void KABCore::storeContactIn( const QString &uid, bool copy /*false*/ ) +void KABCore::storeContactIn( const TQString &uid, bool copy /*false*/ ) { // First, locate the contact entry - QStringList uidList; + TQStringList uidList; if ( uid.isNull() ) { uidList = mViewManager->selectedUids(); } else { @@ -828,8 +828,8 @@ void KABCore::storeContactIn( const QString &uid, bool copy /*false*/ ) return; KABLock::self( mAddressBook )->lock( resource ); - QStringList::Iterator it( uidList.begin() ); - const QStringList::Iterator endIt( uidList.end() ); + TQStringList::Iterator it( uidList.begin() ); + const TQStringList::Iterator endIt( uidList.end() ); while ( it != endIt ) { KABC::Addressee addr = mAddressBook->findByUid( *it++ ); if ( !addr.isEmpty() ) { @@ -855,8 +855,8 @@ void KABCore::storeContactIn( const QString &uid, bool copy /*false*/ ) void KABCore::save() { - QPtrList<KABC::Resource> resources = mAddressBook->resources(); - QPtrListIterator<KABC::Resource> it( resources ); + TQPtrList<KABC::Resource> resources = mAddressBook->resources(); + TQPtrListIterator<KABC::Resource> it( resources ); while ( it.current() && !it.current()->readOnly() ) { KABC::Ticket *ticket = mAddressBook->requestSaveTicket( it.current() ); if ( ticket ) { @@ -922,33 +922,33 @@ void KABCore::extensionModified( const KABC::Addressee::List &list ) } } -void KABCore::extensionDeleted( const QStringList &uidList ) +void KABCore::extensionDeleted( const TQStringList &uidList ) { DeleteCommand *command = new DeleteCommand( mAddressBook, uidList ); mCommandHistory->addCommand( command ); // now if we deleted anything, refresh - setContactSelected( QString::null ); + setContactSelected( TQString::null ); setModified( true ); } -QString KABCore::getNameByPhone( const QString &phone ) +TQString KABCore::getNameByPhone( const TQString &phone ) { #if KDE_IS_VERSION(3,4,89) // This ugly hack will be removed in 4.0 // addressbook may not be reloaded yet, as done asynchronously, so wait while ( !mAddressBook->loadingHasFinished() ) { - QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput ); + TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); // use sleep here to reduce cpu usage usleep( 100 ); } #endif - QRegExp r( "[/*/-/ ]" ); - QString localPhone( phone ); + TQRegExp r( "[/*/-/ ]" ); + TQString localPhone( phone ); bool found = false; - QString ownerName = ""; + TQString ownerName = ""; KABC::PhoneNumber::List phoneList; KABC::AddressBook::ConstIterator iter; @@ -981,10 +981,10 @@ void KABCore::openLDAPDialog() if ( !mLdapSearchDialog ) { mLdapSearchDialog = new LDAPSearchDialog( mAddressBook, this, mWidget ); - connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), - SLOT( addressBookChanged() ) ); - connect( mLdapSearchDialog, SIGNAL( addresseesAdded() ), - SLOT( setModified() ) ); + connect( mLdapSearchDialog, TQT_SIGNAL( addresseesAdded() ), + TQT_SLOT( addressBookChanged() ) ); + connect( mLdapSearchDialog, TQT_SIGNAL( addresseesAdded() ), + TQT_SLOT( setModified() ) ); } else mLdapSearchDialog->restoreSettings(); @@ -998,8 +998,8 @@ void KABCore::configure() saveSettings(); KCMultiDialog dlg( mWidget, "", true ); - connect( &dlg, SIGNAL( configCommitted() ), - this, SLOT( configurationChanged() ) ); + connect( &dlg, TQT_SIGNAL( configCommitted() ), + this, TQT_SLOT( configurationChanged() ) ); dlg.addModule( "kabconfig.desktop" ); dlg.addModule( "kabldapconfig.desktop" ); @@ -1023,7 +1023,7 @@ void KABCore::print() wizard.exec(); } -void KABCore::detailsHighlighted( const QString &msg ) +void KABCore::detailsHighlighted( const TQString &msg ) { if ( mStatusBar ) { if ( !mStatusBar->hasItem( 2 ) ) @@ -1033,9 +1033,9 @@ void KABCore::detailsHighlighted( const QString &msg ) } } -void KABCore::showContactsAddress( const QString &addrUid ) +void KABCore::showContactsAddress( const TQString &addrUid ) { - QStringList uidList = mViewManager->selectedUids(); + TQStringList uidList = mViewManager->selectedUids(); if ( uidList.isEmpty() ) return; @@ -1064,8 +1064,8 @@ bool KABCore::queryClose() saveSettings(); KABPrefs::instance()->writeConfig(); - QPtrList<KABC::Resource> resources = mAddressBook->resources(); - QPtrListIterator<KABC::Resource> it( resources ); + TQPtrList<KABC::Resource> resources = mAddressBook->resources(); + TQPtrListIterator<KABC::Resource> it( resources ); while ( it.current() ) { it.current()->close(); ++it; @@ -1085,7 +1085,7 @@ void KABCore::delayedAddressBookChanged() void KABCore::addressBookChanged() { - const QStringList selectedUids = mViewManager->selectedUids(); + const TQStringList selectedUids = mViewManager->selectedUids(); mAddressBookChangedTimer->stop(); @@ -1094,9 +1094,9 @@ void KABCore::addressBookChanged() mSearchManager->reload(); - mViewManager->setSelected( QString::null, false ); + mViewManager->setSelected( TQString::null, false ); - QString uid = QString::null; + TQString uid = TQString::null; if ( !selectedUids.isEmpty() ) { uid = selectedUids.first(); mViewManager->setSelected( uid, true ); @@ -1107,132 +1107,132 @@ void KABCore::addressBookChanged() updateCategories(); } -AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( QWidget *parent, +AddresseeEditorDialog *KABCore::createAddresseeEditorDialog( TQWidget *parent, const char *name ) { AddresseeEditorDialog *dialog = new AddresseeEditorDialog( this, parent, name ? name : "editorDialog" ); - connect( dialog, SIGNAL( contactModified( const KABC::Addressee& ) ), - SLOT( contactModified( const KABC::Addressee& ) ) ); - connect( dialog, SIGNAL( editorDestroyed( const QString& ) ), - SLOT( slotEditorDestroyed( const QString& ) ) ); + connect( dialog, TQT_SIGNAL( contactModified( const KABC::Addressee& ) ), + TQT_SLOT( contactModified( const KABC::Addressee& ) ) ); + connect( dialog, TQT_SIGNAL( editorDestroyed( const TQString& ) ), + TQT_SLOT( slotEditorDestroyed( const TQString& ) ) ); return dialog; } -void KABCore::activateDetailsWidget( QWidget *widget ) +void KABCore::activateDetailsWidget( TQWidget *widget ) { if ( mDetailsStack->visibleWidget() == widget ) return; mDetailsStack->raiseWidget( widget ); } -void KABCore::deactivateDetailsWidget( QWidget *widget ) +void KABCore::deactivateDetailsWidget( TQWidget *widget ) { if ( mDetailsStack->visibleWidget() != widget ) return; mDetailsStack->raiseWidget( mDetailsWidget ); } -void KABCore::slotEditorDestroyed( const QString &uid ) +void KABCore::slotEditorDestroyed( const TQString &uid ) { AddresseeEditorDialog *dialog = mEditorDict.take( uid ); KABC::Addressee addr = dialog->addressee(); if ( !addr.resource()->readOnly() ) { - QApplication::setOverrideCursor( Qt::waitCursor ); + TQApplication::setOverrideCursor( Qt::waitCursor ); KABLock::self( mAddressBook )->unlock( addr.resource() ); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } } void KABCore::initGUI() { - QVBoxLayout *topLayout = new QVBoxLayout( mWidget, 0, 0 ); + TQVBoxLayout *topLayout = new TQVBoxLayout( mWidget, 0, 0 ); KToolBar* searchTB = new KToolBar( mWidget, "search toolbar"); searchTB->boxLayout()->setSpacing( KDialog::spacingHint() ); mIncSearchWidget = new IncSearchWidget( searchTB, "kde toolbar widget"); searchTB->setStretchableWidget( mIncSearchWidget ); - connect( mIncSearchWidget, SIGNAL( doSearch( const QString& ) ), - SLOT( incrementalTextSearch( const QString& ) ) ); + connect( mIncSearchWidget, TQT_SIGNAL( doSearch( const TQString& ) ), + TQT_SLOT( incrementalTextSearch( const TQString& ) ) ); - mDetailsSplitter = new QSplitter( mWidget ); + mDetailsSplitter = new TQSplitter( mWidget ); - mLeftSplitter = new QSplitter( mDetailsSplitter ); + mLeftSplitter = new TQSplitter( mDetailsSplitter ); mLeftSplitter->setOrientation( KABPrefs::instance()->contactListAboveExtensions() ? Qt::Vertical : Qt::Horizontal ); topLayout->addWidget( searchTB ); topLayout->addWidget( mDetailsSplitter ); - mDetailsStack = new QWidgetStack( mDetailsSplitter ); - mExtensionManager = new ExtensionManager( new QWidget( mLeftSplitter ), mDetailsStack, this, this ); - connect( mExtensionManager, SIGNAL( detailsWidgetDeactivated( QWidget* ) ), - this, SLOT( deactivateDetailsWidget( QWidget* ) ) ); - connect( mExtensionManager, SIGNAL( detailsWidgetActivated( QWidget* ) ), - this, SLOT( activateDetailsWidget( QWidget* ) ) ); + mDetailsStack = new TQWidgetStack( mDetailsSplitter ); + mExtensionManager = new ExtensionManager( new TQWidget( mLeftSplitter ), mDetailsStack, this, this ); + connect( mExtensionManager, TQT_SIGNAL( detailsWidgetDeactivated( TQWidget* ) ), + this, TQT_SLOT( deactivateDetailsWidget( TQWidget* ) ) ); + connect( mExtensionManager, TQT_SIGNAL( detailsWidgetActivated( TQWidget* ) ), + this, TQT_SLOT( activateDetailsWidget( TQWidget* ) ) ); - QWidget *viewWidget = new QWidget( mLeftSplitter ); + TQWidget *viewWidget = new TQWidget( mLeftSplitter ); if ( KABPrefs::instance()->contactListAboveExtensions() ) mLeftSplitter->moveToFirst( viewWidget ); - QVBoxLayout *viewLayout = new QVBoxLayout( viewWidget ); + TQVBoxLayout *viewLayout = new TQVBoxLayout( viewWidget ); viewLayout->setSpacing( KDialog::spacingHint() ); - mViewHeaderLabel = new QLabel( viewWidget ); -// mViewHeaderLabel->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ); + mViewHeaderLabel = new TQLabel( viewWidget ); +// mViewHeaderLabel->setSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ); mViewHeaderLabel->setText( i18n( "Contacts" ) ); viewLayout->addWidget( mViewHeaderLabel ); mViewManager = new ViewManager( this, viewWidget ); viewLayout->addWidget( mViewManager, 1 ); #ifdef KDEPIM_NEW_DISTRLISTS - mDistListButtonWidget = new QWidget( viewWidget ); - QHBoxLayout *buttonLayout = new QHBoxLayout( mDistListButtonWidget ); + mDistListButtonWidget = new TQWidget( viewWidget ); + TQHBoxLayout *buttonLayout = new TQHBoxLayout( mDistListButtonWidget ); buttonLayout->setSpacing( KDialog::spacingHint() ); buttonLayout->addStretch( 1 ); KPushButton *addDistListButton = new KPushButton( mDistListButtonWidget ); addDistListButton->setText( i18n( "Add" ) ); - connect( addDistListButton, SIGNAL( clicked() ), - this, SLOT( editSelectedDistributionList() ) ); + connect( addDistListButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( editSelectedDistributionList() ) ); buttonLayout->addWidget( addDistListButton ); mDistListButtonWidget->setShown( false ); viewLayout->addWidget( mDistListButtonWidget ); KPushButton *removeDistListButton = new KPushButton( mDistListButtonWidget ); removeDistListButton->setText( i18n( "Remove" ) ); - connect( removeDistListButton, SIGNAL( clicked() ), - this, SLOT( removeSelectedContactsFromDistList() ) ); + connect( removeDistListButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( removeSelectedContactsFromDistList() ) ); buttonLayout->addWidget( removeDistListButton ); #endif mFilterSelectionWidget = new FilterSelectionWidget( searchTB , "kde toolbar widget" ); mViewManager->setFilterSelectionWidget( mFilterSelectionWidget ); - connect( mFilterSelectionWidget, SIGNAL( filterActivated( int ) ), - mViewManager, SLOT( setActiveFilter( int ) ) ); + connect( mFilterSelectionWidget, TQT_SIGNAL( filterActivated( int ) ), + mViewManager, TQT_SLOT( setActiveFilter( int ) ) ); - mDetailsWidget = new QWidget( mDetailsSplitter ); - mDetailsLayout = new QHBoxLayout( mDetailsWidget ); + mDetailsWidget = new TQWidget( mDetailsSplitter ); + mDetailsLayout = new TQHBoxLayout( mDetailsWidget ); - mDetailsPage = new QWidget( mDetailsWidget ); + mDetailsPage = new TQWidget( mDetailsWidget ); mDetailsLayout->addWidget( mDetailsPage ); - QHBoxLayout *detailsPageLayout = new QHBoxLayout( mDetailsPage, 0, 0 ); + TQHBoxLayout *detailsPageLayout = new TQHBoxLayout( mDetailsPage, 0, 0 ); mDetailsViewer = new KPIM::AddresseeView( mDetailsPage ); - mDetailsViewer->setVScrollBarMode( QScrollView::Auto ); + mDetailsViewer->setVScrollBarMode( TQScrollView::Auto ); detailsPageLayout->addWidget( mDetailsViewer ); mDistListEntryView = new KAB::DistributionListEntryView( this, mWidget ); - connect( mDistListEntryView, SIGNAL( distributionListClicked( const QString& ) ), - this, SLOT( sendMailToDistributionList( const QString& ) ) ); + connect( mDistListEntryView, TQT_SIGNAL( distributionListClicked( const TQString& ) ), + this, TQT_SLOT( sendMailToDistributionList( const TQString& ) ) ); mDetailsStack->addWidget( mDistListEntryView ); mDetailsStack->addWidget( mDetailsWidget ); mDetailsStack->raiseWidget( mDetailsWidget ); mDetailsSplitter->moveToLast( mDetailsStack ); - connect( mDetailsViewer, SIGNAL( addressClicked( const QString&) ), - this, SLOT( showContactsAddress( const QString& ) ) ); + connect( mDetailsViewer, TQT_SIGNAL( addressClicked( const TQString&) ), + this, TQT_SLOT( showContactsAddress( const TQString& ) ) ); topLayout->setStretchFactor( mDetailsSplitter, 1 ); @@ -1247,62 +1247,62 @@ void KABCore::createJumpButtonBar() mDetailsLayout->addWidget( mJumpButtonBar ); mDetailsLayout->setStretchFactor( mJumpButtonBar, 1 ); - connect( mJumpButtonBar, SIGNAL( jumpToLetter( const QString& ) ), - SLOT( incrementalJumpButtonSearch( const QString& ) ) ); - connect( mViewManager, SIGNAL( sortFieldChanged() ), - mJumpButtonBar, SLOT( updateButtons() ) ); + connect( mJumpButtonBar, TQT_SIGNAL( jumpToLetter( const TQString& ) ), + TQT_SLOT( incrementalJumpButtonSearch( const TQString& ) ) ); + connect( mViewManager, TQT_SIGNAL( sortFieldChanged() ), + mJumpButtonBar, TQT_SLOT( updateButtons() ) ); } void KABCore::initActions() { - connect( QApplication::clipboard(), SIGNAL( dataChanged() ), - SLOT( clipboardDataChanged() ) ); + connect( TQApplication::clipboard(), TQT_SIGNAL( dataChanged() ), + TQT_SLOT( clipboardDataChanged() ) ); KAction *action; // file menu mActionMail = new KAction( i18n( "&Send Email to Contact..." ), "mail_send", 0, - this, SLOT( sendMail() ), actionCollection(), "file_mail" ); - action = KStdAction::print( this, SLOT( print() ), actionCollection() ); + this, TQT_SLOT( sendMail() ), actionCollection(), "file_mail" ); + action = KStdAction::print( this, TQT_SLOT( print() ), actionCollection() ); mActionMail->setWhatsThis( i18n( "Send a mail to all selected contacts." ) ); action->setWhatsThis( i18n( "Print a special number of contacts." ) ); mActionSave = KStdAction::save( this, - SLOT( save() ), actionCollection(), "file_sync" ); + TQT_SLOT( save() ), actionCollection(), "file_sync" ); mActionSave->setWhatsThis( i18n( "Save all changes of the address book to the storage backend." ) ); action = new KAction( i18n( "&New Contact..." ), "identity", CTRL+Key_N, this, - SLOT( newContact() ), actionCollection(), "file_new_contact" ); + TQT_SLOT( newContact() ), actionCollection(), "file_new_contact" ); action->setWhatsThis( i18n( "Create a new contact<p>You will be presented with a dialog where you can add all data about a person, including addresses and phone numbers." ) ); action = new KAction( i18n( "&New Distribution List..." ), "kontact_contacts", 0, this, - SLOT( newDistributionList() ), actionCollection(), "file_new_distributionlist" ); + TQT_SLOT( newDistributionList() ), actionCollection(), "file_new_distributionlist" ); action->setWhatsThis( i18n( "Create a new distribution list<p>You will be presented with a dialog where you can create a new distribution list." ) ); mActionMailVCard = new KAction( i18n("Send &Contact..."), "mail_post_to", 0, - this, SLOT( mailVCard() ), + this, TQT_SLOT( mailVCard() ), actionCollection(), "file_mail_vcard" ); mActionMailVCard->setWhatsThis( i18n( "Send a mail with the selected contact as attachment." ) ); mActionChat = new KAction( i18n("Chat &With..."), 0, - this, SLOT( startChat() ), + this, TQT_SLOT( startChat() ), actionCollection(), "file_chat" ); mActionChat->setWhatsThis( i18n( "Start a chat with the selected contact." ) ); mActionEditAddressee = new KAction( i18n( "&Edit Contact..." ), "edit", 0, - this, SLOT( editContact() ), + this, TQT_SLOT( editContact() ), actionCollection(), "file_properties" ); mActionEditAddressee->setWhatsThis( i18n( "Edit a contact<p>You will be presented with a dialog where you can change all data about a person, including addresses and phone numbers." ) ); mActionMerge = new KAction( i18n( "&Merge Contacts" ), "", 0, - this, SLOT( mergeContacts() ), + this, TQT_SLOT( mergeContacts() ), actionCollection(), "edit_merge" ); // edit menu - mActionCopy = KStdAction::copy( this, SLOT( copyContacts() ), actionCollection() ); - mActionCut = KStdAction::cut( this, SLOT( cutContacts() ), actionCollection() ); - mActionPaste = KStdAction::paste( this, SLOT( pasteContacts() ), actionCollection() ); - action = KStdAction::selectAll( this, SLOT( selectAllContacts() ), actionCollection() ); + mActionCopy = KStdAction::copy( this, TQT_SLOT( copyContacts() ), actionCollection() ); + mActionCut = KStdAction::cut( this, TQT_SLOT( cutContacts() ), actionCollection() ); + mActionPaste = KStdAction::paste( this, TQT_SLOT( pasteContacts() ), actionCollection() ); + action = KStdAction::selectAll( this, TQT_SLOT( selectAllContacts() ), actionCollection() ); mActionCopy->setWhatsThis( i18n( "Copy the currently selected contact(s) to system clipboard in vCard format." ) ); mActionCut->setWhatsThis( i18n( "Cuts the currently selected contact(s) to system clipboard in vCard format." ) ); mActionPaste->setWhatsThis( i18n( "Paste the previously cut or copied contacts from clipboard." ) ); @@ -1311,19 +1311,19 @@ void KABCore::initActions() // mActionRedo->setWhatsThis( i18n( "Redoes the last <b>Cut</b>, <b>Copy</b> or <b>Paste</b>." ) ); mActionDelete = new KAction( i18n( "&Delete Contact" ), "editdelete", - Key_Delete, this, SLOT( deleteContacts() ), + Key_Delete, this, TQT_SLOT( deleteContacts() ), actionCollection(), "edit_delete" ); mActionDelete->setWhatsThis( i18n( "Delete all selected contacts." ) ); mActionCopyAddresseeTo = new KAction( i18n( "&Copy Contact To..." ), "", 0, - this, SLOT( copySelectedContactToResource() ), + this, TQT_SLOT( copySelectedContactToResource() ), actionCollection(), "copy_contact_to" ); - const QString copyMoveWhatsThis = i18n( "Store a contact in a different Addressbook<p>You will be presented with a dialog where you can select a new storage place for this contact." ); + const TQString copyMoveWhatsThis = i18n( "Store a contact in a different Addressbook<p>You will be presented with a dialog where you can select a new storage place for this contact." ); mActionCopyAddresseeTo->setWhatsThis( copyMoveWhatsThis ); mActionMoveAddresseeTo = new KAction( i18n( "M&ove Contact To..." ), "", 0, - this, SLOT( moveSelectedContactToResource() ), + this, TQT_SLOT( moveSelectedContactToResource() ), actionCollection(), "move_contact_to" ); mActionMoveAddresseeTo->setWhatsThis( copyMoveWhatsThis ); @@ -1332,41 +1332,41 @@ void KABCore::initActions() actionCollection(), "options_show_jump_bar" ); mActionJumpBar->setWhatsThis( i18n( "Toggle whether the jump button bar shall be visible." ) ); mActionJumpBar->setCheckedState( i18n( "Hide Jump Bar") ); - connect( mActionJumpBar, SIGNAL( toggled( bool ) ), SLOT( setJumpButtonBarVisible( bool ) ) ); + connect( mActionJumpBar, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( setJumpButtonBarVisible( bool ) ) ); mActionDetails = new KToggleAction( i18n( "Show Details" ), 0, 0, actionCollection(), "options_show_details" ); mActionDetails->setWhatsThis( i18n( "Toggle whether the details page shall be visible." ) ); mActionDetails->setCheckedState( i18n( "Hide Details") ); - connect( mActionDetails, SIGNAL( toggled( bool ) ), SLOT( setDetailsVisible( bool ) ) ); + connect( mActionDetails, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( setDetailsVisible( bool ) ) ); if ( mIsPart ) action = new KAction( i18n( "&Configure Address Book..." ), "configure", 0, - this, SLOT( configure() ), actionCollection(), + this, TQT_SLOT( configure() ), actionCollection(), "kaddressbook_configure" ); else - action = KStdAction::preferences( this, SLOT( configure() ), actionCollection() ); + action = KStdAction::preferences( this, TQT_SLOT( configure() ), actionCollection() ); action->setWhatsThis( i18n( "You will be presented with a dialog, that offers you all possibilities to configure KAddressBook." ) ); // misc action = new KAction( i18n( "&Lookup Addresses in LDAP Directory..." ), "find", 0, - this, SLOT( openLDAPDialog() ), actionCollection(), "ldap_lookup" ); + this, TQT_SLOT( openLDAPDialog() ), actionCollection(), "ldap_lookup" ); action->setWhatsThis( i18n( "Search for contacts on a LDAP server<p>You will be presented with a dialog, where you can search for contacts and select the ones you want to add to your local address book." ) ); mActionWhoAmI = new KAction( i18n( "Set as Personal Contact Data" ), "personal", 0, this, - SLOT( setWhoAmI() ), actionCollection(), + TQT_SLOT( setWhoAmI() ), actionCollection(), "edit_set_personal" ); mActionWhoAmI->setWhatsThis( i18n( "Set the personal contact<p>The data of this contact will be used in many other KDE applications, so you do not have to input your personal data several times." ) ); mActionCategories = new KAction( i18n( "Select Categories..." ), 0, this, - SLOT( setCategories() ), actionCollection(), + TQT_SLOT( setCategories() ), actionCollection(), "edit_set_categories" ); mActionCategories->setWhatsThis( i18n( "Set the categories for all selected contacts." ) ); KAction *clearLocation = new KAction( i18n( "Clear Search Bar" ), - QApplication::reverseLayout() ? "clear_left" : "locationbar_erase", - CTRL+Key_L, this, SLOT( slotClearSearchBar() ), actionCollection(), "clear_search" ); + TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", + CTRL+Key_L, this, TQT_SLOT( slotClearSearchBar() ), actionCollection(), "clear_search" ); clearLocation->setWhatsThis( i18n( "Clear Search Bar<p>" "Clears the content of the quick search bar." ) ); @@ -1376,7 +1376,7 @@ void KABCore::initActions() void KABCore::clipboardDataChanged() { if ( mReadWrite ) - mActionPaste->setEnabled( !QApplication::clipboard()->text().isEmpty() ); + mActionPaste->setEnabled( !TQApplication::clipboard()->text().isEmpty() ); } void KABCore::updateIncSearchWidget() @@ -1386,12 +1386,12 @@ void KABCore::updateIncSearchWidget() void KABCore::updateCategories() { - QStringList categories( allCategories() ); + TQStringList categories( allCategories() ); categories.sort(); - const QStringList customCategories( KABPrefs::instance()->customCategories() ); - QStringList::ConstIterator it; - const QStringList::ConstIterator endIt( customCategories.end() ); + const TQStringList customCategories( KABPrefs::instance()->customCategories() ); + TQStringList::ConstIterator it; + const TQStringList::ConstIterator endIt( customCategories.end() ); for ( it = customCategories.begin(); it != endIt; ++it ) { if ( categories.find( *it ) == categories.end() ) { categories.append( *it ); @@ -1405,10 +1405,10 @@ void KABCore::updateCategories() mCategoryEditDialog->reload(); } -QStringList KABCore::allCategories() const +TQStringList KABCore::allCategories() const { - QStringList categories, allCategories; - QStringList::ConstIterator catIt; + TQStringList categories, allCategories; + TQStringList::ConstIterator catIt; // Avoid crash on exit if ( !mAddressBook ) { @@ -1419,7 +1419,7 @@ QStringList KABCore::allCategories() const const KABC::AddressBook::ConstIterator endIt( mAddressBook->end() ); for ( it = mAddressBook->begin(); it != endIt; ++it ) { categories = (*it).categories(); - const QStringList::ConstIterator catEndIt( categories.end() ); + const TQStringList::ConstIterator catEndIt( categories.end() ); for ( catIt = categories.begin(); catIt != catEndIt; ++catIt ) { if ( !allCategories.contains( *catIt ) ) allCategories.append( *catIt ); @@ -1434,34 +1434,34 @@ void KABCore::setCategories() // Show the category dialog if ( mCategorySelectDialog == 0 ) { mCategorySelectDialog = new KPIM::CategorySelectDialog( KABPrefs::instance(), mWidget ); - connect( mCategorySelectDialog, SIGNAL( categoriesSelected( const QStringList& ) ), - SLOT( categoriesSelected( const QStringList& ) ) ); - connect( mCategorySelectDialog, SIGNAL( editCategories() ), SLOT( editCategories() ) ); + connect( mCategorySelectDialog, TQT_SIGNAL( categoriesSelected( const TQStringList& ) ), + TQT_SLOT( categoriesSelected( const TQStringList& ) ) ); + connect( mCategorySelectDialog, TQT_SIGNAL( editCategories() ), TQT_SLOT( editCategories() ) ); } mCategorySelectDialog->show(); mCategorySelectDialog->raise(); } -void KABCore::categoriesSelected( const QStringList &categories ) +void KABCore::categoriesSelected( const TQStringList &categories ) { bool merge = false; - QString msg = i18n( "Merge with existing categories?" ); - if ( KMessageBox::questionYesNo( mWidget, msg, QString::null, i18n( "Merge" ), i18n( "Do Not Merge" ) ) == KMessageBox::Yes ) + TQString msg = i18n( "Merge with existing categories?" ); + if ( KMessageBox::questionYesNo( mWidget, msg, TQString::null, i18n( "Merge" ), i18n( "Do Not Merge" ) ) == KMessageBox::Yes ) merge = true; - QStringList uids = mViewManager->selectedUids(); - QStringList::ConstIterator it; - const QStringList::ConstIterator endIt( uids.end() ); + TQStringList uids = mViewManager->selectedUids(); + TQStringList::ConstIterator it; + const TQStringList::ConstIterator endIt( uids.end() ); for ( it = uids.begin(); it != endIt; ++it ) { KABC::Addressee addr = mAddressBook->findByUid( *it ); if ( !addr.isEmpty() ) { if ( !merge ) addr.setCategories( categories ); else { - QStringList addrCategories = addr.categories(); - QStringList::ConstIterator catIt; - const QStringList::ConstIterator catEndIt( categories.end() ); + TQStringList addrCategories = addr.categories(); + TQStringList::ConstIterator catIt; + const TQStringList::ConstIterator catEndIt( categories.end() ); for ( catIt = categories.begin(); catIt != catEndIt; ++catIt ) { if ( !addrCategories.contains( *catIt ) ) addrCategories.append( *catIt ); @@ -1481,8 +1481,8 @@ void KABCore::editCategories() { if ( mCategoryEditDialog == 0 ) { mCategoryEditDialog = new KPIM::CategoryEditDialog( KABPrefs::instance(), mWidget ); - connect( mCategoryEditDialog, SIGNAL( categoryConfigChanged() ), - mCategorySelectDialog, SLOT( updateCategoryConfig() ) ); + connect( mCategoryEditDialog, TQT_SIGNAL( categoryConfigChanged() ), + mCategorySelectDialog, TQT_SLOT( updateCategoryConfig() ) ); } mCategoryEditDialog->show(); @@ -1498,7 +1498,7 @@ void KABCore::slotClearSearchBar() void KABCore::slotContactsUpdated() { if ( mStatusBar ) { - QString msg( i18n( "%n contact matches", "%n contacts matching", mSearchManager->contacts().count() ) ); + TQString msg( i18n( "%n contact matches", "%n contacts matching", mSearchManager->contacts().count() ) ); if ( !mStatusBar->hasItem( 1 ) ) mStatusBar->insertItem( msg, 1 ); else @@ -1511,14 +1511,14 @@ void KABCore::slotContactsUpdated() bool KABCore::handleCommandLine( KAddressBookIface* iface ) { KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QCString addrStr = args->getOption( "addr" ); - QCString uidStr = args->getOption( "uid" ); + TQCString addrStr = args->getOption( "addr" ); + TQCString uidStr = args->getOption( "uid" ); - QString addr, uid, vcard; + TQString addr, uid, vcard; if ( !addrStr.isEmpty() ) - addr = QString::fromLocal8Bit( addrStr ); + addr = TQString::fromLocal8Bit( addrStr ); if ( !uidStr.isEmpty() ) - uid = QString::fromLocal8Bit( uidStr ); + uid = TQString::fromLocal8Bit( uidStr ); bool doneSomething = false; @@ -1553,10 +1553,10 @@ void KABCore::removeSelectedContactsFromDistList() KPIM::DistributionList dist = KPIM::DistributionList::findByName( addressBook(), mSelectedDistributionList ); if ( dist.isEmpty() ) return; - const QStringList uids = selectedUIDs(); + const TQStringList uids = selectedUIDs(); if ( uids.isEmpty() ) return; - for ( QStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { + for ( TQStringList::ConstIterator it = uids.begin(); it != uids.end(); ++it ) { dist.removeEntry ( *it ); } addressBook()->insertAddressee( dist ); @@ -1564,14 +1564,14 @@ void KABCore::removeSelectedContactsFromDistList() #endif } -void KABCore::sendMailToDistributionList( const QString &name ) +void KABCore::sendMailToDistributionList( const TQString &name ) { #ifdef KDEPIM_NEW_DISTRLISTS KPIM::DistributionList dist = KPIM::DistributionList::findByName( addressBook(), name ); if ( dist.isEmpty() ) return; typedef KPIM::DistributionList::Entry::List EntryList; - QStringList mails; + TQStringList mails; const EntryList entries = dist.entries( addressBook() ); for ( EntryList::ConstIterator it = entries.begin(); it != entries.end(); ++it ) mails += (*it).addressee.fullEmail( (*it).email ); @@ -1587,7 +1587,7 @@ void KABCore::editSelectedDistributionList() } -void KABCore::editDistributionList( const QString &name ) +void KABCore::editDistributionList( const TQString &name ) { #ifdef KDEPIM_NEW_DISTRLISTS editDistributionList( KPIM::DistributionList::findByName( addressBook(), name ) ); @@ -1596,7 +1596,7 @@ void KABCore::editDistributionList( const QString &name ) #ifdef KDEPIM_NEW_DISTRLISTS -void KABCore::showDistributionListEntry( const QString& uid ) +void KABCore::showDistributionListEntry( const TQString& uid ) { KPIM::DistributionList dist = KPIM::DistributionList::findByName( addressBook(), mSelectedDistributionList ); if ( !dist.isEmpty() ) { @@ -1616,9 +1616,9 @@ void KABCore::editDistributionList( const KPIM::DistributionList &dist ) { if ( dist.isEmpty() ) return; - QGuardedPtr<KPIM::DistributionListEditor::EditorWidget> dlg = new KPIM::DistributionListEditor::EditorWidget( addressBook(), widget() ); + TQGuardedPtr<KPIM::DistributionListEditor::EditorWidget> dlg = new KPIM::DistributionListEditor::EditorWidget( addressBook(), widget() ); dlg->setDistributionList( dist ); - if ( dlg->exec() == QDialog::Accepted && dlg ) { + if ( dlg->exec() == TQDialog::Accepted && dlg ) { const KPIM::DistributionList newDist = dlg->distributionList(); if ( newDist != dist ) { addressBook()->insertAddressee( newDist ); @@ -1634,7 +1634,7 @@ KPIM::DistributionList::List KABCore::distributionLists() const return mSearchManager->distributionLists(); } -void KABCore::setSelectedDistributionList( const QString &name ) +void KABCore::setSelectedDistributionList( const TQString &name ) { mSelectedDistributionList = name; mSearchManager->setSelectedDistributionList( name ); @@ -1642,14 +1642,14 @@ void KABCore::setSelectedDistributionList( const QString &name ) mDistListButtonWidget->setShown( !mSelectedDistributionList.isNull() ); if ( !name.isNull() ) { mDetailsStack->raiseWidget( mDistListEntryView ); - const QStringList selectedUids = selectedUIDs(); - showDistributionListEntry( selectedUids.isEmpty() ? QString() : selectedUids.first() ); + const TQStringList selectedUids = selectedUIDs(); + showDistributionListEntry( selectedUids.isEmpty() ? TQString() : selectedUids.first() ); } else mDetailsStack->raiseWidget( mExtensionManager->activeDetailsWidget() ? mExtensionManager->activeDetailsWidget() : mDetailsWidget ); } -QStringList KABCore::distributionListNames() const +TQStringList KABCore::distributionListNames() const { return mSearchManager->distributionListNames(); } diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index 8cb2bc4d5..ed6b4ab5f 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -26,9 +26,9 @@ #include <kabc/field.h> -#include <qdict.h> -#include <qlabel.h> -#include <qwidget.h> +#include <tqdict.h> +#include <tqlabel.h> +#include <tqwidget.h> #include "core.h" #include <kdepimmacros.h> @@ -82,8 +82,8 @@ class KDE_EXPORT KABCore : public KAB::Core Q_OBJECT public: - KABCore( KXMLGUIClient *client, bool readWrite, QWidget *parent, - const QString &file = QString::null, const char *name = 0 ); + KABCore( KXMLGUIClient *client, bool readWrite, TQWidget *parent, + const TQString &file = TQString::null, const char *name = 0 ); ~KABCore(); /** @@ -120,19 +120,19 @@ class KDE_EXPORT KABCore : public KAB::Core /** Returns the uid list of the currently selected contacts. */ - QStringList selectedUIDs() const; + TQStringList selectedUIDs() const; /** Displays the ResourceSelectDialog and returns the selected resource or a null pointer if no resource was selected by the user. */ - KABC::Resource *requestResource( QWidget *parent ); + KABC::Resource *requestResource( TQWidget *parent ); /** Returns the parent widget. */ - QWidget *widget() const; + TQWidget *widget() const; static KAboutData *createAboutData(); @@ -153,20 +153,20 @@ class KDE_EXPORT KABCore : public KAB::Core /** Returns the name of all the distribution lists. */ - virtual QStringList distributionListNames() const; + virtual TQStringList distributionListNames() const; /** sets the distribution list to display. If null, the regular address book is to be displayed. */ - virtual void setSelectedDistributionList( const QString &name ); + virtual void setSelectedDistributionList( const TQString &name ); #endif public slots: /** Is called whenever a contact is selected in the view. */ - void setContactSelected( const QString &uid ); + void setContactSelected( const TQString &uid ); /** Opens the preferred mail composer with all selected contacts as @@ -178,11 +178,11 @@ class KDE_EXPORT KABCore : public KAB::Core Opens the preferred mail composer with the given contacts as arguments. */ - void sendMail( const QString& email ); + void sendMail( const TQString& email ); void mailVCard(); - void mailVCard(const QStringList& uids); + void mailVCard(const TQStringList& uids); /** * Start an Instant Messaging chat with the selected contacts @@ -192,7 +192,7 @@ class KDE_EXPORT KABCore : public KAB::Core /** Starts the preferred web browser with the given URL as argument. */ - void browse( const QString& url ); + void browse( const TQString& url ); /** Select all contacts in the view. @@ -209,14 +209,14 @@ class KDE_EXPORT KABCore : public KAB::Core @param uids The uids of the contacts, which shall be deleted. */ - void deleteContacts( const QStringList &uids ); + void deleteContacts( const TQStringList &uids ); /** Deletes given distribution lists from the address book. @param uids The names of the distribution lists which shall be deleted. */ - void deleteDistributionLists( const QStringList &names ); + void deleteDistributionLists( const TQStringList &names ); /** @@ -263,9 +263,9 @@ class KDE_EXPORT KABCore : public KAB::Core Search with the current search field for a contact, that matches the given text, and selects it in the view. */ - void incrementalTextSearch( const QString& text ); + void incrementalTextSearch( const TQString& text ); - void incrementalJumpButtonSearch( const QString& characters ); + void incrementalJumpButtonSearch( const TQString& characters ); /** Marks the address book as modified. @@ -291,7 +291,7 @@ class KDE_EXPORT KABCore : public KAB::Core /** DCOP METHOD: Adds the given email address to address book. */ - virtual void addEmail( const QString& addr ); + virtual void addEmail( const TQString& addr ); /** DCOP METHOD: Imports the vCard, located at the given url. @@ -301,7 +301,7 @@ class KDE_EXPORT KABCore : public KAB::Core /** DCOP METHOD: Imports the given vCard. */ - virtual void importVCardFromData( const QString& vCard ); + virtual void importVCardFromData( const TQString& vCard ); /** DCOP METHOD: Opens contact editor to input a new contact. @@ -317,7 +317,7 @@ class KDE_EXPORT KABCore : public KAB::Core DCOP METHOD: Returns the name of the contact, that matches the given phone number. */ - virtual QString getNameByPhone( const QString& phone ); + virtual TQString getNameByPhone( const TQString& phone ); /** DCOP METHOD: Handle command line arguments, return true if handled @@ -332,16 +332,16 @@ class KDE_EXPORT KABCore : public KAB::Core void save(); /** - Shows the edit dialog for the given uid. If the uid is QString::null, + Shows the edit dialog for the given uid. If the uid is TQString::null, the method will try to find a selected addressee in the view. */ - void editContact( const QString &uid = QString::null ); + void editContact( const TQString &uid = TQString::null ); /** * Let the user chose a different resource for the selected contacts. * If the adding to the new resource is successfull, the contact is * removed from the old one, unless the Copy flag is given. */ - void storeContactIn( const QString &uid = QString::null, bool copy = false ); + void storeContactIn( const TQString &uid = TQString::null, bool copy = false ); /** * Lets the user chose a different resource for the selected contacts and @@ -371,9 +371,9 @@ class KDE_EXPORT KABCore : public KAB::Core */ void print(); - void detailsHighlighted( const QString& ); + void detailsHighlighted( const TQString& ); - void showContactsAddress( const QString &uid ); + void showContactsAddress( const TQString &uid ); void configurationChanged(); @@ -388,7 +388,7 @@ class KDE_EXPORT KABCore : public KAB::Core #ifdef KDEPIM_NEW_DISTRLISTS void editDistributionList( const KPIM::DistributionList &list ); - void showDistributionListEntry( const QString &uid ); + void showDistributionListEntry( const TQString &uid ); #endif private slots: @@ -396,27 +396,27 @@ class KDE_EXPORT KABCore : public KAB::Core void setDetailsVisible( bool visible ); void extensionModified( const KABC::Addressee::List &list ); - void extensionDeleted( const QStringList &uidList ); + void extensionDeleted( const TQStringList &uidList ); void clipboardDataChanged(); void updateIncSearchWidget(); - void slotEditorDestroyed( const QString &uid ); + void slotEditorDestroyed( const TQString &uid ); void delayedAddressBookChanged(); void addressBookChanged(); - void categoriesSelected( const QStringList& ); + void categoriesSelected( const TQStringList& ); void editCategories(); void slotClearSearchBar(); void slotContactsUpdated(); - void activateDetailsWidget( QWidget *widget ); - void deactivateDetailsWidget( QWidget *widget ); + void activateDetailsWidget( TQWidget *widget ); + void deactivateDetailsWidget( TQWidget *widget ); - void editDistributionList( const QString &name ); + void editDistributionList( const TQString &name ); void removeSelectedContactsFromDistList(); void editSelectedDistributionList(); - void sendMailToDistributionList( const QString &id ); + void sendMailToDistributionList( const TQString &id ); private: void initGUI(); @@ -424,21 +424,21 @@ class KDE_EXPORT KABCore : public KAB::Core void initActions(); void updateCategories(); - QStringList allCategories() const; + TQStringList allCategories() const; - AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, + AddresseeEditorDialog *createAddresseeEditorDialog( TQWidget *parent, const char *name = 0 ); - QWidget *mWidget; + TQWidget *mWidget; KABC::AddressBook *mAddressBook; KStatusBar *mStatusBar; ViewManager *mViewManager; - QLabel *mViewHeaderLabel; + TQLabel *mViewHeaderLabel; #ifdef KDEPIM_NEW_DISTRLISTS - QString mSelectedDistributionList; - QWidget *mDistListButtonWidget; + TQString mSelectedDistributionList; + TQWidget *mDistListButtonWidget; #endif ExtensionManager *mExtensionManager; @@ -451,20 +451,20 @@ class KDE_EXPORT KABCore : public KAB::Core KPIM::AddresseeView *mDetailsViewer; KPIM::CategorySelectDialog *mCategorySelectDialog; KPIM::CategoryEditDialog *mCategoryEditDialog; - QWidget *mDetailsPage; - QWidget *mDetailsWidget; - QHBoxLayout *mDetailsLayout; - QSplitter *mDetailsSplitter; - QSplitter *mLeftSplitter; - QWidgetStack *mDetailsStack; + TQWidget *mDetailsPage; + TQWidget *mDetailsWidget; + TQHBoxLayout *mDetailsLayout; + TQSplitter *mDetailsSplitter; + TQSplitter *mLeftSplitter; + TQWidgetStack *mDetailsStack; LDAPSearchDialog *mLdapSearchDialog; - QDict<AddresseeEditorDialog> mEditorDict; + TQDict<AddresseeEditorDialog> mEditorDict; bool mReadWrite; bool mModified; bool mIsPart; - QTimer *mAddressBookChangedTimer; + TQTimer *mAddressBookChangedTimer; KAction *mActionPaste; KAction *mActionCut; diff --git a/kaddressbook/kablock.h b/kaddressbook/kablock.h index d75d963af..a90f77c94 100644 --- a/kaddressbook/kablock.h +++ b/kaddressbook/kablock.h @@ -51,7 +51,7 @@ class KABLock private: static KABLock *mSelf; - QMap<KABC::Resource*, LockEntry> mLocks; + TQMap<KABC::Resource*, LockEntry> mLocks; KABC::AddressBook *mAddressBook; }; diff --git a/kaddressbook/kabtools.cpp b/kaddressbook/kabtools.cpp index c3b1d05bc..ba3b886f0 100644 --- a/kaddressbook/kabtools.cpp +++ b/kaddressbook/kabtools.cpp @@ -27,14 +27,14 @@ #include <kdebug.h> #include <ktempdir.h> -#include <qfile.h> +#include <tqfile.h> #include "kabtools.h" -static QString uniqueFileName( const KABC::Addressee &addressee, QStringList &existingFiles ) +static TQString uniqueFileName( const KABC::Addressee &addressee, TQStringList &existingFiles ) { - QString name; - QString uniquePart; + TQString name; + TQString uniquePart; uint number = 0; do { @@ -43,7 +43,7 @@ static QString uniqueFileName( const KABC::Addressee &addressee, QStringList &ex name.replace( '/', '_' ); ++number; - uniquePart = QString( "_%1" ).arg( number ); + uniquePart = TQString( "_%1" ).arg( number ); } while ( existingFiles.contains( name ) ); existingFiles.append( name ); @@ -51,7 +51,7 @@ static QString uniqueFileName( const KABC::Addressee &addressee, QStringList &ex return name; } -void KABTools::mailVCards( const QStringList &uids, KABC::AddressBook *ab ) +void KABTools::mailVCards( const TQStringList &uids, KABC::AddressBook *ab ) { KURL::List urls; @@ -61,29 +61,29 @@ void KABTools::mailVCards( const QStringList &uids, KABC::AddressBook *ab ) return; } - QStringList existingFiles; - QStringList::ConstIterator it( uids.begin() ); - const QStringList::ConstIterator endIt( uids.end() ); + TQStringList existingFiles; + TQStringList::ConstIterator it( uids.begin() ); + const TQStringList::ConstIterator endIt( uids.end() ); for ( ; it != endIt; ++it ) { KABC::Addressee addressee = ab->findByUid( *it ); if ( addressee.isEmpty() ) continue; - QString fileName = uniqueFileName( addressee, existingFiles ); + TQString fileName = uniqueFileName( addressee, existingFiles ); - QString path = tempDir.name() + "/" + fileName; + TQString path = tempDir.name() + "/" + fileName; - QFile file( path ); + TQFile file( path ); if ( file.open( IO_WriteOnly ) ) { KABC::VCardConverter converter; KABC::Addressee::List list; list.append( addressee ); - QString vcard = converter.createVCards( list, KABC::VCardConverter::v3_0 ); + TQString vcard = converter.createVCards( list, KABC::VCardConverter::v3_0 ); - QTextStream t( &file ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream t( &file ); + t.setEncoding( TQTextStream::UnicodeUTF8 ); t << vcard; file.close(); @@ -94,10 +94,10 @@ void KABTools::mailVCards( const QStringList &uids, KABC::AddressBook *ab ) } } - kapp->invokeMailer( QString::null, QString::null, QString::null, - QString::null, - QString::null, - QString::null, + kapp->invokeMailer( TQString::null, TQString::null, TQString::null, + TQString::null, + TQString::null, + TQString::null, urls.toStringList() ); } @@ -147,11 +147,11 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) masterAddressee.setBirthday( (*contactIt).birthday() ); // CATEGORIES - const QStringList categories = (*contactIt).categories(); - const QStringList masterCategories = masterAddressee.categories(); - QStringList newCategories( masterCategories ); - QStringList::ConstIterator it( categories.begin() ); - QStringList::ConstIterator endIt( categories.end() ); + const TQStringList categories = (*contactIt).categories(); + const TQStringList masterCategories = masterAddressee.categories(); + TQStringList newCategories( masterCategories ); + TQStringList::ConstIterator it( categories.begin() ); + TQStringList::ConstIterator endIt( categories.end() ); for ( it = categories.begin(); it != endIt; ++it ) if ( !masterCategories.contains( *it ) ) newCategories.append( *it ); @@ -162,8 +162,8 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) masterAddressee.setSecrecy( (*contactIt).secrecy() ); // EMAIL - const QStringList emails = (*contactIt).emails(); - const QStringList masterEmails = masterAddressee.emails(); + const TQStringList emails = (*contactIt).emails(); + const TQStringList masterEmails = masterAddressee.emails(); endIt = emails.end(); for ( it = emails.begin(); it != endIt; ++it ) if ( !masterEmails.contains( *it ) ) @@ -254,9 +254,9 @@ KABC::Addressee KABTools::mergeContacts( const KABC::Addressee::List &list ) masterAddressee.setUrl( (*contactIt).url() ); // X- - const QStringList customs = (*contactIt).customs(); - const QStringList masterCustoms = masterAddressee.customs(); - QStringList newCustoms( masterCustoms ); + const TQStringList customs = (*contactIt).customs(); + const TQStringList masterCustoms = masterAddressee.customs(); + TQStringList newCustoms( masterCustoms ); endIt = customs.end(); for ( it = customs.begin(); it != endIt; ++it ) if ( !masterCustoms.contains( *it ) ) diff --git a/kaddressbook/kabtools.h b/kaddressbook/kabtools.h index 5cf402925..0d57c65eb 100644 --- a/kaddressbook/kabtools.h +++ b/kaddressbook/kabtools.h @@ -34,7 +34,7 @@ class KABTools /** Sends a mail with vCards as attachments for all given UIDs. */ - static void mailVCards( const QStringList &uids, KABC::AddressBook *ab ); + static void mailVCards( const TQStringList &uids, KABC::AddressBook *ab ); /** Merges all passed contacts to a single one. diff --git a/kaddressbook/kaddressbook_part.cpp b/kaddressbook/kaddressbook_part.cpp index f2a23ec4f..3acb85aab 100644 --- a/kaddressbook/kaddressbook_part.cpp +++ b/kaddressbook/kaddressbook_part.cpp @@ -21,7 +21,7 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> +#include <tqlayout.h> #include <kaction.h> #include <kapplication.h> @@ -42,19 +42,19 @@ typedef KParts::GenericFactory< KAddressbookPart > KAddressbookFactory; K_EXPORT_COMPONENT_FACTORY( libkaddressbookpart, KAddressbookFactory ) -KAddressbookPart::KAddressbookPart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, - const QStringList & ) +KAddressbookPart::KAddressbookPart( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const TQStringList & ) : DCOPObject( "KAddressBookIface" ), KParts::ReadOnlyPart( parent, name ) { setInstance( KAddressbookFactory::instance() ); // create a canvas to insert our widget - QWidget *canvas = new QWidget( parentWidget, widgetName ); - canvas->setFocusPolicy( QWidget::ClickFocus ); + TQWidget *canvas = new TQWidget( parentWidget, widgetName ); + canvas->setFocusPolicy( TQWidget::ClickFocus ); setWidget( canvas ); - QVBoxLayout *topLayout = new QVBoxLayout( canvas ); + TQVBoxLayout *topLayout = new TQVBoxLayout( canvas ); KGlobal::iconLoader()->addAppDir( "kaddressbook" ); @@ -82,7 +82,7 @@ KAboutData *KAddressbookPart::createAboutData() return KABCore::createAboutData(); } -void KAddressbookPart::addEmail( QString addr ) +void KAddressbookPart::addEmail( TQString addr ) { mCore->addEmail( addr ); } @@ -92,12 +92,12 @@ void KAddressbookPart::importVCard( const KURL& url ) mCore->importVCard( url ); } -void KAddressbookPart::importVCardFromData( const QString& vCard ) +void KAddressbookPart::importVCardFromData( const TQString& vCard ) { mCore->importVCardFromData( vCard ); } -ASYNC KAddressbookPart::showContactEditor( QString uid ) +ASYNC KAddressbookPart::showContactEditor( TQString uid ) { mCore->editContact( uid ); } @@ -113,7 +113,7 @@ void KAddressbookPart::newDistributionList() mCore->newDistributionList(); } -QString KAddressbookPart::getNameByPhone( QString phone ) +TQString KAddressbookPart::getNameByPhone( TQString phone ) { return mCore->getNameByPhone( phone ); } @@ -168,11 +168,11 @@ void KAddressbookPart::guiActivateEvent( KParts::GUIActivateEvent *e ) } } -void KAddressbookPart::loadProfile( const QString& ) +void KAddressbookPart::loadProfile( const TQString& ) { } -void KAddressbookPart::saveToProfile( const QString& ) const +void KAddressbookPart::saveToProfile( const TQString& ) const { } diff --git a/kaddressbook/kaddressbook_part.h b/kaddressbook/kaddressbook_part.h index da1fbf6fc..43691f7e4 100644 --- a/kaddressbook/kaddressbook_part.h +++ b/kaddressbook/kaddressbook_part.h @@ -39,22 +39,22 @@ class KAddressbookPart: public KParts::ReadOnlyPart, virtual public KAddressBook Q_OBJECT public: - KAddressbookPart( QWidget *parentWidget, const char *widgetName, - QObject *parent, const char *name, const QStringList& ); + KAddressbookPart( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList& ); virtual ~KAddressbookPart(); static KAboutData *createAboutData(); - virtual void saveToProfile( const QString& path ) const; - virtual void loadProfile( const QString& path ); + virtual void saveToProfile( const TQString& path ) const; + virtual void loadProfile( const TQString& path ); public slots: - virtual void addEmail( QString addr ); + virtual void addEmail( TQString addr ); virtual void importVCard( const KURL& url ); - virtual void importVCardFromData( const QString& vCard ); - virtual ASYNC showContactEditor( QString uid ); + virtual void importVCardFromData( const TQString& vCard ); + virtual ASYNC showContactEditor( TQString uid ); virtual void newContact(); virtual void newDistributionList(); - virtual QString getNameByPhone( QString phone ); + virtual TQString getNameByPhone( TQString phone ); virtual void save(); virtual void exit(); virtual bool openURL( const KURL &url ); diff --git a/kaddressbook/kaddressbookiface.h b/kaddressbook/kaddressbookiface.h index 914cd0299..448955e81 100644 --- a/kaddressbook/kaddressbookiface.h +++ b/kaddressbook/kaddressbookiface.h @@ -26,7 +26,7 @@ #include <dcopobject.h> #include <kurl.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <kdepimmacros.h> class KDE_EXPORT KAddressBookIface : virtual public DCOPObject @@ -34,11 +34,11 @@ class KDE_EXPORT KAddressBookIface : virtual public DCOPObject K_DCOP k_dcop: - virtual void addEmail( QString addr ) = 0; + virtual void addEmail( TQString addr ) = 0; virtual void importVCard( const KURL& url ) = 0; - virtual void importVCardFromData( const QString& vCard ) = 0; + virtual void importVCardFromData( const TQString& vCard ) = 0; - virtual ASYNC showContactEditor( QString uid ) = 0; + virtual ASYNC showContactEditor( TQString uid ) = 0; /** Shows dialog for creation of a new contact. Returns once a contact @@ -55,7 +55,7 @@ class KDE_EXPORT KAddressBookIface : virtual public DCOPObject /** Save changes to the address book files. */ - virtual QString getNameByPhone( QString phone ) = 0; + virtual TQString getNameByPhone( TQString phone ) = 0; virtual void save() = 0; virtual void exit() = 0; @@ -65,8 +65,8 @@ class KDE_EXPORT KAddressBookIface : virtual public DCOPObject */ virtual bool handleCommandLine() = 0; - virtual void loadProfile( const QString& path ) = 0; - virtual void saveToProfile( const QString& path ) const = 0; + virtual void loadProfile( const TQString& path ) = 0; + virtual void saveToProfile( const TQString& path ) const = 0; }; #endif diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp index a3a145b3c..7f521a0c6 100644 --- a/kaddressbook/kaddressbookmain.cpp +++ b/kaddressbook/kaddressbookmain.cpp @@ -34,7 +34,7 @@ #include "kaddressbookmain.h" -KAddressBookMain::KAddressBookMain( const QString &file ) +KAddressBookMain::KAddressBookMain( const TQString &file ) : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 ) { // Set this to be the group leader for all subdialogs - this means @@ -79,7 +79,7 @@ KAddressBookMain::~KAddressBookMain() mCore->saveSettings(); } -void KAddressBookMain::addEmail( QString addr ) +void KAddressBookMain::addEmail( TQString addr ) { mCore->addEmail( addr ); } @@ -89,12 +89,12 @@ void KAddressBookMain::importVCard( const KURL& url ) mCore->importVCard( url ); } -void KAddressBookMain::importVCardFromData( const QString& vCard ) +void KAddressBookMain::importVCardFromData( const TQString& vCard ) { mCore->importVCardFromData( vCard ); } -ASYNC KAddressBookMain::showContactEditor( QString uid ) +ASYNC KAddressBookMain::showContactEditor( TQString uid ) { mCore->editContact( uid ); } @@ -109,7 +109,7 @@ void KAddressBookMain::newContact() mCore->newContact(); } -QString KAddressBookMain::getNameByPhone( QString phone ) +TQString KAddressBookMain::getNameByPhone( TQString phone ) { return mCore->getNameByPhone( phone ); } @@ -144,13 +144,13 @@ bool KAddressBookMain::queryClose() void KAddressBookMain::initActions() { - KStdAction::quit( this, SLOT( close() ), actionCollection() ); + KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() ); KAction *action; - action = KStdAction::keyBindings( this, SLOT( configureKeyBindings() ), actionCollection() ); + action = KStdAction::keyBindings( this, TQT_SLOT( configureKeyBindings() ), actionCollection() ); action->setWhatsThis( i18n( "You will be presented with a dialog, where you can configure the application wide shortcuts." ) ); - KStdAction::configureToolbars( this, SLOT( configureToolbars() ), actionCollection() ); + KStdAction::configureToolbars( this, TQT_SLOT( configureToolbars() ), actionCollection() ); } void KAddressBookMain::configureKeyBindings() @@ -158,11 +158,11 @@ void KAddressBookMain::configureKeyBindings() KKeyDialog::configure( actionCollection(), this ); } -void KAddressBookMain::loadProfile( const QString& ) +void KAddressBookMain::loadProfile( const TQString& ) { } -void KAddressBookMain::saveToProfile( const QString& ) const +void KAddressBookMain::saveToProfile( const TQString& ) const { } @@ -171,8 +171,8 @@ void KAddressBookMain::configureToolbars() saveMainWindowSettings( KGlobal::config(), "MainWindow" ); KEditToolbar edit( factory() ); - connect( &edit, SIGNAL( newToolbarConfig() ), - this, SLOT( newToolbarConfig() ) ); + connect( &edit, TQT_SIGNAL( newToolbarConfig() ), + this, TQT_SLOT( newToolbarConfig() ) ); edit.exec(); } diff --git a/kaddressbook/kaddressbookmain.h b/kaddressbook/kaddressbookmain.h index 8c0e3c726..4c9f69fe6 100644 --- a/kaddressbook/kaddressbookmain.h +++ b/kaddressbook/kaddressbookmain.h @@ -24,7 +24,7 @@ #ifndef KADDRESSBOOKMAIN_H #define KADDRESSBOOKMAIN_H -#include <qptrlist.h> +#include <tqptrlist.h> #include <kaction.h> #include <kapplication.h> @@ -47,17 +47,17 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface Q_OBJECT public: - KAddressBookMain( const QString &file = QString::null ); + KAddressBookMain( const TQString &file = TQString::null ); virtual ~KAddressBookMain(); public slots: - virtual void addEmail( QString addr ); + virtual void addEmail( TQString addr ); virtual void importVCard( const KURL& url ); - virtual void importVCardFromData( const QString& vCard ); - virtual ASYNC showContactEditor( QString uid ); + virtual void importVCardFromData( const TQString& vCard ); + virtual ASYNC showContactEditor( TQString uid ); virtual void newContact(); virtual void newDistributionList(); - virtual QString getNameByPhone( QString phone ); + virtual TQString getNameByPhone( TQString phone ); virtual void save(); virtual void exit(); virtual bool handleCommandLine(); @@ -81,10 +81,10 @@ class KAddressBookMain : public KMainWindow, virtual public KAddressBookIface virtual bool queryClose(); //override - void loadProfile( const QString& path ); + void loadProfile( const TQString& path ); //override - void saveToProfile( const QString& path ) const; + void saveToProfile( const TQString& path ) const; private slots: void configureKeyBindings(); diff --git a/kaddressbook/kaddressbookservice.cpp b/kaddressbook/kaddressbookservice.cpp index 3d8139e65..320e90998 100644 --- a/kaddressbook/kaddressbookservice.cpp +++ b/kaddressbook/kaddressbookservice.cpp @@ -30,7 +30,7 @@ KAddressBookService::KAddressBookService( KAB::Core *core ) { } -void KAddressBookService::importVCardFromData( const QString& vCard ) +void KAddressBookService::importVCardFromData( const TQString& vCard ) { mCore->importVCardFromData( vCard ); } diff --git a/kaddressbook/kaddressbookservice.h b/kaddressbook/kaddressbookservice.h index 004a4733c..ac323f64f 100644 --- a/kaddressbook/kaddressbookservice.h +++ b/kaddressbook/kaddressbookservice.h @@ -40,7 +40,7 @@ class KAddressBookService : virtual public KPIM::AddressBookServiceIface @param vCard The vCard in string representation. */ - void importVCardFromData( const QString& vCard ); + void importVCardFromData( const TQString& vCard ); /** This method will add a vcard to the address book. diff --git a/kaddressbook/kaddressbookview.cpp b/kaddressbook/kaddressbookview.cpp index 72e70675f..28fd81afd 100644 --- a/kaddressbook/kaddressbookview.cpp +++ b/kaddressbook/kaddressbookview.cpp @@ -21,8 +21,8 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> -#include <qpopupmenu.h> +#include <tqlayout.h> +#include <tqpopupmenu.h> #include <kabc/addressbook.h> #include <kabc/distributionlistdialog.h> @@ -37,14 +37,14 @@ #include "kaddressbookview.h" -KAddressBookView::KAddressBookView( KAB::Core *core, QWidget *parent, +KAddressBookView::KAddressBookView( KAB::Core *core, TQWidget *parent, const char *name ) - : QWidget( parent, name ), mCore( core ), mFieldList() + : TQWidget( parent, name ), mCore( core ), mFieldList() { initGUI(); - connect( mCore->searchManager(), SIGNAL( contactsUpdated() ), - SLOT( updateView() ) ); + connect( mCore->searchManager(), TQT_SIGNAL( contactsUpdated() ), + TQT_SLOT( updateView() ) ); } KAddressBookView::~KAddressBookView() @@ -69,20 +69,20 @@ void KAddressBookView::writeConfig( KConfig* ) // Most of writing the config is handled by the ConfigureViewDialog } -QString KAddressBookView::selectedEmails() +TQString KAddressBookView::selectedEmails() { bool first = true; - QString emailAddrs; - const QStringList uidList = selectedUids(); + TQString emailAddrs; + const TQStringList uidList = selectedUids(); KABC::Addressee addr; - QString email; + TQString email; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = uidList.begin(); it != uidList.end(); ++it ) { addr = mCore->addressBook()->findByUid( *it ); if ( !addr.isEmpty() ) { - QString m = QString::null; + TQString m = TQString::null; if ( addr.emails().count() > 1 ) m = KABC::EmailSelector::getEmail( addr.emails(), addr.preferredEmail(), this ); @@ -122,10 +122,10 @@ KABC::Addressee::List KAddressBookView::addressees() void KAddressBookView::initGUI() { // Create the layout - QVBoxLayout *layout = new QVBoxLayout( this ); + TQVBoxLayout *layout = new TQVBoxLayout( this ); // Add the view widget - mViewWidget = new QWidget( this ); + mViewWidget = new TQWidget( this ); layout->addWidget( mViewWidget ); } @@ -144,7 +144,7 @@ KAddressBookView::DefaultFilterType KAddressBookView::defaultFilterType() const return mDefaultFilterType; } -const QString &KAddressBookView::defaultFilterName() const +const TQString &KAddressBookView::defaultFilterName() const { return mDefaultFilterName; } @@ -154,33 +154,33 @@ KAB::Core *KAddressBookView::core() const return mCore; } -void KAddressBookView::popup( const QPoint &point ) +void KAddressBookView::popup( const TQPoint &point ) { if ( !mCore->guiClient() ) { kdWarning() << "No GUI client set!" << endl; return; } - QPopupMenu *menu = static_cast<QPopupMenu*>( mCore->guiClient()->factory()->container( "RMBPopup", + TQPopupMenu *menu = static_cast<TQPopupMenu*>( mCore->guiClient()->factory()->container( "RMBPopup", mCore->guiClient() ) ); if ( menu ) menu->popup( point ); } -QWidget *KAddressBookView::viewWidget() +TQWidget *KAddressBookView::viewWidget() { return mViewWidget; } void KAddressBookView::updateView() { - const QStringList uidList = selectedUids(); + const TQStringList uidList = selectedUids(); refresh(); // This relists and deselects everything, in all views if ( !uidList.isEmpty() ) { // Keep previous selection - QStringList::ConstIterator it, uidListEnd( uidList.end() ); + TQStringList::ConstIterator it, uidListEnd( uidList.end() ); for ( it = uidList.begin(); it != uidListEnd; ++it ) setSelected( *it, true ); @@ -189,12 +189,12 @@ void KAddressBookView::updateView() if ( !contacts.isEmpty() ) setFirstSelected( true ); else - emit selected( QString::null ); + emit selected( TQString::null ); } } ViewConfigureWidget *ViewFactory::configureWidget( KABC::AddressBook *ab, - QWidget *parent, + TQWidget *parent, const char *name ) { return new ViewConfigureWidget( ab, parent, name ); diff --git a/kaddressbook/kaddressbookview.h b/kaddressbook/kaddressbookview.h index 89ddca944..eb5e25156 100644 --- a/kaddressbook/kaddressbookview.h +++ b/kaddressbook/kaddressbookview.h @@ -26,8 +26,8 @@ #define KAB_VIEW_PLUGIN_VERSION 1 -#include <qstringlist.h> -#include <qwidget.h> +#include <tqstringlist.h> +#include <tqwidget.h> #include <kabc/field.h> #include <klibloader.h> @@ -60,14 +60,14 @@ class KDE_EXPORT KAddressBookView : public QWidget public: enum DefaultFilterType { None = 0, Active = 1, Specific = 2 }; - KAddressBookView( KAB::Core *core, QWidget *parent, const char *name ); + KAddressBookView( KAB::Core *core, TQWidget *parent, const char *name ); virtual ~KAddressBookView(); /** Must be overloaded in subclasses. Should return a list of all the uids of selected contacts. */ - virtual QStringList selectedUids() = 0; + virtual TQStringList selectedUids() = 0; /** Called whenever this view should read the config. This can be used @@ -98,17 +98,17 @@ class KDE_EXPORT KAddressBookView : public QWidget virtual void writeConfig( KConfig * ); /** - Returns a QString with all the selected email addresses concatenated + Returns a TQString with all the selected email addresses concatenated together with a ',' seperator. */ - virtual QString selectedEmails(); + virtual TQString selectedEmails(); /** Return the type of the view: Icon, Table, etc. Please make sure that this is the same value that ViewWrapper::type() will return for your view. */ - virtual QString type() const = 0; + virtual TQString type() const = 0; /** Returns a list of the fields that should be displayed. The list @@ -141,7 +141,7 @@ class KDE_EXPORT KAddressBookView : public QWidget @return The name of the default filter. This string is only valid if defaultFilterType() is returning SpecificFilter. */ - const QString &defaultFilterName() const; + const TQString &defaultFilterName() const; /** @return The Core object. @@ -164,14 +164,14 @@ class KDE_EXPORT KAddressBookView : public QWidget addressee with uid needs to be refreshed. This is an optimization only. */ - virtual void refresh( const QString &uid = QString() ) = 0; + virtual void refresh( const TQString &uid = TQString() ) = 0; /** This method must be overloaded in subclasses. Select (highlight) the addressee matching <i>uid</i>. If uid - is equal to QString::null, then all addressees should be selected. + is equal to TQString::null, then all addressees should be selected. */ - virtual void setSelected( const QString &uid = QString(), bool selected = true ) = 0; + virtual void setSelected( const TQString &uid = TQString(), bool selected = true ) = 0; /** Selects the first contact in the view. @@ -183,7 +183,7 @@ class KDE_EXPORT KAddressBookView : public QWidget @param point The position where the menu shall appear. */ - void popup( const QPoint &point ); + void popup( const TQPoint &point ); signals: /** @@ -203,7 +203,7 @@ class KDE_EXPORT KAddressBookView : public QWidget @see KListView */ - void selected( const QString &uid ); + void selected( const TQString &uid ); /** This signal should be emitted by a subclass whenever an addressee @@ -214,12 +214,12 @@ class KDE_EXPORT KAddressBookView : public QWidget @see KListView */ - void executed( const QString &uid ); + void executed( const TQString &uid ); /** This signal is emitted whenever a user attempts to start a drag in the view. The slot connected to this signal would usually want - to create a QDragObject. + to create a TQDragObject. */ void startDrag(); @@ -228,7 +228,7 @@ class KDE_EXPORT KAddressBookView : public QWidget view. The individual view should handle checking if the item is droppable (ie: if it is a vcard). */ - void dropped( QDropEvent* ); + void dropped( TQDropEvent* ); /** This signal is emitted whenever the sort field changed. @@ -255,7 +255,7 @@ class KDE_EXPORT KAddressBookView : public QWidget 'this', the view subclass has the option of placing other widgets around the view (ie: search fields, etc). Do not delete this widget! */ - QWidget *viewWidget(); + TQWidget *viewWidget(); private slots: void updateView(); @@ -265,30 +265,30 @@ class KDE_EXPORT KAddressBookView : public QWidget DefaultFilterType mDefaultFilterType; Filter mFilter; - QString mDefaultFilterName; + TQString mDefaultFilterName; KAB::Core *mCore; KABC::Field::List mFieldList; - QWidget *mViewWidget; + TQWidget *mViewWidget; }; class KDE_EXPORT ViewFactory : public KLibFactory { public: - virtual KAddressBookView *view( KAB::Core *core, QWidget *parent, + virtual KAddressBookView *view( KAB::Core *core, TQWidget *parent, const char *name = 0 ) = 0; /** @return The type of the view. This is normally a small one word string (ie: Table, Icon, Tree, etc). */ - virtual QString type() const = 0; + virtual TQString type() const = 0; /** @return The description of the view. This should be a 3 to 4 line string (don't actually use return characters in the string) describing the features offered by the view. */ - virtual QString description() const = 0; + virtual TQString description() const = 0; /** Creates a config dialog for the view type. The default @@ -300,12 +300,12 @@ class KDE_EXPORT ViewFactory : public KLibFactory <B>not</B> be called. */ virtual ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, - QWidget *parent, + TQWidget *parent, const char *name = 0 ); protected: - virtual QObject* createObject( QObject*, const char*, const char*, - const QStringList & ) + virtual TQObject* createObject( TQObject*, const char*, const char*, + const TQStringList & ) { return 0; } diff --git a/kaddressbook/kcmconfigs/addhostdialog.cpp b/kaddressbook/kcmconfigs/addhostdialog.cpp index b3eb60bcf..14abca147 100644 --- a/kaddressbook/kcmconfigs/addhostdialog.cpp +++ b/kaddressbook/kcmconfigs/addhostdialog.cpp @@ -21,11 +21,11 @@ without including the source code for Qt in the source distribution. */ -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qspinbox.h> -#include <qtooltip.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqspinbox.h> +#include <tqtooltip.h> #include <kaccelmanager.h> #include <kbuttonbox.h> @@ -33,13 +33,13 @@ #include <klocale.h> #include "addhostdialog.h" -AddHostDialog::AddHostDialog( KPIM::LdapServer *server, QWidget* parent, const char* name ) +AddHostDialog::AddHostDialog( KPIM::LdapServer *server, TQWidget* parent, const char* name ) : KDialogBase( Plain, i18n( "Add Host" ), Ok | Cancel, Ok, parent, name, true, true ) { mServer = server; - QWidget *page = plainPage(); - QHBoxLayout *layout = new QHBoxLayout( page, marginHint(), spacingHint() ); + TQWidget *page = plainPage(); + TQHBoxLayout *layout = new TQHBoxLayout( page, marginHint(), spacingHint() ); mCfg = new KABC::LdapConfigWidget( KABC::LdapConfigWidget::W_USER | @@ -98,7 +98,7 @@ AddHostDialog::~AddHostDialog() { } -void AddHostDialog::slotHostEditChanged( const QString &text ) +void AddHostDialog::slotHostEditChanged( const TQString &text ) { enableButtonOK( !text.isEmpty() ); } diff --git a/kaddressbook/kcmconfigs/addhostdialog.h b/kaddressbook/kcmconfigs/addhostdialog.h index 84f5a0c9e..12d145f08 100644 --- a/kaddressbook/kcmconfigs/addhostdialog.h +++ b/kaddressbook/kcmconfigs/addhostdialog.h @@ -37,14 +37,14 @@ class AddHostDialog : public KDialogBase Q_OBJECT public: - AddHostDialog( KPIM::LdapServer* server, QWidget* parent = 0, const char* name = 0 ); + AddHostDialog( KPIM::LdapServer* server, TQWidget* parent = 0, const char* name = 0 ); ~AddHostDialog(); signals: void changed( bool ); private slots: - void slotHostEditChanged( const QString& ); + void slotHostEditChanged( const TQString& ); virtual void slotOk(); private: KABC::LdapConfigWidget *mCfg; diff --git a/kaddressbook/kcmconfigs/addresseewidget.cpp b/kaddressbook/kcmconfigs/addresseewidget.cpp index 610b94b80..1c074d397 100644 --- a/kaddressbook/kcmconfigs/addresseewidget.cpp +++ b/kaddressbook/kcmconfigs/addresseewidget.cpp @@ -21,12 +21,12 @@ without including the source code for Qt in the source distribution. */ -#include <qcstring.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistbox.h> -#include <qpushbutton.h> +#include <tqcstring.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> #include <dcopclient.h> @@ -40,26 +40,26 @@ #include "addresseewidget.h" -NamePartWidget::NamePartWidget( const QString &title, const QString &label, - QWidget *parent, const char *name ) - : QWidget( parent, name ), mTitle( title ), mLabel( label ) +NamePartWidget::NamePartWidget( const TQString &title, const TQString &label, + TQWidget *parent, const char *name ) + : TQWidget( parent, name ), mTitle( title ), mLabel( label ) { - QHBoxLayout *layout = new QHBoxLayout( this ); + TQHBoxLayout *layout = new TQHBoxLayout( this ); - QGroupBox *group = new QGroupBox( 0, Qt::Vertical, title, this ); - QGridLayout *groupLayout = new QGridLayout( group->layout(), 2, 2, + TQGroupBox *group = new TQGroupBox( 0, Qt::Vertical, title, this ); + TQGridLayout *groupLayout = new TQGridLayout( group->layout(), 2, 2, KDialog::spacingHint() ); - mBox = new QListBox( group ); - connect( mBox, SIGNAL( selectionChanged( QListBoxItem* ) ), - SLOT( selectionChanged( QListBoxItem* ) ) ); + mBox = new TQListBox( group ); + connect( mBox, TQT_SIGNAL( selectionChanged( TQListBoxItem* ) ), + TQT_SLOT( selectionChanged( TQListBoxItem* ) ) ); groupLayout->addWidget( mBox, 0, 0 ); KButtonBox *bbox = new KButtonBox( group, Qt::Vertical ); - mAddButton = bbox->addButton( i18n( "Add..." ), this, SLOT( add() ) ); - mEditButton = bbox->addButton( i18n( "Edit..." ), this, SLOT( edit() ) ); + mAddButton = bbox->addButton( i18n( "Add..." ), this, TQT_SLOT( add() ) ); + mEditButton = bbox->addButton( i18n( "Edit..." ), this, TQT_SLOT( edit() ) ); mEditButton->setEnabled( false ); - mRemoveButton = bbox->addButton( i18n( "Remove" ), this, SLOT( remove() ) ); + mRemoveButton = bbox->addButton( i18n( "Remove" ), this, TQT_SLOT( remove() ) ); mRemoveButton->setEnabled( false ); bbox->layout(); groupLayout->addWidget( bbox, 0, 1 ); @@ -71,15 +71,15 @@ NamePartWidget::~NamePartWidget() { } -void NamePartWidget::setNameParts( const QStringList &list ) +void NamePartWidget::setNameParts( const TQStringList &list ) { mBox->clear(); mBox->insertStringList( list ); } -QStringList NamePartWidget::nameParts() const +TQStringList NamePartWidget::nameParts() const { - QStringList parts; + TQStringList parts; for ( uint i = 0; i < mBox->count(); ++i ) parts.append( mBox->text( i ) ); @@ -90,8 +90,8 @@ void NamePartWidget::add() { bool ok; - QString namePart = KInputDialog::getText( i18n( "New" ), mLabel, - QString::null, &ok ); + TQString namePart = KInputDialog::getText( i18n( "New" ), mLabel, + TQString::null, &ok ); if ( ok && !namePart.isEmpty() ) { mBox->insertItem( namePart ); emit modified(); @@ -106,7 +106,7 @@ void NamePartWidget::edit() if ( index == -1 ) return; - QString namePart = KInputDialog::getText( i18n( "Edit" ), mLabel, + TQString namePart = KInputDialog::getText( i18n( "Edit" ), mLabel, mBox->text( index ), &ok ); if ( ok && !namePart.isEmpty() ) { mBox->changeItem( namePart, index ); @@ -123,7 +123,7 @@ void NamePartWidget::remove() emit modified(); } -void NamePartWidget::selectionChanged( QListBoxItem *item ) +void NamePartWidget::selectionChanged( TQListBoxItem *item ) { mEditButton->setEnabled( item != 0 ); mRemoveButton->setEnabled( item != 0 ); @@ -131,10 +131,10 @@ void NamePartWidget::selectionChanged( QListBoxItem *item ) -AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +AddresseeWidget::AddresseeWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - QGridLayout *layout = new QGridLayout( this, 2, 3, KDialog::marginHint(), + TQGridLayout *layout = new TQGridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint() ); mPrefix = new NamePartWidget( i18n( "Prefixes"), i18n( "Enter prefix:" ), this ); @@ -146,7 +146,7 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) mSuffix = new NamePartWidget( i18n( "Suffixes" ), i18n( "Enter suffix:" ), this ); layout->addWidget( mSuffix, 0, 2 ); - QLabel *label = new QLabel( i18n( "Default formatted name:" ), this ); + TQLabel *label = new TQLabel( i18n( "Default formatted name:" ), this ); layout->addWidget( label, 1, 0 ); mFormattedNameCombo = new KComboBox( this ); @@ -157,10 +157,10 @@ AddresseeWidget::AddresseeWidget( QWidget *parent, const char *name ) mFormattedNameCombo->insertItem( i18n( "Reverse Name" ) ); layout->addMultiCellWidget( mFormattedNameCombo, 1, 1, 1, 2 ); - connect( mPrefix, SIGNAL( modified() ), SIGNAL( modified() ) ); - connect( mInclusion, SIGNAL( modified() ), SIGNAL( modified() ) ); - connect( mSuffix, SIGNAL( modified() ), SIGNAL( modified() ) ); - connect( mFormattedNameCombo, SIGNAL( activated( int ) ), SIGNAL( modified() ) ); + connect( mPrefix, TQT_SIGNAL( modified() ), TQT_SIGNAL( modified() ) ); + connect( mInclusion, TQT_SIGNAL( modified() ), TQT_SIGNAL( modified() ) ); + connect( mSuffix, TQT_SIGNAL( modified() ), TQT_SIGNAL( modified() ) ); + connect( mFormattedNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( modified() ) ); } AddresseeWidget::~AddresseeWidget() @@ -196,7 +196,7 @@ void AddresseeWidget::saveSettings() DCOPClient *client = DCOPClient::mainClient(); if ( client ) - client->emitDCOPSignal( "KABC::AddressBookConfig", "changed()", QByteArray() ); + client->emitDCOPSignal( "KABC::AddressBookConfig", "changed()", TQByteArray() ); } #include "addresseewidget.moc" diff --git a/kaddressbook/kcmconfigs/addresseewidget.h b/kaddressbook/kcmconfigs/addresseewidget.h index c942ee42b..9f4b4332a 100644 --- a/kaddressbook/kcmconfigs/addresseewidget.h +++ b/kaddressbook/kcmconfigs/addresseewidget.h @@ -24,7 +24,7 @@ #ifndef ADDRESSEEWIDGET_H #define ADDRESSEEWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> class KComboBox; class KLineEdit; @@ -38,12 +38,12 @@ class NamePartWidget : public QWidget Q_OBJECT public: - NamePartWidget( const QString &title, const QString &label, QWidget *parent, + NamePartWidget( const TQString &title, const TQString &label, TQWidget *parent, const char *name = 0 ); ~NamePartWidget(); - void setNameParts( const QStringList &list ); - QStringList nameParts() const; + void setNameParts( const TQStringList &list ); + TQStringList nameParts() const; signals: void modified(); @@ -53,16 +53,16 @@ class NamePartWidget : public QWidget void edit(); void remove(); - void selectionChanged( QListBoxItem* ); + void selectionChanged( TQListBoxItem* ); private: - QListBox *mBox; - QPushButton *mAddButton; - QPushButton *mEditButton; - QPushButton *mRemoveButton; + TQListBox *mBox; + TQPushButton *mAddButton; + TQPushButton *mEditButton; + TQPushButton *mRemoveButton; - QString mTitle; - QString mLabel; + TQString mTitle; + TQString mLabel; }; class AddresseeWidget : public QWidget @@ -70,7 +70,7 @@ class AddresseeWidget : public QWidget Q_OBJECT public: - AddresseeWidget( QWidget *parent, const char *name = 0 ); + AddresseeWidget( TQWidget *parent, const char *name = 0 ); ~AddresseeWidget(); void restoreSettings(); diff --git a/kaddressbook/kcmconfigs/extensionconfigdialog.cpp b/kaddressbook/kcmconfigs/extensionconfigdialog.cpp index 70a8d1afc..80f73f469 100644 --- a/kaddressbook/kcmconfigs/extensionconfigdialog.cpp +++ b/kaddressbook/kcmconfigs/extensionconfigdialog.cpp @@ -21,7 +21,7 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> @@ -30,12 +30,12 @@ #include "extensionwidget.h" ExtensionConfigDialog::ExtensionConfigDialog( KAB::ExtensionFactory *factory, KConfig *config, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "Extension Settings" ), Ok | Cancel, Ok, parent, name, true, true ), mWidget( 0 ), mConfig( config ) { - QFrame *page = plainPage(); - QGridLayout *layout = new QGridLayout( page, 1, 1, marginHint(), spacingHint() ); + TQFrame *page = plainPage(); + TQGridLayout *layout = new TQGridLayout( page, 1, 1, marginHint(), spacingHint() ); mWidget = factory->configureWidget( page, "ExtensionConfigWidget" ); layout->addWidget( mWidget, 0, 0 ); diff --git a/kaddressbook/kcmconfigs/extensionconfigdialog.h b/kaddressbook/kcmconfigs/extensionconfigdialog.h index 1547647a9..34339fa01 100644 --- a/kaddressbook/kcmconfigs/extensionconfigdialog.h +++ b/kaddressbook/kcmconfigs/extensionconfigdialog.h @@ -38,7 +38,7 @@ class ExtensionConfigDialog : public KDialogBase public: ExtensionConfigDialog( KAB::ExtensionFactory *factory, KConfig *config, - QWidget *parent, const char *name = 0 ); + TQWidget *parent, const char *name = 0 ); ~ExtensionConfigDialog(); protected slots: diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.cpp b/kaddressbook/kcmconfigs/kabconfigwidget.cpp index 7c57a926c..e4fea7409 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.cpp +++ b/kaddressbook/kcmconfigs/kabconfigwidget.cpp @@ -21,16 +21,16 @@ without including the source code for Qt in the source distribution. */ -#include <qcheckbox.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qtabwidget.h> -#include <qtooltip.h> -#include <qcombobox.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqtabwidget.h> +#include <tqtooltip.h> +#include <tqcombobox.h> #include <kconfig.h> #include <kdebug.h> @@ -45,31 +45,31 @@ #include "kabconfigwidget.h" -KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +KABConfigWidget::KABConfigWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - QVBoxLayout *topLayout = new QVBoxLayout( this, 0, + TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); - QTabWidget *tabWidget = new QTabWidget( this ); + TQTabWidget *tabWidget = new TQTabWidget( this ); topLayout->addWidget( tabWidget ); // General page - QWidget *generalPage = new QWidget( this ); - QVBoxLayout *layout = new QVBoxLayout( generalPage, KDialog::marginHint(), + TQWidget *generalPage = new TQWidget( this ); + TQVBoxLayout *layout = new TQVBoxLayout( generalPage, KDialog::marginHint(), KDialog::spacingHint() ); - QGroupBox *groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "General" ), generalPage ); - QBoxLayout *boxLayout = new QVBoxLayout( groupBox->layout() ); + TQGroupBox *groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "General" ), generalPage ); + TQBoxLayout *boxLayout = new TQVBoxLayout( groupBox->layout() ); boxLayout->setAlignment( Qt::AlignTop ); - mViewsSingleClickBox = new QCheckBox( i18n( "Honor KDE single click" ), groupBox, "msingle" ); + mViewsSingleClickBox = new TQCheckBox( i18n( "Honor KDE single click" ), groupBox, "msingle" ); boxLayout->addWidget( mViewsSingleClickBox ); - mNameParsing = new QCheckBox( i18n( "Automatic name parsing for new addressees" ), groupBox, "mparse" ); + mNameParsing = new TQCheckBox( i18n( "Automatic name parsing for new addressees" ), groupBox, "mparse" ); boxLayout->addWidget( mNameParsing ); - mTradeAsFamilyName = new QCheckBox( i18n( "Trade single name component as family name" ), groupBox, "mtrade" ); + mTradeAsFamilyName = new TQCheckBox( i18n( "Trade single name component as family name" ), groupBox, "mtrade" ); boxLayout->addWidget( mTradeAsFamilyName ); /** TODO: show the checkbox when we can compile agains kdelibs from HEAD, atm it @@ -77,15 +77,15 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name ) */ mTradeAsFamilyName->hide(); - mLimitContactDisplay = new QCheckBox( i18n( "Limit unfiltered display to 100 contacts" ), groupBox, "mlimit" ); + mLimitContactDisplay = new TQCheckBox( i18n( "Limit unfiltered display to 100 contacts" ), groupBox, "mlimit" ); boxLayout->addWidget( mLimitContactDisplay ); - QBoxLayout *editorLayout = new QHBoxLayout( boxLayout, KDialog::spacingHint() ); + TQBoxLayout *editorLayout = new TQHBoxLayout( boxLayout, KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Addressee editor type:" ), groupBox ); + TQLabel *label = new TQLabel( i18n( "Addressee editor type:" ), groupBox ); editorLayout->addWidget( label ); - mEditorCombo = new QComboBox( groupBox ); + mEditorCombo = new TQComboBox( groupBox ); mEditorCombo->insertItem( i18n( "Full Editor" ) ); mEditorCombo->insertItem( i18n( "Simple Editor" ) ); label->setBuddy( mEditorCombo ); @@ -96,29 +96,29 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name ) layout->addWidget( groupBox ); - groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Script-Hooks" ), generalPage ); - QGridLayout *grid = new QGridLayout( groupBox->layout(), 3, 2, + groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Script-Hooks" ), generalPage ); + TQGridLayout *grid = new TQGridLayout( groupBox->layout(), 3, 2, KDialog::spacingHint() ); - label = new QLabel( i18n( "Phone:" ), groupBox ); + label = new TQLabel( i18n( "Phone:" ), groupBox ); grid->addWidget( label, 0, 0 ); - mPhoneHook = new QLineEdit( groupBox ); - QToolTip::add( mPhoneHook, i18n( "<ul><li>%N: Phone Number</li></ul>" ) ); + mPhoneHook = new TQLineEdit( groupBox ); + TQToolTip::add( mPhoneHook, i18n( "<ul><li>%N: Phone Number</li></ul>" ) ); grid->addWidget( mPhoneHook, 0, 1 ); - label = new QLabel( i18n( "Fax:" ), groupBox ); + label = new TQLabel( i18n( "Fax:" ), groupBox ); grid->addWidget( label, 1, 0 ); - mFaxHook = new QLineEdit( groupBox ); - QToolTip::add( mFaxHook, i18n( "<ul><li>%N: Fax Number</li></ul>" ) ); + mFaxHook = new TQLineEdit( groupBox ); + TQToolTip::add( mFaxHook, i18n( "<ul><li>%N: Fax Number</li></ul>" ) ); grid->addWidget( mFaxHook, 1, 1 ); - label = new QLabel( i18n( "SMS Text:" ), groupBox ); + label = new TQLabel( i18n( "SMS Text:" ), groupBox ); grid->addWidget( label, 2, 0 ); - mSMSHook = new QLineEdit( groupBox ); - QToolTip::add( mSMSHook, i18n( "<ul><li>%N: Phone Number</li><li>%F: File containing the text message(s)</li></ul>" ) ); + mSMSHook = new TQLineEdit( groupBox ); + TQToolTip::add( mSMSHook, i18n( "<ul><li>%N: Phone Number</li><li>%F: File containing the text message(s)</li></ul>" ) ); grid->addWidget( mSMSHook, 2, 1 ); @@ -126,13 +126,13 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name ) layout->addWidget( groupBox ); - groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Location Map" ), generalPage ); - boxLayout = new QVBoxLayout( groupBox->layout(), KDialog::spacingHint() ); + groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Location Map" ), generalPage ); + boxLayout = new TQVBoxLayout( groupBox->layout(), KDialog::spacingHint() ); boxLayout->setAlignment( Qt::AlignTop ); - mLocationMapURL = new QComboBox( true, groupBox ); - mLocationMapURL->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) ); - QToolTip::add( mLocationMapURL, i18n( "<ul> <li>%s: Street</li>" + mLocationMapURL = new TQComboBox( true, groupBox ); + mLocationMapURL->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); + TQToolTip::add( mLocationMapURL, i18n( "<ul> <li>%s: Street</li>" "<li>%r: Region</li>" "<li>%l: Location</li>" "<li>%z: Zip Code</li>" @@ -141,22 +141,22 @@ KABConfigWidget::KABConfigWidget( QWidget *parent, const char *name ) boxLayout->addWidget( mLocationMapURL ); layout->addWidget( groupBox ); - connect( mNameParsing, SIGNAL( toggled( bool ) ), SLOT( modified() ) ); - connect( mViewsSingleClickBox, SIGNAL( toggled( bool ) ), SLOT( modified() ) ); - connect( mTradeAsFamilyName, SIGNAL( toggled( bool ) ), SLOT( modified() ) ); - connect( mLimitContactDisplay, SIGNAL( toggled( bool ) ), SLOT( modified() ) ); - connect( mPhoneHook, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); - connect( mSMSHook, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); - connect( mFaxHook, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); - connect( mLocationMapURL, SIGNAL( textChanged( const QString& ) ), SLOT( modified() ) ); - connect( mEditorCombo, SIGNAL( activated( int ) ), SLOT( modified() ) ); + connect( mNameParsing, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( modified() ) ); + connect( mViewsSingleClickBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( modified() ) ); + connect( mTradeAsFamilyName, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( modified() ) ); + connect( mLimitContactDisplay, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( modified() ) ); + connect( mPhoneHook, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) ); + connect( mSMSHook, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) ); + connect( mFaxHook, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) ); + connect( mLocationMapURL, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( modified() ) ); + connect( mEditorCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( modified() ) ); tabWidget->addTab( generalPage, i18n( "General" ) ); // Addressee page mAddresseeWidget = new AddresseeWidget( this ); tabWidget->addTab( mAddresseeWidget, i18n( "Contact" ) ); - connect( mAddresseeWidget, SIGNAL( modified() ), SLOT( modified() ) ); + connect( mAddresseeWidget, TQT_SIGNAL( modified() ), TQT_SLOT( modified() ) ); } void KABConfigWidget::restoreSettings() diff --git a/kaddressbook/kcmconfigs/kabconfigwidget.h b/kaddressbook/kcmconfigs/kabconfigwidget.h index 72b3e88f3..3e5718690 100644 --- a/kaddressbook/kcmconfigs/kabconfigwidget.h +++ b/kaddressbook/kcmconfigs/kabconfigwidget.h @@ -24,7 +24,7 @@ #ifndef KABCONFIGWIDGET_H #define KABCONFIGWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> class QCheckBox; class QLineEdit; @@ -41,7 +41,7 @@ class KABConfigWidget : public QWidget Q_OBJECT public: - KABConfigWidget( QWidget *parent, const char *name = 0 ); + KABConfigWidget( TQWidget *parent, const char *name = 0 ); void restoreSettings(); void saveSettings(); @@ -54,15 +54,15 @@ class KABConfigWidget : public QWidget void modified(); private: - QCheckBox *mNameParsing; - QCheckBox *mViewsSingleClickBox; - QCheckBox *mTradeAsFamilyName; - QComboBox *mEditorCombo; - QLineEdit *mPhoneHook; - QLineEdit *mFaxHook; - QLineEdit *mSMSHook; - QCheckBox *mLimitContactDisplay; - QComboBox *mLocationMapURL; + TQCheckBox *mNameParsing; + TQCheckBox *mViewsSingleClickBox; + TQCheckBox *mTradeAsFamilyName; + TQComboBox *mEditorCombo; + TQLineEdit *mPhoneHook; + TQLineEdit *mFaxHook; + TQLineEdit *mSMSHook; + TQCheckBox *mLimitContactDisplay; + TQComboBox *mLocationMapURL; AddresseeWidget *mAddresseeWidget; }; diff --git a/kaddressbook/kcmconfigs/kcmkabconfig.cpp b/kaddressbook/kcmconfigs/kcmkabconfig.cpp index 97fee4661..6b516249a 100644 --- a/kaddressbook/kcmconfigs/kcmkabconfig.cpp +++ b/kaddressbook/kcmconfigs/kcmkabconfig.cpp @@ -21,7 +21,7 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> +#include <tqlayout.h> #include <kaboutdata.h> #include <kdebug.h> @@ -35,19 +35,19 @@ extern "C" { - KDE_EXPORT KCModule *create_kabconfig( QWidget *parent, const char * ) { + KDE_EXPORT KCModule *create_kabconfig( TQWidget *parent, const char * ) { return new KCMKabConfig( parent, "kcmkabconfig" ); } } -KCMKabConfig::KCMKabConfig( QWidget *parent, const char *name ) +KCMKabConfig::KCMKabConfig( TQWidget *parent, const char *name ) : KCModule( parent, name ) { - QVBoxLayout *layout = new QVBoxLayout( this ); + TQVBoxLayout *layout = new TQVBoxLayout( this ); mConfigWidget = new KABConfigWidget( this, "mConfigWidget" ); layout->addWidget( mConfigWidget ); - connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) ); + connect( mConfigWidget, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool ) ) ); load(); diff --git a/kaddressbook/kcmconfigs/kcmkabconfig.h b/kaddressbook/kcmconfigs/kcmkabconfig.h index a42dff08b..5ffecea50 100644 --- a/kaddressbook/kcmconfigs/kcmkabconfig.h +++ b/kaddressbook/kcmconfigs/kcmkabconfig.h @@ -33,7 +33,7 @@ class KCMKabConfig : public KCModule Q_OBJECT public: - KCMKabConfig( QWidget *parent = 0, const char *name = 0 ); + KCMKabConfig( TQWidget *parent = 0, const char *name = 0 ); virtual void load(); virtual void save(); diff --git a/kaddressbook/kcmconfigs/kcmkabcustomfields.cpp b/kaddressbook/kcmconfigs/kcmkabcustomfields.cpp index 0c70b08bd..3b127eab2 100644 --- a/kaddressbook/kcmconfigs/kcmkabcustomfields.cpp +++ b/kaddressbook/kcmconfigs/kcmkabcustomfields.cpp @@ -27,51 +27,51 @@ #include <kstandarddirs.h> -#include <qregexp.h> +#include <tqregexp.h> #include <kdepimmacros.h> extern "C" { - KDE_EXPORT KCModule *create_kabcustomfields( QWidget *parent, const char * ) { + KDE_EXPORT KCModule *create_kabcustomfields( TQWidget *parent, const char * ) { return new KCMKabCustomFields( parent, "kcmkabcustomfields" ); } } -KCMKabCustomFields::KCMKabCustomFields( QWidget *parent, const char *name ) +KCMKabCustomFields::KCMKabCustomFields( TQWidget *parent, const char *name ) : KCMDesignerFields( parent, name ) { } -QString KCMKabCustomFields::localUiDir() +TQString KCMKabCustomFields::localUiDir() { return kabLocalDir() + "contacteditorpages/"; } -QString KCMKabCustomFields::uiPath() +TQString KCMKabCustomFields::uiPath() { return "kaddressbook/contacteditorpages/"; } -void KCMKabCustomFields::writeActivePages( const QStringList &activePages ) +void KCMKabCustomFields::writeActivePages( const TQStringList &activePages ) { KABPrefs::instance()->setAdvancedCustomFields( activePages ); KABPrefs::instance()->writeConfig(); } -QStringList KCMKabCustomFields::readActivePages() +TQStringList KCMKabCustomFields::readActivePages() { return KABPrefs::instance()->advancedCustomFields(); } -QString KCMKabCustomFields::applicationName() +TQString KCMKabCustomFields::applicationName() { return "KADDRESSBOOK"; } -QString KCMKabCustomFields::kabLocalDir() +TQString KCMKabCustomFields::kabLocalDir() { - QStringList kabdirs = locateLocal("data", "kaddressbook/"); - return kabdirs.grep( QRegExp( "^"+KGlobal::dirs()->localkdedir() ) ).first(); + TQStringList kabdirs = locateLocal("data", "kaddressbook/"); + return kabdirs.grep( TQRegExp( "^"+KGlobal::dirs()->localkdedir() ) ).first(); } diff --git a/kaddressbook/kcmconfigs/kcmkabcustomfields.h b/kaddressbook/kcmconfigs/kcmkabcustomfields.h index 1501c42ed..38cd19a98 100644 --- a/kaddressbook/kcmconfigs/kcmkabcustomfields.h +++ b/kaddressbook/kcmconfigs/kcmkabcustomfields.h @@ -28,16 +28,16 @@ class KCMKabCustomFields : public KPIM::KCMDesignerFields { public: - KCMKabCustomFields( QWidget *parent = 0, const char *name = 0 ); + KCMKabCustomFields( TQWidget *parent = 0, const char *name = 0 ); protected: - QString localUiDir(); - QString uiPath(); - void writeActivePages( const QStringList & ); - QStringList readActivePages(); - QString applicationName(); + TQString localUiDir(); + TQString uiPath(); + void writeActivePages( const TQStringList & ); + TQStringList readActivePages(); + TQString applicationName(); - QString kabLocalDir(); + TQString kabLocalDir(); }; #endif diff --git a/kaddressbook/kcmconfigs/kcmkabldapconfig.cpp b/kaddressbook/kcmconfigs/kcmkabldapconfig.cpp index 48c83a543..e899198b5 100644 --- a/kaddressbook/kcmconfigs/kcmkabldapconfig.cpp +++ b/kaddressbook/kcmconfigs/kcmkabldapconfig.cpp @@ -21,9 +21,9 @@ without including the source code for Qt in the source distribution. */ -#include <qcheckbox.h> -#include <qframe.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqframe.h> +#include <tqlayout.h> #include <kaboutdata.h> #include <klocale.h> @@ -36,19 +36,19 @@ extern "C" { - KDE_EXPORT KCModule *create_kabldapconfig( QWidget *parent, const char * ) { + KDE_EXPORT KCModule *create_kabldapconfig( TQWidget *parent, const char * ) { return new KCMKabLdapConfig( parent, "kcmkabldapconfig" ); } } -KCMKabLdapConfig::KCMKabLdapConfig( QWidget *parent, const char *name ) +KCMKabLdapConfig::KCMKabLdapConfig( TQWidget *parent, const char *name ) : KCModule( parent, name ) { - QVBoxLayout *layout = new QVBoxLayout( this ); + TQVBoxLayout *layout = new TQVBoxLayout( this ); mConfigWidget = new LDAPOptionsWidget( this ); layout->addWidget( mConfigWidget ); - connect( mConfigWidget, SIGNAL( changed( bool ) ), SIGNAL( changed( bool ) ) ); + connect( mConfigWidget, TQT_SIGNAL( changed( bool ) ), TQT_SIGNAL( changed( bool ) ) ); load(); diff --git a/kaddressbook/kcmconfigs/kcmkabldapconfig.h b/kaddressbook/kcmconfigs/kcmkabldapconfig.h index 85e67053a..53d1a21b4 100644 --- a/kaddressbook/kcmconfigs/kcmkabldapconfig.h +++ b/kaddressbook/kcmconfigs/kcmkabldapconfig.h @@ -26,7 +26,7 @@ #include <kcmodule.h> -#include <qwidget.h> +#include <tqwidget.h> class LDAPOptionsWidget; @@ -35,7 +35,7 @@ class KCMKabLdapConfig : public KCModule Q_OBJECT public: - KCMKabLdapConfig( QWidget *parent = 0, const char *name = 0 ); + KCMKabLdapConfig( TQWidget *parent = 0, const char *name = 0 ); virtual void load(); virtual void save(); diff --git a/kaddressbook/kcmconfigs/ldapoptionswidget.cpp b/kaddressbook/kcmconfigs/ldapoptionswidget.cpp index df80ad872..3825ac1d8 100644 --- a/kaddressbook/kcmconfigs/ldapoptionswidget.cpp +++ b/kaddressbook/kcmconfigs/ldapoptionswidget.cpp @@ -21,13 +21,13 @@ without including the source code for Qt in the source distribution. */ -#include <qgroupbox.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qtoolbutton.h> -#include <qstring.h> +#include <tqgroupbox.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqtoolbutton.h> +#include <tqstring.h> #include <kapplication.h> #include <kbuttonbox.h> @@ -37,16 +37,16 @@ #include "addhostdialog.h" #include "ldapoptionswidget.h" -#include <qvgroupbox.h> -#include <qhbox.h> -#include <qvbox.h> +#include <tqvgroupbox.h> +#include <tqhbox.h> +#include <tqvbox.h> #include <kiconloader.h> class LDAPItem : public QCheckListItem { public: - LDAPItem( QListView *parent, const KPIM::LdapServer &server, bool isActive = false ) - : QCheckListItem( parent, parent->lastItem(), QString::null, QCheckListItem::CheckBox ), + LDAPItem( TQListView *parent, const KPIM::LdapServer &server, bool isActive = false ) + : TQCheckListItem( parent, parent->lastItem(), TQString::null, TQCheckListItem::CheckBox ), mIsActive( isActive ) { setServer( server ); @@ -69,32 +69,32 @@ class LDAPItem : public QCheckListItem bool mIsActive; }; -LDAPOptionsWidget::LDAPOptionsWidget( QWidget* parent, const char* name ) - : QWidget( parent, name ) +LDAPOptionsWidget::LDAPOptionsWidget( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { initGUI(); mHostListView->setSorting( -1 ); mHostListView->setAllColumnsShowFocus( true ); mHostListView->setFullWidth( true ); - mHostListView->addColumn( QString::null ); + mHostListView->addColumn( TQString::null ); mHostListView->header()->hide(); - connect( mHostListView, SIGNAL( selectionChanged( QListViewItem* ) ), - SLOT( slotSelectionChanged( QListViewItem* ) ) ); - connect( mHostListView, SIGNAL(doubleClicked( QListViewItem *, const QPoint &, int )), this, SLOT(slotEditHost())); - connect( mHostListView, SIGNAL( clicked( QListViewItem* ) ), - SLOT( slotItemClicked( QListViewItem* ) ) ); + connect( mHostListView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ), + TQT_SLOT( slotSelectionChanged( TQListViewItem* ) ) ); + connect( mHostListView, TQT_SIGNAL(doubleClicked( TQListViewItem *, const TQPoint &, int )), this, TQT_SLOT(slotEditHost())); + connect( mHostListView, TQT_SIGNAL( clicked( TQListViewItem* ) ), + TQT_SLOT( slotItemClicked( TQListViewItem* ) ) ); - connect( mUpButton, SIGNAL( clicked() ), this, SLOT( slotMoveUp() ) ); - connect( mDownButton, SIGNAL( clicked() ), this, SLOT( slotMoveDown() ) ); + connect( mUpButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveUp() ) ); + connect( mDownButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotMoveDown() ) ); } LDAPOptionsWidget::~LDAPOptionsWidget() { } -void LDAPOptionsWidget::slotSelectionChanged( QListViewItem *item ) +void LDAPOptionsWidget::slotSelectionChanged( TQListViewItem *item ) { bool state = ( item != 0 ); mEditButton->setEnabled( state ); @@ -103,7 +103,7 @@ void LDAPOptionsWidget::slotSelectionChanged( QListViewItem *item ) mUpButton->setEnabled( item && item->itemAbove() ); } -void LDAPOptionsWidget::slotItemClicked( QListViewItem *item ) +void LDAPOptionsWidget::slotItemClicked( TQListViewItem *item ) { LDAPItem *ldapItem = dynamic_cast<LDAPItem*>( item ); if ( !ldapItem ) @@ -146,7 +146,7 @@ void LDAPOptionsWidget::slotEditHost() void LDAPOptionsWidget::slotRemoveHost() { - QListViewItem *item = mHostListView->currentItem(); + TQListViewItem *item = mHostListView->currentItem(); if ( !item ) return; @@ -200,7 +200,7 @@ void LDAPOptionsWidget::restoreSettings() KConfig *config = KPIM::LdapSearch::config(); KConfigGroupSaver saver( config, "LDAP" ); - QString host; + TQString host; uint count = config->readUnsignedNumEntry( "NumSelectedHosts"); for ( uint i = 0; i < count; ++i ) { @@ -228,7 +228,7 @@ void LDAPOptionsWidget::saveSettings() KConfigGroupSaver saver( config, "LDAP" ); uint selected = 0; uint unselected = 0; - QListViewItemIterator it( mHostListView ); + TQListViewItemIterator it( mHostListView ); for ( ; it.current(); ++it ) { LDAPItem *item = dynamic_cast<LDAPItem*>( it.current() ); if ( !item ) @@ -258,46 +258,46 @@ void LDAPOptionsWidget::defaults() void LDAPOptionsWidget::initGUI() { - QVBoxLayout *layout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQVBoxLayout *layout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); - QVGroupBox *groupBox = new QVGroupBox( i18n( "LDAP Servers" ), this ); + TQVGroupBox *groupBox = new TQVGroupBox( i18n( "LDAP Servers" ), this ); groupBox->setInsideSpacing( KDialog::spacingHint() ); groupBox->setInsideMargin( KDialog::marginHint() ); - // Contents of the QVGroupBox: label and hbox - /*QLabel *label =*/ new QLabel( i18n( "Check all servers that should be used:" ), groupBox ); + // Contents of the TQVGroupBox: label and hbox + /*TQLabel *label =*/ new TQLabel( i18n( "Check all servers that should be used:" ), groupBox ); - QHBox* hBox = new QHBox( groupBox ); + TQHBox* hBox = new TQHBox( groupBox ); hBox->setSpacing( 6 ); // Contents of the hbox: listview and up/down buttons on the right (vbox) mHostListView = new KListView( hBox ); - QVBox* upDownBox = new QVBox( hBox ); + TQVBox* upDownBox = new TQVBox( hBox ); upDownBox->setSpacing( 6 ); - mUpButton = new QToolButton( upDownBox, "mUpButton" ); + mUpButton = new TQToolButton( upDownBox, "mUpButton" ); mUpButton->setIconSet( BarIconSet( "up", KIcon::SizeSmall ) ); mUpButton->setEnabled( false ); // b/c no item is selected yet - mDownButton = new QToolButton( upDownBox, "mDownButton" ); + mDownButton = new TQToolButton( upDownBox, "mDownButton" ); mDownButton->setIconSet( BarIconSet( "down", KIcon::SizeSmall ) ); mDownButton->setEnabled( false ); // b/c no item is selected yet - QWidget* spacer = new QWidget( upDownBox ); + TQWidget* spacer = new TQWidget( upDownBox ); upDownBox->setStretchFactor( spacer, 100 ); layout->addWidget( groupBox ); KButtonBox *buttons = new KButtonBox( this ); - buttons->addButton( i18n( "&Add Host..." ), this, SLOT( slotAddHost() ) ); - mEditButton = buttons->addButton( i18n( "&Edit Host..." ), this, SLOT( slotEditHost() ) ); + buttons->addButton( i18n( "&Add Host..." ), this, TQT_SLOT( slotAddHost() ) ); + mEditButton = buttons->addButton( i18n( "&Edit Host..." ), this, TQT_SLOT( slotEditHost() ) ); mEditButton->setEnabled( false ); - mRemoveButton = buttons->addButton( i18n( "&Remove Host" ), this, SLOT( slotRemoveHost() ) ); + mRemoveButton = buttons->addButton( i18n( "&Remove Host" ), this, TQT_SLOT( slotRemoveHost() ) ); mRemoveButton->setEnabled( false ); buttons->layout(); layout->addWidget( buttons ); - resize( QSize( 460, 300 ).expandedTo( sizeHint() ) ); + resize( TQSize( 460, 300 ).expandedTo( sizeHint() ) ); } #include "ldapoptionswidget.moc" diff --git a/kaddressbook/kcmconfigs/ldapoptionswidget.h b/kaddressbook/kcmconfigs/ldapoptionswidget.h index c63b96dd7..22b7e621e 100644 --- a/kaddressbook/kcmconfigs/ldapoptionswidget.h +++ b/kaddressbook/kcmconfigs/ldapoptionswidget.h @@ -24,7 +24,7 @@ #ifndef LDAPOPTIONSWIDGET_H #define LDAPOPTIONSWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> class QToolButton; class KListView; @@ -36,7 +36,7 @@ class LDAPOptionsWidget : public QWidget Q_OBJECT public: - LDAPOptionsWidget( QWidget* parent = 0, const char* name = 0 ); + LDAPOptionsWidget( TQWidget* parent = 0, const char* name = 0 ); ~LDAPOptionsWidget(); void restoreSettings(); @@ -50,8 +50,8 @@ class LDAPOptionsWidget : public QWidget void slotAddHost(); void slotEditHost(); void slotRemoveHost(); - void slotSelectionChanged( QListViewItem* ); - void slotItemClicked( QListViewItem* ); + void slotSelectionChanged( TQListViewItem* ); + void slotItemClicked( TQListViewItem* ); void slotMoveUp(); void slotMoveDown(); @@ -60,12 +60,12 @@ class LDAPOptionsWidget : public QWidget KListView* mHostListView; - QPushButton* mAddButton; - QPushButton* mEditButton; - QPushButton* mRemoveButton; + TQPushButton* mAddButton; + TQPushButton* mEditButton; + TQPushButton* mRemoveButton; - QToolButton* mUpButton; - QToolButton* mDownButton; + TQToolButton* mUpButton; + TQToolButton* mDownButton; }; #endif diff --git a/kaddressbook/keywidget.cpp b/kaddressbook/keywidget.cpp index ab0f8fa7f..57558cb46 100644 --- a/kaddressbook/keywidget.cpp +++ b/kaddressbook/keywidget.cpp @@ -21,10 +21,10 @@ without including the source code for Qt in the source distribution. */ -#include <qfile.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> #include <kapplication.h> #include <kcombobox.h> @@ -38,32 +38,32 @@ #include "keywidget.h" -KeyWidget::KeyWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +KeyWidget::KeyWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - QGridLayout *layout = new QGridLayout( this, 4, 2, KDialog::marginHint(), + TQGridLayout *layout = new TQGridLayout( this, 4, 2, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Keys:" ), this ); + TQLabel *label = new TQLabel( i18n( "Keys:" ), this ); layout->addWidget( label, 0, 0 ); mKeyCombo = new KComboBox( this ); layout->addWidget( mKeyCombo, 0, 1 ); - mAddButton = new QPushButton( i18n( "Add..." ), this ); + mAddButton = new TQPushButton( i18n( "Add..." ), this ); layout->addMultiCellWidget( mAddButton, 1, 1, 0, 1 ); - mRemoveButton = new QPushButton( i18n( "Remove" ), this ); + mRemoveButton = new TQPushButton( i18n( "Remove" ), this ); mRemoveButton->setEnabled( false ); layout->addMultiCellWidget( mRemoveButton, 2, 2, 0, 1 ); - mExportButton = new QPushButton( i18n( "Export..." ), this ); + mExportButton = new TQPushButton( i18n( "Export..." ), this ); mExportButton->setEnabled( false ); layout->addMultiCellWidget( mExportButton, 3, 3, 0, 1 ); - connect( mAddButton, SIGNAL( clicked() ), SLOT( addKey() ) ); - connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeKey() ) ); - connect( mExportButton, SIGNAL( clicked() ), SLOT( exportKey() ) ); + connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( addKey() ) ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeKey() ) ); + connect( mExportButton, TQT_SIGNAL( clicked() ), TQT_SLOT( exportKey() ) ); } KeyWidget::~KeyWidget() @@ -84,9 +84,9 @@ KABC::Key::List KeyWidget::keys() const void KeyWidget::addKey() { - QMap<QString, int> keyMap; - QStringList keyTypeNames; - QStringList existingKeyTypes; + TQMap<TQString, int> keyMap; + TQStringList keyTypeNames; + TQStringList existingKeyTypes; KABC::Key::List::ConstIterator listIt; for ( listIt = mKeyList.begin(); listIt != mKeyList.end(); ++listIt ) { @@ -105,7 +105,7 @@ void KeyWidget::addKey() } bool ok; - QString name = KInputDialog::getItem( i18n( "Key Type" ), i18n( "Select the key type:" ), keyTypeNames, 0, true, &ok ); + TQString name = KInputDialog::getItem( i18n( "Key Type" ), i18n( "Select the key type:" ), keyTypeNames, 0, true, &ok ); if ( !ok || name.isEmpty() ) return; @@ -117,19 +117,19 @@ void KeyWidget::addKey() if ( url.isEmpty() ) return; - QString tmpFile; + TQString tmpFile; if ( KIO::NetAccess::download( url, tmpFile, this ) ) { - QFile file( tmpFile ); + TQFile file( tmpFile ); if ( !file.open( IO_ReadOnly ) ) { - QString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); + TQString text( i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ) ); KMessageBox::error( this, text.arg( url.url() ) ); return; } - QTextStream s( &file ); - QString data; + TQTextStream s( &file ); + TQString data; - s.setEncoding( QTextStream::UnicodeUTF8 ); + s.setEncoding( TQTextStream::UnicodeUTF8 ); s >> data; file.close(); @@ -152,8 +152,8 @@ void KeyWidget::removeKey() if ( pos == -1 ) return; - QString type = mKeyCombo->currentText(); - QString text = i18n( "<qt>Do you really want to remove the key <b>%1</b>?</qt>" ); + TQString type = mKeyCombo->currentText(); + TQString text = i18n( "<qt>Do you really want to remove the key <b>%1</b>?</qt>" ); if ( KMessageBox::warningContinueCancel( this, text.arg( type ), "", KGuiItem( i18n("&Delete"), "editdelete") ) == KMessageBox::Cancel ) return; @@ -170,8 +170,8 @@ void KeyWidget::exportKey() KURL url = KFileDialog::getSaveURL(); KTempFile tempFile; - QTextStream *s = tempFile.textStream(); - s->setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream *s = tempFile.textStream(); + s->setEncoding( TQTextStream::UnicodeUTF8 ); (*s) << key.textData(); tempFile.close(); diff --git a/kaddressbook/keywidget.h b/kaddressbook/keywidget.h index 712c26c00..2b3b83a0c 100644 --- a/kaddressbook/keywidget.h +++ b/kaddressbook/keywidget.h @@ -24,7 +24,7 @@ #ifndef KEYWIDGET_H #define KEYWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> #include <kabc/key.h> class KComboBox; @@ -36,7 +36,7 @@ class KeyWidget : public QWidget Q_OBJECT public: - KeyWidget( QWidget *parent, const char *name = 0 ); + KeyWidget( TQWidget *parent, const char *name = 0 ); ~KeyWidget(); void setKeys( const KABC::Key::List &list ); @@ -55,9 +55,9 @@ class KeyWidget : public QWidget KComboBox *mKeyCombo; - QPushButton *mAddButton; - QPushButton *mRemoveButton; - QPushButton *mExportButton; + TQPushButton *mAddButton; + TQPushButton *mRemoveButton; + TQPushButton *mExportButton; KABC::Key::List mKeyList; }; diff --git a/kaddressbook/ldapsearchdialog.cpp b/kaddressbook/ldapsearchdialog.cpp index 706b982ff..fc99562d4 100644 --- a/kaddressbook/ldapsearchdialog.cpp +++ b/kaddressbook/ldapsearchdialog.cpp @@ -20,14 +20,14 @@ #include "config.h" -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qheader.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistview.h> -#include <qmap.h> -#include <qpushbutton.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqheader.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistview.h> +#include <tqmap.h> +#include <tqpushbutton.h> #include <addresseelineedit.h> #include <kapplication.h> @@ -46,23 +46,23 @@ #include "distributionlistpicker.h" #endif -static QString asUtf8( const QByteArray &val ) +static TQString asUtf8( const TQByteArray &val ) { if ( val.isEmpty() ) - return QString::null; + return TQString::null; const char *data = val.data(); - //QString::fromUtf8() bug workaround + //TQString::fromUtf8() bug workaround if ( data[ val.size() - 1 ] == '\0' ) - return QString::fromUtf8( data, val.size() - 1 ); + return TQString::fromUtf8( data, val.size() - 1 ); else - return QString::fromUtf8( data, val.size() ); + return TQString::fromUtf8( data, val.size() ); } -static QString join( const KPIM::LdapAttrValue& lst, const QString& sep ) +static TQString join( const KPIM::LdapAttrValue& lst, const TQString& sep ) { - QString res; + TQString res; bool alredy = false; for ( KPIM::LdapAttrValue::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { if ( alredy ) @@ -73,9 +73,9 @@ static QString join( const KPIM::LdapAttrValue& lst, const QString& sep ) return res; } -static QMap<QString, QString>& adrbookattr2ldap() +static TQMap<TQString, TQString>& adrbookattr2ldap() { - static QMap<QString, QString> keys; + static TQMap<TQString, TQString> keys; if ( keys.isEmpty() ) { keys[ i18n( "Title" ) ] = "title"; @@ -104,17 +104,17 @@ static QMap<QString, QString>& adrbookattr2ldap() class ContactListItem : public QListViewItem { public: - ContactListItem( QListView* parent, const KPIM::LdapAttrMap& attrs ) - : QListViewItem( parent ), mAttrs( attrs ) + ContactListItem( TQListView* parent, const KPIM::LdapAttrMap& attrs ) + : TQListViewItem( parent ), mAttrs( attrs ) { } KPIM::LdapAttrMap mAttrs; - virtual QString text( int col ) const + virtual TQString text( int col ) const { // Look up a suitable attribute for column col - const QString colName = listView()->columnText( col ); - const QString ldapAttrName = adrbookattr2ldap()[ colName ]; + const TQString colName = listView()->columnText( col ); + const TQString ldapAttrName = adrbookattr2ldap()[ colName ]; return join( mAttrs[ ldapAttrName ], ", " ); } }; @@ -122,13 +122,13 @@ class ContactListItem : public QListViewItem class LDAPSearchDialog::Private { public: - static QValueList<ContactListItem*> selectedItems( QListView* ); - QMap<const ContactListItem*, QString> itemToServer; + static TQValueList<ContactListItem*> selectedItems( TQListView* ); + TQMap<const ContactListItem*, TQString> itemToServer; }; -QValueList<ContactListItem*> LDAPSearchDialog::Private::selectedItems( QListView* view ) +TQValueList<ContactListItem*> LDAPSearchDialog::Private::selectedItems( TQListView* view ) { - QValueList<ContactListItem*> selected; + TQValueList<ContactListItem*> selected; ContactListItem* cli = static_cast<ContactListItem*>( view->firstChild() ); while ( cli ) { if ( cli->isSelected() ) @@ -139,32 +139,32 @@ QValueList<ContactListItem*> LDAPSearchDialog::Private::selectedItems( QListView } LDAPSearchDialog::LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core, - QWidget* parent, const char* name ) + TQWidget* parent, const char* name ) : KDialogBase( Plain, i18n( "Search for Addresses in Directory" ), Help | User1 | User2 | Cancel, Default, parent, name, false, true ), mAddressBook( ab ), mCore( core ), d( new Private ) { setButtonCancel( KStdGuiItem::close() ); - QFrame *page = plainPage(); - QVBoxLayout *topLayout = new QVBoxLayout( page, marginHint(), spacingHint() ); + TQFrame *page = plainPage(); + TQVBoxLayout *topLayout = new TQVBoxLayout( page, marginHint(), spacingHint() ); - QGroupBox *groupBox = new QGroupBox( i18n( "Search for Addresses in Directory" ), + TQGroupBox *groupBox = new TQGroupBox( i18n( "Search for Addresses in Directory" ), page ); - groupBox->setFrameShape( QGroupBox::Box ); - groupBox->setFrameShadow( QGroupBox::Sunken ); + groupBox->setFrameShape( TQGroupBox::Box ); + groupBox->setFrameShadow( TQGroupBox::Sunken ); groupBox->setColumnLayout( 0, Qt::Vertical ); - QGridLayout *boxLayout = new QGridLayout( groupBox->layout(), 2, + TQGridLayout *boxLayout = new TQGridLayout( groupBox->layout(), 2, 5, spacingHint() ); boxLayout->setColStretch( 1, 1 ); - QLabel *label = new QLabel( i18n( "Search for:" ), groupBox ); + TQLabel *label = new TQLabel( i18n( "Search for:" ), groupBox ); boxLayout->addWidget( label, 0, 0 ); mSearchEdit = new KLineEdit( groupBox ); boxLayout->addWidget( mSearchEdit, 0, 1 ); label->setBuddy( mSearchEdit ); - label = new QLabel( i18n( "In LDAP attribute", "in" ), groupBox ); + label = new TQLabel( i18n( "In LDAP attribute", "in" ), groupBox ); boxLayout->addWidget( label, 0, 2 ); mFilterCombo = new KComboBox( groupBox ); @@ -174,8 +174,8 @@ LDAPSearchDialog::LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core, mFilterCombo->insertItem( i18n( "Work Number" ) ); boxLayout->addWidget( mFilterCombo, 0, 3 ); - QSize buttonSize; - mSearchButton = new QPushButton( i18n( "Stop" ), groupBox ); + TQSize buttonSize; + mSearchButton = new TQPushButton( i18n( "Stop" ), groupBox ); buttonSize = mSearchButton->sizeHint(); mSearchButton->setText( i18n( "&Search" ) ); if ( buttonSize.width() < mSearchButton->sizeHint().width() ) @@ -185,7 +185,7 @@ LDAPSearchDialog::LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core, mSearchButton->setDefault( true ); boxLayout->addWidget( mSearchButton, 0, 4 ); - mRecursiveCheckbox = new QCheckBox( i18n( "Recursive search" ), groupBox ); + mRecursiveCheckbox = new TQCheckBox( i18n( "Recursive search" ), groupBox ); mRecursiveCheckbox->setChecked( true ); boxLayout->addMultiCellWidget( mRecursiveCheckbox, 1, 1, 0, 4 ); @@ -196,19 +196,19 @@ LDAPSearchDialog::LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core, topLayout->addWidget( groupBox ); - mResultListView = new QListView( page ); - mResultListView->setSelectionMode( QListView::Multi ); + mResultListView = new TQListView( page ); + mResultListView->setSelectionMode( TQListView::Multi ); mResultListView->setAllColumnsShowFocus( true ); mResultListView->setShowSortIndicator( true ); topLayout->addWidget( mResultListView ); KButtonBox *buttons = new KButtonBox( page, Qt::Horizontal ); - buttons->addButton( i18n( "Select All" ), this, SLOT( slotSelectAll() ) ); - buttons->addButton( i18n( "Unselect All" ), this, SLOT( slotUnselectAll() ) ); + buttons->addButton( i18n( "Select All" ), this, TQT_SLOT( slotSelectAll() ) ); + buttons->addButton( i18n( "Unselect All" ), this, TQT_SLOT( slotUnselectAll() ) ); topLayout->addWidget( buttons ); - resize( QSize( 600, 400).expandedTo( minimumSizeHint() ) ); + resize( TQSize( 600, 400).expandedTo( minimumSizeHint() ) ); setButtonText( User1, i18n( "Add Selected" ) ); @@ -222,10 +222,10 @@ LDAPSearchDialog::LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core, mNumHosts = 0; mIsOK = false; - connect( mRecursiveCheckbox, SIGNAL( toggled( bool ) ), - this, SLOT( slotSetScope( bool ) ) ); - connect( mSearchButton, SIGNAL( clicked() ), - this, SLOT( slotStartSearch() ) ); + connect( mRecursiveCheckbox, TQT_SIGNAL( toggled( bool ) ), + this, TQT_SLOT( slotSetScope( bool ) ) ); + connect( mSearchButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotStartSearch() ) ); setTabOrder(mSearchEdit, mFilterCombo); setTabOrder(mFilterCombo, mSearchButton); @@ -268,19 +268,19 @@ void LDAPSearchDialog::restoreSettings() KPIM::LdapServer ldapServer; KPIM::LdapSearch::readConfig( ldapServer, config, j, true ); ldapClient->setServer( ldapServer ); - QStringList attrs; + TQStringList attrs; - for ( QMap<QString,QString>::ConstIterator it = adrbookattr2ldap().begin(); it != adrbookattr2ldap().end(); ++it ) + for ( TQMap<TQString,TQString>::ConstIterator it = adrbookattr2ldap().begin(); it != adrbookattr2ldap().end(); ++it ) attrs << *it; ldapClient->setAttrs( attrs ); - connect( ldapClient, SIGNAL( result( const KPIM::LdapObject& ) ), - this, SLOT( slotAddResult( const KPIM::LdapObject& ) ) ); - connect( ldapClient, SIGNAL( done() ), - this, SLOT( slotSearchDone() ) ); - connect( ldapClient, SIGNAL( error( const QString& ) ), - this, SLOT( slotError( const QString& ) ) ); + connect( ldapClient, TQT_SIGNAL( result( const KPIM::LdapObject& ) ), + this, TQT_SLOT( slotAddResult( const KPIM::LdapObject& ) ) ); + connect( ldapClient, TQT_SIGNAL( done() ), + this, TQT_SLOT( slotSearchDone() ) ); + connect( ldapClient, TQT_SIGNAL( error( const TQString& ) ), + this, TQT_SLOT( slotError( const TQString& ) ) ); mLdapClientList.append( ldapClient ); } @@ -345,7 +345,7 @@ void LDAPSearchDialog::slotSetScope( bool rec ) } } -QString LDAPSearchDialog::makeFilter( const QString& query, const QString& attr, +TQString LDAPSearchDialog::makeFilter( const TQString& query, const TQString& attr, bool startsWith ) { /* The reasoning behind this filter is: @@ -354,7 +354,7 @@ QString LDAPSearchDialog::makeFilter( const QString& query, const QString& attr, * This allows both resource accounts with an email address which are not a person and * person entries without an email address to show up, while still not showing things * like structural entries in the ldap tree. */ - QString result( "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(" ); + TQString result( "&(|(objectclass=person)(objectclass=groupofnames)(mail=*))(" ); if( query.isEmpty() ) // Return a filter that matches everything return result + "|(cn=*)(sn=*)" + ")"; @@ -372,7 +372,7 @@ QString LDAPSearchDialog::makeFilter( const QString& query, const QString& attr, result = result.arg( "telephoneNumber" ).arg( query ); } else { // Error? - result = QString::null; + result = TQString::null; return result; } } @@ -384,17 +384,17 @@ void LDAPSearchDialog::slotStartSearch() { cancelQuery(); - QApplication::setOverrideCursor( Qt::waitCursor ); + TQApplication::setOverrideCursor( Qt::waitCursor ); mSearchButton->setText( i18n( "Stop" ) ); - disconnect( mSearchButton, SIGNAL( clicked() ), - this, SLOT( slotStartSearch() ) ); - connect( mSearchButton, SIGNAL( clicked() ), - this, SLOT( slotStopSearch() ) ); + disconnect( mSearchButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotStartSearch() ) ); + connect( mSearchButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotStopSearch() ) ); bool startsWith = (mSearchType->currentItem() == 1); - QString filter = makeFilter( mSearchEdit->text().stripWhiteSpace(), mFilterCombo->currentText(), startsWith ); + TQString filter = makeFilter( mSearchEdit->text().stripWhiteSpace(), mFilterCombo->currentText(), startsWith ); // loop in the list and run the KPIM::LdapClients mResultListView->clear(); @@ -419,22 +419,22 @@ void LDAPSearchDialog::slotSearchDone() return; } - disconnect( mSearchButton, SIGNAL( clicked() ), - this, SLOT( slotStopSearch() ) ); - connect( mSearchButton, SIGNAL( clicked() ), - this, SLOT( slotStartSearch() ) ); + disconnect( mSearchButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotStopSearch() ) ); + connect( mSearchButton, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotStartSearch() ) ); mSearchButton->setText( i18n( "&Search" ) ); - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); } -void LDAPSearchDialog::slotError( const QString& error ) +void LDAPSearchDialog::slotError( const TQString& error ) { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); KMessageBox::error( this, error ); } -void LDAPSearchDialog::closeEvent( QCloseEvent* e ) +void LDAPSearchDialog::closeEvent( TQCloseEvent* e ) { slotStopSearch(); e->accept(); @@ -444,15 +444,15 @@ void LDAPSearchDialog::closeEvent( QCloseEvent* e ) * Returns a ", " separated list of email addresses that were * checked by the user */ -QString LDAPSearchDialog::selectedEMails() const +TQString LDAPSearchDialog::selectedEMails() const { - QStringList result; + TQStringList result; ContactListItem* cli = static_cast<ContactListItem*>( mResultListView->firstChild() ); while ( cli ) { if ( cli->isSelected() ) { - QString email = asUtf8( cli->mAttrs[ "mail" ].first() ).stripWhiteSpace(); + TQString email = asUtf8( cli->mAttrs[ "mail" ].first() ).stripWhiteSpace(); if ( !email.isEmpty() ) { - QString name = asUtf8( cli->mAttrs[ "cn" ].first() ).stripWhiteSpace(); + TQString name = asUtf8( cli->mAttrs[ "cn" ].first() ).stripWhiteSpace(); if ( name.isEmpty() ) { result << email; } else { @@ -546,27 +546,27 @@ KABC::Addressee LDAPSearchDialog::convertLdapAttributesToAddressee( const KPIM:: #ifdef KDEPIM_NEW_DISTRLISTS KPIM::DistributionList LDAPSearchDialog::selectDistributionList() { - QGuardedPtr<KPIM::DistributionListPickerDialog> picker = new KPIM::DistributionListPickerDialog( mCore->addressBook(), this ); + TQGuardedPtr<KPIM::DistributionListPickerDialog> picker = new KPIM::DistributionListPickerDialog( mCore->addressBook(), this ); picker->setLabelText( i18n( "Select a distribution list to add the selected contacts to." ) ); picker->setCaption( i18n( "Select Distribution List" ) ); picker->exec(); const KPIM::DistributionList list = KPIM::DistributionList::findByName( mCore->addressBook(), picker -? picker->selectedDistributionList() : QString() ); +? picker->selectedDistributionList() : TQString() ); delete picker; return list; } #endif -KABC::Addressee::List LDAPSearchDialog::importContactsUnlessTheyExist( const QValueList<ContactListItem*>& selectedItems, +KABC::Addressee::List LDAPSearchDialog::importContactsUnlessTheyExist( const TQValueList<ContactListItem*>& selectedItems, KABC::Resource * const resource ) { - const QDateTime now = QDateTime::currentDateTime(); - QStringList importedAddrs; + const TQDateTime now = TQDateTime::currentDateTime(); + TQStringList importedAddrs; KABC::Addressee::List localAddrs; KABLock::self( mCore->addressBook() )->lock( resource ); - for ( QValueList<ContactListItem*>::ConstIterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) { + for ( TQValueList<ContactListItem*>::ConstIterator it = selectedItems.begin(); it != selectedItems.end(); ++it ) { const ContactListItem * const cli = *it; KABC::Addressee addr = convertLdapAttributesToAddressee( cli->mAttrs ); const KABC::Addressee::List existing = mCore->addressBook()->findByEmail( addr.preferredEmail() ); @@ -598,7 +598,7 @@ void LDAPSearchDialog::slotUser2() KABC::Resource *resource = mCore->requestResource( this ); if ( !resource ) return; - const QValueList<ContactListItem*> selectedItems = d->selectedItems( mResultListView ); + const TQValueList<ContactListItem*> selectedItems = d->selectedItems( mResultListView ); if ( selectedItems.isEmpty() ) { KMessageBox::information( this, i18n( "Please select the contacts you want to add to the distribution list." ), i18n( "No Contacts Selected" ) ); return; @@ -614,7 +614,7 @@ void LDAPSearchDialog::slotUser2() return; for ( KABC::Addressee::List::ConstIterator it = localAddrs.begin(); it != localAddrs.end(); ++it ) { - dist.insertEntry( *it, QString() ); + dist.insertEntry( *it, TQString() ); } KABLock::self( mCore->addressBook() )->lock( resource ); mCore->addressBook()->insertAddressee( dist ); @@ -627,7 +627,7 @@ void LDAPSearchDialog::slotUser1() { KABC::Resource *resource = mCore->requestResource( this ); if ( !resource ) return; - const QValueList<ContactListItem*> selectedItems = d->selectedItems( mResultListView ); + const TQValueList<ContactListItem*> selectedItems = d->selectedItems( mResultListView ); importContactsUnlessTheyExist( selectedItems, resource ); } diff --git a/kaddressbook/ldapsearchdialog.h b/kaddressbook/ldapsearchdialog.h index dba41fc54..8c368a116 100644 --- a/kaddressbook/ldapsearchdialog.h +++ b/kaddressbook/ldapsearchdialog.h @@ -23,7 +23,7 @@ #include "config.h" -#include <qptrlist.h> +#include <tqptrlist.h> #include <kabc/addressbook.h> #include <ldapclient.h> @@ -52,7 +52,7 @@ class LDAPSearchDialog : public KDialogBase Q_OBJECT public: - LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core, QWidget* parent, const char* name = 0 ); + LDAPSearchDialog( KABC::AddressBook *ab, KABCore *core, TQWidget* parent, const char* name = 0 ); ~LDAPSearchDialog(); bool isOK() const { return mIsOK; } @@ -68,7 +68,7 @@ class LDAPSearchDialog : public KDialogBase void slotStartSearch(); void slotStopSearch(); void slotSearchDone(); - void slotError( const QString& ); + void slotError( const TQString& ); virtual void slotHelp(); virtual void slotUser1(); virtual void slotUser2(); @@ -79,12 +79,12 @@ class LDAPSearchDialog : public KDialogBase * unless they already exist. Returns the list of both the added * and the existing contacts. */ - KABC::Addressee::List importContactsUnlessTheyExist( const QValueList<ContactListItem*>& items, KABC::Resource * const resource ); + KABC::Addressee::List importContactsUnlessTheyExist( const TQValueList<ContactListItem*>& items, KABC::Resource * const resource ); protected: - QString selectedEMails() const; + TQString selectedEMails() const; - virtual void closeEvent( QCloseEvent* ); + virtual void closeEvent( TQCloseEvent* ); private: void saveSettings(); @@ -93,12 +93,12 @@ class LDAPSearchDialog : public KDialogBase KPIM::DistributionList selectDistributionList(); #endif - QString makeFilter( const QString& query, const QString& attr, bool startsWith ); + TQString makeFilter( const TQString& query, const TQString& attr, bool startsWith ); void cancelQuery(); int mNumHosts; - QPtrList<KPIM::LdapClient> mLdapClientList; + TQPtrList<KPIM::LdapClient> mLdapClientList; bool mIsOK; KABC::AddressBook *mAddressBook; KABCore *mCore; @@ -107,9 +107,9 @@ class LDAPSearchDialog : public KDialogBase KComboBox* mSearchType; KLineEdit* mSearchEdit; - QCheckBox* mRecursiveCheckbox; - QListView* mResultListView; - QPushButton* mSearchButton; + TQCheckBox* mRecursiveCheckbox; + TQListView* mResultListView; + TQPushButton* mSearchButton; class Private; Private* const d; }; diff --git a/kaddressbook/main.cpp b/kaddressbook/main.cpp index bfb5f8159..48cf08b6d 100644 --- a/kaddressbook/main.cpp +++ b/kaddressbook/main.cpp @@ -24,7 +24,7 @@ #include <stdlib.h> #include <unistd.h> -#include <qstring.h> +#include <tqstring.h> #include <kabc/stdaddressbook.h> #include <kaboutdata.h> @@ -74,7 +74,7 @@ int KAddressBookApp::newInstance() // otherwise, leave the window like it is (hidden or shown) KStartupInfo::appStarted(); } else { - QString file; + TQString file; if ( args->isSet( "document" ) ) { file = args->getOption( "document" ); } diff --git a/kaddressbook/nameeditdialog.cpp b/kaddressbook/nameeditdialog.cpp index fc29eda8d..3e2191ff9 100644 --- a/kaddressbook/nameeditdialog.cpp +++ b/kaddressbook/nameeditdialog.cpp @@ -21,15 +21,15 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> -#include <qlabel.h> -#include <qlistbox.h> -#include <qlistview.h> -#include <qtooltip.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qstring.h> -#include <qwhatsthis.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlistbox.h> +#include <tqlistview.h> +#include <tqtooltip.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqstring.h> +#include <tqwhatsthis.h> #include <kaccelmanager.h> #include <kapplication.h> @@ -46,17 +46,17 @@ #include "nameeditdialog.h" NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, - bool readOnly, QWidget *parent, const char *name ) + bool readOnly, TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "Edit Contact Name" ), Help | Ok | Cancel, Ok, parent, name, true ), mAddressee( addr ) { - QWidget *page = plainPage(); - QGridLayout *layout = new QGridLayout( page ); + TQWidget *page = plainPage(); + TQGridLayout *layout = new TQGridLayout( page ); layout->setSpacing( spacingHint() ); layout->addColSpacing( 2, 100 ); - QLabel *label; + TQLabel *label; - label = new QLabel( i18n( "Honorific prefixes:" ), page ); + label = new TQLabel( i18n( "Honorific prefixes:" ), page ); layout->addWidget( label, 0, 0 ); mPrefixCombo = new KComboBox( page ); mPrefixCombo->setDuplicatesEnabled( false ); @@ -65,30 +65,30 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, label->setBuddy( mPrefixCombo ); layout->addMultiCellWidget( mPrefixCombo, 0, 0, 1, 2 ); - QWhatsThis::add( mPrefixCombo, i18n( "The predefined honorific prefixes can be extended in the settings dialog." ) ); + TQWhatsThis::add( mPrefixCombo, i18n( "The predefined honorific prefixes can be extended in the settings dialog." ) ); - label = new QLabel( i18n( "Given name:" ), page ); + label = new TQLabel( i18n( "Given name:" ), page ); layout->addWidget( label, 1, 0 ); mGivenNameEdit = new KLineEdit( page ); mGivenNameEdit->setReadOnly( readOnly ); label->setBuddy( mGivenNameEdit ); layout->addMultiCellWidget( mGivenNameEdit, 1, 1, 1, 2 ); - label = new QLabel( i18n( "Additional names:" ), page ); + label = new TQLabel( i18n( "Additional names:" ), page ); layout->addWidget( label, 2, 0 ); mAdditionalNameEdit = new KLineEdit( page ); mAdditionalNameEdit->setReadOnly( readOnly ); label->setBuddy( mAdditionalNameEdit ); layout->addMultiCellWidget( mAdditionalNameEdit, 2, 2, 1, 2 ); - label = new QLabel( i18n( "Family names:" ), page ); + label = new TQLabel( i18n( "Family names:" ), page ); layout->addWidget( label, 3, 0 ); mFamilyNameEdit = new KLineEdit( page ); mFamilyNameEdit->setReadOnly( readOnly ); label->setBuddy( mFamilyNameEdit ); layout->addMultiCellWidget( mFamilyNameEdit, 3, 3, 1, 2 ); - label = new QLabel( i18n( "Honorific suffixes:" ), page ); + label = new TQLabel( i18n( "Honorific suffixes:" ), page ); layout->addWidget( label, 4, 0 ); mSuffixCombo = new KComboBox( page ); mSuffixCombo->setDuplicatesEnabled( false ); @@ -97,24 +97,24 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, label->setBuddy( mSuffixCombo ); layout->addMultiCellWidget( mSuffixCombo, 4, 4, 1, 2 ); - QWhatsThis::add( mSuffixCombo, i18n( "The predefined honorific suffixes can be extended in the settings dialog." ) ); + TQWhatsThis::add( mSuffixCombo, i18n( "The predefined honorific suffixes can be extended in the settings dialog." ) ); - label = new QLabel( i18n( "Formatted name:" ), page ); + label = new TQLabel( i18n( "Formatted name:" ), page ); layout->addWidget( label, 5, 0 ); mFormattedNameCombo = new KComboBox( page ); mFormattedNameCombo->setEnabled( !readOnly ); layout->addWidget( mFormattedNameCombo, 5, 1 ); - connect( mFormattedNameCombo, SIGNAL( activated( int ) ), SLOT( typeChanged( int ) ) ); + connect( mFormattedNameCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( typeChanged( int ) ) ); mFormattedNameEdit = new KLineEdit( page ); mFormattedNameEdit->setEnabled( type == CustomName && !readOnly ); layout->addWidget( mFormattedNameEdit, 5, 2 ); - mParseBox = new QCheckBox( i18n( "Parse name automatically" ), page ); + mParseBox = new TQCheckBox( i18n( "Parse name automatically" ), page ); mParseBox->setEnabled( !readOnly ); - connect( mParseBox, SIGNAL( toggled(bool) ), SLOT( parseBoxChanged(bool) ) ); - connect( mParseBox, SIGNAL( toggled(bool) ), SLOT( modified() ) ); + connect( mParseBox, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( parseBoxChanged(bool) ) ); + connect( mParseBox, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( modified() ) ); layout->addMultiCellWidget( mParseBox, 6, 6, 0, 1 ); // Fill in the values @@ -127,7 +127,7 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, KConfig config( "kabcrc" ); config.setGroup( "General" ); - QStringList sTitle; + TQStringList sTitle; sTitle += ""; sTitle += i18n( "Dr." ); sTitle += i18n( "Miss" ); @@ -138,7 +138,7 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, sTitle += config.readListEntry( "Prefixes" ); sTitle.sort(); - QStringList sSuffix; + TQStringList sSuffix; sSuffix += ""; sSuffix += i18n( "I" ); sSuffix += i18n( "II" ); @@ -159,24 +159,24 @@ NameEditDialog::NameEditDialog( const KABC::Addressee &addr, int type, KAcceleratorManager::manage( this ); - connect( mPrefixCombo, SIGNAL( textChanged( const QString& ) ), - this, SLOT( modified() ) ); - connect( mGivenNameEdit, SIGNAL( textChanged( const QString& ) ), - this, SLOT( modified() ) ); - connect( mAdditionalNameEdit, SIGNAL( textChanged( const QString& ) ), - this, SLOT( modified() ) ); - connect( mFamilyNameEdit, SIGNAL( textChanged( const QString& ) ), - this, SLOT( modified() ) ); - connect( mSuffixCombo, SIGNAL( textChanged( const QString& ) ), - this, SLOT( modified() ) ); - connect( mFormattedNameCombo, SIGNAL( activated( int ) ), - this, SLOT( modified() ) ); - connect( mFormattedNameCombo, SIGNAL( activated( int ) ), - this, SLOT( formattedNameTypeChanged() ) ); - connect( mFormattedNameEdit, SIGNAL( textChanged( const QString& ) ), - this, SLOT( modified() ) ); - connect( mFormattedNameEdit, SIGNAL( textChanged( const QString& ) ), - this, SLOT( formattedNameChanged( const QString& ) ) ); + connect( mPrefixCombo, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( modified() ) ); + connect( mGivenNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( modified() ) ); + connect( mAdditionalNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( modified() ) ); + connect( mFamilyNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( modified() ) ); + connect( mSuffixCombo, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( modified() ) ); + connect( mFormattedNameCombo, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( modified() ) ); + connect( mFormattedNameCombo, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( formattedNameTypeChanged() ) ); + connect( mFormattedNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( modified() ) ); + connect( mFormattedNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( formattedNameChanged( const TQString& ) ) ); initTypeCombo(); mFormattedNameCombo->setCurrentItem( type ); @@ -188,32 +188,32 @@ NameEditDialog::~NameEditDialog() { } -QString NameEditDialog::familyName() const +TQString NameEditDialog::familyName() const { return mFamilyNameEdit->text(); } -QString NameEditDialog::givenName() const +TQString NameEditDialog::givenName() const { return mGivenNameEdit->text(); } -QString NameEditDialog::prefix() const +TQString NameEditDialog::prefix() const { return mPrefixCombo->currentText(); } -QString NameEditDialog::suffix() const +TQString NameEditDialog::suffix() const { return mSuffixCombo->currentText(); } -QString NameEditDialog::additionalName() const +TQString NameEditDialog::additionalName() const { return mAdditionalNameEdit->text(); } -QString NameEditDialog::customFormattedName() const +TQString NameEditDialog::customFormattedName() const { return mFormattedNameEdit->text(); } @@ -230,7 +230,7 @@ bool NameEditDialog::changed() const void NameEditDialog::formattedNameTypeChanged() { - QString name; + TQString name; if ( formattedNameType() == CustomName ) name = mCustomFormattedName; @@ -249,9 +249,9 @@ void NameEditDialog::formattedNameTypeChanged() mFormattedNameEdit->setText( name ); } -QString NameEditDialog::formattedName( const KABC::Addressee &addr, int type ) +TQString NameEditDialog::formattedName( const KABC::Addressee &addr, int type ) { - QString name; + TQString name; switch ( type ) { case SimpleName: @@ -287,7 +287,7 @@ void NameEditDialog::typeChanged( int pos ) mFormattedNameEdit->setEnabled( pos == 0 ); } -void NameEditDialog::formattedNameChanged( const QString &name ) +void NameEditDialog::formattedNameChanged( const TQString &name ) { if ( formattedNameType() == CustomName ) mCustomFormattedName = name; diff --git a/kaddressbook/nameeditdialog.h b/kaddressbook/nameeditdialog.h index 6581eccac..6ba602c92 100644 --- a/kaddressbook/nameeditdialog.h +++ b/kaddressbook/nameeditdialog.h @@ -53,20 +53,20 @@ class NameEditDialog : public KDialogBase }; NameEditDialog( const KABC::Addressee &addr, int type, - bool readOnly, QWidget *parent, const char *name = 0 ); + bool readOnly, TQWidget *parent, const char *name = 0 ); ~NameEditDialog(); - QString familyName() const; - QString givenName() const; - QString prefix() const; - QString suffix() const; - QString additionalName() const; - QString customFormattedName() const; + TQString familyName() const; + TQString givenName() const; + TQString prefix() const; + TQString suffix() const; + TQString additionalName() const; + TQString customFormattedName() const; int formattedNameType() const; bool changed() const; - static QString formattedName( const KABC::Addressee &addr, int type ); + static TQString formattedName( const KABC::Addressee &addr, int type ); protected slots: void slotHelp(); @@ -74,7 +74,7 @@ class NameEditDialog : public KDialogBase private slots: void parseBoxChanged( bool ); void formattedNameTypeChanged(); - void formattedNameChanged( const QString& ); + void formattedNameChanged( const TQString& ); void typeChanged( int ); void initTypeCombo(); void modified(); @@ -87,11 +87,11 @@ class NameEditDialog : public KDialogBase KLineEdit *mGivenNameEdit; KLineEdit *mAdditionalNameEdit; KLineEdit *mFormattedNameEdit; - QCheckBox *mParseBox; + TQCheckBox *mParseBox; AddresseeConfig mAddresseeConfig; KABC::Addressee mAddressee; - QString mCustomFormattedName; + TQString mCustomFormattedName; bool mChanged; }; diff --git a/kaddressbook/phoneeditwidget.cpp b/kaddressbook/phoneeditwidget.cpp index 6b696dc93..71a9f504f 100644 --- a/kaddressbook/phoneeditwidget.cpp +++ b/kaddressbook/phoneeditwidget.cpp @@ -21,16 +21,16 @@ without including the source code for Qt in the source distribution. */ -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistbox.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qsignalmapper.h> -#include <qstring.h> -#include <qtooltip.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistbox.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqsignalmapper.h> +#include <tqstring.h> +#include <tqtooltip.h> #include <kapplication.h> #include <kbuttonbox.h> @@ -46,7 +46,7 @@ #include "phoneeditwidget.h" -PhoneTypeCombo::PhoneTypeCombo( QWidget *parent ) +PhoneTypeCombo::PhoneTypeCombo( TQWidget *parent ) : KComboBox( parent, "TypeCombo" ), mType( KABC::PhoneNumber::Home ), mLastSelected( 0 ), @@ -56,10 +56,10 @@ PhoneTypeCombo::PhoneTypeCombo( QWidget *parent ) update(); - connect( this, SIGNAL( activated( int ) ), - this, SLOT( selected( int ) ) ); - connect( this, SIGNAL( activated( int ) ), - this, SIGNAL( modified() ) ); + connect( this, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( selected( int ) ) ); + connect( this, TQT_SIGNAL( activated( int ) ), + this, TQT_SIGNAL( modified() ) ); } PhoneTypeCombo::~PhoneTypeCombo() @@ -86,7 +86,7 @@ void PhoneTypeCombo::update() blockSignals( true ); clear(); - QValueList<int>::ConstIterator it; + TQValueList<int>::ConstIterator it; for ( it = mTypeList.begin(); it != mTypeList.end(); ++it ) { if ( *it == -1 ) { // "Other..." entry insertItem( i18n( "Other..." ) ); @@ -126,10 +126,10 @@ void PhoneTypeCombo::otherSelected() update(); } -PhoneNumberWidget::PhoneNumberWidget( QWidget *parent ) - : QWidget( parent ) +PhoneNumberWidget::PhoneNumberWidget( TQWidget *parent ) + : TQWidget( parent ) { - QHBoxLayout *layout = new QHBoxLayout( this, 6, 11 ); + TQHBoxLayout *layout = new TQHBoxLayout( this, 6, 11 ); mTypeCombo = new PhoneTypeCombo( this ); mNumberEdit = new KLineEdit( this ); @@ -137,8 +137,8 @@ PhoneNumberWidget::PhoneNumberWidget( QWidget *parent ) layout->addWidget( mTypeCombo ); layout->addWidget( mNumberEdit ); - connect( mTypeCombo, SIGNAL( modified() ), SIGNAL( modified() ) ); - connect( mNumberEdit, SIGNAL( textChanged( const QString& ) ), SIGNAL( modified() ) ); + connect( mTypeCombo, TQT_SIGNAL( modified() ), TQT_SIGNAL( modified() ) ); + connect( mNumberEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SIGNAL( modified() ) ); } void PhoneNumberWidget::setNumber( const KABC::PhoneNumber &number ) @@ -166,28 +166,28 @@ void PhoneNumberWidget::setReadOnly( bool readOnly ) } -PhoneEditWidget::PhoneEditWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ), mReadOnly( false ) +PhoneEditWidget::PhoneEditWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), mReadOnly( false ) { - QGridLayout *layout = new QGridLayout( this, 2, 2 ); + TQGridLayout *layout = new TQGridLayout( this, 2, 2 ); layout->setSpacing( KDialog::spacingHint() ); - mWidgetLayout = new QVBoxLayout( layout ); + mWidgetLayout = new TQVBoxLayout( layout ); layout->addMultiCellLayout( mWidgetLayout, 0, 0, 0, 1 ); - mAddButton = new QPushButton( i18n( "Add" ), this ); + mAddButton = new TQPushButton( i18n( "Add" ), this ); mAddButton->setMaximumSize( mAddButton->sizeHint() ); layout->addWidget( mAddButton, 1, 0, Qt::AlignRight ); - mRemoveButton = new QPushButton( i18n( "Remove" ), this ); + mRemoveButton = new TQPushButton( i18n( "Remove" ), this ); mRemoveButton->setMaximumSize( mRemoveButton->sizeHint() ); layout->addWidget( mRemoveButton, 1, 1 ); - mMapper = new QSignalMapper( this ); - connect( mMapper, SIGNAL( mapped( int ) ), SLOT( changed( int ) ) ); + mMapper = new TQSignalMapper( this ); + connect( mMapper, TQT_SIGNAL( mapped( int ) ), TQT_SLOT( changed( int ) ) ); - connect( mAddButton, SIGNAL( clicked() ), SLOT( add() ) ); - connect( mRemoveButton, SIGNAL( clicked() ), SLOT( remove() ) ); + connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( add() ) ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( remove() ) ); } PhoneEditWidget::~PhoneEditWidget() @@ -200,7 +200,7 @@ void PhoneEditWidget::setReadOnly( bool readOnly ) mAddButton->setEnabled( !readOnly ); mRemoveButton->setEnabled( !readOnly && mPhoneNumberList.count() > 3 ); - QPtrListIterator<PhoneNumberWidget> it( mWidgets ); + TQPtrListIterator<PhoneNumberWidget> it( mWidgets ); while ( it.current() ) { it.current()->setReadOnly( readOnly ); ++it; @@ -259,7 +259,7 @@ void PhoneEditWidget::remove() void PhoneEditWidget::recreateNumberWidgets() { - for ( QWidget *w = mWidgets.first(); w; w = mWidgets.next() ) { + for ( TQWidget *w = mWidgets.first(); w; w = mWidgets.next() ) { mWidgetLayout->remove( w ); w->deleteLater(); } @@ -272,7 +272,7 @@ void PhoneEditWidget::recreateNumberWidgets() wdg->setNumber( *it ); mMapper->setMapping( wdg, counter ); - connect( wdg, SIGNAL( modified() ), mMapper, SLOT( map() ) ); + connect( wdg, TQT_SIGNAL( modified() ), mMapper, TQT_SLOT( map() ) ); mWidgetLayout->addWidget( wdg ); mWidgets.append( wdg ); @@ -291,19 +291,19 @@ void PhoneEditWidget::changed( int pos ) /////////////////////////////////////////// // PhoneTypeDialog -PhoneTypeDialog::PhoneTypeDialog( int type, QWidget *parent ) +PhoneTypeDialog::PhoneTypeDialog( int type, TQWidget *parent ) : KDialogBase( Plain, i18n( "Edit Phone Number" ), Ok | Cancel, Ok, parent, "PhoneTypeDialog", true ), mType( type ) { - QWidget *page = plainPage(); + TQWidget *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page, spacingHint() ); + TQVBoxLayout *layout = new TQVBoxLayout( page, spacingHint() ); - mPreferredBox = new QCheckBox( i18n( "This is the preferred phone number" ), page ); + mPreferredBox = new TQCheckBox( i18n( "This is the preferred phone number" ), page ); layout->addWidget( mPreferredBox ); - mGroup = new QButtonGroup( 2, Horizontal, i18n( "Types" ), page ); + mGroup = new TQButtonGroup( 2, Horizontal, i18n( "Types" ), page ); layout->addWidget( mGroup ); // fill widgets @@ -312,10 +312,10 @@ PhoneTypeDialog::PhoneTypeDialog( int type, QWidget *parent ) KABC::PhoneNumber::TypeList::ConstIterator it; for ( it = mTypeList.begin(); it != mTypeList.end(); ++it ) - new QCheckBox( KABC::PhoneNumber::typeLabel( *it ), mGroup ); + new TQCheckBox( KABC::PhoneNumber::typeLabel( *it ), mGroup ); for ( int i = 0; i < mGroup->count(); ++i ) { - QCheckBox *box = (QCheckBox*)mGroup->find( i ); + TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); box->setChecked( mType & mTypeList[ i ] ); } @@ -327,7 +327,7 @@ int PhoneTypeDialog::type() const int type = 0; for ( int i = 0; i < mGroup->count(); ++i ) { - QCheckBox *box = (QCheckBox*)mGroup->find( i ); + TQCheckBox *box = (TQCheckBox*)mGroup->find( i ); if ( box->isChecked() ) type += mTypeList[ i ]; } diff --git a/kaddressbook/phoneeditwidget.h b/kaddressbook/phoneeditwidget.h index e123f68a0..7089d1c2b 100644 --- a/kaddressbook/phoneeditwidget.h +++ b/kaddressbook/phoneeditwidget.h @@ -41,7 +41,7 @@ class PhoneTypeCombo : public KComboBox Q_OBJECT public: - PhoneTypeCombo( QWidget *parent ); + PhoneTypeCombo( TQWidget *parent ); ~PhoneTypeCombo(); void setType( int type ); @@ -59,7 +59,7 @@ class PhoneTypeCombo : public KComboBox int mType; int mLastSelected; - QValueList<int> mTypeList; + TQValueList<int> mTypeList; }; class PhoneNumberWidget : public QWidget @@ -67,7 +67,7 @@ class PhoneNumberWidget : public QWidget Q_OBJECT public: - PhoneNumberWidget( QWidget *parent ); + PhoneNumberWidget( TQWidget *parent ); void setNumber( const KABC::PhoneNumber &number ); KABC::PhoneNumber number() const; @@ -91,7 +91,7 @@ class PhoneEditWidget : public QWidget Q_OBJECT public: - PhoneEditWidget( QWidget *parent, const char *name = 0 ); + PhoneEditWidget( TQWidget *parent, const char *name = 0 ); ~PhoneEditWidget(); void setPhoneNumbers( const KABC::PhoneNumber::List &list ); @@ -112,14 +112,14 @@ class PhoneEditWidget : public QWidget void recreateNumberWidgets(); KABC::PhoneNumber::List mPhoneNumberList; - QPtrList<PhoneNumberWidget> mWidgets; + TQPtrList<PhoneNumberWidget> mWidgets; - QPushButton *mAddButton; - QPushButton *mRemoveButton; - QVBoxLayout *mWidgetLayout; + TQPushButton *mAddButton; + TQPushButton *mRemoveButton; + TQVBoxLayout *mWidgetLayout; bool mReadOnly; - QSignalMapper *mMapper; + TQSignalMapper *mMapper; }; /** @@ -129,7 +129,7 @@ class PhoneTypeDialog : public KDialogBase { Q_OBJECT public: - PhoneTypeDialog( int type, QWidget *parent ); + PhoneTypeDialog( int type, TQWidget *parent ); int type() const; @@ -137,8 +137,8 @@ class PhoneTypeDialog : public KDialogBase int mType; KABC::PhoneNumber::TypeList mTypeList; - QButtonGroup *mGroup; - QCheckBox *mPreferredBox; + TQButtonGroup *mGroup; + TQCheckBox *mPreferredBox; }; #endif 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; diff --git a/kaddressbook/searchmanager.cpp b/kaddressbook/searchmanager.cpp index 1919dfea8..0cd23b5a1 100644 --- a/kaddressbook/searchmanager.cpp +++ b/kaddressbook/searchmanager.cpp @@ -29,12 +29,12 @@ using namespace KAB; SearchManager::SearchManager( KABC::AddressBook *ab, - QObject *parent, const char *name ) - : QObject( parent, name ), mAddressBook( ab ) + TQObject *parent, const char *name ) + : TQObject( parent, name ), mAddressBook( ab ) { } -void SearchManager::search( const QString &pattern, const KABC::Field::List &fields, Type type ) +void SearchManager::search( const TQString &pattern, const KABC::Field::List &fields, Type type ) { mPattern = pattern; mFields = fields; @@ -129,14 +129,14 @@ void SearchManager::search( const QString &pattern, const KABC::Field::List &fie if ( !found ) { // search over custom fields - const QStringList customs = (*it).customs(); + const TQStringList customs = (*it).customs(); - QStringList::ConstIterator customIt( customs.begin() ); - const QStringList::ConstIterator customEndIt( customs.end() ); + TQStringList::ConstIterator customIt( customs.begin() ); + const TQStringList::ConstIterator customEndIt( customs.end() ); for ( ; customIt != customEndIt; ++customIt ) { int pos = (*customIt).find( ':' ); if ( pos != -1 ) { - const QString value = (*customIt).mid( pos + 1 ); + const TQString value = (*customIt).mid( pos + 1 ); if ( type == StartsWith && value.startsWith( pattern, false ) ) { mContacts.append( *it ); break; @@ -170,7 +170,7 @@ void SearchManager::reload() #ifdef KDEPIM_NEW_DISTRLISTS -void KAB::SearchManager::setSelectedDistributionList( const QString &name ) +void KAB::SearchManager::setSelectedDistributionList( const TQString &name ) { if ( mSelectedDistributionList == name ) return; @@ -183,9 +183,9 @@ KPIM::DistributionList::List KAB::SearchManager::distributionLists() const return mDistributionLists; } -QStringList KAB::SearchManager::distributionListNames() const +TQStringList KAB::SearchManager::distributionListNames() const { - QStringList lst; + TQStringList lst; KPIM::DistributionList::List::ConstIterator it( mDistributionLists.begin() ); const KPIM::DistributionList::List::ConstIterator endIt( mDistributionLists.end() ); for ( ; it != endIt; ++it ) { diff --git a/kaddressbook/searchmanager.h b/kaddressbook/searchmanager.h index 2179f6f60..88ce94c7b 100644 --- a/kaddressbook/searchmanager.h +++ b/kaddressbook/searchmanager.h @@ -25,7 +25,7 @@ #define SEARCHMANAGER_H #include <config.h> // for KDEPIM_NEW_DISTRLISTS -#include <qobject.h> +#include <tqobject.h> #include <kabc/stdaddressbook.h> #ifdef KDEPIM_NEW_DISTRLISTS @@ -47,7 +47,7 @@ class SearchManager : public QObject }; SearchManager( KABC::AddressBook *ab, - QObject *parent, const char *name = 0 ); + TQObject *parent, const char *name = 0 ); /** This method takes a pattern and searches for a match of the specified @@ -58,7 +58,7 @@ class SearchManager : public QObject @param field The field which shall be compared with the search string. @param type The type for the matching. */ - void search( const QString &pattern, const KABC::Field::List &fields, Type type = Contains ); + void search( const TQString &pattern, const KABC::Field::List &fields, Type type = Contains ); /** Returns the contacts which matched the last search query. @@ -70,7 +70,7 @@ class SearchManager : public QObject /** sets the distribution list to be shown */ - void setSelectedDistributionList( const QString &name ); + void setSelectedDistributionList( const TQString &name ); /** Returns all the distribution lists. @@ -80,7 +80,7 @@ class SearchManager : public QObject /** Returns the name of all the distribution lists. */ - QStringList distributionListNames() const; + TQStringList distributionListNames() const; #endif signals: @@ -95,12 +95,12 @@ class SearchManager : public QObject private: KABC::Addressee::List mContacts; #ifdef KDEPIM_NEW_DISTRLISTS - QString mSelectedDistributionList; + TQString mSelectedDistributionList; KPIM::DistributionList::List mDistributionLists; #endif KABC::AddressBook *mAddressBook; - QString mPattern; + TQString mPattern; KABC::Field::List mFields; Type mType; }; diff --git a/kaddressbook/secrecywidget.cpp b/kaddressbook/secrecywidget.cpp index 70b3bf3c8..5a39ddfa7 100644 --- a/kaddressbook/secrecywidget.cpp +++ b/kaddressbook/secrecywidget.cpp @@ -21,7 +21,7 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> +#include <tqlayout.h> #include <kabc/secrecy.h> #include <kcombobox.h> @@ -29,10 +29,10 @@ #include "secrecywidget.h" -SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name ) - : QWidget( parent, name ) +SecrecyWidget::SecrecyWidget( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - QVBoxLayout *layout = new QVBoxLayout( this, KDialog::marginHint(), + TQVBoxLayout *layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); mSecrecyCombo = new KComboBox( this ); layout->addWidget( mSecrecyCombo ); @@ -42,8 +42,8 @@ SecrecyWidget::SecrecyWidget( QWidget *parent, const char *name ) for ( it = list.begin(); it != list.end(); ++it ) mSecrecyCombo->insertItem( KABC::Secrecy::typeLabel( *it ), *it ); - connect( mSecrecyCombo, SIGNAL( activated( const QString& ) ), - SIGNAL( changed() ) ); + connect( mSecrecyCombo, TQT_SIGNAL( activated( const TQString& ) ), + TQT_SIGNAL( changed() ) ); } SecrecyWidget::~SecrecyWidget() diff --git a/kaddressbook/secrecywidget.h b/kaddressbook/secrecywidget.h index e73e6fac0..0c07c0156 100644 --- a/kaddressbook/secrecywidget.h +++ b/kaddressbook/secrecywidget.h @@ -24,7 +24,7 @@ #ifndef SECRECYWIDGET_H #define SECRECYWIDGET_H -#include <qwidget.h> +#include <tqwidget.h> namespace KABC { class Secrecy; } class KComboBox; @@ -34,7 +34,7 @@ class SecrecyWidget : public QWidget Q_OBJECT public: - SecrecyWidget( QWidget *parent, const char *name = 0 ); + SecrecyWidget( TQWidget *parent, const char *name = 0 ); ~SecrecyWidget(); void setSecrecy( const KABC::Secrecy &secrecy ); diff --git a/kaddressbook/simpleaddresseeeditor.cpp b/kaddressbook/simpleaddresseeeditor.cpp index e377feeed..f55ab303b 100644 --- a/kaddressbook/simpleaddresseeeditor.cpp +++ b/kaddressbook/simpleaddresseeeditor.cpp @@ -21,8 +21,8 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klineedit.h> #include <klocale.h> @@ -30,7 +30,7 @@ #include "simpleaddresseeeditor.h" -SimpleAddresseeEditor::SimpleAddresseeEditor( QWidget *parent, const char *name ) +SimpleAddresseeEditor::SimpleAddresseeEditor( TQWidget *parent, const char *name ) : AddresseeEditorBase( parent, name ), mDirty( false ), mBlockModified( false ) @@ -64,24 +64,24 @@ void SimpleAddresseeEditor::setInitialFocus() void SimpleAddresseeEditor::initGui() { - 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( "Name:" ), this ); + TQLabel *label = new TQLabel( i18n( "Name:" ), this ); topLayout->addWidget( label, 0, 0 ); mNameEdit = new KLineEdit( this ); topLayout->addWidget( mNameEdit, 0, 1 ); - connect( mNameEdit, SIGNAL( textChanged( const QString & ) ), - SLOT( emitModified() ) ); + connect( mNameEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( emitModified() ) ); - label = new QLabel( i18n( "Email:" ), this ); + label = new TQLabel( i18n( "Email:" ), this ); topLayout->addWidget( label, 1, 0 ); mEmailEdit = new KLineEdit( this ); topLayout->addWidget( mEmailEdit, 1, 1 ); - connect( mEmailEdit, SIGNAL( textChanged( const QString & ) ), - SLOT( emitModified() ) ); + connect( mEmailEdit, TQT_SIGNAL( textChanged( const TQString & ) ), + TQT_SLOT( emitModified() ) ); } void SimpleAddresseeEditor::load() diff --git a/kaddressbook/simpleaddresseeeditor.h b/kaddressbook/simpleaddresseeeditor.h index 560148901..f8e16fb26 100644 --- a/kaddressbook/simpleaddresseeeditor.h +++ b/kaddressbook/simpleaddresseeeditor.h @@ -33,7 +33,7 @@ class SimpleAddresseeEditor : public AddresseeEditorBase { Q_OBJECT public: - SimpleAddresseeEditor( QWidget *parent, const char *name = 0 ); + SimpleAddresseeEditor( TQWidget *parent, const char *name = 0 ); ~SimpleAddresseeEditor(); void setAddressee( const KABC::Addressee& ); diff --git a/kaddressbook/soundwidget.cpp b/kaddressbook/soundwidget.cpp index 74b8137ef..ca0a9bfde 100644 --- a/kaddressbook/soundwidget.cpp +++ b/kaddressbook/soundwidget.cpp @@ -31,54 +31,54 @@ #include <ktempfile.h> #include <kurlrequester.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qwhatsthis.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqwhatsthis.h> #include "soundwidget.h" -SoundWidget::SoundWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) +SoundWidget::SoundWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::ContactEditorWidget( ab, parent, name ), mReadOnly( false ) { - QGridLayout *topLayout = new QGridLayout( this, 2, 3, KDialog::marginHint(), + TQGridLayout *topLayout = new TQGridLayout( this, 2, 3, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel *label = new QLabel( this ); + TQLabel *label = new TQLabel( this ); label->setPixmap( KGlobal::iconLoader()->loadIcon( "multimedia", KIcon::Desktop, KIcon::SizeMedium ) ); label->setAlignment( Qt::AlignTop ); topLayout->addMultiCellWidget( label, 0, 1, 0, 0 ); - mPlayButton = new QPushButton( i18n( "Play" ), this ); + mPlayButton = new TQPushButton( i18n( "Play" ), this ); mPlayButton->setEnabled( false ); topLayout->addWidget( mPlayButton, 0, 1 ); mSoundUrl = new KURLRequester( this ); topLayout->addWidget( mSoundUrl, 0, 2 ); - mUseSoundUrl = new QCheckBox( i18n( "Store as URL" ), this ); + mUseSoundUrl = new TQCheckBox( i18n( "Store as URL" ), this ); mUseSoundUrl->setEnabled( false ); topLayout->addWidget( mUseSoundUrl, 1, 2 ); - connect( mSoundUrl, SIGNAL( textChanged( const QString& ) ), - SLOT( setModified() ) ); - connect( mSoundUrl, SIGNAL( textChanged( const QString& ) ), - SLOT( urlChanged( const QString& ) ) ); - connect( mUseSoundUrl, SIGNAL( toggled( bool ) ), - SLOT( setModified() ) ); - connect( mUseSoundUrl, SIGNAL( toggled( bool ) ), - mPlayButton, SLOT( setDisabled( bool ) ) ); - connect( mSoundUrl, SIGNAL( urlSelected( const QString& ) ), - SLOT( loadSound() ) ); - connect( mSoundUrl, SIGNAL( urlSelected( const QString& ) ), - SLOT( updateGUI() ) ); - connect( mPlayButton, SIGNAL( clicked() ), - SLOT( playSound() ) ); - - QWhatsThis::add( this, i18n( "This field stores a sound file which contains the name of the contact to clarify the pronunciation." ) ); - QWhatsThis::add( mUseSoundUrl, i18n( "Save only the URL to the sound file, not the whole object." ) ); + connect( mSoundUrl, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( setModified() ) ); + connect( mSoundUrl, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( urlChanged( const TQString& ) ) ); + connect( mUseSoundUrl, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( setModified() ) ); + connect( mUseSoundUrl, TQT_SIGNAL( toggled( bool ) ), + mPlayButton, TQT_SLOT( setDisabled( bool ) ) ); + connect( mSoundUrl, TQT_SIGNAL( urlSelected( const TQString& ) ), + TQT_SLOT( loadSound() ) ); + connect( mSoundUrl, TQT_SIGNAL( urlSelected( const TQString& ) ), + TQT_SLOT( updateGUI() ) ); + connect( mPlayButton, TQT_SIGNAL( clicked() ), + TQT_SLOT( playSound() ) ); + + TQWhatsThis::add( this, i18n( "This field stores a sound file which contains the name of the contact to clarify the pronunciation." ) ); + TQWhatsThis::add( mUseSoundUrl, i18n( "Save only the URL to the sound file, not the whole object." ) ); } SoundWidget::~SoundWidget() @@ -138,7 +138,7 @@ void SoundWidget::playSound() void SoundWidget::loadSound() { - QString fileName; + TQString fileName; KURL url( mSoundUrl->url() ); @@ -150,7 +150,7 @@ void SoundWidget::loadSound() else if ( !KIO::NetAccess::download( url, fileName, this ) ) return; - QFile file( fileName ); + TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) return; @@ -167,7 +167,7 @@ void SoundWidget::updateGUI() mUseSoundUrl->setEnabled( !mReadOnly ); } -void SoundWidget::urlChanged( const QString &url ) +void SoundWidget::urlChanged( const TQString &url ) { if ( !mUseSoundUrl->isChecked() ) { bool state = !url.isEmpty(); diff --git a/kaddressbook/soundwidget.h b/kaddressbook/soundwidget.h index b0ad168a7..7dd0e116a 100644 --- a/kaddressbook/soundwidget.h +++ b/kaddressbook/soundwidget.h @@ -38,7 +38,7 @@ class SoundWidget : public KAB::ContactEditorWidget Q_OBJECT public: - SoundWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + SoundWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); ~SoundWidget(); void loadContact( KABC::Addressee *addr ); @@ -49,13 +49,13 @@ class SoundWidget : public KAB::ContactEditorWidget void playSound(); void loadSound(); void updateGUI(); - void urlChanged( const QString& ); + void urlChanged( const TQString& ); private: KURLRequester *mSoundUrl; - QCheckBox *mUseSoundUrl; - QPushButton *mPlayButton; + TQCheckBox *mUseSoundUrl; + TQPushButton *mPlayButton; KABC::Sound mSound; bool mReadOnly; @@ -64,12 +64,12 @@ class SoundWidget : public KAB::ContactEditorWidget class SoundWidgetFactory : public KAB::ContactEditorWidgetFactory { public: - KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) + KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) { return new SoundWidget( ab, parent, name ); } - QString pageIdentifier() const { return "misc"; } + TQString pageIdentifier() const { return "misc"; } }; #endif diff --git a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp index 4c8a5611e..0ed562e18 100644 --- a/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp +++ b/kaddressbook/thumbnailcreator/ldifvcardcreator.cpp @@ -26,12 +26,12 @@ * */ -#include <qdatetime.h> -#include <qfile.h> -#include <qpixmap.h> -#include <qimage.h> -#include <qpainter.h> -#include <qtextstream.h> +#include <tqdatetime.h> +#include <tqfile.h> +#include <tqpixmap.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqtextstream.h> #include <kdebug.h> #include <kglobal.h> @@ -64,18 +64,18 @@ VCard_LDIFCreator::~VCard_LDIFCreator() } -bool VCard_LDIFCreator::readContents( const QString &path ) +bool VCard_LDIFCreator::readContents( const TQString &path ) { // read file contents - QFile file( path ); + TQFile file( path ); if ( !file.open( IO_ReadOnly ) ) return false; - QString info; + TQString info; text.truncate(0); // read the file - QString contents = file.readAll(); + TQString contents = file.readAll(); file.close(); // convert the file contents to a KABC::Addressee address @@ -117,9 +117,9 @@ bool VCard_LDIFCreator::readContents( const QString &path ) KABC::PhoneNumber::List pnList = addr.phoneNumbers(); - QStringList phoneNumbers; + TQStringList phoneNumbers; for (unsigned int no=0; no<pnList.count(); ++no) { - QString pn = pnList[no].number().simplifyWhiteSpace(); + TQString pn = pnList[no].number().simplifyWhiteSpace(); if (!pn.isEmpty() && !phoneNumbers.contains(pn)) phoneNumbers.append(pn); } @@ -150,18 +150,18 @@ bool VCard_LDIFCreator::createImageSmall() if ( !mSplitter ) { mSplitter = new KPixmapSplitter; - QString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" ); + TQString pixmap = locate( "data", "konqueror/pics/thumbnailfont_7x4.png" ); if ( pixmap.isEmpty() ) { delete mSplitter; mSplitter=0; kdWarning() << "VCard_LDIFCreator: Font image \"thumbnailfont_7x4.png\" not found!\n"; return false; } - mSplitter->setPixmap( QPixmap( pixmap ) ); - mSplitter->setItemSize( QSize( 4, 7 ) ); + mSplitter->setPixmap( TQPixmap( pixmap ) ); + mSplitter->setItemSize( TQSize( 4, 7 ) ); } - QSize chSize = mSplitter->itemSize(); // the size of one char + TQSize chSize = mSplitter->itemSize(); // the size of one char int xOffset = chSize.width(); int yOffset = chSize.height(); @@ -172,7 +172,7 @@ bool VCard_LDIFCreator::createImageSmall() int numLines = (int) (canvasHeight / chSize.height()); // render the information - QRect rect; + TQRect rect; int rest = mPixmap.width() - (numCharsPerLine * chSize.width()); xborder = QMAX( xborder, rest / 2 ); // center horizontally rest = mPixmap.height() - (numLines * chSize.height()); @@ -184,7 +184,7 @@ bool VCard_LDIFCreator::createImageSmall() int posLastLine = mPixmap.height() - (chSize.height() + yborder); bool newLine = false; Q_ASSERT( posNewLine > 0 ); - const QPixmap *fontPixmap = &(mSplitter->pixmap()); + const TQPixmap *fontPixmap = &(mSplitter->pixmap()); for ( uint i = 0; i < text.length(); i++ ) { if ( x > posNewLine || newLine ) { // start a new line? @@ -206,7 +206,7 @@ bool VCard_LDIFCreator::createImageSmall() } // check for newlines in the text (unix,dos) - QChar ch = text.at( i ); + TQChar ch = text.at( i ); if ( ch == '\n' ) { newLine = true; continue; @@ -218,7 +218,7 @@ bool VCard_LDIFCreator::createImageSmall() rect = mSplitter->coordinates( ch ); if ( !rect.isEmpty() ) - bitBlt( &mPixmap, QPoint(x,y), fontPixmap, rect, Qt::CopyROP ); + bitBlt( &mPixmap, TQPoint(x,y), fontPixmap, rect, Qt::CopyROP ); x += xOffset; // next character } @@ -228,19 +228,19 @@ bool VCard_LDIFCreator::createImageSmall() bool VCard_LDIFCreator::createImageBig() { - QFont normalFont( KGlobalSettings::generalFont() ); - QFont titleFont( normalFont ); + TQFont normalFont( KGlobalSettings::generalFont() ); + TQFont titleFont( normalFont ); titleFont.setBold(true); // titleFont.setUnderline(true); titleFont.setItalic(true); - QPainter painter(&mPixmap); + TQPainter painter(&mPixmap); painter.setFont(titleFont); - QFontMetrics fm(painter.fontMetrics()); + TQFontMetrics fm(painter.fontMetrics()); // draw contact name painter.setClipRect(2, 2, pixmapSize.width()-4, pixmapSize.height()-4); - QPoint p(5, fm.height()+2); + TQPoint p(5, fm.height()+2); painter.drawText(p, name); p.setY( 3*p.y()/2 ); @@ -248,8 +248,8 @@ bool VCard_LDIFCreator::createImageBig() painter.setFont(normalFont); fm = painter.fontMetrics(); - const QStringList list( QStringList::split('\n', text) ); - for ( QStringList::ConstIterator it = list.begin(); + const TQStringList list( TQStringList::split('\n', text) ); + for ( TQStringList::ConstIterator it = list.begin(); p.y()<=pixmapSize.height() && it != list.end(); ++it ) { p.setY( p.y() + fm.height() ); painter.drawText(p, *it); @@ -258,13 +258,13 @@ bool VCard_LDIFCreator::createImageBig() return true; } -bool VCard_LDIFCreator::create(const QString &path, int width, int height, QImage &img) +bool VCard_LDIFCreator::create(const TQString &path, int width, int height, TQImage &img) { if ( !readContents(path) ) return false; // resize the image if necessary - pixmapSize = QSize( width, height ); + pixmapSize = TQSize( width, height ); if (height * 3 > width * 4) pixmapSize.setHeight( width * 4 / 3 ); else @@ -273,7 +273,7 @@ bool VCard_LDIFCreator::create(const QString &path, int width, int height, QImag if ( pixmapSize != mPixmap.size() ) mPixmap.resize( pixmapSize ); - mPixmap.fill( QColor( 245, 245, 245 ) ); // light-grey background + mPixmap.fill( TQColor( 245, 245, 245 ) ); // light-grey background // one pixel for the rectangle, the rest. whitespace xborder = 1 + pixmapSize.width()/16; // minimum x-border diff --git a/kaddressbook/thumbnailcreator/ldifvcardcreator.h b/kaddressbook/thumbnailcreator/ldifvcardcreator.h index e6ae6ba42..7b5cface5 100644 --- a/kaddressbook/thumbnailcreator/ldifvcardcreator.h +++ b/kaddressbook/thumbnailcreator/ldifvcardcreator.h @@ -21,7 +21,7 @@ #ifndef VCARD_LDIFCREATOR_H #define VCARD_LDIFCREATOR_H -#include <qpixmap.h> +#include <tqpixmap.h> #include <kio/thumbcreator.h> class KPixmapSplitter; @@ -31,18 +31,18 @@ class VCard_LDIFCreator : public ThumbCreator public: VCard_LDIFCreator(); virtual ~VCard_LDIFCreator(); - virtual bool create(const QString &path, int width, int height, QImage &img); + virtual bool create(const TQString &path, int width, int height, TQImage &img); virtual Flags flags() const; private: KPixmapSplitter *mSplitter; - QPixmap mPixmap; + TQPixmap mPixmap; - QString name; - QString text; - bool readContents( const QString &path ); + TQString name; + TQString text; + bool readContents( const TQString &path ); int xborder, yborder; - QSize pixmapSize; + TQSize pixmapSize; bool createImageSmall(); bool createImageBig(); }; diff --git a/kaddressbook/typecombo.h b/kaddressbook/typecombo.h index 3b411c86c..90a000110 100644 --- a/kaddressbook/typecombo.h +++ b/kaddressbook/typecombo.h @@ -37,10 +37,10 @@ class TypeCombo : public KComboBox typedef typename T::List List; typedef typename T::List::Iterator Iterator; - TypeCombo( List &list, QWidget *parent, const char *name = 0 ); + TypeCombo( List &list, TQWidget *parent, const char *name = 0 ); - void setLineEdit( QLineEdit *edit ) { mLineEdit = edit; } - QLineEdit *lineEdit() const { return mLineEdit; } + void setLineEdit( TQLineEdit *edit ) { mLineEdit = edit; } + TQLineEdit *lineEdit() const { return mLineEdit; } void updateTypes(); @@ -58,11 +58,11 @@ class TypeCombo : public KComboBox private: List &mTypeList; - QLineEdit *mLineEdit; + TQLineEdit *mLineEdit; }; template <class T> -TypeCombo<T>::TypeCombo( TypeCombo::List &list, QWidget *parent, +TypeCombo<T>::TypeCombo( TypeCombo::List &list, TQWidget *parent, const char *name ) : KComboBox( parent, name ), mTypeList( list ) @@ -73,18 +73,18 @@ template <class T> void TypeCombo<T>::updateTypes() { // Remember current item - QString currentId; + TQString currentId; int current = currentItem(); if ( current >= 0 ) currentId = mTypeList[ current ].id(); clear(); - QMap<int,int> labelCount; + TQMap<int,int> labelCount; uint i; for ( i = 0; i < mTypeList.count(); ++i ) { int type = ( mTypeList[ i ].type() & ~( T::Pref ) ); - QString label = mTypeList[ i ].typeLabel( type ); + TQString label = mTypeList[ i ].typeLabel( type ); int count = 1; if ( labelCount.contains( type ) ) { count = labelCount[ type ] + 1; @@ -92,7 +92,7 @@ void TypeCombo<T>::updateTypes() labelCount[ type ] = count; if ( count > 1 ) { label = i18n("label (number)", "%1 (%2)").arg( label ) - .arg( QString::number( count ) ); + .arg( TQString::number( count ) ); } insertItem( label ); } diff --git a/kaddressbook/undocmds.cpp b/kaddressbook/undocmds.cpp index e9350c1bf..ee9895951 100644 --- a/kaddressbook/undocmds.cpp +++ b/kaddressbook/undocmds.cpp @@ -22,8 +22,8 @@ without including the source code for Qt in the source distribution. */ -#include <qapplication.h> -#include <qclipboard.h> +#include <tqapplication.h> +#include <tqclipboard.h> #include <klocale.h> #include <kapplication.h> @@ -36,12 +36,12 @@ #include "undocmds.h" DeleteCommand::DeleteCommand( KABC::AddressBook *addressBook, - const QStringList &uidList) + const TQStringList &uidList) : Command( addressBook ), mUIDList( uidList ) { } -QString DeleteCommand::name() const +TQString DeleteCommand::name() const { return i18n( "Delete Contact", "Delete %n Contacts", mUIDList.count() ); } @@ -68,8 +68,8 @@ void DeleteCommand::execute() { KABC::Addressee addr; - QStringList::ConstIterator it; - const QStringList::ConstIterator endIt( mUIDList.end() ); + TQStringList::ConstIterator it; + const TQStringList::ConstIterator endIt( mUIDList.end() ); for ( it = mUIDList.begin(); it != endIt; ++it ) { addr = addressBook()->findByUid( *it ); lock()->lock( addr.resource() ); @@ -92,7 +92,7 @@ PasteCommand::PasteCommand( KAB::Core *core, const KABC::Addressee::List &addres { } -QString PasteCommand::name() const +TQString PasteCommand::name() const { return i18n( "Paste Contact", "Paste %n Contacts", mAddresseeList.count() ); } @@ -114,7 +114,7 @@ void PasteCommand::unexecute() void PasteCommand::execute() { - QStringList uids; + TQStringList uids; KABC::Addressee::List::ConstIterator constIt; const KABC::Addressee::List::ConstIterator constEndIt( mAddresseeList.end() ); @@ -136,8 +136,8 @@ void PasteCommand::execute() lock()->unlock( (*it).resource() ); } - QStringList::ConstIterator uidIt; - const QStringList::ConstIterator uidEndIt( uids.end() ); + TQStringList::ConstIterator uidIt; + const TQStringList::ConstIterator uidEndIt( uids.end() ); for ( uidIt = uids.begin(); uidIt != uidEndIt; ++uidIt ) mCore->editContact( *uidIt ); } @@ -148,7 +148,7 @@ NewCommand::NewCommand( KABC::AddressBook *addressBook, const KABC::Addressee::L { } -QString NewCommand::name() const +TQString NewCommand::name() const { return i18n( "New Contact", "New %n Contacts", mAddresseeList.count() ); } @@ -192,7 +192,7 @@ EditCommand::EditCommand( KABC::AddressBook *addressBook, { } -QString EditCommand::name() const +TQString EditCommand::name() const { return i18n( "Edit Contact" ); } @@ -212,12 +212,12 @@ void EditCommand::execute() } -CutCommand::CutCommand( KABC::AddressBook *addressBook, const QStringList &uidList ) +CutCommand::CutCommand( KABC::AddressBook *addressBook, const TQStringList &uidList ) : Command( addressBook ), mUIDList( uidList ) { } -QString CutCommand::name() const +TQString CutCommand::name() const { return i18n( "Cut Contact", "Cut %n Contacts", mUIDList.count() ); } @@ -238,7 +238,7 @@ void CutCommand::unexecute() mAddresseeList.clear(); - QClipboard *cb = QApplication::clipboard(); + QClipboard *cb = TQApplication::clipboard(); kapp->processEvents(); cb->setText( mOldText ); } @@ -247,8 +247,8 @@ void CutCommand::execute() { KABC::Addressee addr; - QStringList::ConstIterator it; - const QStringList::ConstIterator endIt( mUIDList.end() ); + TQStringList::ConstIterator it; + const TQStringList::ConstIterator endIt( mUIDList.end() ); for ( it = mUIDList.begin(); it != endIt; ++it ) { addr = addressBook()->findByUid( *it ); mAddresseeList.append( addr ); @@ -265,7 +265,7 @@ void CutCommand::execute() // Convert to clipboard mClipText = AddresseeUtil::addresseesToClipboard( mAddresseeList ); - QClipboard *cb = QApplication::clipboard(); + QClipboard *cb = TQApplication::clipboard(); mOldText = cb->text(); kapp->processEvents(); cb->setText( mClipText ); diff --git a/kaddressbook/undocmds.h b/kaddressbook/undocmds.h index 27f7f24b9..192a4e80b 100644 --- a/kaddressbook/undocmds.h +++ b/kaddressbook/undocmds.h @@ -27,8 +27,8 @@ // Commands for undo/redo functionality. -#include <qstring.h> -#include <qstringlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <kabc/addressbook.h> #include <kabc/addressee.h> @@ -56,15 +56,15 @@ class Command : public KCommand class DeleteCommand : public Command { public: - DeleteCommand( KABC::AddressBook *addressBook, const QStringList &uidList ); + DeleteCommand( KABC::AddressBook *addressBook, const TQStringList &uidList ); - virtual QString name() const; + virtual TQString name() const; virtual void unexecute(); virtual void execute(); private: KABC::Addressee::List mAddresseeList; - QStringList mUIDList; + TQStringList mUIDList; }; class PasteCommand : public Command @@ -73,7 +73,7 @@ class PasteCommand : public Command PasteCommand( KAB::Core *core, const KABC::Addressee::List &addressees ); - virtual QString name() const; + virtual TQString name() const; virtual void unexecute(); virtual void execute(); @@ -85,17 +85,17 @@ class PasteCommand : public Command class CutCommand : public Command { public: - CutCommand( KABC::AddressBook *addressBook, const QStringList &uidList ); + CutCommand( KABC::AddressBook *addressBook, const TQStringList &uidList ); - virtual QString name() const; + virtual TQString name() const; virtual void unexecute(); virtual void execute(); private: KABC::Addressee::List mAddresseeList; - QStringList mUIDList; - QString mClipText; - QString mOldText; + TQStringList mUIDList; + TQString mClipText; + TQString mOldText; }; class NewCommand : public Command @@ -104,7 +104,7 @@ class NewCommand : public Command NewCommand( KABC::AddressBook *addressBook, const KABC::Addressee::List &addressees ); - virtual QString name() const; + virtual TQString name() const; virtual void unexecute(); virtual void execute(); @@ -118,7 +118,7 @@ class EditCommand : public Command EditCommand( KABC::AddressBook *addressBook, const KABC::Addressee &oldAddressee, const KABC::Addressee &newAddressee ); - virtual QString name() const; + virtual TQString name() const; virtual void unexecute(); virtual void execute(); diff --git a/kaddressbook/viewconfigurefieldspage.cpp b/kaddressbook/viewconfigurefieldspage.cpp index fd50d92fe..f83a8c925 100644 --- a/kaddressbook/viewconfigurefieldspage.cpp +++ b/kaddressbook/viewconfigurefieldspage.cpp @@ -21,12 +21,12 @@ without including the source code for Qt in the source distribution. */ -#include <qlabel.h> -#include <qlayout.h> -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qtoolbutton.h> -#include <qapplication.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> +#include <tqtoolbutton.h> +#include <tqapplication.h> #include <kcombobox.h> #include <kdebug.h> @@ -39,11 +39,11 @@ class FieldItem : public QListBoxText { public: - FieldItem( QListBox *parent, KABC::Field *field ) - : QListBoxText( parent, field->label() ), mField( field ) {} + FieldItem( TQListBox *parent, KABC::Field *field ) + : TQListBoxText( parent, field->label() ), mField( field ) {} - FieldItem( QListBox *parent, KABC::Field *field, int index ) - : QListBoxText( parent, field->label(), parent->item( index ) ), + FieldItem( TQListBox *parent, KABC::Field *field, int index ) + : TQListBoxText( parent, field->label(), parent->item( index ) ), mField( field ) {} KABC::Field *field() { return mField; } @@ -54,9 +54,9 @@ class FieldItem : public QListBoxText ViewConfigureFieldsPage::ViewConfigureFieldsPage( KABC::AddressBook *ab, - QWidget *parent, + TQWidget *parent, const char *name ) - : QWidget( parent, name ), mAddressBook( ab ) + : TQWidget( parent, name ), mAddressBook( ab ) { initGUI(); } @@ -100,7 +100,7 @@ void ViewConfigureFieldsPage::slotShowFields( int index ) KABC::Field::List::ConstIterator it; for ( it = allFields.begin(); it != allFields.end(); ++it ) { - QListBoxItem *item = mSelectedBox->firstItem(); + TQListBoxItem *item = mSelectedBox->firstItem(); while( item ) { FieldItem *fieldItem = static_cast<FieldItem *>( item ); if ( (*it)->equals( fieldItem->field() ) ) @@ -180,7 +180,7 @@ void ViewConfigureFieldsPage::slotMoveUp() { int i = mSelectedBox->currentItem(); if ( i > 0 ) { - QListBoxItem *item = mSelectedBox->item( i ); + TQListBoxItem *item = mSelectedBox->item( i ); mSelectedBox->takeItem( item ); mSelectedBox->insertItem( item, i - 1 ); mSelectedBox->setCurrentItem( item ); @@ -192,7 +192,7 @@ void ViewConfigureFieldsPage::slotMoveDown() { int i = mSelectedBox->currentItem(); if ( i > -1 && i < (int)mSelectedBox->count() - 1 ) { - QListBoxItem *item = mSelectedBox->item( i ); + TQListBoxItem *item = mSelectedBox->item( i ); mSelectedBox->takeItem( item ); mSelectedBox->insertItem( item, i + 1 ); mSelectedBox->setCurrentItem( item ); @@ -204,7 +204,7 @@ void ViewConfigureFieldsPage::initGUI() { setCaption( i18n("Select Fields to Display") ); - QGridLayout *gl = new QGridLayout( this , 6, 4, 0, KDialog::spacingHint() ); + TQGridLayout *gl = new TQGridLayout( this , 6, 4, 0, KDialog::spacingHint() ); mCategoryCombo = new KComboBox( false, this ); mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::All ) ); @@ -214,55 +214,55 @@ void ViewConfigureFieldsPage::initGUI() mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::Personal ) ); mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::Organization ) ); mCategoryCombo->insertItem( KABC::Field::categoryLabel( KABC::Field::CustomCategory ) ); - connect( mCategoryCombo, SIGNAL( activated(int) ), SLOT( slotShowFields(int) ) ); + connect( mCategoryCombo, TQT_SIGNAL( activated(int) ), TQT_SLOT( slotShowFields(int) ) ); gl->addWidget( mCategoryCombo, 0, 0 ); - QLabel *label = new QLabel( i18n( "&Selected fields:" ), this ); + TQLabel *label = new TQLabel( i18n( "&Selected fields:" ), this ); gl->addWidget( label, 0, 2 ); - mUnSelectedBox = new QListBox( this ); - mUnSelectedBox->setSelectionMode( QListBox::Extended ); + mUnSelectedBox = new TQListBox( this ); + mUnSelectedBox->setSelectionMode( TQListBox::Extended ); mUnSelectedBox->setMinimumHeight( 100 ); gl->addWidget( mUnSelectedBox, 1, 0 ); - mSelectedBox = new QListBox( this ); - mSelectedBox->setSelectionMode( QListBox::Extended ); + mSelectedBox = new TQListBox( this ); + mSelectedBox->setSelectionMode( TQListBox::Extended ); label->setBuddy( mSelectedBox ); gl->addWidget( mSelectedBox, 1, 2 ); - QBoxLayout *vb1 = new QBoxLayout( QBoxLayout::TopToBottom, KDialog::spacingHint() ); + TQBoxLayout *vb1 = new TQBoxLayout( TQBoxLayout::TopToBottom, KDialog::spacingHint() ); vb1->addStretch(); - mAddButton = new QToolButton( this ); - mAddButton->setIconSet( QApplication::reverseLayout() ? SmallIconSet( "1leftarrow" ) : SmallIconSet( "1rightarrow" ) ); - connect( mAddButton, SIGNAL( clicked() ), SLOT( slotSelect() ) ); + mAddButton = new TQToolButton( this ); + mAddButton->setIconSet( TQApplication::reverseLayout() ? SmallIconSet( "1leftarrow" ) : SmallIconSet( "1rightarrow" ) ); + connect( mAddButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotSelect() ) ); vb1->addWidget( mAddButton ); - mRemoveButton = new QToolButton( this ); - mRemoveButton->setIconSet( QApplication::reverseLayout() ? SmallIconSet( "1rightarrow" ) : SmallIconSet( "1leftarrow" ) ); - connect( mRemoveButton, SIGNAL( clicked() ), SLOT( slotUnSelect() ) ); + mRemoveButton = new TQToolButton( this ); + mRemoveButton->setIconSet( TQApplication::reverseLayout() ? SmallIconSet( "1rightarrow" ) : SmallIconSet( "1leftarrow" ) ); + connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotUnSelect() ) ); vb1->addWidget( mRemoveButton ); vb1->addStretch(); gl->addLayout( vb1, 1, 1 ); - QBoxLayout *vb2 = new QBoxLayout( QBoxLayout::TopToBottom, KDialog::spacingHint() ); + TQBoxLayout *vb2 = new TQBoxLayout( TQBoxLayout::TopToBottom, KDialog::spacingHint() ); vb2->addStretch(); - mUpButton = new QToolButton( this ); + mUpButton = new TQToolButton( this ); mUpButton->setIconSet( SmallIconSet( "1uparrow" ) ); - connect( mUpButton, SIGNAL( clicked() ), SLOT( slotMoveUp() ) ); + connect( mUpButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotMoveUp() ) ); vb2->addWidget( mUpButton ); - mDownButton = new QToolButton( this ); + mDownButton = new TQToolButton( this ); mDownButton->setIconSet( SmallIconSet( "1downarrow" ) ); - connect( mDownButton, SIGNAL( clicked() ), SLOT( slotMoveDown() ) ); + connect( mDownButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotMoveDown() ) ); vb2->addWidget( mDownButton ); vb2->addStretch(); gl->addLayout( vb2, 1, 3 ); - QSize sizeHint = mUnSelectedBox->sizeHint(); + TQSize sizeHint = mUnSelectedBox->sizeHint(); // make sure we fill the list with all items, so that we can // get the maxItemWidth we need to not truncate the view @@ -275,9 +275,9 @@ void ViewConfigureFieldsPage::initGUI() gl->activate(); - connect( mUnSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) ); - connect( mSelectedBox, SIGNAL( selectionChanged() ), SLOT( slotButtonsEnabled() ) ); - connect( mSelectedBox, SIGNAL( currentChanged( QListBoxItem * ) ), SLOT( slotButtonsEnabled() ) ); + connect( mUnSelectedBox, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotButtonsEnabled() ) ); + connect( mSelectedBox, TQT_SIGNAL( selectionChanged() ), TQT_SLOT( slotButtonsEnabled() ) ); + connect( mSelectedBox, TQT_SIGNAL( currentChanged( TQListBoxItem * ) ), TQT_SLOT( slotButtonsEnabled() ) ); slotButtonsEnabled(); } diff --git a/kaddressbook/viewconfigurefieldspage.h b/kaddressbook/viewconfigurefieldspage.h index 27b421c6f..e0ccdb8ba 100644 --- a/kaddressbook/viewconfigurefieldspage.h +++ b/kaddressbook/viewconfigurefieldspage.h @@ -24,7 +24,7 @@ #ifndef VIEWCONFIGUREFIELDSPAGE_H #define VIEWCONFIGUREFIELDSPAGE_H -#include <qwidget.h> +#include <tqwidget.h> #include <kabc/field.h> #include <kabc/addressbook.h> @@ -40,7 +40,7 @@ class ViewConfigureFieldsPage : public QWidget Q_OBJECT public: - ViewConfigureFieldsPage( KABC::AddressBook *ab, QWidget *parent = 0, + ViewConfigureFieldsPage( KABC::AddressBook *ab, TQWidget *parent = 0, const char *name = 0 ); void restoreSettings( KConfig* ); @@ -59,12 +59,12 @@ class ViewConfigureFieldsPage : public QWidget void initGUI(); KComboBox *mCategoryCombo; - QListBox *mSelectedBox; - QListBox *mUnSelectedBox; - QToolButton *mAddButton; - QToolButton *mRemoveButton; - QToolButton *mUpButton; - QToolButton *mDownButton; + TQListBox *mSelectedBox; + TQListBox *mUnSelectedBox; + TQToolButton *mAddButton; + TQToolButton *mRemoveButton; + TQToolButton *mUpButton; + TQToolButton *mDownButton; KABC::AddressBook *mAddressBook; }; diff --git a/kaddressbook/viewconfigurefilterpage.cpp b/kaddressbook/viewconfigurefilterpage.cpp index 2db6e4923..7a07b050b 100644 --- a/kaddressbook/viewconfigurefilterpage.cpp +++ b/kaddressbook/viewconfigurefilterpage.cpp @@ -21,10 +21,10 @@ without including the source code for Qt in the source distribution. */ -#include <qbuttongroup.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qradiobutton.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqradiobutton.h> #include <kconfig.h> #include <kcombobox.h> @@ -34,37 +34,37 @@ #include "viewconfigurefilterpage.h" #include "filter.h" -ViewConfigureFilterPage::ViewConfigureFilterPage( QWidget *parent, +ViewConfigureFilterPage::ViewConfigureFilterPage( TQWidget *parent, const char *name ) - : QWidget( parent, name ) + : TQWidget( parent, name ) { - QBoxLayout *topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + TQBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); - mFilterGroup = new QButtonGroup(); - connect( mFilterGroup, SIGNAL( clicked( int ) ), SLOT( buttonClicked( int ) ) ); + mFilterGroup = new TQButtonGroup(); + connect( mFilterGroup, TQT_SIGNAL( clicked( int ) ), TQT_SLOT( buttonClicked( int ) ) ); - QLabel *label = new QLabel( i18n( "The default filter will be activated whenever" + TQLabel *label = new TQLabel( i18n( "The default filter will be activated whenever" " this view is displayed. This feature allows you to configure views that only" " interact with certain types of information based on the filter. Once the view" " is activated, the filter can be changed at anytime." ), this ); label->setAlignment( Qt::AlignLeft | Qt::AlignTop | Qt::WordBreak ); topLayout->addWidget( label ); - QWidget *spacer = new QWidget( this ); + TQWidget *spacer = new TQWidget( this ); spacer->setMinimumHeight( 5 ); topLayout->addWidget( spacer ); - QRadioButton *button = new QRadioButton( i18n( "No default filter" ), this ); + TQRadioButton *button = new TQRadioButton( i18n( "No default filter" ), this ); mFilterGroup->insert( button ); topLayout->addWidget( button ); - button = new QRadioButton( i18n( "Use last active filter" ), this ); + button = new TQRadioButton( i18n( "Use last active filter" ), this ); mFilterGroup->insert( button ); topLayout->addWidget( button ); - QBoxLayout *comboLayout = new QHBoxLayout(); + TQBoxLayout *comboLayout = new TQHBoxLayout(); topLayout->addLayout( comboLayout ); - button = new QRadioButton( i18n( "Use filter:" ), this ); + button = new TQRadioButton( i18n( "Use filter:" ), this ); mFilterGroup->insert( button ); comboLayout->addWidget( button ); diff --git a/kaddressbook/viewconfigurefilterpage.h b/kaddressbook/viewconfigurefilterpage.h index bc50b3096..fbb8b987b 100644 --- a/kaddressbook/viewconfigurefilterpage.h +++ b/kaddressbook/viewconfigurefilterpage.h @@ -24,7 +24,7 @@ #ifndef VIEWCONFIGUREFILTERPAGE #define VIEWCONFIGUREFILTERPAGE -#include <qwidget.h> +#include <tqwidget.h> class QButtonGroup; @@ -36,7 +36,7 @@ class ViewConfigureFilterPage : public QWidget Q_OBJECT public: - ViewConfigureFilterPage( QWidget *parent, const char *name = 0 ); + ViewConfigureFilterPage( TQWidget *parent, const char *name = 0 ); ~ViewConfigureFilterPage(); void restoreSettings( KConfig* ); @@ -47,7 +47,7 @@ class ViewConfigureFilterPage : public QWidget private: KComboBox *mFilterCombo; - QButtonGroup *mFilterGroup; + TQButtonGroup *mFilterGroup; }; #endif diff --git a/kaddressbook/viewconfigurewidget.cpp b/kaddressbook/viewconfigurewidget.cpp index f8e883f0b..f75fe1cec 100644 --- a/kaddressbook/viewconfigurewidget.cpp +++ b/kaddressbook/viewconfigurewidget.cpp @@ -21,8 +21,8 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> -#include <qvbox.h> +#include <tqlayout.h> +#include <tqvbox.h> #include <kapplication.h> #include <kconfig.h> @@ -37,17 +37,17 @@ #include "viewconfigurewidget.h" -ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent, +ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::ConfigureWidget( ab, parent, name ) { - QVBoxLayout *topLayout = new QVBoxLayout( this ); + TQVBoxLayout *topLayout = new TQVBoxLayout( this ); mMainWidget = new KJanusWidget( this, "JanusWidget", KJanusWidget::IconList ); topLayout->addWidget( mMainWidget ); // Add the first page, the attributes - QVBox *page = addPage( i18n( "Fields" ), QString::null, + TQVBox *page = addPage( i18n( "Fields" ), TQString::null, KGlobal::iconLoader()->loadIcon( "view_detailed", KIcon::Panel ) ); @@ -55,7 +55,7 @@ ViewConfigureWidget::ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent mFieldsPage = new ViewConfigureFieldsPage( addressBook(), page ); // Add the second page, the filter selection - page = addPage( i18n( "Default Filter" ), QString::null, + page = addPage( i18n( "Default Filter" ), TQString::null, KGlobal::iconLoader()->loadIcon( "filter", KIcon::Panel ) ); @@ -78,14 +78,14 @@ void ViewConfigureWidget::saveSettings( KConfig *config ) mFilterPage->saveSettings( config ); } -QVBox *ViewConfigureWidget::addPage( const QString &item, const QString &header, - const QPixmap &pixmap ) +TQVBox *ViewConfigureWidget::addPage( const TQString &item, const TQString &header, + const TQPixmap &pixmap ) { return mMainWidget->addVBoxPage( item, header, pixmap ); } -ViewConfigureDialog::ViewConfigureDialog( ViewConfigureWidget *wdg, const QString &viewName, - QWidget *parent, const char *name ) +ViewConfigureDialog::ViewConfigureDialog( ViewConfigureWidget *wdg, const TQString &viewName, + TQWidget *parent, const char *name ) : KDialogBase( Swallow, i18n( "Modify View: " ) + viewName, Help | Ok | Cancel, Ok, parent, name, true, true ), mConfigWidget( wdg ) { diff --git a/kaddressbook/viewconfigurewidget.h b/kaddressbook/viewconfigurewidget.h index f5511b7e1..590b9fa1e 100644 --- a/kaddressbook/viewconfigurewidget.h +++ b/kaddressbook/viewconfigurewidget.h @@ -26,7 +26,7 @@ #include <kdialogbase.h> #include <kdepimmacros.h> -#include <qpixmap.h> +#include <tqpixmap.h> #include "configurewidget.h" @@ -50,7 +50,7 @@ class KDE_EXPORT ViewConfigureWidget : public KAB::ConfigureWidget Q_OBJECT public: - ViewConfigureWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + ViewConfigureWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); virtual ~ViewConfigureWidget(); /** @@ -74,8 +74,8 @@ class KDE_EXPORT ViewConfigureWidget : public KAB::ConfigureWidget /** Use this method to add new pages to the widget. */ - QVBox *addPage( const QString &item, const QString &header = QString::null, - const QPixmap &pixmap = QPixmap() ); + TQVBox *addPage( const TQString &item, const TQString &header = TQString::null, + const TQPixmap &pixmap = TQPixmap() ); private: KJanusWidget *mMainWidget; @@ -89,8 +89,8 @@ class ViewConfigureDialog : public KDialogBase Q_OBJECT public: - ViewConfigureDialog( ViewConfigureWidget *wdg, const QString &viewName, - QWidget *parent, const char *name = 0 ); + ViewConfigureDialog( ViewConfigureWidget *wdg, const TQString &viewName, + TQWidget *parent, const char *name = 0 ); ~ViewConfigureDialog(); void restoreSettings( KConfig* ); diff --git a/kaddressbook/viewmanager.cpp b/kaddressbook/viewmanager.cpp index 9d2f632ed..4e4cd5a65 100644 --- a/kaddressbook/viewmanager.cpp +++ b/kaddressbook/viewmanager.cpp @@ -21,9 +21,9 @@ without including the source code for Qt in the source distribution. */ -#include <qfile.h> -#include <qlayout.h> -#include <qwidgetstack.h> +#include <tqfile.h> +#include <tqlayout.h> +#include <tqwidgetstack.h> #include <libkdepim/kvcarddrag.h> #include <kabc/addressbook.h> @@ -49,8 +49,8 @@ #include "viewmanager.h" -ViewManager::ViewManager( KAB::Core *core, QWidget *parent, const char *name ) - : QWidget( parent, name ), mCore( core ), mActiveView( 0 ), +ViewManager::ViewManager( KAB::Core *core, TQWidget *parent, const char *name ) + : TQWidget( parent, name ), mCore( core ), mActiveView( 0 ), mFilterSelectionWidget( 0 ) { initGUI(); @@ -70,7 +70,7 @@ ViewManager::~ViewManager() void ViewManager::restoreSettings() { mViewNameList = KABPrefs::instance()->viewNames(); - QString activeViewName = KABPrefs::instance()->currentView(); + TQString activeViewName = KABPrefs::instance()->currentView(); mActionSelectView->setItems( mViewNameList ); @@ -81,7 +81,7 @@ void ViewManager::restoreSettings() // Tell the views to reread their config, since they may have // been modified by global settings - QDictIterator<KAddressBookView> it( mViewDict ); + TQDictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { KConfigGroupSaver saver( mCore->config(), it.currentKey() ); it.current()->readConfig( mCore->config() ); @@ -94,7 +94,7 @@ void ViewManager::restoreSettings() void ViewManager::saveSettings() { - QDictIterator<KAddressBookView> it( mViewDict ); + TQDictIterator<KAddressBookView> it( mViewDict ); for ( it.toFirst(); it.current(); ++it ) { KConfigGroupSaver saver( mCore->config(), it.currentKey() ); (*it)->writeConfig( mCore->config() ); @@ -110,28 +110,28 @@ void ViewManager::saveSettings() KABPrefs::instance()->setCurrentView( mActiveView->caption() ); } -QStringList ViewManager::selectedUids() const +TQStringList ViewManager::selectedUids() const { if ( mActiveView ) { return mActiveView->selectedUids(); } else - return QStringList(); + return TQStringList(); } -QStringList ViewManager::selectedEmails() const +TQStringList ViewManager::selectedEmails() const { if ( mActiveView ) return mActiveView->selectedEmails(); else - return QStringList(); + return TQStringList(); } KABC::Addressee::List ViewManager::selectedAddressees() const { KABC::Addressee::List list; - const QStringList uids = selectedUids(); - QStringList::ConstIterator it; + const TQStringList uids = selectedUids(); + TQStringList::ConstIterator it; for ( it = uids.begin(); it != uids.end(); ++it ) { KABC::Addressee addr = mCore->addressBook()->findByUid( *it ); if ( !addr.isEmpty() ) @@ -164,7 +164,7 @@ KABC::Field::List ViewManager::viewFields() const return KABC::Field::List(); } -void ViewManager::setSelected( const QString &uid, bool selected ) +void ViewManager::setSelected( const TQString &uid, bool selected ) { if ( mActiveView ) mActiveView->setSelected( uid, selected ); @@ -182,7 +182,7 @@ void ViewManager::unloadViews() mActiveView = 0; } -void ViewManager::setActiveView( const QString &name ) +void ViewManager::setActiveView( const TQString &name ) { KAddressBookView *view = 0; @@ -201,7 +201,7 @@ void ViewManager::setActiveView( const QString &name ) if ( view == 0 ) { KConfig *config = mCore->config(); KConfigGroupSaver saver( config, name ); - QString type = config->readEntry( "Type", "Table" ); + TQString type = config->readEntry( "Type", "Table" ); kdDebug(5720) << "ViewManager::setActiveView: creating view - " << name << endl; @@ -216,15 +216,15 @@ void ViewManager::setActiveView( const QString &name ) view->readConfig( config ); // The manager just relays the signals - connect( view, SIGNAL( selected( const QString& ) ), - SIGNAL( selected( const QString & ) ) ); - connect( view, SIGNAL( executed( const QString& ) ), - SIGNAL( executed( const QString& ) ) ); - connect( view, SIGNAL( modified() ), SIGNAL( modified() ) ); - connect( view, SIGNAL( dropped( QDropEvent* ) ), - SLOT( dropped( QDropEvent* ) ) ); - connect( view, SIGNAL( startDrag() ), SLOT( startDrag() ) ); - connect( view, SIGNAL( sortFieldChanged() ), SIGNAL( sortFieldChanged() ) ); + connect( view, TQT_SIGNAL( selected( const TQString& ) ), + TQT_SIGNAL( selected( const TQString & ) ) ); + connect( view, TQT_SIGNAL( executed( const TQString& ) ), + TQT_SIGNAL( executed( const TQString& ) ) ); + connect( view, TQT_SIGNAL( modified() ), TQT_SIGNAL( modified() ) ); + connect( view, TQT_SIGNAL( dropped( TQDropEvent* ) ), + TQT_SLOT( dropped( TQDropEvent* ) ) ); + connect( view, TQT_SIGNAL( startDrag() ), TQT_SLOT( startDrag() ) ); + connect( view, TQT_SIGNAL( sortFieldChanged() ), TQT_SIGNAL( sortFieldChanged() ) ); } } @@ -254,7 +254,7 @@ void ViewManager::setActiveView( const QString &name ) kdDebug(5720) << "ViewManager::setActiveView: unable to find view\n"; } -void ViewManager::refreshView( const QString &uid ) +void ViewManager::refreshView( const TQString &uid ) { if ( mActiveView ) mActiveView->refresh( uid ); @@ -306,9 +306,9 @@ void ViewManager::editView() void ViewManager::deleteView() { - QString text = i18n( "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>" ) + TQString text = i18n( "<qt>Are you sure that you want to delete the view <b>%1</b>?</qt>" ) .arg( mActiveView->caption() ); - QString caption = i18n( "Confirm Delete" ); + TQString caption = i18n( "Confirm Delete" ); if ( KMessageBox::warningContinueCancel( this, text, caption, KGuiItem( i18n("&Delete"), "editdelete") ) == KMessageBox::Continue ) { mViewNameList.remove( mActiveView->caption() ); @@ -336,8 +336,8 @@ void ViewManager::addView() AddViewDialog dialog( &mViewFactoryDict, this ); if ( dialog.exec() ) { - QString newName = dialog.viewName(); - QString type = dialog.viewType(); + TQString newName = dialog.viewName(); + TQString type = dialog.viewType(); // Check for name conflicts bool firstConflict = true; @@ -348,7 +348,7 @@ void ViewManager::addView() firstConflict = false; } - newName = QString( "%1 <%2>" ).arg( newName ).arg( numTries ); + newName = TQString( "%1 <%2>" ).arg( newName ).arg( numTries ); numTries++; } @@ -387,7 +387,7 @@ void ViewManager::scrollDown() void ViewManager::createViewFactories() { const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/View", - QString( "[X-KDE-KAddressBook-ViewPluginVersion] == %1" ).arg( KAB_VIEW_PLUGIN_VERSION ) ); + TQString( "[X-KDE-KAddressBook-ViewPluginVersion] == %1" ).arg( KAB_VIEW_PLUGIN_VERSION ) ); KTrader::OfferList::ConstIterator it; for ( it = plugins.begin(); it != plugins.end(); ++it ) { if ( !(*it)->hasServiceType( "KAddressBook/View" ) ) @@ -411,7 +411,7 @@ void ViewManager::createViewFactories() } } -void ViewManager::dropped( QDropEvent *e ) +void ViewManager::dropped( TQDropEvent *e ) { kdDebug(5720) << "ViewManager::dropped: got a drop event" << endl; @@ -419,14 +419,14 @@ void ViewManager::dropped( QDropEvent *e ) if ( e->source() == this ) return; - QString clipText, vcards; + TQString clipText, vcards; KURL::List urls; if ( KURLDrag::decode( e, urls) ) { KURL::List::ConstIterator it = urls.begin(); int c = urls.count(); if ( c > 1 ) { - QString questionString = i18n( "Import one contact into your addressbook?", "Import %n contacts into your addressbook?", c ); + TQString questionString = i18n( "Import one contact into your addressbook?", "Import %n contacts into your addressbook?", c ); if ( KMessageBox::questionYesNo( this, questionString, i18n( "Import Contacts?" ), i18n("Import"), i18n("Do Not Import") ) == KMessageBox::Yes ) { for ( ; it != urls.end(); ++it ) emit urlDropped( *it ); @@ -454,35 +454,35 @@ void ViewManager::startDrag() { // Get the list of all the selected addressees KABC::Addressee::List addrList; - const QStringList uidList = selectedUids(); + const TQStringList uidList = selectedUids(); if ( uidList.isEmpty() ) return; kdDebug(5720) << "ViewManager::startDrag: starting to drag" << endl; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = uidList.begin(); it != uidList.end(); ++it ) addrList.append( mCore->addressBook()->findByUid( *it ) ); KMultipleDrag *drag = new KMultipleDrag( this ); KABC::VCardConverter converter; - QString vcards = converter.createVCards( addrList ); + TQString vcards = converter.createVCards( addrList ); // Best text representation is given by textdrag, so it must be first - drag->addDragObject( new QTextDrag( AddresseeUtil::addresseesToEmails( addrList ), this ) ); + drag->addDragObject( new TQTextDrag( AddresseeUtil::addresseesToEmails( addrList ), this ) ); drag->addDragObject( new KVCardDrag( vcards, this ) ); KTempDir tempDir; // can't set tempDir to autoDelete, in case of dropping on the desktop, the copy is async... if ( tempDir.status() == 0 ) { - QString fileName; + TQString fileName; if ( addrList.count() == 1 ) fileName = addrList[ 0 ].givenName() + "_" + addrList[ 0 ].familyName() + ".vcf"; else fileName = "contacts.vcf"; - QFile tempFile( tempDir.name() + "/" + fileName ); + TQFile tempFile( tempDir.name() + "/" + fileName ); if ( tempFile.open( IO_WriteOnly ) ) { tempFile.writeBlock( vcards.utf8() ); tempFile.close(); @@ -514,7 +514,7 @@ void ViewManager::setActiveFilter( int index ) if ( mActiveView ) { mActiveView->setFilter( currentFilter ); mActiveView->refresh(); - emit selected( QString::null ); + emit selected( TQString::null ); } } @@ -533,9 +533,9 @@ void ViewManager::configureFilters() setActiveFilter( pos ); } -QStringList ViewManager::filterNames() const +TQStringList ViewManager::filterNames() const { - QStringList names( i18n( "None" ) ); + TQStringList names( i18n( "None" ) ); names.append( i18n( "Unfiled" ) ); Filter::List::ConstIterator it; @@ -545,7 +545,7 @@ QStringList ViewManager::filterNames() const return names; } -int ViewManager::filterPosition( const QString &name ) const +int ViewManager::filterPosition( const TQString &name ) const { int pos = 0; @@ -563,41 +563,41 @@ void ViewManager::initActions() #if KDE_VERSION >= 309 mActionSelectView->setMenuAccelsEnabled( false ); #endif - connect( mActionSelectView, SIGNAL( activated( const QString& ) ), - SLOT( setActiveView( const QString& ) ) ); + connect( mActionSelectView, TQT_SIGNAL( activated( const TQString& ) ), + TQT_SLOT( setActiveView( const TQString& ) ) ); KAction *action; action = new KAction( i18n( "Modify View..." ), "configure", 0, this, - SLOT( editView() ), mCore->actionCollection(), + TQT_SLOT( editView() ), mCore->actionCollection(), "view_modify" ); action->setWhatsThis( i18n( "By pressing this button a dialog opens that allows you to modify the view of the addressbook. There you can add or remove fields that you want to be shown or hidden in the addressbook like the name for example." ) ); action = new KAction( i18n( "Add View..." ), "window_new", 0, this, - SLOT( addView() ), mCore->actionCollection(), + TQT_SLOT( addView() ), mCore->actionCollection(), "view_add" ); action->setWhatsThis( i18n( "You can add a new view by choosing one from the dialog that appears after pressing the button. You have to give the view a name, so that you can distinguish between the different views." ) ); mActionDeleteView = new KAction( i18n( "Delete View" ), "view_remove", 0, - this, SLOT( deleteView() ), + this, TQT_SLOT( deleteView() ), mCore->actionCollection(), "view_delete" ); mActionDeleteView->setWhatsThis( i18n( "By pressing this button you can delete the actual view, which you have added before." ) ); action = new KAction( i18n( "Refresh View" ), "reload", 0, this, - SLOT( refreshView() ), mCore->actionCollection(), + TQT_SLOT( refreshView() ), mCore->actionCollection(), "view_refresh" ); action->setWhatsThis( i18n( "The view will be refreshed by pressing this button." ) ); action = new KAction( i18n( "Edit &Filters..." ), "filter", 0, this, - SLOT( configureFilters() ), mCore->actionCollection(), + TQT_SLOT( configureFilters() ), mCore->actionCollection(), "options_edit_filters" ); action->setWhatsThis( i18n( "Edit the contact filters<p>You will be presented with a dialog, where you can add, remove and edit filters." ) ); } void ViewManager::initGUI() { - QHBoxLayout *layout = new QHBoxLayout( this ); - mViewWidgetStack = new QWidgetStack( this ); + TQHBoxLayout *layout = new TQHBoxLayout( this ); + mViewWidgetStack = new TQWidgetStack( this ); layout->addWidget( mViewWidgetStack ); } diff --git a/kaddressbook/viewmanager.h b/kaddressbook/viewmanager.h index b74f025ee..4b37b10ba 100644 --- a/kaddressbook/viewmanager.h +++ b/kaddressbook/viewmanager.h @@ -24,8 +24,8 @@ #ifndef VIEWMANAGER_H #define VIEWMANAGER_H -#include <qdict.h> -#include <qwidget.h> +#include <tqdict.h> +#include <tqwidget.h> #include <kaddressbookview.h> class QDropEvent; @@ -52,7 +52,7 @@ class ViewManager : public QWidget Q_OBJECT public: - ViewManager( KAB::Core *core, QWidget *parent, const char *name = 0 ); + ViewManager( KAB::Core *core, TQWidget *parent, const char *name = 0 ); ~ViewManager(); void restoreSettings(); @@ -60,8 +60,8 @@ class ViewManager : public QWidget void unloadViews(); - QStringList selectedUids() const; - QStringList selectedEmails() const; + TQStringList selectedUids() const; + TQStringList selectedEmails() const; KABC::Addressee::List selectedAddressees() const; void setFilterSelectionWidget( FilterSelectionWidget *wdg ); @@ -70,10 +70,10 @@ class ViewManager : public QWidget KABC::Field::List viewFields() const; public slots: - void setSelected( const QString &uid = QString::null, bool selected = true ); + void setSelected( const TQString &uid = TQString::null, bool selected = true ); void setFirstSelected( bool selected = true ); - void refreshView( const QString &uid = QString::null ); + void refreshView( const TQString &uid = TQString::null ); void editView(); void deleteView(); void addView(); @@ -87,7 +87,7 @@ class ViewManager : public QWidget This method will try to decode what was dropped, and if it was a valid addressee, add it to the addressbook. */ - void dropped( QDropEvent* ); + void dropped( TQDropEvent* ); /** Called whenever the user attempts to start a drag in the view. @@ -100,12 +100,12 @@ class ViewManager : public QWidget /** Emitted whenever the user selects an entry in the view. */ - void selected( const QString &uid ); + void selected( const TQString &uid ); /** Emitted whenever the user activates an entry in the view. */ - void executed( const QString &uid ); + void executed( const TQString &uid ); /** Emitted whenever the address book is modified in some way. @@ -128,16 +128,16 @@ class ViewManager : public QWidget void viewFieldsChanged(); private slots: - void setActiveView( const QString &name ); + void setActiveView( const TQString &name ); void setActiveFilter( int index ); void configureFilters(); private: void createViewFactories(); - QStringList filterNames() const; - int filterPosition( const QString &name ) const; - QStringList viewNames() const; - int viewPosition( const QString &name ) const; + TQStringList filterNames() const; + int filterPosition( const TQString &name ) const; + TQStringList viewNames() const; + int viewPosition( const TQString &name ) const; void initActions(); void initGUI(); @@ -146,11 +146,11 @@ class ViewManager : public QWidget Filter mCurrentFilter; Filter::List mFilterList; - QDict<KAddressBookView> mViewDict; - QDict<ViewFactory> mViewFactoryDict; - QStringList mViewNameList; + TQDict<KAddressBookView> mViewDict; + TQDict<ViewFactory> mViewFactoryDict; + TQStringList mViewNameList; - QWidgetStack *mViewWidgetStack; + TQWidgetStack *mViewWidgetStack; KAddressBookView *mActiveView; KAction *mActionDeleteView; diff --git a/kaddressbook/views/cardview.cpp b/kaddressbook/views/cardview.cpp index 82e987794..6e7d71d67 100644 --- a/kaddressbook/views/cardview.cpp +++ b/kaddressbook/views/cardview.cpp @@ -24,13 +24,13 @@ #include <limits.h> -#include <qcursor.h> -#include <qdatetime.h> -#include <qlabel.h> -#include <qpainter.h> -#include <qstyle.h> -#include <qtimer.h> -#include <qtooltip.h> +#include <tqcursor.h> +#include <tqdatetime.h> +#include <tqlabel.h> +#include <tqpainter.h> +#include <tqstyle.h> +#include <tqtimer.h> +#include <tqtooltip.h> #include <kdebug.h> #include <kglobalsettings.h> @@ -42,10 +42,10 @@ class CardViewTip : public QLabel { public: - CardViewTip( QWidget *parent = 0, const char *name = 0 ) - : QLabel( parent, name ) + CardViewTip( TQWidget *parent = 0, const char *name = 0 ) + : TQLabel( parent, name ) { - setPalette( QToolTip::palette() ); + setPalette( TQToolTip::palette() ); setFrameStyle( Panel | Plain ); setMidLineWidth( 0 ); setIndent( 1 ); @@ -54,7 +54,7 @@ class CardViewTip : public QLabel ~CardViewTip() {}; protected: - void leaveEvent( QEvent* ) + void leaveEvent( TQEvent* ) { hide(); } @@ -64,11 +64,11 @@ class CardViewTip : public QLabel // Warning: make sure you use findRef() instead of find() to find an // item! Only the pointer value is unique in the list. // -class CardViewItemList : public QPtrList<CardViewItem> +class CardViewItemList : public TQPtrList<CardViewItem> { protected: - virtual int compareItems( QPtrCollection::Item item1, - QPtrCollection::Item item2 ) + virtual int compareItems( TQPtrCollection::Item item1, + TQPtrCollection::Item item2 ) { CardViewItem *cItem1 = (CardViewItem*)item1; CardViewItem *cItem2 = (CardViewItem*)item2; @@ -96,15 +96,15 @@ class CardViewSeparator CardViewSeparator( CardView *view ) : mView( view ) { - mRect = QRect( 0, 0, view->separatorWidth(), 0 ); + mRect = TQRect( 0, 0, view->separatorWidth(), 0 ); } ~CardViewSeparator() {} - void paintSeparator( QPainter *p, QColorGroup &cg ) + void paintSeparator( TQPainter *p, TQColorGroup &cg ) { p->fillRect( 0, 0, mRect.width(), mRect.height(), - cg.brush(QColorGroup::Button) ); + cg.brush(TQColorGroup::Button) ); } void repaintSeparator() @@ -114,7 +114,7 @@ class CardViewSeparator private: CardView *mView; - QRect mRect; + TQRect mRect; }; class CardViewPrivate @@ -134,16 +134,16 @@ class CardViewPrivate mItemWidth( 200 ), mMaxFieldLines( INT_MAX ), mCurrentItem( 0L ), - mLastClickPos( QPoint(0, 0) ), + mLastClickPos( TQPoint(0, 0) ), mRubberBandAnchor( 0 ), - mCompText( QString::null ) + mCompText( TQString::null ) {}; CardViewItemList mItemList; - QPtrList<CardViewSeparator> mSeparatorList; - QFontMetrics *mFm; - QFontMetrics *mBFm; - QFont mHeaderFont; + TQPtrList<CardViewSeparator> mSeparatorList; + TQFontMetrics *mFm; + TQFontMetrics *mBFm; + TQFont mHeaderFont; CardView::SelectionMode mSelectionMode; bool mDrawCardBorder; bool mDrawFieldLabels; @@ -157,8 +157,8 @@ class CardViewPrivate int mItemWidth; // width of all items uint mMaxFieldLines; // Max lines to dispaly pr field CardViewItem *mCurrentItem; - QPoint mLastClickPos; - QTimer *mTimer; // times out if mouse rests for more than 500 msecs + TQPoint mLastClickPos; + TQTimer *mTimer; // times out if mouse rests for more than 500 msecs CardViewTip *mTip; // passed to the item under a resting cursor to display full text bool mOnSeparator; // set/reset on mouse movement // for resizing by dragging the separators @@ -173,8 +173,8 @@ class CardViewPrivate int mPressed; // the colummn that was pressed on at resizing start int mSpan; // pressed - first // key completion - QString mCompText; // current completion string - QDateTime mCompUpdated; // ...was updated at this time + TQString mCompText; // current completion string + TQDateTime mCompUpdated; // ...was updated at this time }; class CardViewItemPrivate @@ -182,8 +182,8 @@ class CardViewItemPrivate public: CardViewItemPrivate() {} - QString mCaption; - QPtrList< CardViewItem::Field > mFieldList; + TQString mCaption; + TQPtrList< CardViewItem::Field > mFieldList; bool mSelected; int x; // horizontal position, set by the view int y; // vertical position, set by the view @@ -192,7 +192,7 @@ class CardViewItemPrivate }; -CardViewItem::CardViewItem( CardView *parent, const QString &caption ) +CardViewItem::CardViewItem( CardView *parent, const TQString &caption ) : d( new CardViewItemPrivate() ), mView( parent ) { d->mCaption = caption; @@ -222,15 +222,15 @@ void CardViewItem::initialize() mView->insertItem( this ); } -void CardViewItem::paintCard( QPainter *p, QColorGroup &cg ) +void CardViewItem::paintCard( TQPainter *p, TQColorGroup &cg ) { if ( !mView ) return; - QPen pen; - QBrush brush; - QFontMetrics fm = *(mView->d->mFm); - QFontMetrics bFm = *(mView->d->mBFm); + TQPen pen; + TQBrush brush; + TQFontMetrics fm = *(mView->d->mFm); + TQFontMetrics bFm = *(mView->d->mBFm); bool drawLabels = mView->d->mDrawFieldLabels; bool drawBorder = mView->d->mDrawCardBorder; int mg = mView->itemMargin(); @@ -252,9 +252,9 @@ void CardViewItem::paintCard( QPainter *p, QColorGroup &cg ) // Draw a simple box if ( isSelected() ) - pen = QPen( cg.highlight(), 1 ); + pen = TQPen( cg.highlight(), 1 ); else - pen = QPen( cg.button(), 1 ); + pen = TQPen( cg.button(), 1 ); p->setPen( pen ); // Draw the border - this is only draw if the user asks for it. @@ -263,15 +263,15 @@ void CardViewItem::paintCard( QPainter *p, QColorGroup &cg ) // set the proper pen color for the caption box if ( isSelected() ) - brush = cg.brush( QColorGroup::Highlight ); + brush = cg.brush( TQColorGroup::Highlight ); else - brush = cg.brush( QColorGroup::Button ); + brush = cg.brush( TQColorGroup::Button ); p->fillRect( mg, mg, w, 4 + bFm.height(), brush ); // Now paint the caption p->save(); - QFont bFont = mView->headerFont(); + TQFont bFont = mView->headerFont(); p->setFont( bFont ); if ( isSelected() ) p->setPen( cg.highlightedText() ); @@ -282,14 +282,14 @@ void CardViewItem::paintCard( QPainter *p, QColorGroup &cg ) p->restore(); // Go through the fields and draw them - QPtrListIterator<CardViewItem::Field> iter( d->mFieldList ); - QString label, value; + TQPtrListIterator<CardViewItem::Field> iter( d->mFieldList ); + TQString label, value; int yPos = mg + 4 + bFm.height() + fm.height(); p->setPen( cg.text() ); int fh = fm.height(); int cln( 0 ); - QString tmp; + TQString tmp; int maxLines = mView->maxFieldLines(); for ( iter.toFirst(); iter.current(); ++iter ) { value = (*iter)->second; @@ -316,14 +316,14 @@ void CardViewItem::paintCard( QPainter *p, QColorGroup &cg ) // if we are the current item and the view has focus, draw focus rect if ( mView->currentItem() == this && mView->hasFocus() ) { - mView->style().drawPrimitive( QStyle::PE_FocusRect, p, - QRect( 0, 0, mView->itemWidth(), h + (2 * mg) ), cg, - QStyle::Style_FocusAtBorder, - QStyleOption( isSelected() ? cg.highlight() : cg.base() ) ); + mView->style().drawPrimitive( TQStyle::PE_FocusRect, p, + TQRect( 0, 0, mView->itemWidth(), h + (2 * mg) ), cg, + TQStyle::Style_FocusAtBorder, + TQStyleOption( isSelected() ? cg.highlight() : cg.base() ) ); } } -const QString &CardViewItem::caption() const +const TQString &CardViewItem::caption() const { return d->mCaption; } @@ -351,7 +351,7 @@ int CardViewItem::height( bool allowCache ) const int fieldHeight = 0; int lines; int maxLines( mView->maxFieldLines() ); - QPtrListIterator<CardViewItem::Field> iter( d->mFieldList ); + TQPtrListIterator<CardViewItem::Field> iter( d->mFieldList ); for ( iter.toFirst(); iter.current(); ++iter ) { if ( !sef && (*iter)->second.isEmpty() ) continue; @@ -375,7 +375,7 @@ void CardViewItem::setSelected( bool selected ) d->mSelected = selected; } -void CardViewItem::insertField( const QString &label, const QString &value ) +void CardViewItem::insertField( const TQString &label, const TQString &value ) { CardViewItem::Field *f = new CardViewItem::Field( label, value ); d->mFieldList.append( f ); @@ -387,11 +387,11 @@ void CardViewItem::insertField( const QString &label, const QString &value ) } } -void CardViewItem::removeField( const QString &label ) +void CardViewItem::removeField( const TQString &label ) { CardViewItem::Field *f; - QPtrListIterator<CardViewItem::Field> iter( d->mFieldList ); + TQPtrListIterator<CardViewItem::Field> iter( d->mFieldList ); for ( iter.toFirst(); iter.current(); ++iter ) { f = *iter; if ( f->first == label ) @@ -415,15 +415,15 @@ void CardViewItem::clearFields() mView->setLayoutDirty( true ); } -QString CardViewItem::trimString( const QString &text, int width, - QFontMetrics &fm ) const +TQString CardViewItem::trimString( const TQString &text, int width, + TQFontMetrics &fm ) const { 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 ) { @@ -454,27 +454,27 @@ void CardViewItem::repaintCard() mView->repaintItem( this ); } -void CardViewItem::setCaption( const QString &caption ) +void CardViewItem::setCaption( const TQString &caption ) { d->mCaption = caption; repaintCard(); } -QString CardViewItem::fieldValue( const QString &label ) const +TQString CardViewItem::fieldValue( const TQString &label ) const { - QPtrListIterator<CardViewItem::Field> iter( d->mFieldList ); + TQPtrListIterator<CardViewItem::Field> iter( d->mFieldList ); for ( iter.toFirst(); iter.current(); ++iter ) if ( (*iter)->first == label ) return (*iter)->second; - return QString(); + return TQString(); } -void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip ) +void CardViewItem::showFullString( const TQPoint &itempos, CardViewTip *tip ) { bool trimmed( false ); - QString s; + TQString s; int mrg = mView->itemMargin(); int y = mView->d->mBFm->height() + 6 + mrg; int w = mView->itemWidth() - (2 * mrg); @@ -520,7 +520,7 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip ) if ( isLabel ) { trimmed = mView->d->mFm->width( s ) > mw - colonWidth; } else { - QRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) ); + TQRect r( mView->d->mFm->boundingRect( 0, 0, INT_MAX, INT_MAX, Qt::AlignTop|Qt::AlignLeft, s ) ); trimmed = r.width() > mw || r.height() / fh > QMIN( s.contains( '\n' ) + 1, maxLines ); } } @@ -532,8 +532,8 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip ) // find a proper position int lx; lx = isLabel || !drawLabels ? mrg : lw + mrg + 2; - QPoint pnt( mView->contentsToViewport( QPoint( d->x, d->y ) ) ); - pnt += QPoint( lx, y ); + TQPoint pnt( mView->contentsToViewport( TQPoint( d->x, d->y ) ) ); + pnt += TQPoint( lx, y ); if ( pnt.x() < 0 ) pnt.setX( 0 ); if ( pnt.x() + tip->width() > mView->visibleWidth() ) @@ -546,7 +546,7 @@ void CardViewItem::showFullString( const QPoint &itempos, CardViewTip *tip ) } } -CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const +CardViewItem::Field *CardViewItem::fieldAt( const TQPoint & itempos ) const { int ypos = mView->d->mBFm->height() + 7 + mView->d->mItemMargin; int iy = itempos.y(); @@ -569,28 +569,28 @@ CardViewItem::Field *CardViewItem::fieldAt( const QPoint & itempos ) const } -CardView::CardView( QWidget *parent, const char *name ) - : QScrollView( parent, name ), +CardView::CardView( TQWidget *parent, const char *name ) + : TQScrollView( parent, name ), d( new CardViewPrivate() ) { d->mItemList.setAutoDelete( true ); d->mSeparatorList.setAutoDelete( true ); - QFont f = font(); - d->mFm = new QFontMetrics( f ); + TQFont f = font(); + d->mFm = new TQFontMetrics( f ); f.setBold( true ); d->mHeaderFont = f; - d->mBFm = new QFontMetrics( f ); + d->mBFm = new TQFontMetrics( f ); d->mTip = new CardViewTip( viewport() ); d->mTip->hide(); - d->mTimer = new QTimer( this, "mouseTimer" ); + d->mTimer = new TQTimer( this, "mouseTimer" ); viewport()->setMouseTracking( true ); viewport()->setFocusProxy( this ); viewport()->setFocusPolicy( WheelFocus ); viewport()->setBackgroundMode( PaletteBase ); - connect( d->mTimer, SIGNAL( timeout() ), this, SLOT( tryShowFullText() ) ); + connect( d->mTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( tryShowFullText() ) ); setBackgroundMode( PaletteBackground, PaletteBase ); @@ -664,14 +664,14 @@ void CardView::setCurrentItem( CardViewItem *item ) emit currentChanged( item ); } -CardViewItem *CardView::itemAt( const QPoint &viewPos ) const +CardViewItem *CardView::itemAt( const TQPoint &viewPos ) const { CardViewItem *item = 0; - QPtrListIterator<CardViewItem> iter( d->mItemList ); + TQPtrListIterator<CardViewItem> iter( d->mItemList ); bool found = false; for ( iter.toFirst(); iter.current() && !found; ++iter ) { item = *iter; - if ( QRect( item->d->x, item->d->y, d->mItemWidth, item->height() ).contains( viewPos ) ) + if ( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ).contains( viewPos ) ) found = true; } @@ -681,9 +681,9 @@ CardViewItem *CardView::itemAt( const QPoint &viewPos ) const return 0; } -QRect CardView::itemRect( const CardViewItem *item ) const +TQRect CardView::itemRect( const CardViewItem *item ) const { - return QRect( item->d->x, item->d->y, d->mItemWidth, item->height() ); + return TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ); } void CardView::ensureItemVisible( const CardViewItem *item ) @@ -694,7 +694,7 @@ void CardView::ensureItemVisible( const CardViewItem *item ) void CardView::repaintItem( const CardViewItem *item ) { - repaintContents( QRect( item->d->x, item->d->y, d->mItemWidth, item->height() ) ); + repaintContents( TQRect( item->d->x, item->d->y, d->mItemWidth, item->height() ) ); } void CardView::setSelectionMode( CardView::SelectionMode mode ) @@ -711,7 +711,7 @@ CardView::SelectionMode CardView::selectionMode() const void CardView::selectAll( bool state ) { - QPtrListIterator<CardViewItem> iter( d->mItemList ); + TQPtrListIterator<CardViewItem> iter( d->mItemList ); if ( !state ) { for ( iter.toFirst(); iter.current(); ++iter ) { if ( (*iter)->isSelected() ) { @@ -785,7 +785,7 @@ bool CardView::isSelected( CardViewItem *item ) const CardViewItem *CardView::selectedItem() const { // find the first selected item - QPtrListIterator<CardViewItem> iter( d->mItemList ); + TQPtrListIterator<CardViewItem> iter( d->mItemList ); for ( iter.toFirst(); iter.current(); ++iter ) { if ( (*iter)->isSelected() ) return *iter; @@ -804,7 +804,7 @@ int CardView::childCount() const return d->mItemList.count(); } -CardViewItem *CardView::findItem( const QString &text, const QString &label, +CardViewItem *CardView::findItem( const TQString &text, const TQString &label, Qt::StringComparisonMode compare ) const { // If the text is empty, we will return null, since empty text will @@ -812,9 +812,9 @@ CardViewItem *CardView::findItem( const QString &text, const QString &label, if ( text.isEmpty() ) return 0; - QPtrListIterator<CardViewItem> iter( d->mItemList ); + TQPtrListIterator<CardViewItem> iter( d->mItemList ); if ( compare & Qt::BeginsWith ) { - QString value; + TQString value; for ( iter.toFirst(); iter.current(); ++iter ) { value = (*iter)->fieldValue( label ).upper(); if ( value.startsWith( text.upper() ) ) @@ -834,20 +834,20 @@ uint CardView::columnWidth() const d->mItemWidth + d->mItemSpacing; } -void CardView::drawContents( QPainter *p, int clipx, int clipy, +void CardView::drawContents( TQPainter *p, int clipx, int clipy, int clipw, int cliph ) { - QScrollView::drawContents( p, clipx, clipy, clipw, cliph ); + TQScrollView::drawContents( p, clipx, clipy, clipw, cliph ); if ( d->mLayoutDirty ) calcLayout(); // allow setting costum colors in the viewport pale - QColorGroup cg = viewport()->palette().active(); + TQColorGroup cg = viewport()->palette().active(); - QRect clipRect( clipx, clipy, clipw, cliph ); - QRect cardRect; - QRect sepRect; + TQRect clipRect( clipx, clipy, clipw, cliph ); + TQRect cardRect; + TQRect sepRect; CardViewItem *item; CardViewSeparator *sep; @@ -855,7 +855,7 @@ void CardView::drawContents( QPainter *p, int clipx, int clipy, viewport()->erase( clipRect ); // Now tell the cards to draw, if they are in the clip region - QPtrListIterator<CardViewItem> iter( d->mItemList ); + TQPtrListIterator<CardViewItem> iter( d->mItemList ); for ( iter.toFirst(); iter.current(); ++iter) { item = *iter; cardRect.setRect( item->d->x, item->d->y, d->mItemWidth, item->height() ); @@ -870,7 +870,7 @@ void CardView::drawContents( QPainter *p, int clipx, int clipy, } // Followed by the separators if they are in the clip region - QPtrListIterator<CardViewSeparator> sepIter( d->mSeparatorList ); + TQPtrListIterator<CardViewSeparator> sepIter( d->mSeparatorList ); for ( sepIter.toFirst(); sepIter.current(); ++sepIter ) { sep = *sepIter; sepRect = sep->mRect; @@ -884,9 +884,9 @@ void CardView::drawContents( QPainter *p, int clipx, int clipy, } } -void CardView::resizeEvent( QResizeEvent *event ) +void CardView::resizeEvent( TQResizeEvent *event ) { - QScrollView::resizeEvent( event ); + TQScrollView::resizeEvent( event ); setLayoutDirty( true ); } @@ -904,7 +904,7 @@ void CardView::calcLayout() // delete the old separators d->mSeparatorList.clear(); - QPtrListIterator<CardViewItem> iter( d->mItemList ); + TQPtrListIterator<CardViewItem> iter( d->mItemList ); CardViewItem *item = 0; CardViewSeparator *sep = 0; xPos += cardSpacing; @@ -924,7 +924,7 @@ void CardView::calcLayout() if ( d->mDrawSeparators ) { // Create a separator since the user asked sep = new CardViewSeparator( this ); - sep->mRect.moveTopLeft( QPoint( xPos, yPos + d->mItemMargin ) ); + sep->mRect.moveTopLeft( TQPoint( xPos, yPos + d->mItemMargin ) ); xPos += d->mSepWidth + cardSpacing; d->mSeparatorList.append( sep ); } @@ -944,7 +944,7 @@ void CardView::calcLayout() // Update the height of all the separators now that we know the // max height of a column - QPtrListIterator<CardViewSeparator> sepIter( d->mSeparatorList ); + TQPtrListIterator<CardViewSeparator> sepIter( d->mSeparatorList ); for ( sepIter.toFirst(); sepIter.current(); ++sepIter ) (*sepIter)->mRect.setHeight( maxHeight - 2 * cardSpacing - 2 * d->mItemMargin ); @@ -985,11 +985,11 @@ void CardView::setItemSpacing( uint spacing ) setLayoutDirty( true ); } -void CardView::contentsMousePressEvent( QMouseEvent *e ) +void CardView::contentsMousePressEvent( TQMouseEvent *e ) { - QScrollView::contentsMousePressEvent( e ); + TQScrollView::contentsMousePressEvent( e ); - QPoint pos = contentsToViewport( e->pos() ); + TQPoint pos = contentsToViewport( e->pos() ); d->mLastClickPos = e->pos(); CardViewItem *item = itemAt( e->pos() ); @@ -1100,9 +1100,9 @@ void CardView::contentsMousePressEvent( QMouseEvent *e ) } } -void CardView::contentsMouseReleaseEvent( QMouseEvent *e ) +void CardView::contentsMouseReleaseEvent( TQMouseEvent *e ) { - QScrollView::contentsMouseReleaseEvent( e ); + TQScrollView::contentsMouseReleaseEvent( e ); if ( d->mResizeAnchor && d->mSpan ) { unsetCursor(); @@ -1133,9 +1133,9 @@ void CardView::contentsMouseReleaseEvent( QMouseEvent *e ) emit executed( item ); } -void CardView::contentsMouseDoubleClickEvent( QMouseEvent *e ) +void CardView::contentsMouseDoubleClickEvent( TQMouseEvent *e ) { - QScrollView::contentsMouseDoubleClickEvent( e ); + TQScrollView::contentsMouseDoubleClickEvent( e ); CardViewItem *item = itemAt( e->pos() ); @@ -1148,7 +1148,7 @@ void CardView::contentsMouseDoubleClickEvent( QMouseEvent *e ) emit doubleClicked( item ); } -void CardView::contentsMouseMoveEvent( QMouseEvent *e ) +void CardView::contentsMouseMoveEvent( TQMouseEvent *e ) { // resizing if ( d->mResizeAnchor ) { @@ -1183,12 +1183,12 @@ void CardView::contentsMouseMoveEvent( QMouseEvent *e ) } } -void CardView::enterEvent( QEvent* ) +void CardView::enterEvent( TQEvent* ) { d->mTimer->start( 500 ); } -void CardView::leaveEvent( QEvent* ) +void CardView::leaveEvent( TQEvent* ) { d->mTimer->stop(); if ( d->mOnSeparator ) { @@ -1197,7 +1197,7 @@ void CardView::leaveEvent( QEvent* ) } } -void CardView::focusInEvent( QFocusEvent* ) +void CardView::focusInEvent( TQFocusEvent* ) { if ( !d->mCurrentItem && d->mItemList.count() ) setCurrentItem( d->mItemList.first() ); @@ -1205,13 +1205,13 @@ void CardView::focusInEvent( QFocusEvent* ) d->mCurrentItem->repaintCard(); } -void CardView::focusOutEvent( QFocusEvent* ) +void CardView::focusOutEvent( TQFocusEvent* ) { if ( d->mCurrentItem ) d->mCurrentItem->repaintCard(); } -void CardView::keyPressEvent( QKeyEvent *e ) +void CardView::keyPressEvent( TQKeyEvent *e ) { if ( !(childCount() && d->mCurrentItem) ) { e->ignore(); @@ -1240,12 +1240,12 @@ void CardView::keyPressEvent( QKeyEvent *e ) // look for an item in the previous/next column, starting from // the vertical middle of the current item. // FIXME use nice calculatd measures!!! - QPoint aPoint( d->mCurrentItem->d->x, d->mCurrentItem->d->y ); - aPoint -= QPoint( 30, -(d->mCurrentItem->height() / 2) ); + TQPoint aPoint( d->mCurrentItem->d->x, d->mCurrentItem->d->y ); + aPoint -= TQPoint( 30, -(d->mCurrentItem->height() / 2) ); aItem = itemAt( aPoint ); // maybe we hit some space below an item while ( !aItem && aPoint.y() > 27 ) { - aPoint -= QPoint( 0, 16 ); + aPoint -= TQPoint( 0, 16 ); aItem = itemAt( aPoint ); } if ( aItem ) @@ -1256,11 +1256,11 @@ void CardView::keyPressEvent( QKeyEvent *e ) case Key_Right: { // FIXME use nice calculated measures!!! - QPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y ); - aPoint += QPoint( 30, (d->mCurrentItem->height() / 2) ); + TQPoint aPoint( d->mCurrentItem->d->x + d->mItemWidth, d->mCurrentItem->d->y ); + aPoint += TQPoint( 30, (d->mCurrentItem->height() / 2) ); aItem = itemAt( aPoint ); while ( !aItem && aPoint.y() > 27 ) { - aPoint -= QPoint( 0, 16 ); + aPoint -= TQPoint( 0, 16 ); aItem = itemAt( aPoint ); } if ( aItem ) @@ -1278,13 +1278,13 @@ void CardView::keyPressEvent( QKeyEvent *e ) break; case Key_Prior: // PageUp { - // QListView: "Make the item above the top visible and current" + // TQListView: "Make the item above the top visible and current" // TODO if contentsY(), pick the top item of the leftmost visible column if ( contentsX() <= 0 ) return; int cw = columnWidth(); int theCol = ( QMAX( 0, ( contentsX() / cw) * cw ) ) + d->mItemSpacing; - aItem = itemAt( QPoint( theCol + 1, d->mItemSpacing + 1 ) ); + aItem = itemAt( TQPoint( theCol + 1, d->mItemSpacing + 1 ) ); if ( aItem ) setCurrentItem( aItem ); @@ -1292,7 +1292,7 @@ void CardView::keyPressEvent( QKeyEvent *e ) } case Key_Next: // PageDown { - // QListView: "Make the item below the bottom visible and current" + // TQListView: "Make the item below the bottom visible and current" // find the first not fully visible column. // TODO: consider if a partly visible (or even hidden) item at the // bottom of the rightmost column exists @@ -1306,7 +1306,7 @@ void CardView::keyPressEvent( QKeyEvent *e ) while ( theCol > contentsWidth() ) theCol -= columnWidth(); - aItem = itemAt( QPoint( theCol, d->mItemSpacing + 1 ) ); + aItem = itemAt( TQPoint( theCol, d->mItemSpacing + 1 ) ); if ( aItem ) setCurrentItem( aItem ); @@ -1383,7 +1383,7 @@ void CardView::keyPressEvent( QKeyEvent *e ) } } -void CardView::contentsWheelEvent( QWheelEvent *e ) +void CardView::contentsWheelEvent( TQWheelEvent *e ) { scrollBy( 2 * e->delta() / -3, 0 ); } @@ -1458,11 +1458,11 @@ void CardView::tryShowFullText() { d->mTimer->stop(); // if we have an item - QPoint cpos = viewportToContents( viewport()->mapFromGlobal( QCursor::pos() ) ); + TQPoint cpos = viewportToContents( viewport()->mapFromGlobal( TQCursor::pos() ) ); CardViewItem *item = itemAt( cpos ); if ( item ) { // query it for a value to display - QPoint ipos = cpos - itemRect( item ).topLeft(); + TQPoint ipos = cpos - itemRect( item ).topLeft(); item->showFullString( ipos, d->mTip ); } } @@ -1477,7 +1477,7 @@ void CardView::drawRubberBands( int pos ) int x = d->mFirstX + tmpcw - d->mSepWidth - contentsX(); int h = visibleHeight(); - QPainter p( viewport() ); + TQPainter p( viewport() ); p.setRasterOp( XorROP ); p.setPen( gray ); p.setBrush( gray ); @@ -1519,23 +1519,23 @@ void CardView::setItemWidth( int w ) updateContents(); } -void CardView::setHeaderFont( const QFont &fnt ) +void CardView::setHeaderFont( const TQFont &fnt ) { d->mHeaderFont = fnt; delete d->mBFm; - d->mBFm = new QFontMetrics( fnt ); + d->mBFm = new TQFontMetrics( fnt ); } -QFont CardView::headerFont() const +TQFont CardView::headerFont() const { return d->mHeaderFont; } -void CardView::setFont( const QFont &fnt ) +void CardView::setFont( const TQFont &fnt ) { - QScrollView::setFont( fnt ); + TQScrollView::setFont( fnt ); delete d->mFm; - d->mFm = new QFontMetrics( fnt ); + d->mFm = new TQFontMetrics( fnt ); } int CardView::separatorWidth() const diff --git a/kaddressbook/views/cardview.h b/kaddressbook/views/cardview.h index e38a82d53..6539f4459 100644 --- a/kaddressbook/views/cardview.h +++ b/kaddressbook/views/cardview.h @@ -24,12 +24,12 @@ #ifndef CARDVIEW_H #define CARDVIEW_H -#include <qpair.h> -#include <qpoint.h> -#include <qptrlist.h> -#include <qrect.h> -#include <qscrollview.h> -#include <qstring.h> +#include <tqpair.h> +#include <tqpoint.h> +#include <tqptrlist.h> +#include <tqrect.h> +#include <tqscrollview.h> +#include <tqstring.h> class QLabel; class QMouseEvent; @@ -55,7 +55,7 @@ class CardViewItem A single field in the card view. The first item is the label and the second item is the value. */ - typedef QPair<QString, QString> Field; + typedef QPair<TQString, TQString> Field; /** Constructor. @@ -65,26 +65,26 @@ class CardViewItem appear at the top of the card. This is also the string that will be used to sort the cards in the view. */ - CardViewItem( CardView *parent, const QString &caption = QString() ); + CardViewItem( CardView *parent, const TQString &caption = TQString() ); virtual ~CardViewItem(); /** - @return The caption of the card, or QString::null if none was ever set. + @return The caption of the card, or TQString::null if none was ever set. */ - const QString &caption() const; + const TQString &caption() const; /** Sets the caption of the card. This is the text that will appear at the top of the card. This is also the string that will be used to sort the cards in the view. */ - void setCaption( const QString &caption ); + void setCaption( const TQString &caption ); /** Paints the card using the given painter and color group. The card will handle painting itself selected if it is selected. */ - virtual void paintCard( QPainter *p, QColorGroup &cg ); + virtual void paintCard( TQPainter *p, TQColorGroup &cg ); /** Repaints the card. This is done by sending a repaint event to the @@ -99,17 +99,17 @@ class CardViewItem within a card. @param value The value of the field. */ - void insertField( const QString &label, const QString &value ); + void insertField( const TQString &label, const TQString &value ); /** Removes the field with label <i>label</i> from the card. */ - void removeField( const QString &label ); + void removeField( const TQString &label ); /** @return The value of the field with label <i>label</i>. */ - QString fieldValue( const QString &label ) const; + TQString fieldValue( const TQString &label ) const; /** Removes all the fields from this card. @@ -133,14 +133,14 @@ class CardViewItem a certain amount of time. If the label or value at pos is obscured (trimmed) make the label display the full text. */ - void showFullString( const QPoint &pos, CardViewTip *tip ); + void showFullString( const TQPoint &pos, CardViewTip *tip ); /** @return a pointer to the Field at the position itempos in this item. 0 is returned if itempos is in the caption. @param itempos the position in item coordinates */ - Field *fieldAt( const QPoint &itempos ) const; + Field *fieldAt( const TQPoint &itempos ) const; CardView *cardView() const { return mView; }; @@ -173,7 +173,7 @@ class CardViewItem <i>width</i>, then the string will be trimmed and a '...' will be appended. */ - QString trimString( const QString &text, int width, QFontMetrics &fm ) const; + TQString trimString( const TQString &text, int width, TQFontMetrics &fm ) const; CardViewItemPrivate *d; CardView *mView; @@ -186,8 +186,8 @@ class CardViewItem displays multiple cards in a grid. The Cards are sorted based on their caption. - The CardView class is designed to mirror the API of the QListView or - QIconView. The CardView is also completely independant of KAddressBook and + The CardView class is designed to mirror the API of the TQListView or + TQIconView. The CardView is also completely independant of KAddressBook and can be used elsewhere. With the exception of a few simple config checks, the CardView is also 100% independant of KDE. */ @@ -201,7 +201,7 @@ class CardView : public QScrollView /** Constructor. */ - CardView( QWidget *parent, const char *name ); + CardView( TQWidget *parent, const char *name ); virtual ~CardView(); /** @@ -239,12 +239,12 @@ class CardView : public QScrollView @return The item found at the given point, or 0 if there is no item at that point. */ - CardViewItem *itemAt( const QPoint &viewPos ) const; + CardViewItem *itemAt( const TQPoint &viewPos ) const; /** @return The bounding rect of the given item. */ - QRect itemRect( const CardViewItem *item ) const; + TQRect itemRect( const CardViewItem *item ) const; /** Ensures that the given item is in the viewable area of the widget @@ -320,7 +320,7 @@ class CardView : public QScrollView @return The first matching item, or 0 if no items match. */ - CardViewItem *findItem( const QString &text, const QString &label, + CardViewItem *findItem( const TQString &text, const TQString &label, Qt::StringComparisonMode compare = Qt::BeginsWith ) const; /** @@ -390,7 +390,7 @@ class CardView : public QScrollView which is 80. It is currently not checked, so setting a value greater than 40 will probably mean a crash in the items painting routine. */ - // Note: I looked for a value in QStyle::PixelMetric to use, but I could + // Note: I looked for a value in TQStyle::PixelMetric to use, but I could // not see a useful one. One may turn up in a future version of Qt. uint itemMargin() const; @@ -405,7 +405,7 @@ class CardView : public QScrollView column, between the items and column separators if drawn, and between the items and the borders of the widget. The default value is set to 10. */ - // Note: There is no useful QStyle::PixelMetric to use for this atm. + // Note: There is no useful TQStyle::PixelMetric to use for this atm. // An option would be using KDialog::spacingHint(). uint itemSpacing() const; @@ -428,17 +428,17 @@ class CardView : public QScrollView /** Sets the header font */ - void setHeaderFont( const QFont &fnt ); + void setHeaderFont( const TQFont &fnt ); /** @return the header font */ - QFont headerFont() const; + TQFont headerFont() const; /** Reimplementation from QWidget */ - void setFont( const QFont &fnt ); + void setFont( const TQFont &fnt ); /** Sets the column separator width @@ -505,24 +505,24 @@ class CardView : public QScrollView /** Emitted when the context menu is requested in some way. */ - void contextMenuRequested( CardViewItem*, const QPoint& ); + void contextMenuRequested( CardViewItem*, const TQPoint& ); protected: /** Determines which cards intersect that region and tells them to paint themselves. */ - void drawContents( QPainter *p, int clipx, int clipy, int clipw, int cliph ); + void drawContents( TQPainter *p, int clipx, int clipy, int clipw, int cliph ); /** Sets the layout to dirty and repaints. */ - void resizeEvent( QResizeEvent* ); + void resizeEvent( TQResizeEvent* ); /** Changes the direction the canvas scolls. */ - void contentsWheelEvent( QWheelEvent* ); + void contentsWheelEvent( TQWheelEvent* ); /** Sets the layout to dirty and calls for a repaint. @@ -536,18 +536,18 @@ class CardView : public QScrollView */ void calcLayout(); - virtual void contentsMousePressEvent( QMouseEvent* ); - virtual void contentsMouseMoveEvent( QMouseEvent* ); - virtual void contentsMouseReleaseEvent( QMouseEvent* ); - virtual void contentsMouseDoubleClickEvent( QMouseEvent* ); + virtual void contentsMousePressEvent( TQMouseEvent* ); + virtual void contentsMouseMoveEvent( TQMouseEvent* ); + virtual void contentsMouseReleaseEvent( TQMouseEvent* ); + virtual void contentsMouseDoubleClickEvent( TQMouseEvent* ); - virtual void enterEvent( QEvent* ); - virtual void leaveEvent( QEvent* ); + virtual void enterEvent( TQEvent* ); + virtual void leaveEvent( TQEvent* ); - virtual void focusInEvent( QFocusEvent* ); - virtual void focusOutEvent( QFocusEvent* ); + virtual void focusInEvent( TQFocusEvent* ); + virtual void focusOutEvent( TQFocusEvent* ); - virtual void keyPressEvent( QKeyEvent* ); + virtual void keyPressEvent( TQKeyEvent* ); /** Overload this method to be told when a drag should be started. diff --git a/kaddressbook/views/colorlistbox.cpp b/kaddressbook/views/colorlistbox.cpp index 37a2ac1f4..8043eacde 100644 --- a/kaddressbook/views/colorlistbox.cpp +++ b/kaddressbook/views/colorlistbox.cpp @@ -18,17 +18,17 @@ * */ -#include <qpainter.h> +#include <tqpainter.h> #include <kcolordialog.h> #include <kcolordrag.h> #include "colorlistbox.h" -ColorListBox::ColorListBox( QWidget *parent, const char *name, WFlags f ) +ColorListBox::ColorListBox( TQWidget *parent, const char *name, WFlags f ) :KListBox( parent, name, f ), mCurrentOnDragEnter(-1) { - connect( this, SIGNAL(selected(int)), this, SLOT(newColor(int)) ); + connect( this, TQT_SIGNAL(selected(int)), this, TQT_SLOT(newColor(int)) ); setAcceptDrops( true); } @@ -40,7 +40,7 @@ void ColorListBox::setEnabled( bool state ) return; } - QListBox::setEnabled( state ); + TQListBox::setEnabled( state ); for( uint i=0; i<count(); i++ ) { updateItem( i ); @@ -48,7 +48,7 @@ void ColorListBox::setEnabled( bool state ) } -void ColorListBox::setColor( uint index, const QColor &color ) +void ColorListBox::setColor( uint index, const TQColor &color ) { if( index < count() ) { @@ -59,7 +59,7 @@ void ColorListBox::setColor( uint index, const QColor &color ) } -QColor ColorListBox::color( uint index ) const +TQColor ColorListBox::color( uint index ) const { if( index < count() ) { @@ -82,8 +82,8 @@ void ColorListBox::newColor( int index ) if( (uint)index < count() ) { - QColor c = color( index ); - if( KColorDialog::getColor( c, this ) != QDialog::Rejected ) + TQColor c = color( index ); + if( KColorDialog::getColor( c, this ) != TQDialog::Rejected ) { setColor( index, c ); } @@ -91,7 +91,7 @@ void ColorListBox::newColor( int index ) } -void ColorListBox::dragEnterEvent( QDragEnterEvent *e ) +void ColorListBox::dragEnterEvent( TQDragEnterEvent *e ) { if( KColorDrag::canDecode(e) && isEnabled() ) { @@ -106,7 +106,7 @@ void ColorListBox::dragEnterEvent( QDragEnterEvent *e ) } -void ColorListBox::dragLeaveEvent( QDragLeaveEvent * ) +void ColorListBox::dragLeaveEvent( TQDragLeaveEvent * ) { if( mCurrentOnDragEnter != -1 ) { @@ -116,7 +116,7 @@ void ColorListBox::dragLeaveEvent( QDragLeaveEvent * ) } -void ColorListBox::dragMoveEvent( QDragMoveEvent *e ) +void ColorListBox::dragMoveEvent( TQDragMoveEvent *e ) { if( KColorDrag::canDecode(e) && isEnabled() ) { @@ -129,9 +129,9 @@ void ColorListBox::dragMoveEvent( QDragMoveEvent *e ) } -void ColorListBox::dropEvent( QDropEvent *e ) +void ColorListBox::dropEvent( TQDropEvent *e ) { - QColor color; + TQColor color; if( KColorDrag::decode( e, color ) ) { int index = currentItem(); @@ -147,28 +147,28 @@ void ColorListBox::dropEvent( QDropEvent *e ) -ColorListItem::ColorListItem( const QString &text, const QColor &color ) - : QListBoxItem(), mColor( color ), mBoxWidth( 30 ) +ColorListItem::ColorListItem( const TQString &text, const TQColor &color ) + : TQListBoxItem(), mColor( color ), mBoxWidth( 30 ) { setText( text ); } -const QColor &ColorListItem::color( void ) +const TQColor &ColorListItem::color( void ) { return( mColor ); } -void ColorListItem::setColor( const QColor &color ) +void ColorListItem::setColor( const TQColor &color ) { mColor = color; } -void ColorListItem::paint( QPainter *p ) +void ColorListItem::paint( TQPainter *p ) { - QFontMetrics fm = p->fontMetrics(); + TQFontMetrics fm = p->fontMetrics(); int h = fm.height(); p->drawText( mBoxWidth+3*2, fm.ascent() + fm.leading()/2, text() ); @@ -179,13 +179,13 @@ void ColorListItem::paint( QPainter *p ) } -int ColorListItem::height(const QListBox *lb ) const +int ColorListItem::height(const TQListBox *lb ) const { return( lb->fontMetrics().lineSpacing()+1 ); } -int ColorListItem::width(const QListBox *lb ) const +int ColorListItem::width(const TQListBox *lb ) const { return( mBoxWidth + lb->fontMetrics().width( text() ) + 6 ); } diff --git a/kaddressbook/views/colorlistbox.h b/kaddressbook/views/colorlistbox.h index 06b2c4627..053f06fff 100644 --- a/kaddressbook/views/colorlistbox.h +++ b/kaddressbook/views/colorlistbox.h @@ -28,18 +28,18 @@ class ColorListBox : public KListBox Q_OBJECT public: - ColorListBox( QWidget *parent=0, const char * name=0, WFlags f=0 ); - void setColor( uint index, const QColor &color ); - QColor color( uint index ) const; + ColorListBox( TQWidget *parent=0, const char * name=0, WFlags f=0 ); + void setColor( uint index, const TQColor &color ); + TQColor color( uint index ) const; public slots: virtual void setEnabled( bool state ); protected: - void dragEnterEvent( QDragEnterEvent *e ); - void dragLeaveEvent( QDragLeaveEvent *e ); - void dragMoveEvent( QDragMoveEvent *e ); - void dropEvent( QDropEvent *e ); + void dragEnterEvent( TQDragEnterEvent *e ); + void dragLeaveEvent( TQDragLeaveEvent *e ); + void dragMoveEvent( TQDragMoveEvent *e ); + void dropEvent( TQDropEvent *e ); private slots: void newColor( int index ); @@ -53,17 +53,17 @@ class ColorListBox : public KListBox class ColorListItem : public QListBoxItem { public: - ColorListItem( const QString &text, const QColor &color=Qt::black ); - const QColor &color( void ); - void setColor( const QColor &color ); + ColorListItem( const TQString &text, const TQColor &color=Qt::black ); + const TQColor &color( void ); + void setColor( const TQColor &color ); protected: - virtual void paint( QPainter * ); - virtual int height( const QListBox * ) const; - virtual int width( const QListBox * ) const; + virtual void paint( TQPainter * ); + virtual int height( const TQListBox * ) const; + virtual int width( const TQListBox * ) const; private: - QColor mColor; + TQColor mColor; int mBoxWidth; }; diff --git a/kaddressbook/views/configurecardviewdialog.cpp b/kaddressbook/views/configurecardviewdialog.cpp index 8843d3c68..ed7cfda1f 100644 --- a/kaddressbook/views/configurecardviewdialog.cpp +++ b/kaddressbook/views/configurecardviewdialog.cpp @@ -21,15 +21,15 @@ without including the source code for Qt in the source distribution. */ -#include <qstring.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qvbox.h> -#include <qgroupbox.h> -#include <qspinbox.h> -#include <qtabwidget.h> -#include <qwhatsthis.h> +#include <tqstring.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqvbox.h> +#include <tqgroupbox.h> +#include <tqspinbox.h> +#include <tqtabwidget.h> +#include <tqwhatsthis.h> #include <kdebug.h> #include <kglobal.h> @@ -47,11 +47,11 @@ ///////////////////////////////// // ConfigureCardViewDialog -ConfigureCardViewWidget::ConfigureCardViewWidget( KABC::AddressBook *ab, QWidget *parent, +ConfigureCardViewWidget::ConfigureCardViewWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : ViewConfigureWidget( ab, parent, name ) { - QWidget *page = addPage( i18n( "Look & Feel" ), QString::null, + TQWidget *page = addPage( i18n( "Look & Feel" ), TQString::null, DesktopIcon( "looknfeel" ) ); mAdvancedPage = new CardViewLookNFeelPage( page ); } @@ -76,8 +76,8 @@ void ConfigureCardViewWidget::saveSettings( KConfig *config ) //////////////////////// // CardViewLookNFeelPage -CardViewLookNFeelPage::CardViewLookNFeelPage( QWidget *parent, const char *name ) - : QVBox( parent, name ) +CardViewLookNFeelPage::CardViewLookNFeelPage( TQWidget *parent, const char *name ) + : TQVBox( parent, name ) { initGUI(); } @@ -90,7 +90,7 @@ void CardViewLookNFeelPage::restoreSettings( KConfig *config ) { // colors cbEnableCustomColors->setChecked( config->readBoolEntry( "EnableCustomColors", false ) ); - QColor c; + TQColor c; c = KGlobalSettings::baseColor(); lbColors->insertItem( new ColorListItem( i18n("Background Color"), config->readColorEntry( "BackgroundColor", &c ) ) ); @@ -113,10 +113,10 @@ void CardViewLookNFeelPage::restoreSettings( KConfig *config ) enableColors(); // fonts - QFont fnt = font(); - updateFontLabel( config->readFontEntry( "TextFont", &fnt ), (QLabel*)lTextFont ); + TQFont fnt = font(); + updateFontLabel( config->readFontEntry( "TextFont", &fnt ), (TQLabel*)lTextFont ); fnt.setBold( true ); - updateFontLabel( config->readFontEntry( "HeaderFont", &fnt ), (QLabel*)lHeaderFont ); + updateFontLabel( config->readFontEntry( "HeaderFont", &fnt ), (TQLabel*)lHeaderFont ); cbEnableCustomFonts->setChecked( config->readBoolEntry( "EnableCustomFonts", false ) ); enableFonts(); @@ -166,15 +166,15 @@ void CardViewLookNFeelPage::saveSettings( KConfig *config ) void CardViewLookNFeelPage::setTextFont() { - QFont f( lTextFont->font() ); - if ( KFontDialog::getFont( f, false, this ) == QDialog::Accepted ) + TQFont f( lTextFont->font() ); + if ( KFontDialog::getFont( f, false, this ) == TQDialog::Accepted ) updateFontLabel( f, lTextFont ); } void CardViewLookNFeelPage::setHeaderFont() { - QFont f( lHeaderFont->font() ); - if ( KFontDialog::getFont( f,false, this ) == QDialog::Accepted ) + TQFont f( lHeaderFont->font() ); + if ( KFontDialog::getFont( f,false, this ) == TQDialog::Accepted ) updateFontLabel( f, lHeaderFont ); } @@ -193,102 +193,102 @@ void CardViewLookNFeelPage::initGUI() int spacing = KDialog::spacingHint(); int margin = KDialog::marginHint(); - QTabWidget *tabs = new QTabWidget( this ); + TQTabWidget *tabs = new TQTabWidget( this ); // Layout - QVBox *loTab = new QVBox( this, "layouttab" ); + TQVBox *loTab = new TQVBox( this, "layouttab" ); loTab->setSpacing( spacing ); loTab->setMargin( margin ); - QGroupBox *gbGeneral = new QGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); + TQGroupBox *gbGeneral = new TQGroupBox( 1, Qt::Horizontal, i18n("General"), loTab ); - cbDrawSeps = new QCheckBox( i18n("Draw &separators"), gbGeneral ); + cbDrawSeps = new TQCheckBox( i18n("Draw &separators"), gbGeneral ); - QHBox *hbSW = new QHBox( gbGeneral ); - QLabel *lSW = new QLabel( i18n("Separator &width:"), hbSW ); - sbSepWidth = new QSpinBox( 1, 50, 1, hbSW ); + TQHBox *hbSW = new TQHBox( gbGeneral ); + TQLabel *lSW = new TQLabel( i18n("Separator &width:"), hbSW ); + sbSepWidth = new TQSpinBox( 1, 50, 1, hbSW ); lSW->setBuddy( sbSepWidth); - QHBox *hbPadding = new QHBox( gbGeneral ); - QLabel *lSpacing = new QLabel( i18n("&Padding:"), hbPadding ); - sbSpacing = new QSpinBox( 0, 100, 1, hbPadding ); + TQHBox *hbPadding = new TQHBox( gbGeneral ); + TQLabel *lSpacing = new TQLabel( i18n("&Padding:"), hbPadding ); + sbSpacing = new TQSpinBox( 0, 100, 1, hbPadding ); lSpacing->setBuddy( sbSpacing ); - QGroupBox *gbCards = new QGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); + TQGroupBox *gbCards = new TQGroupBox( 1, Qt::Horizontal, i18n("Cards"), loTab ); - QHBox *hbMargin = new QHBox( gbCards ); - QLabel *lMargin = new QLabel( i18n("&Margin:"), hbMargin ); - sbMargin = new QSpinBox( 0, 100, 1, hbMargin ); + TQHBox *hbMargin = new TQHBox( gbCards ); + TQLabel *lMargin = new TQLabel( i18n("&Margin:"), hbMargin ); + sbMargin = new TQSpinBox( 0, 100, 1, hbMargin ); lMargin->setBuddy( sbMargin ); - cbDrawBorders = new QCheckBox( i18n("Draw &borders"), gbCards ); + cbDrawBorders = new TQCheckBox( i18n("Draw &borders"), gbCards ); - loTab->setStretchFactor( new QWidget( loTab ), 1 ); + loTab->setStretchFactor( new TQWidget( loTab ), 1 ); - QWhatsThis::add( sbMargin, i18n( + TQWhatsThis::add( sbMargin, i18n( "The item margin is the distance (in pixels) between the item edge and the item data. Most noticeably, " "incrementing the item margin will add space between the focus rectangle and the item data." ) ); - QWhatsThis::add( lMargin, QWhatsThis::textFor( sbMargin ) ); - QWhatsThis::add( sbSpacing, i18n( + TQWhatsThis::add( lMargin, TQWhatsThis::textFor( sbMargin ) ); + TQWhatsThis::add( sbSpacing, i18n( "The item spacing decides the distance (in pixels) between the items and anything else: the view " "borders, other items or column separators." ) ); - QWhatsThis::add( lSpacing, QWhatsThis::textFor( sbSpacing ) ); - QWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") ); - QWhatsThis::add( lSW, QWhatsThis::textFor( sbSepWidth ) ); + TQWhatsThis::add( lSpacing, TQWhatsThis::textFor( sbSpacing ) ); + TQWhatsThis::add( sbSepWidth, i18n("Sets the width of column separators") ); + TQWhatsThis::add( lSW, TQWhatsThis::textFor( sbSepWidth ) ); tabs->addTab( loTab, i18n("&Layout") ); // Colors - QVBox *colorTab = new QVBox( this, "colortab" ); + TQVBox *colorTab = new TQVBox( this, "colortab" ); colorTab->setSpacing( spacing ); colorTab->setMargin( spacing ); - cbEnableCustomColors = new QCheckBox( i18n("&Enable custom colors"), colorTab ); - connect( cbEnableCustomColors, SIGNAL(clicked()), this, SLOT(enableColors()) ); + cbEnableCustomColors = new TQCheckBox( i18n("&Enable custom colors"), colorTab ); + connect( cbEnableCustomColors, TQT_SIGNAL(clicked()), this, TQT_SLOT(enableColors()) ); lbColors = new ColorListBox( colorTab ); tabs->addTab( colorTab, i18n("&Colors") ); - QWhatsThis::add( cbEnableCustomColors, i18n( + TQWhatsThis::add( cbEnableCustomColors, i18n( "If custom colors is enabled, you may choose the colors for the view below. " "Otherwise colors from your current KDE color scheme are used." ) ); - QWhatsThis::add( lbColors, i18n( + TQWhatsThis::add( lbColors, i18n( "Double click or press RETURN on a item to select a color for the related strings in the view." ) ); // Fonts - QVBox *fntTab = new QVBox( this, "fonttab" ); + TQVBox *fntTab = new TQVBox( this, "fonttab" ); fntTab->setSpacing( spacing ); fntTab->setMargin( spacing ); - cbEnableCustomFonts = new QCheckBox( i18n("&Enable custom fonts"), fntTab ); - connect( cbEnableCustomFonts, SIGNAL(clicked()), this, SLOT(enableFonts()) ); + cbEnableCustomFonts = new TQCheckBox( i18n("&Enable custom fonts"), fntTab ); + connect( cbEnableCustomFonts, TQT_SIGNAL(clicked()), this, TQT_SLOT(enableFonts()) ); - vbFonts = new QWidget( fntTab ); - QGridLayout *gFnts = new QGridLayout( vbFonts, 2, 3 ); + vbFonts = new TQWidget( fntTab ); + TQGridLayout *gFnts = new TQGridLayout( vbFonts, 2, 3 ); gFnts->setSpacing( spacing ); gFnts->setAutoAdd( true ); gFnts->setColStretch( 1, 1 ); - QLabel *lTFnt = new QLabel( i18n("&Text font:"), vbFonts ); - lTextFont = new QLabel( vbFonts ); - lTextFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + TQLabel *lTFnt = new TQLabel( i18n("&Text font:"), vbFonts ); + lTextFont = new TQLabel( vbFonts ); + lTextFont->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); btnFont = new KPushButton( i18n("Choose..."), vbFonts ); lTFnt->setBuddy( btnFont ); - connect( btnFont, SIGNAL(clicked()), this, SLOT(setTextFont()) ); + connect( btnFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(setTextFont()) ); - QLabel *lHFnt = new QLabel( i18n("&Header font:"), vbFonts ); - lHeaderFont = new QLabel( vbFonts ); - lHeaderFont->setFrameStyle( QFrame::Panel|QFrame::Sunken ); + TQLabel *lHFnt = new TQLabel( i18n("&Header font:"), vbFonts ); + lHeaderFont = new TQLabel( vbFonts ); + lHeaderFont->setFrameStyle( TQFrame::Panel|TQFrame::Sunken ); btnHeaderFont = new KPushButton( i18n("Choose..."), vbFonts ); lHFnt->setBuddy( btnHeaderFont ); - connect( btnHeaderFont, SIGNAL(clicked()), this, SLOT(setHeaderFont()) ); + connect( btnHeaderFont, TQT_SIGNAL(clicked()), this, TQT_SLOT(setHeaderFont()) ); - fntTab->setStretchFactor( new QWidget( fntTab ), 1 ); + fntTab->setStretchFactor( new TQWidget( fntTab ), 1 ); - QWhatsThis::add( cbEnableCustomFonts, i18n( + TQWhatsThis::add( cbEnableCustomFonts, i18n( "If custom fonts are enabled, you may choose which fonts to use for this view below. " "Otherwise the default KDE font will be used, in bold style for the header and " "normal style for the data." @@ -297,23 +297,23 @@ void CardViewLookNFeelPage::initGUI() tabs->addTab( fntTab, i18n("&Fonts") ); // Behaviour - QVBox *behaviourTab = new QVBox( this ); + TQVBox *behaviourTab = new TQVBox( this ); behaviourTab->setMargin( margin ); behaviourTab->setSpacing( spacing ); - cbShowEmptyFields = new QCheckBox( i18n("Show &empty fields"), behaviourTab ); - cbShowFieldLabels = new QCheckBox( i18n("Show field &labels"), behaviourTab ); + cbShowEmptyFields = new TQCheckBox( i18n("Show &empty fields"), behaviourTab ); + cbShowFieldLabels = new TQCheckBox( i18n("Show field &labels"), behaviourTab ); - behaviourTab->setStretchFactor( new QWidget( behaviourTab ), 1 ); + behaviourTab->setStretchFactor( new TQWidget( behaviourTab ), 1 ); tabs->addTab( behaviourTab, i18n("Be&havior") ); } -void CardViewLookNFeelPage::updateFontLabel( QFont fnt, QLabel *l ) +void CardViewLookNFeelPage::updateFontLabel( TQFont fnt, TQLabel *l ) { l->setFont( fnt ); - l->setText( QString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); + l->setText( TQString( fnt.family() + " %1" ).arg( fnt.pointSize() ) ); } #include "configurecardviewdialog.moc" diff --git a/kaddressbook/views/configurecardviewdialog.h b/kaddressbook/views/configurecardviewdialog.h index a37db6cb3..4d9d19be5 100644 --- a/kaddressbook/views/configurecardviewdialog.h +++ b/kaddressbook/views/configurecardviewdialog.h @@ -26,9 +26,9 @@ #include "viewconfigurewidget.h" -#include <qvbox.h> -#include <qwidget.h> -#include <qfont.h> +#include <tqvbox.h> +#include <tqwidget.h> +#include <tqfont.h> class QString; class QWidget; @@ -48,7 +48,7 @@ class CardViewLookAndFeelPage; class ConfigureCardViewWidget : public ViewConfigureWidget { public: - ConfigureCardViewWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ); + ConfigureCardViewWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ); virtual ~ConfigureCardViewWidget(); virtual void restoreSettings( KConfig* ); @@ -77,12 +77,12 @@ class ConfigureCardViewWidget : public ViewConfigureWidget * item spacing */ -class CardViewLookNFeelPage : public QVBox { +class CardViewLookNFeelPage : public TQVBox { Q_OBJECT public: - CardViewLookNFeelPage( QWidget *parent=0, const char *name=0 ); + CardViewLookNFeelPage( TQWidget *parent=0, const char *name=0 ); ~CardViewLookNFeelPage(); void restoreSettings( KConfig* ); @@ -96,18 +96,18 @@ class CardViewLookNFeelPage : public QVBox { private: void initGUI(); - void updateFontLabel( QFont, QLabel * ); + void updateFontLabel( TQFont, TQLabel * ); - QCheckBox *cbEnableCustomFonts, + TQCheckBox *cbEnableCustomFonts, *cbEnableCustomColors, *cbDrawSeps, *cbDrawBorders, *cbShowFieldLabels, *cbShowEmptyFields; class ColorListBox *lbColors; - QLabel *lTextFont, *lHeaderFont; + TQLabel *lTextFont, *lHeaderFont; class KPushButton *btnFont, *btnHeaderFont; - class QSpinBox *sbMargin, *sbSpacing, *sbSepWidth; + class TQSpinBox *sbMargin, *sbSpacing, *sbSepWidth; - class QWidget *vbFonts; + class TQWidget *vbFonts; }; #endif diff --git a/kaddressbook/views/configuretableviewdialog.cpp b/kaddressbook/views/configuretableviewdialog.cpp index d01c4d7df..c79ef5244 100644 --- a/kaddressbook/views/configuretableviewdialog.cpp +++ b/kaddressbook/views/configuretableviewdialog.cpp @@ -21,13 +21,13 @@ without including the source code for Qt in the source distribution. */ -#include <qstring.h> -#include <qwidget.h> -#include <qlayout.h> -#include <qradiobutton.h> -#include <qcheckbox.h> -#include <qvbox.h> -#include <qbuttongroup.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> +#include <tqvbox.h> +#include <tqbuttongroup.h> #include <kdeversion.h> #include <kglobal.h> @@ -41,11 +41,11 @@ #include "configuretableviewdialog.h" ConfigureTableViewWidget::ConfigureTableViewWidget( KABC::AddressBook *ab, - QWidget *parent, + TQWidget *parent, const char *name ) : ViewConfigureWidget( ab, parent, name ) { - QWidget *page = addPage( i18n( "Look & Feel" ), QString::null, + TQWidget *page = addPage( i18n( "Look & Feel" ), TQString::null, KGlobal::iconLoader()->loadIcon( "looknfeel", KIcon::Panel ) ); @@ -72,8 +72,8 @@ void ConfigureTableViewWidget::saveSettings( KConfig *config ) -LookAndFeelPage::LookAndFeelPage(QWidget *parent, const char *name) - : QWidget(parent, name) +LookAndFeelPage::LookAndFeelPage(TQWidget *parent, const char *name) + : TQWidget(parent, name) { initGUI(); @@ -111,25 +111,25 @@ void LookAndFeelPage::saveSettings( KConfig *config ) void LookAndFeelPage::initGUI() { - QVBoxLayout *layout = new QVBoxLayout(this, 0, KDialogBase::spacingHint()); + TQVBoxLayout *layout = new TQVBoxLayout(this, 0, KDialogBase::spacingHint()); - QButtonGroup *group = new QButtonGroup(1, Qt::Horizontal, + TQButtonGroup *group = new TQButtonGroup(1, Qt::Horizontal, i18n("Row Separator"), this); layout->addWidget(group); - mAlternateButton = new QRadioButton(i18n("Alternating backgrounds"), + mAlternateButton = new TQRadioButton(i18n("Alternating backgrounds"), group, "mAlternateButton"); - mLineButton = new QRadioButton(i18n("Single line"), group, "mLineButton"); - mNoneButton = new QRadioButton(i18n("None"), group, "mNoneButton"); + mLineButton = new TQRadioButton(i18n("Single line"), group, "mLineButton"); + mNoneButton = new TQRadioButton(i18n("None"), group, "mNoneButton"); // Background Checkbox/Selector - QHBoxLayout *backgroundLayout = new QHBoxLayout(); + TQHBoxLayout *backgroundLayout = new TQHBoxLayout(); layout->addLayout(backgroundLayout); - mBackgroundBox = new QCheckBox(i18n("Enable background image:"), this, + mBackgroundBox = new TQCheckBox(i18n("Enable background image:"), this, "mBackgroundBox"); - connect(mBackgroundBox, SIGNAL(toggled(bool)), - SLOT(enableBackgroundToggled(bool))); + connect(mBackgroundBox, TQT_SIGNAL(toggled(bool)), + TQT_SLOT(enableBackgroundToggled(bool))); backgroundLayout->addWidget(mBackgroundBox); mBackgroundName = new KURLRequester(this, "mBackgroundName"); @@ -139,11 +139,11 @@ void LookAndFeelPage::initGUI() backgroundLayout->addWidget(mBackgroundName); // ToolTip Checkbox - mToolTipBox = new QCheckBox(i18n("Enable contact tooltips"), this, + mToolTipBox = new TQCheckBox(i18n("Enable contact tooltips"), this, "mToolTipBox"); layout->addWidget(mToolTipBox); #if KDE_IS_VERSION(3,2,90) - mIMPresenceBox = new QCheckBox( i18n( "Show instant messaging presence" ), this, "mIMPresenceBox" ); + mIMPresenceBox = new TQCheckBox( i18n( "Show instant messaging presence" ), this, "mIMPresenceBox" ); layout->addWidget( mIMPresenceBox ); #endif } diff --git a/kaddressbook/views/configuretableviewdialog.h b/kaddressbook/views/configuretableviewdialog.h index 1260971c2..f1f89d0dc 100644 --- a/kaddressbook/views/configuretableviewdialog.h +++ b/kaddressbook/views/configuretableviewdialog.h @@ -45,7 +45,7 @@ class LookAndFeelPage; class ConfigureTableViewWidget : public ViewConfigureWidget { public: - ConfigureTableViewWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ); + ConfigureTableViewWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name ); virtual ~ConfigureTableViewWidget(); virtual void restoreSettings( KConfig* ); @@ -65,7 +65,7 @@ class LookAndFeelPage : public QWidget Q_OBJECT public: - LookAndFeelPage( QWidget *parent, const char *name = 0 ); + LookAndFeelPage( TQWidget *parent, const char *name = 0 ); ~LookAndFeelPage() {} void restoreSettings( KConfig* ); @@ -77,13 +77,13 @@ class LookAndFeelPage : public QWidget private: void initGUI(); - QRadioButton *mAlternateButton; - QRadioButton *mLineButton; - QRadioButton *mNoneButton; - QCheckBox *mToolTipBox; + TQRadioButton *mAlternateButton; + TQRadioButton *mLineButton; + TQRadioButton *mNoneButton; + TQCheckBox *mToolTipBox; KURLRequester *mBackgroundName; - QCheckBox *mBackgroundBox; - QCheckBox *mIMPresenceBox; + TQCheckBox *mBackgroundBox; + TQCheckBox *mIMPresenceBox; }; #endif diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp index 90941ff56..0bc7c041d 100644 --- a/kaddressbook/views/contactlistview.cpp +++ b/kaddressbook/views/contactlistview.cpp @@ -21,14 +21,14 @@ without including the source code for Qt in the source distribution. */ -#include <qheader.h> -#include <qiconset.h> -#include <qimage.h> -#include <qdragobject.h> -#include <qcombobox.h> -#include <qpainter.h> -#include <qbrush.h> -#include <qevent.h> +#include <tqheader.h> +#include <tqiconset.h> +#include <tqimage.h> +#include <tqdragobject.h> +#include <tqcombobox.h> +#include <tqpainter.h> +#include <tqbrush.h> +#include <tqevent.h> #include <klocale.h> #include <kglobalsettings.h> @@ -48,11 +48,11 @@ // DynamicTip Methods DynamicTip::DynamicTip( ContactListView *parent) - : QToolTip( parent ) + : TQToolTip( parent ) { } -void DynamicTip::maybeTip( const QPoint &pos ) +void DynamicTip::maybeTip( const TQPoint &pos ) { if (!parentWidget()->inherits( "ContactListView" )) return; @@ -61,9 +61,9 @@ void DynamicTip::maybeTip( const QPoint &pos ) if (!plv->tooltips()) return; - QPoint posVp = plv->viewport()->pos(); + TQPoint posVp = plv->viewport()->pos(); - QListViewItem *lvi = plv->itemAt( pos - posVp ); + TQListViewItem *lvi = plv->itemAt( pos - posVp ); if (!lvi) return; @@ -71,8 +71,8 @@ void DynamicTip::maybeTip( const QPoint &pos ) if (!plvi) return; - QString s; - QRect r = plv->itemRect( lvi ); + TQString s; + TQRect r = plv->itemRect( lvi ); r.moveBy( posVp.x(), posVp.y() ); //kdDebug(5720) << "Tip rec: " << r.x() << "," << r.y() << "," << r.width() @@ -89,13 +89,13 @@ void DynamicTip::maybeTip( const QPoint &pos ) s += i18n("label: value", "%1: %2").arg(a.organizationLabel()) .arg(a.organization()); - QString notes = a.note().stripWhiteSpace(); + TQString notes = a.note().stripWhiteSpace(); if ( !notes.isEmpty() ) { notes += '\n'; s += '\n' + i18n("label: value", "%1: \n").arg(a.noteLabel()); - QFontMetrics fm( font() ); + TQFontMetrics fm( font() ); - // Begin word wrap code based on QMultiLineEdit code + // Begin word wrap code based on TQMultiLineEdit code int i = 0; bool doBreak = false; int linew = 0; @@ -161,11 +161,11 @@ ContactListViewItem::ContactListViewItem(const KABC::Addressee &a, refresh(); } -QString ContactListViewItem::key(int column, bool ascending) const +TQString ContactListViewItem::key(int column, bool ascending) const { - // Preserve behaviour of QListViewItem::key(), otherwise we cause a crash if the column does not exist + // Preserve behaviour of TQListViewItem::key(), otherwise we cause a crash if the column does not exist if ( column >= parentListView->columns() ) - return QString::null; + return TQString::null; #if KDE_VERSION >= 319 Q_UNUSED( ascending ) @@ -176,7 +176,7 @@ QString ContactListViewItem::key(int column, bool ascending) const // increment by one before converting to string so that -1 is not greater than 1 // create the sort key by taking the numeric status 0 low, 5 high, and subtracting it from 5 // so that the default ascending gives online before offline, etc. - QString key = QString::number( 5 - ( mIMProxy->presenceNumeric( mAddressee.uid() ) + 1 ) ); + TQString key = TQString::number( 5 - ( mIMProxy->presenceNumeric( mAddressee.uid() ) + 1 ) ); return key; } else { @@ -186,12 +186,12 @@ QString ContactListViewItem::key(int column, bool ascending) const else return mFields[ column ]->sortKey( mAddressee ); #else - return QListViewItem::key( column, ascending ).lower(); + return TQListViewItem::key( column, ascending ).lower(); #endif } -void ContactListViewItem::paintCell(QPainter * p, - const QColorGroup & cg, +void ContactListViewItem::paintCell(TQPainter * p, + const TQColorGroup & cg, int column, int width, int align) @@ -232,13 +232,13 @@ void ContactListViewItem::refresh() if ( mIMProxy->presenceNumeric( mAddressee.uid() ) > 0 ) setPixmap( parentListView->imColumn(), mIMProxy->presenceIcon( mAddressee.uid() ) ); else - setPixmap( parentListView->imColumn(), QPixmap() ); + setPixmap( parentListView->imColumn(), TQPixmap() ); } KABC::Field::List::ConstIterator it; for ( it = mFields.begin(); it != mFields.end(); ++it ) { if ( (*it)->label() == KABC::Addressee::birthdayLabel() ) { - QDate date = mAddressee.birthday().date(); + TQDate date = mAddressee.birthday().date(); if ( date.isValid() ) setText( i++, KGlobal::locale()->formatDate( date, true ) ); else @@ -258,7 +258,7 @@ void ContactListViewItem::setHasIM( bool hasIM ) ContactListView::ContactListView(KAddressBookTableView *view, KABC::AddressBook* /* doc */, - QWidget *parent, + TQWidget *parent, const char *name ) : KListView( parent, name ), pabWidget( view ), @@ -278,15 +278,15 @@ ContactListView::ContactListView(KAddressBookTableView *view, setSelectionModeExt( KListView::Extended ); setDropVisualizer(false); - connect(this, SIGNAL(dropped(QDropEvent*)), - this, SLOT(itemDropped(QDropEvent*))); + connect(this, TQT_SIGNAL(dropped(TQDropEvent*)), + this, TQT_SLOT(itemDropped(TQDropEvent*))); new DynamicTip( this ); } -void ContactListView::paintEmptyArea( QPainter * p, const QRect & rect ) +void ContactListView::paintEmptyArea( TQPainter * p, const TQRect & rect ) { - QBrush b = palette().brush(QPalette::Active, QColorGroup::Base); + TQBrush b = palette().brush(TQPalette::Active, TQColorGroup::Base); // Get the brush, which will have the background pixmap if there is one. if (b.pixmap()) @@ -304,7 +304,7 @@ void ContactListView::paintEmptyArea( QPainter * p, const QRect & rect ) } } -void ContactListView::contentsMousePressEvent(QMouseEvent* e) +void ContactListView::contentsMousePressEvent(TQMouseEvent* e) { presspos = e->pos(); KListView::contentsMousePressEvent(e); @@ -312,7 +312,7 @@ void ContactListView::contentsMousePressEvent(QMouseEvent* e) // To initiate a drag operation -void ContactListView::contentsMouseMoveEvent( QMouseEvent *e ) +void ContactListView::contentsMouseMoveEvent( TQMouseEvent *e ) { if ((e->state() & LeftButton) && (e->pos() - presspos).manhattanLength() > 4 ) { emit startAddresseeDrag(); @@ -321,17 +321,17 @@ void ContactListView::contentsMouseMoveEvent( QMouseEvent *e ) KListView::contentsMouseMoveEvent( e ); } -bool ContactListView::acceptDrag(QDropEvent *e) const +bool ContactListView::acceptDrag(TQDropEvent *e) const { - return QTextDrag::canDecode(e); + return TQTextDrag::canDecode(e); } -void ContactListView::itemDropped(QDropEvent *e) +void ContactListView::itemDropped(TQDropEvent *e) { contentsDropEvent(e); } -void ContactListView::contentsDropEvent( QDropEvent *e ) +void ContactListView::contentsDropEvent( TQDropEvent *e ) { emit addresseeDropped(e); } @@ -346,11 +346,11 @@ void ContactListView::setAlternateBackgroundEnabled(bool enabled) } else { - setAlternateBackground(QColor()); + setAlternateBackground(TQColor()); } } -void ContactListView::setBackgroundPixmap(const QString &filename) +void ContactListView::setBackgroundPixmap(const TQString &filename) { if (filename.isEmpty()) { @@ -358,7 +358,7 @@ void ContactListView::setBackgroundPixmap(const QString &filename) } else { - setPaletteBackgroundPixmap(QPixmap(filename)); + setPaletteBackgroundPixmap(TQPixmap(filename)); } } diff --git a/kaddressbook/views/contactlistview.h b/kaddressbook/views/contactlistview.h index c018e4c2b..ff09dbe35 100644 --- a/kaddressbook/views/contactlistview.h +++ b/kaddressbook/views/contactlistview.h @@ -24,10 +24,10 @@ #ifndef CONTACTLISTVIEW_H #define CONTACTLISTVIEW_H -#include <qcolor.h> -#include <qpixmap.h> -#include <qtooltip.h> -#include <qstring.h> +#include <tqcolor.h> +#include <tqpixmap.h> +#include <tqtooltip.h> +#include <tqstring.h> #include <klistview.h> @@ -47,7 +47,7 @@ class DynamicTip : public QToolTip DynamicTip( ContactListView * parent ); protected: - void maybeTip( const QPoint & ); + void maybeTip( const TQPoint & ); private: }; @@ -61,12 +61,12 @@ public: const KABC::Addressee &addressee() const { return mAddressee; } virtual void refresh(); virtual ContactListView* parent(); - virtual QString key ( int, bool ) const; + virtual TQString key ( int, bool ) const; void setHasIM( bool hasIM ); /** Adds the border around the cell if the user wants it. * This is how the single line config option is implemented. */ - virtual void paintCell(QPainter * p, const QColorGroup & cg, + virtual void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); private: @@ -89,7 +89,7 @@ class ContactListView : public KListView public: ContactListView(KAddressBookTableView *view, KABC::AddressBook *doc, - QWidget *parent, + TQWidget *parent, const char *name = 0L ); virtual ~ContactListView() {} //void resort(); @@ -105,13 +105,13 @@ public: bool singleLine() const { return mSingleLine; } void setSingleLineEnabled(bool enabled) { mSingleLine = enabled; } - const QColor &alternateColor() const { return mAlternateColor; } + const TQColor &alternateColor() const { return mAlternateColor; } /** Sets the background pixmap to <i>filename</i>. If the - * QString is empty (QString::isEmpty()), then the background + * TQString is empty (TQString::isEmpty()), then the background * pixmap will be disabled. */ - void setBackgroundPixmap(const QString &filename); + void setBackgroundPixmap(const TQString &filename); /** * Sets whether instant messaging presence should be shown in the first column @@ -140,20 +140,20 @@ protected: /** Paints the background pixmap in the empty area. This method is needed * since Qt::FixedPixmap will not scroll with the list view. */ - virtual void paintEmptyArea( QPainter * p, const QRect & rect ); - virtual void contentsMousePressEvent(QMouseEvent*); - void contentsMouseMoveEvent( QMouseEvent *e ); - void contentsDropEvent( QDropEvent *e ); - virtual bool acceptDrag(QDropEvent *e) const; + virtual void paintEmptyArea( TQPainter * p, const TQRect & rect ); + virtual void contentsMousePressEvent(TQMouseEvent*); + void contentsMouseMoveEvent( TQMouseEvent *e ); + void contentsDropEvent( TQDropEvent *e ); + virtual bool acceptDrag(TQDropEvent *e) const; protected slots: - void itemDropped(QDropEvent *e); + void itemDropped(TQDropEvent *e); public slots: signals: void startAddresseeDrag(); - void addresseeDropped(QDropEvent *); + void addresseeDropped(TQDropEvent *); private: KAddressBookTableView *pabWidget; @@ -166,9 +166,9 @@ private: bool mToolTips; bool mShowIM; - QColor mAlternateColor; + TQColor mAlternateColor; - QPoint presspos; + TQPoint presspos; int mInstantMsgColumn; }; diff --git a/kaddressbook/views/kaddressbookcardview.cpp b/kaddressbook/views/kaddressbookcardview.cpp index d65c4d71f..7ba89a0ed 100644 --- a/kaddressbook/views/kaddressbookcardview.cpp +++ b/kaddressbook/views/kaddressbookcardview.cpp @@ -21,12 +21,12 @@ without including the source code for Qt in the source distribution. */ -#include <qapplication.h> -#include <qdragobject.h> -#include <qevent.h> -#include <qiconview.h> -#include <qlayout.h> -#include <qstringlist.h> +#include <tqapplication.h> +#include <tqdragobject.h> +#include <tqevent.h> +#include <tqiconview.h> +#include <tqlayout.h> +#include <tqstringlist.h> #include <kabc/addressbook.h> #include <kabc/addressee.h> @@ -43,16 +43,16 @@ class CardViewFactory : public ViewFactory { public: - KAddressBookView *view( KAB::Core *core, QWidget *parent, const char *name ) + KAddressBookView *view( KAB::Core *core, TQWidget *parent, const char *name ) { return new KAddressBookCardView( core, parent, name ); } - QString type() const { return I18N_NOOP("Card"); } + TQString type() const { return I18N_NOOP("Card"); } - QString description() const { return i18n( "Rolodex style cards represent contacts." ); } + TQString description() const { return i18n( "Rolodex style cards represent contacts." ); } - ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent, + ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ) { return new ConfigureCardViewWidget( ab, parent, name ); @@ -116,7 +116,7 @@ class AddresseeCardViewItem : public CardViewItem }; -AddresseeCardView::AddresseeCardView( QWidget *parent, const char *name ) +AddresseeCardView::AddresseeCardView( TQWidget *parent, const char *name ) : CardView( parent, name ) { setAcceptDrops( true ); @@ -126,13 +126,13 @@ AddresseeCardView::~AddresseeCardView() { } -void AddresseeCardView::dragEnterEvent( QDragEnterEvent *event ) +void AddresseeCardView::dragEnterEvent( TQDragEnterEvent *event ) { - if ( QTextDrag::canDecode( event ) ) + if ( TQTextDrag::canDecode( event ) ) event->accept(); } -void AddresseeCardView::dropEvent( QDropEvent *event ) +void AddresseeCardView::dropEvent( TQDropEvent *event ) { emit addresseeDropped( event ); } @@ -144,28 +144,28 @@ void AddresseeCardView::startDrag() KAddressBookCardView::KAddressBookCardView( KAB::Core *core, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : KAddressBookView( core, parent, name ) { mShowEmptyFields = false; - QVBoxLayout *layout = new QVBoxLayout( viewWidget() ); + TQVBoxLayout *layout = new TQVBoxLayout( viewWidget() ); mCardView = new AddresseeCardView( viewWidget(), "mCardView" ); mCardView->setSelectionMode( CardView::Extended ); layout->addWidget( mCardView ); // Connect up the signals - connect( mCardView, SIGNAL( executed( CardViewItem* ) ), - this, SLOT( addresseeExecuted( CardViewItem* ) ) ); - connect( mCardView, SIGNAL( selectionChanged() ), - this, SLOT( addresseeSelected() ) ); - connect( mCardView, SIGNAL( addresseeDropped( QDropEvent* ) ), - this, SIGNAL( dropped( QDropEvent* ) ) ); - connect( mCardView, SIGNAL( startAddresseeDrag() ), - this, SIGNAL( startDrag() ) ); - connect( mCardView, SIGNAL( contextMenuRequested( CardViewItem*, const QPoint& ) ), - this, SLOT( rmbClicked( CardViewItem*, const QPoint& ) ) ); + connect( mCardView, TQT_SIGNAL( executed( CardViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) ); + connect( mCardView, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( addresseeSelected() ) ); + connect( mCardView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ), + this, TQT_SIGNAL( dropped( TQDropEvent* ) ) ); + connect( mCardView, TQT_SIGNAL( startAddresseeDrag() ), + this, TQT_SIGNAL( startDrag() ) ); + connect( mCardView, TQT_SIGNAL( contextMenuRequested( CardViewItem*, const TQPoint& ) ), + this, TQT_SLOT( rmbClicked( CardViewItem*, const TQPoint& ) ) ); } KAddressBookCardView::~KAddressBookCardView() @@ -184,19 +184,19 @@ void KAddressBookCardView::readConfig( KConfig *config ) // costum colors? if ( config->readBoolEntry( "EnableCustomColors", false ) ) { - QPalette p( mCardView->palette() ); - QColor c = p.color( QPalette::Normal, QColorGroup::Base ); - p.setColor( QPalette::Normal, QColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) ); - c = p.color( QPalette::Normal, QColorGroup::Text ); - p.setColor( QPalette::Normal, QColorGroup::Text, config->readColorEntry( "TextColor", &c ) ); - c = p.color( QPalette::Normal, QColorGroup::Button ); - p.setColor( QPalette::Normal, QColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) ); - c = p.color( QPalette::Normal, QColorGroup::ButtonText ); - p.setColor( QPalette::Normal, QColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) ); - c = p.color( QPalette::Normal, QColorGroup::Highlight ); - p.setColor( QPalette::Normal, QColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) ); - c = p.color( QPalette::Normal, QColorGroup::HighlightedText ); - p.setColor( QPalette::Normal, QColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) ); + TQPalette p( mCardView->palette() ); + TQColor c = p.color( TQPalette::Normal, TQColorGroup::Base ); + p.setColor( TQPalette::Normal, TQColorGroup::Base, config->readColorEntry( "BackgroundColor", &c ) ); + c = p.color( TQPalette::Normal, TQColorGroup::Text ); + p.setColor( TQPalette::Normal, TQColorGroup::Text, config->readColorEntry( "TextColor", &c ) ); + c = p.color( TQPalette::Normal, TQColorGroup::Button ); + p.setColor( TQPalette::Normal, TQColorGroup::Button, config->readColorEntry( "HeaderColor", &c ) ); + c = p.color( TQPalette::Normal, TQColorGroup::ButtonText ); + p.setColor( TQPalette::Normal, TQColorGroup::ButtonText, config->readColorEntry( "HeaderTextColor", &c ) ); + c = p.color( TQPalette::Normal, TQColorGroup::Highlight ); + p.setColor( TQPalette::Normal, TQColorGroup::Highlight, config->readColorEntry( "HighlightColor", &c ) ); + c = p.color( TQPalette::Normal, TQColorGroup::HighlightedText ); + p.setColor( TQPalette::Normal, TQColorGroup::HighlightedText, config->readColorEntry( "HighlightedTextColor", &c ) ); mCardView->viewport()->setPalette( p ); } else { // needed if turned off during a session. @@ -204,7 +204,7 @@ void KAddressBookCardView::readConfig( KConfig *config ) } //custom fonts? - QFont f( font() ); + TQFont f( font() ); if ( config->readBoolEntry( "EnableCustomFonts", false ) ) { mCardView->setFont( config->readFontEntry( "TextFont", &f ) ); f.setBold( true ); @@ -227,15 +227,15 @@ void KAddressBookCardView::readConfig( KConfig *config ) mCardView->setItemSpacing( config->readNumEntry( "ItemSpacing", 10 ) ); mCardView->setSeparatorWidth( config->readNumEntry( "SeparatorWidth", 2 ) ); - disconnect( mCardView, SIGNAL( executed( CardViewItem* ) ), - this, SLOT( addresseeExecuted( CardViewItem* ) ) ); + disconnect( mCardView, TQT_SIGNAL( executed( CardViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) ); if ( KABPrefs::instance()->honorSingleClick() ) - connect( mCardView, SIGNAL( executed( CardViewItem* ) ), - this, SLOT( addresseeExecuted( CardViewItem* ) ) ); + connect( mCardView, TQT_SIGNAL( executed( CardViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) ); else - connect( mCardView, SIGNAL( doubleClicked( CardViewItem* ) ), - this, SLOT( addresseeExecuted( CardViewItem* ) ) ); + connect( mCardView, TQT_SIGNAL( doubleClicked( CardViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( CardViewItem* ) ) ); } void KAddressBookCardView::writeConfig( KConfig *config ) @@ -244,9 +244,9 @@ void KAddressBookCardView::writeConfig( KConfig *config ) KAddressBookView::writeConfig( config ); } -QStringList KAddressBookCardView::selectedUids() +TQStringList KAddressBookCardView::selectedUids() { - QStringList uidList; + TQStringList uidList; CardViewItem *item; AddresseeCardViewItem *aItem; @@ -261,7 +261,7 @@ QStringList KAddressBookCardView::selectedUids() return uidList; } -void KAddressBookCardView::refresh( const QString &uid ) +void KAddressBookCardView::refresh( const TQString &uid ) { CardViewItem *item; AddresseeCardViewItem *aItem; @@ -282,7 +282,7 @@ void KAddressBookCardView::refresh( const QString &uid ) mCardView->viewport()->update(); // by default nothing is selected - emit selected( QString::null ); + emit selected( TQString::null ); } else { // Try to find the one to refresh bool found = false; @@ -296,7 +296,7 @@ void KAddressBookCardView::refresh( const QString &uid ) } } -void KAddressBookCardView::setSelected( const QString &uid, bool selected ) +void KAddressBookCardView::setSelected( const TQString &uid, bool selected ) { CardViewItem *item; AddresseeCardViewItem *aItem; @@ -349,22 +349,22 @@ void KAddressBookCardView::addresseeSelected() } if ( !found ) - emit selected( QString::null ); + emit selected( TQString::null ); } -void KAddressBookCardView::rmbClicked( CardViewItem*, const QPoint &point ) +void KAddressBookCardView::rmbClicked( CardViewItem*, const TQPoint &point ) { popup( point ); } void KAddressBookCardView::scrollUp() { - QApplication::postEvent( mCardView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Up, 0, 0 ) ); + TQApplication::postEvent( mCardView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Up, 0, 0 ) ); } void KAddressBookCardView::scrollDown() { - QApplication::postEvent( mCardView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Down, 0, 0 ) ); + TQApplication::postEvent( mCardView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Down, 0, 0 ) ); } #include "kaddressbookcardview.moc" diff --git a/kaddressbook/views/kaddressbookcardview.h b/kaddressbook/views/kaddressbookcardview.h index 68e2a13f3..de0120a09 100644 --- a/kaddressbook/views/kaddressbookcardview.h +++ b/kaddressbook/views/kaddressbookcardview.h @@ -24,7 +24,7 @@ without including the source code for Qt in the source distribution. */ -#include <qstring.h> +#include <tqstring.h> #include <kiconview.h> #include "cardview.h" @@ -45,12 +45,12 @@ class KAddressBookCardView : public KAddressBookView Q_OBJECT public: - KAddressBookCardView( KAB::Core *core, QWidget *parent, + KAddressBookCardView( KAB::Core *core, TQWidget *parent, const char *name = 0 ); virtual ~KAddressBookCardView(); - virtual QStringList selectedUids(); - virtual QString type() const { return "Card"; } + virtual TQStringList selectedUids(); + virtual TQString type() const { return "Card"; } virtual KABC::Field *sortField() const; virtual void readConfig( KConfig *config ); @@ -60,14 +60,14 @@ class KAddressBookCardView : public KAddressBookView void scrollDown(); public slots: - void refresh( const QString &uid = QString() ); - void setSelected( const QString &uid = QString(), bool selected = true ); + void refresh( const TQString &uid = TQString() ); + void setSelected( const TQString &uid = TQString(), bool selected = true ); virtual void setFirstSelected( bool selected = true ); protected slots: void addresseeExecuted( CardViewItem* ); void addresseeSelected(); - void rmbClicked( CardViewItem*, const QPoint& ); + void rmbClicked( CardViewItem*, const TQPoint& ); private: AddresseeCardView *mCardView; @@ -78,16 +78,16 @@ class AddresseeCardView : public CardView { Q_OBJECT public: - AddresseeCardView( QWidget *parent, const char *name = 0 ); + AddresseeCardView( TQWidget *parent, const char *name = 0 ); ~AddresseeCardView(); signals: void startAddresseeDrag(); - void addresseeDropped( QDropEvent* ); + void addresseeDropped( TQDropEvent* ); protected: - virtual void dragEnterEvent( QDragEnterEvent* ); - virtual void dropEvent( QDropEvent* ); + virtual void dragEnterEvent( TQDragEnterEvent* ); + virtual void dropEvent( TQDropEvent* ); virtual void startDrag(); }; diff --git a/kaddressbook/views/kaddressbookiconview.cpp b/kaddressbook/views/kaddressbookiconview.cpp index b5d706cad..6d02acf73 100644 --- a/kaddressbook/views/kaddressbookiconview.cpp +++ b/kaddressbook/views/kaddressbookiconview.cpp @@ -21,10 +21,10 @@ without including the source code for Qt in the source distribution. */ -#include <qapplication.h> -#include <qiconview.h> -#include <qlayout.h> -#include <qstringlist.h> +#include <tqapplication.h> +#include <tqiconview.h> +#include <tqlayout.h> +#include <tqstringlist.h> #include <kabc/addressbook.h> #include <kabc/addressee.h> @@ -42,14 +42,14 @@ class IconViewFactory : public ViewFactory { public: - KAddressBookView *view( KAB::Core *core, QWidget *parent, const char *name ) + KAddressBookView *view( KAB::Core *core, TQWidget *parent, const char *name ) { return new KAddressBookIconView( core, parent, name ); } - QString type() const { return I18N_NOOP( "Icon" ); } + TQString type() const { return I18N_NOOP( "Icon" ); } - QString description() const { return i18n( "Icons represent contacts. Very simple view." ); } + TQString description() const { return i18n( "Icons represent contacts. Very simple view." ); } }; extern "C" { @@ -59,31 +59,31 @@ extern "C" { } } -AddresseeIconView::AddresseeIconView( QWidget *parent, const char *name ) +AddresseeIconView::AddresseeIconView( TQWidget *parent, const char *name ) : KIconView( parent, name ) { - setSelectionMode( QIconView::Extended ); - setResizeMode( QIconView::Adjust ); + setSelectionMode( TQIconView::Extended ); + setResizeMode( TQIconView::Adjust ); setWordWrapIconText( true ); setGridX( 100 ); setItemsMovable( false ); setSorting( true, true ); setMode( KIconView::Select ); - connect( this, SIGNAL( dropped( QDropEvent*, const QValueList<QIconDragItem>& ) ), - this, SLOT( itemDropped( QDropEvent*, const QValueList<QIconDragItem>& ) ) ); + connect( this, TQT_SIGNAL( dropped( TQDropEvent*, const TQValueList<TQIconDragItem>& ) ), + this, TQT_SLOT( itemDropped( TQDropEvent*, const TQValueList<TQIconDragItem>& ) ) ); } AddresseeIconView::~AddresseeIconView() { } -void AddresseeIconView::itemDropped( QDropEvent *event, const QValueList<QIconDragItem>& ) +void AddresseeIconView::itemDropped( TQDropEvent *event, const TQValueList<TQIconDragItem>& ) { emit addresseeDropped( event ); } -QDragObject *AddresseeIconView::dragObject() +TQDragObject *AddresseeIconView::dragObject() { emit startAddresseeDrag(); @@ -96,7 +96,7 @@ class AddresseeIconViewItem : public KIconViewItem { public: AddresseeIconViewItem( const KABC::Field::List&, KABC::AddressBook *doc, - const KABC::Addressee &addr, QIconView *parent ) + const KABC::Addressee &addr, TQIconView *parent ) : KIconViewItem( parent ), mDocument( doc ), mAddressee( addr ) { refresh(); @@ -111,14 +111,14 @@ class AddresseeIconViewItem : public KIconViewItem if ( !mAddressee.isEmpty() ) setText( mAddressee.givenName() + " " + mAddressee.familyName() ); - QPixmap icon; - QPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) ); + TQPixmap icon; + TQPixmap defaultIcon( KGlobal::iconLoader()->loadIcon( "vcard", KIcon::Desktop ) ); KABC::Picture pic = mAddressee.photo(); if ( pic.data().isNull() ) pic = mAddressee.logo(); if ( pic.isIntern() && !pic.data().isNull() ) { - QImage img = pic.data(); + TQImage img = pic.data(); if ( img.width() > img.height() ) icon = img.scaleWidth( 32 ); else @@ -136,25 +136,25 @@ class AddresseeIconViewItem : public KIconViewItem KAddressBookIconView::KAddressBookIconView( KAB::Core *core, - QWidget *parent, const char *name) + TQWidget *parent, const char *name) : KAddressBookView( core, parent, name ) { - QVBoxLayout *layout = new QVBoxLayout( viewWidget() ); + TQVBoxLayout *layout = new TQVBoxLayout( viewWidget() ); mIconView = new AddresseeIconView( viewWidget(), "mIconView" ); layout->addWidget( mIconView ); // Connect up the signals - connect( mIconView, SIGNAL( executed( QIconViewItem* ) ), - this, SLOT( addresseeExecuted( QIconViewItem* ) ) ); - connect( mIconView, SIGNAL( selectionChanged() ), - this, SLOT( addresseeSelected() ) ); - connect( mIconView, SIGNAL( addresseeDropped( QDropEvent* ) ), - this, SIGNAL( dropped( QDropEvent* ) ) ); - connect( mIconView, SIGNAL( startAddresseeDrag() ), - this, SIGNAL( startDrag() ) ); - connect( mIconView, SIGNAL( contextMenuRequested( QIconViewItem*, const QPoint& ) ), - this, SLOT( rmbClicked( QIconViewItem*, const QPoint& ) ) ); + connect( mIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) ); + connect( mIconView, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( addresseeSelected() ) ); + connect( mIconView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ), + this, TQT_SIGNAL( dropped( TQDropEvent* ) ) ); + connect( mIconView, TQT_SIGNAL( startAddresseeDrag() ), + this, TQT_SIGNAL( startDrag() ) ); + connect( mIconView, TQT_SIGNAL( contextMenuRequested( TQIconViewItem*, const TQPoint& ) ), + this, TQT_SLOT( rmbClicked( TQIconViewItem*, const TQPoint& ) ) ); } KAddressBookIconView::~KAddressBookIconView() @@ -171,21 +171,21 @@ void KAddressBookIconView::readConfig( KConfig *config ) { KAddressBookView::readConfig( config ); - disconnect( mIconView, SIGNAL( executed( QIconViewItem* ) ), - this, SLOT( addresseeExecuted( QIconViewItem* ) ) ); + disconnect( mIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) ); if ( KABPrefs::instance()->honorSingleClick() ) - connect( mIconView, SIGNAL( executed( QIconViewItem* ) ), - this, SLOT( addresseeExecuted( QIconViewItem* ) ) ); + connect( mIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) ); else - connect( mIconView, SIGNAL( doubleClicked( QIconViewItem* ) ), - this, SLOT( addresseeExecuted( QIconViewItem* ) ) ); + connect( mIconView, TQT_SIGNAL( doubleClicked( TQIconViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( TQIconViewItem* ) ) ); } -QStringList KAddressBookIconView::selectedUids() +TQStringList KAddressBookIconView::selectedUids() { - QStringList uidList; - QIconViewItem *item; + TQStringList uidList; + TQIconViewItem *item; AddresseeIconViewItem *aItem; for ( item = mIconView->firstItem(); item; item = item->nextItem() ) { @@ -199,9 +199,9 @@ QStringList KAddressBookIconView::selectedUids() return uidList; } -void KAddressBookIconView::refresh( const QString &uid ) +void KAddressBookIconView::refresh( const TQString &uid ) { - QIconViewItem *item; + TQIconViewItem *item; AddresseeIconViewItem *aItem; if ( uid.isEmpty() ) { @@ -233,13 +233,13 @@ void KAddressBookIconView::refresh( const QString &uid ) } } - refresh( QString::null ); + refresh( TQString::null ); } } -void KAddressBookIconView::setSelected( const QString &uid, bool selected ) +void KAddressBookIconView::setSelected( const TQString &uid, bool selected ) { - QIconViewItem *item; + TQIconViewItem *item; AddresseeIconViewItem *aItem; if ( uid.isEmpty() ) { @@ -266,7 +266,7 @@ void KAddressBookIconView::setFirstSelected( bool selected ) } } -void KAddressBookIconView::addresseeExecuted( QIconViewItem *item ) +void KAddressBookIconView::addresseeExecuted( TQIconViewItem *item ) { AddresseeIconViewItem *aItem = dynamic_cast<AddresseeIconViewItem*>( item ); @@ -276,7 +276,7 @@ void KAddressBookIconView::addresseeExecuted( QIconViewItem *item ) void KAddressBookIconView::addresseeSelected() { - QIconViewItem *item; + TQIconViewItem *item; AddresseeIconViewItem *aItem; bool found = false; @@ -291,22 +291,22 @@ void KAddressBookIconView::addresseeSelected() } if ( !found ) - emit selected( QString::null ); + emit selected( TQString::null ); } -void KAddressBookIconView::rmbClicked( QIconViewItem*, const QPoint &point ) +void KAddressBookIconView::rmbClicked( TQIconViewItem*, const TQPoint &point ) { popup( point ); } void KAddressBookIconView::scrollUp() { - QApplication::postEvent( mIconView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Up, 0, 0 ) ); + TQApplication::postEvent( mIconView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Up, 0, 0 ) ); } void KAddressBookIconView::scrollDown() { - QApplication::postEvent( mIconView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Down, 0, 0 ) ); + TQApplication::postEvent( mIconView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Down, 0, 0 ) ); } #include "kaddressbookiconview.moc" diff --git a/kaddressbook/views/kaddressbookiconview.h b/kaddressbook/views/kaddressbookiconview.h index f11e7b8a1..21d9bac8e 100644 --- a/kaddressbook/views/kaddressbookiconview.h +++ b/kaddressbook/views/kaddressbookiconview.h @@ -24,7 +24,7 @@ #ifndef KADDRESSBOOKICONVIEW_H #define KADDRESSBOOKICONVIEW_H -#include <qstring.h> +#include <tqstring.h> #include <kiconview.h> #include "kaddressbookview.h" @@ -44,12 +44,12 @@ class KAddressBookIconView : public KAddressBookView Q_OBJECT public: - KAddressBookIconView( KAB::Core *core, QWidget *parent, + KAddressBookIconView( KAB::Core *core, TQWidget *parent, const char *name = 0 ); virtual ~KAddressBookIconView(); - virtual QStringList selectedUids(); - virtual QString type() const { return "Icon"; } + virtual TQStringList selectedUids(); + virtual TQString type() const { return "Icon"; } virtual KABC::Field *sortField() const; virtual void readConfig( KConfig *config ); @@ -57,18 +57,18 @@ class KAddressBookIconView : public KAddressBookView void scrollDown(); public slots: - void refresh( const QString &uid = QString() ); - void setSelected( const QString &uid = QString(), bool selected = true ); + void refresh( const TQString &uid = TQString() ); + void setSelected( const TQString &uid = TQString(), bool selected = true ); virtual void setFirstSelected( bool selected = true ); protected slots: - void addresseeExecuted( QIconViewItem *item ); + void addresseeExecuted( TQIconViewItem *item ); void addresseeSelected(); - void rmbClicked( QIconViewItem*, const QPoint& ); + void rmbClicked( TQIconViewItem*, const TQPoint& ); private: AddresseeIconView *mIconView; - QPtrList<AddresseeIconViewItem> mIconList; + TQPtrList<AddresseeIconViewItem> mIconList; }; @@ -77,17 +77,17 @@ class AddresseeIconView : public KIconView Q_OBJECT public: - AddresseeIconView( QWidget *parent, const char *name = 0 ); + AddresseeIconView( TQWidget *parent, const char *name = 0 ); ~AddresseeIconView(); signals: - void addresseeDropped( QDropEvent* ); + void addresseeDropped( TQDropEvent* ); void startAddresseeDrag(); protected: - virtual QDragObject *dragObject(); + virtual TQDragObject *dragObject(); protected slots: - void itemDropped( QDropEvent*, const QValueList<QIconDragItem>& ); + void itemDropped( TQDropEvent*, const TQValueList<TQIconDragItem>& ); }; #endif diff --git a/kaddressbook/views/kaddressbooktableview.cpp b/kaddressbook/views/kaddressbooktableview.cpp index e0ac61093..7f822ae4d 100644 --- a/kaddressbook/views/kaddressbooktableview.cpp +++ b/kaddressbook/views/kaddressbooktableview.cpp @@ -21,20 +21,20 @@ without including the source code for Qt in the source distribution. */ -#include <qapplication.h> -#include <qlayout.h> -#include <qheader.h> -#include <qvbox.h> -#include <qlistbox.h> -#include <qwidget.h> -#include <qfile.h> -#include <qimage.h> -#include <qcombobox.h> -#include <qapplication.h> -#include <qdragobject.h> -#include <qevent.h> -#include <qurl.h> -#include <qpixmap.h> +#include <tqapplication.h> +#include <tqlayout.h> +#include <tqheader.h> +#include <tqvbox.h> +#include <tqlistbox.h> +#include <tqwidget.h> +#include <tqfile.h> +#include <tqimage.h> +#include <tqcombobox.h> +#include <tqapplication.h> +#include <tqdragobject.h> +#include <tqevent.h> +#include <tqurl.h> +#include <tqpixmap.h> #include <kabc/addressbook.h> #include <kapplication.h> @@ -61,17 +61,17 @@ class TableViewFactory : public ViewFactory { public: - KAddressBookView *view( KAB::Core *core, QWidget *parent, const char *name ) + KAddressBookView *view( KAB::Core *core, TQWidget *parent, const char *name ) { return new KAddressBookTableView( core, parent, name ); } - QString type() const { return I18N_NOOP( "Table" ); } + TQString type() const { return I18N_NOOP( "Table" ); } - QString description() const { return i18n( "A listing of contacts in a table. Each cell of " + TQString description() const { return i18n( "A listing of contacts in a table. Each cell of " "the table holds a field of the contact." ); } - ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, QWidget *parent, + ViewConfigureWidget *configureWidget( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ) { return new ConfigureTableViewWidget( ab, parent, name ); @@ -86,10 +86,10 @@ extern "C" { } KAddressBookTableView::KAddressBookTableView( KAB::Core *core, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : KAddressBookView( core, parent, name ) { - mMainLayout = new QVBoxLayout( viewWidget(), 2 ); + mMainLayout = new TQVBoxLayout( viewWidget(), 2 ); // The list view will be created when the config is read. mListView = 0; @@ -103,16 +103,16 @@ KAddressBookTableView::~KAddressBookTableView() void KAddressBookTableView::reconstructListView() { if ( mListView ) { - disconnect( mListView, SIGNAL( selectionChanged() ), - this, SLOT( addresseeSelected() ) ); - disconnect( mListView, SIGNAL( executed( QListViewItem* ) ), - this, SLOT( addresseeExecuted( QListViewItem* ) ) ); - disconnect( mListView, SIGNAL( doubleClicked( QListViewItem* ) ), - this, SLOT( addresseeExecuted( QListViewItem* ) ) ); - disconnect( mListView, SIGNAL( startAddresseeDrag() ), - this, SIGNAL( startDrag() ) ); - disconnect( mListView, SIGNAL( addresseeDropped( QDropEvent* ) ), - this, SIGNAL( dropped( QDropEvent* ) ) ); + disconnect( mListView, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( addresseeSelected() ) ); + disconnect( mListView, TQT_SIGNAL( executed( TQListViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( TQListViewItem* ) ) ); + disconnect( mListView, TQT_SIGNAL( doubleClicked( TQListViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( TQListViewItem* ) ) ); + disconnect( mListView, TQT_SIGNAL( startAddresseeDrag() ), + this, TQT_SIGNAL( startDrag() ) ); + disconnect( mListView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ), + this, TQT_SIGNAL( dropped( TQDropEvent* ) ) ); delete mListView; } @@ -127,7 +127,7 @@ void KAddressBookTableView::reconstructListView() int c = 0; for ( it = fieldList.begin(); it != fieldList.end(); ++it ) { mListView->addColumn( (*it)->label() ); - mListView->setColumnWidthMode( c++, QListView::Manual ); + mListView->setColumnWidthMode( c++, TQListView::Manual ); } if ( mListView->showIM() ) { @@ -141,23 +141,23 @@ void KAddressBookTableView::reconstructListView() mListView->setFullWidth( true ); - connect( mListView, SIGNAL( selectionChanged() ), - this, SLOT( addresseeSelected() ) ); - connect( mListView, SIGNAL( startAddresseeDrag() ), - this, SIGNAL( startDrag() ) ); - connect( mListView, SIGNAL( addresseeDropped( QDropEvent* ) ), - this, SIGNAL( dropped( QDropEvent* ) ) ); - connect( mListView, SIGNAL( contextMenu( KListView*, QListViewItem*, const QPoint& ) ), - this, SLOT( rmbClicked( KListView*, QListViewItem*, const QPoint& ) ) ); - connect( mListView->header(), SIGNAL( clicked( int ) ), - this, SIGNAL( sortFieldChanged() ) ); + connect( mListView, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( addresseeSelected() ) ); + connect( mListView, TQT_SIGNAL( startAddresseeDrag() ), + this, TQT_SIGNAL( startDrag() ) ); + connect( mListView, TQT_SIGNAL( addresseeDropped( TQDropEvent* ) ), + this, TQT_SIGNAL( dropped( TQDropEvent* ) ) ); + connect( mListView, TQT_SIGNAL( contextMenu( KListView*, TQListViewItem*, const TQPoint& ) ), + this, TQT_SLOT( rmbClicked( KListView*, TQListViewItem*, const TQPoint& ) ) ); + connect( mListView->header(), TQT_SIGNAL( clicked( int ) ), + this, TQT_SIGNAL( sortFieldChanged() ) ); if ( KABPrefs::instance()->honorSingleClick() ) - connect( mListView, SIGNAL( executed( QListViewItem* ) ), - this, SLOT( addresseeExecuted( QListViewItem* ) ) ); + connect( mListView, TQT_SIGNAL( executed( TQListViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( TQListViewItem* ) ) ); else - connect( mListView, SIGNAL( doubleClicked( QListViewItem* ) ), - this, SLOT( addresseeExecuted( QListViewItem* ) ) ); + connect( mListView, TQT_SIGNAL( doubleClicked( TQListViewItem* ) ), + this, TQT_SLOT( addresseeExecuted( TQListViewItem* ) ) ); refresh(); @@ -187,13 +187,13 @@ void KAddressBookTableView::readConfig( KConfig *config ) if ( config->readBoolEntry( "InstantMessagingPresence", false ) ) { if ( !mIMProxy ) { mIMProxy = KIMProxy::instance( kapp->dcopClient() ); - connect( mIMProxy, SIGNAL( sigContactPresenceChanged( const QString& ) ), - this, SLOT( updatePresence( const QString& ) ) ); + connect( mIMProxy, TQT_SIGNAL( sigContactPresenceChanged( const TQString& ) ), + this, TQT_SLOT( updatePresence( const TQString& ) ) ); } } else { if ( mIMProxy ) { - disconnect( mIMProxy, SIGNAL( sigContactPresenceChanged( const QString& ) ), - this, SLOT( updatePresence( const QString& ) ) ); + disconnect( mIMProxy, TQT_SIGNAL( sigContactPresenceChanged( const TQString& ) ), + this, TQT_SLOT( updatePresence( const TQString& ) ) ); mIMProxy = 0; } } @@ -214,11 +214,11 @@ void KAddressBookTableView::readConfig( KConfig *config ) mListView->restoreLayout( config, config->group() ); } -void KAddressBookTableView::refresh( const QString &uid ) +void KAddressBookTableView::refresh( const TQString &uid ) { if ( uid.isEmpty() ) { // Clear the list view - QString currentUID, nextUID; + TQString currentUID, nextUID; ContactListViewItem *currentItem = dynamic_cast<ContactListViewItem*>( mListView->currentItem() ); if ( currentItem ) { ContactListViewItem *nextItem = dynamic_cast<ContactListViewItem*>( currentItem->itemBelow() ); @@ -253,8 +253,8 @@ void KAddressBookTableView::refresh( const QString &uid ) } else { // Only need to update on entry. Iterate through and try to find it ContactListViewItem *ceItem; - QPtrList<QListViewItem> selectedItems( mListView->selectedItems() ); - QListViewItem *it; + TQPtrList<TQListViewItem> selectedItems( mListView->selectedItems() ); + TQListViewItem *it; for ( it = selectedItems.first(); it; it = selectedItems.next() ) { ceItem = dynamic_cast<ContactListViewItem*>( it ); if ( ceItem && ceItem->addressee().uid() == uid ) { @@ -262,16 +262,16 @@ void KAddressBookTableView::refresh( const QString &uid ) return; } } - refresh( QString::null ); + refresh( TQString::null ); } } -QStringList KAddressBookTableView::selectedUids() +TQStringList KAddressBookTableView::selectedUids() { - QStringList uidList; + TQStringList uidList; ContactListViewItem *item; - QListViewItemIterator it( mListView, QListViewItemIterator::Selected ); + TQListViewItemIterator it( mListView, TQListViewItemIterator::Selected ); while ( it.current() ) { item = dynamic_cast<ContactListViewItem*>( it.current() ); if ( item ) @@ -283,12 +283,12 @@ QStringList KAddressBookTableView::selectedUids() return uidList; } -void KAddressBookTableView::setSelected( const QString &uid, bool selected ) +void KAddressBookTableView::setSelected( const TQString &uid, bool selected ) { if ( uid.isEmpty() ) mListView->selectAll( selected ); else { - QListViewItemIterator it( mListView ); + TQListViewItemIterator it( mListView ); while ( it.current() ) { ContactListViewItem *item = dynamic_cast<ContactListViewItem*>( it.current() ); if ( item && (item->addressee().uid() == uid) ) { @@ -314,12 +314,12 @@ void KAddressBookTableView::setFirstSelected( bool selected ) void KAddressBookTableView::addresseeSelected() { // We need to try to find the first selected item. This might not be the - // last selected item, but when QListView is in multiselection mode, + // last selected item, but when TQListView is in multiselection mode, // there is no way to figure out which one was // selected last. bool found =false; - QListViewItemIterator it( mListView, QListViewItemIterator::Selected ); + TQListViewItemIterator it( mListView, TQListViewItemIterator::Selected ); while ( it.current() && !found ) { found = true; ContactListViewItem *item = dynamic_cast<ContactListViewItem*>( it.current() ); @@ -330,10 +330,10 @@ void KAddressBookTableView::addresseeSelected() } if ( !found ) - emit selected( QString::null ); + emit selected( TQString::null ); } -void KAddressBookTableView::addresseeExecuted( QListViewItem *item ) +void KAddressBookTableView::addresseeExecuted( TQListViewItem *item ) { if ( item ) { ContactListViewItem *ceItem = dynamic_cast<ContactListViewItem*>( item ); @@ -341,21 +341,21 @@ void KAddressBookTableView::addresseeExecuted( QListViewItem *item ) if ( ceItem ) emit executed( ceItem->addressee().uid() ); else - emit executed( QString::null ); + emit executed( TQString::null ); } else { - emit executed( QString::null ); + emit executed( TQString::null ); } } -void KAddressBookTableView::rmbClicked( KListView*, QListViewItem*, const QPoint &point ) +void KAddressBookTableView::rmbClicked( KListView*, TQListViewItem*, const TQPoint &point ) { popup( point ); } -void KAddressBookTableView::updatePresence( const QString &uid ) +void KAddressBookTableView::updatePresence( const TQString &uid ) { // find the LVI to update and refresh() it - QListViewItem *item; + TQListViewItem *item; ContactListViewItem *ceItem; for ( item = mListView->firstChild(); item; item = item->itemBelow() ) { ceItem = dynamic_cast<ContactListViewItem*>( item ); @@ -372,12 +372,12 @@ void KAddressBookTableView::updatePresence( const QString &uid ) void KAddressBookTableView::scrollUp() { - QApplication::postEvent( mListView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Up, 0, 0 ) ); + TQApplication::postEvent( mListView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Up, 0, 0 ) ); } void KAddressBookTableView::scrollDown() { - QApplication::postEvent( mListView, new QKeyEvent( QEvent::KeyPress, Qt::Key_Down, 0, 0 ) ); + TQApplication::postEvent( mListView, new TQKeyEvent( TQEvent::KeyPress, Qt::Key_Down, 0, 0 ) ); } diff --git a/kaddressbook/views/kaddressbooktableview.h b/kaddressbook/views/kaddressbooktableview.h index 0d328ce86..ac0515e9e 100644 --- a/kaddressbook/views/kaddressbooktableview.h +++ b/kaddressbook/views/kaddressbooktableview.h @@ -28,13 +28,13 @@ #include <config.h> #endif -#include <qwidget.h> -#include <qlistview.h> -#include <qstring.h> -#include <qdialog.h> -#include <qtabdialog.h> -#include <qstringlist.h> -#include <qvaluelist.h> +#include <tqwidget.h> +#include <tqlistview.h> +#include <tqstring.h> +#include <tqdialog.h> +#include <tqtabdialog.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> #include "kaddressbookview.h" @@ -64,19 +64,19 @@ friend class ContactListView; Q_OBJECT public: - KAddressBookTableView( KAB::Core *core, QWidget *parent, + KAddressBookTableView( KAB::Core *core, TQWidget *parent, const char *name = 0 ); virtual ~KAddressBookTableView(); - virtual void refresh( const QString &uid = QString() ); - virtual QStringList selectedUids(); - virtual void setSelected( const QString &uid = QString(), bool selected = false ); + virtual void refresh( const TQString &uid = TQString() ); + virtual TQStringList selectedUids(); + virtual void setSelected( const TQString &uid = TQString(), bool selected = false ); virtual void setFirstSelected( bool selected = true ); virtual KABC::Field *sortField() const; virtual void readConfig( KConfig *config ); virtual void writeConfig( KConfig *config ); - virtual QString type() const { return "Table"; } + virtual TQString type() const { return "Table"; } void scrollUp(); void scrollDown(); @@ -94,20 +94,20 @@ friend class ContactListView; Called whenever the user executes an addressee. In terms of the list view, this is probably a double click */ - void addresseeExecuted( QListViewItem* ); + void addresseeExecuted( TQListViewItem* ); /** RBM menu called. */ - void rmbClicked( KListView*, QListViewItem*, const QPoint& ); + void rmbClicked( KListView*, TQListViewItem*, const TQPoint& ); /** * Called to update the presence of a single item */ - void updatePresence( const QString &uid ); + void updatePresence( const TQString &uid ); private: - QVBoxLayout *mMainLayout; + TQVBoxLayout *mMainLayout; ContactListView *mListView; KIMProxy *mIMProxy; }; diff --git a/kaddressbook/xxport/bookmark_xxport.cpp b/kaddressbook/xxport/bookmark_xxport.cpp index 0a8d71bef..2cfdf98ca 100644 --- a/kaddressbook/xxport/bookmark_xxport.cpp +++ b/kaddressbook/xxport/bookmark_xxport.cpp @@ -33,15 +33,15 @@ K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_bookmark_xxport, BookmarkXXPort ) -BookmarkXXPort::BookmarkXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) +BookmarkXXPort::BookmarkXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::XXPort( ab, parent, name ) { createExportAction( i18n( "Export Bookmarks Menu..." ) ); } -bool BookmarkXXPort::exportContacts( const KABC::AddresseeList &list, const QString& ) +bool BookmarkXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& ) { - QString fileName = locateLocal( "data", "kabc/bookmarks.xml" ); + TQString fileName = locateLocal( "data", "kabc/bookmarks.xml" ); KBookmarkManager *mgr = KBookmarkManager::managerForFile( fileName ); KBookmarkDomBuilder *builder = new KBookmarkDomBuilder( mgr->root(), mgr ); @@ -51,8 +51,8 @@ bool BookmarkXXPort::exportContacts( const KABC::AddresseeList &list, const QStr emit newFolder( i18n( "AddressBook" ), false, "" ); for ( it = list.begin(); it != list.end(); ++it ) { if ( !(*it).url().isEmpty() ) { - QString name = (*it).givenName() + " " + (*it).familyName(); - emit newBookmark( name, (*it).url().url().latin1(), QString( "" ) ); + TQString name = (*it).givenName() + " " + (*it).familyName(); + emit newBookmark( name, (*it).url().url().latin1(), TQString( "" ) ); } } emit endFolder(); diff --git a/kaddressbook/xxport/bookmark_xxport.h b/kaddressbook/xxport/bookmark_xxport.h index 5cc186ed6..f12ed8e28 100644 --- a/kaddressbook/xxport/bookmark_xxport.h +++ b/kaddressbook/xxport/bookmark_xxport.h @@ -32,20 +32,20 @@ class BookmarkXXPort : public KAB::XXPort Q_OBJECT public: - BookmarkXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + BookmarkXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); - QString identifier() const { return "bookmark"; } + TQString identifier() const { return "bookmark"; } public slots: - bool exportContacts( const KABC::AddresseeList &list, const QString &data ); + bool exportContacts( const KABC::AddresseeList &list, const TQString &data ); signals: /** The following signals are used for building a bookmarks file using KBookmarkDomBuilder. */ - void newBookmark( const QString &text, const QCString &url, const QString &additionnalInfo ); - void newFolder( const QString &text, bool open, const QString &additionnalInfo ); + void newBookmark( const TQString &text, const TQCString &url, const TQString &additionnalInfo ); + void newFolder( const TQString &text, bool open, const TQString &additionnalInfo ); void newSeparator(); void endFolder(); }; diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp index 31611f390..fa4be2c9b 100644 --- a/kaddressbook/xxport/csv_xxport.cpp +++ b/kaddressbook/xxport/csv_xxport.cpp @@ -21,7 +21,7 @@ without including the source code for Qt in the source distribution. */ -#include <qfile.h> +#include <tqfile.h> #include <kfiledialog.h> #include <kio/netaccess.h> @@ -36,14 +36,14 @@ K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_csv_xxport, CSVXXPort ) -CSVXXPort::CSVXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) +CSVXXPort::CSVXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::XXPort( ab, parent, name ) { createImportAction( i18n( "Import CSV List..." ) ); createExportAction( i18n( "Export CSV List..." ) ); } -bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& ) +bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& ) { KURL url = KFileDialog::getSaveURL( "addressbook.csv" ); if ( url.isEmpty() ) @@ -52,7 +52,7 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& if ( !url.isLocalFile() ) { KTempFile tmpFile; if ( tmpFile.status() != 0 ) { - QString txt = i18n( "<qt>Unable to open file <b>%1</b>.%2.</qt>" ); + TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.%2.</qt>" ); KMessageBox::error( parentWidget(), txt.arg( url.url() ) .arg( strerror( tmpFile.status() ) ) ); return false; @@ -63,9 +63,9 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() ); } else { - QFile file( url.path() ); + TQFile file( url.path() ); if ( !file.open( IO_WriteOnly ) ) { - QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); + TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); KMessageBox::error( parentWidget(), txt.arg( url.path() ) ); return false; } @@ -79,7 +79,7 @@ bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& } } -KABC::AddresseeList CSVXXPort::importContacts( const QString& ) const +KABC::AddresseeList CSVXXPort::importContacts( const TQString& ) const { CSVImportDialog dlg( addressBook(), parentWidget() ); if ( dlg.exec() ) @@ -88,10 +88,10 @@ KABC::AddresseeList CSVXXPort::importContacts( const QString& ) const return KABC::AddresseeList(); } -void CSVXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) +void CSVXXPort::doExport( TQFile *fp, const KABC::AddresseeList &list ) { - QTextStream t( fp ); - t.setEncoding( QTextStream::Locale ); + TQTextStream t( fp ); + t.setEncoding( TQTextStream::Locale ); KABC::AddresseeList::ConstIterator iter; KABC::Field::List fields = addressBook()->fields(); diff --git a/kaddressbook/xxport/csv_xxport.h b/kaddressbook/xxport/csv_xxport.h index 972f4cad4..b957299d4 100644 --- a/kaddressbook/xxport/csv_xxport.h +++ b/kaddressbook/xxport/csv_xxport.h @@ -31,16 +31,16 @@ class CSVXXPort : public KAB::XXPort Q_OBJECT public: - CSVXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + CSVXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); - QString identifier() const { return "csv"; } + TQString identifier() const { return "csv"; } public slots: - bool exportContacts( const KABC::AddresseeList &list, const QString &data ); - KABC::AddresseeList importContacts( const QString &data ) const; + bool exportContacts( const KABC::AddresseeList &list, const TQString &data ); + KABC::AddresseeList importContacts( const TQString &data ) const; private: - void doExport( QFile *fp, const KABC::AddresseeList &list ); + void doExport( TQFile *fp, const KABC::AddresseeList &list ); }; #endif diff --git a/kaddressbook/xxport/csvimportdialog.cpp b/kaddressbook/xxport/csvimportdialog.cpp index f89222aff..cfcac0fec 100644 --- a/kaddressbook/xxport/csvimportdialog.cpp +++ b/kaddressbook/xxport/csvimportdialog.cpp @@ -20,17 +20,17 @@ */ -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qtable.h> -#include <qtextcodec.h> -#include <qtooltip.h> +#include <tqbuttongroup.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqtable.h> +#include <tqtextcodec.h> +#include <tqtooltip.h> #include <kapplication.h> #include <kdebug.h> @@ -50,7 +50,7 @@ enum { Local = 0, Guess = 1, Latin1 = 2, Uni = 3, MSBug = 4, Codec = 5 }; -CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, +CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, TQWidget *parent, const char * name ) : KDialogBase( Plain, i18n ( "CSV Import Dialog" ), Ok | Cancel | User1 | User2, Ok, parent, name, true, true ), @@ -121,33 +121,33 @@ CSVImportDialog::CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, reloadCodecs(); - connect( mDelimiterBox, SIGNAL( clicked( int ) ), - this, SLOT( delimiterClicked( int ) ) ); - connect( mDelimiterEdit, SIGNAL( returnPressed() ), - this, SLOT( returnPressed() ) ); - connect( mDelimiterEdit, SIGNAL( textChanged ( const QString& ) ), - this, SLOT( textChanged ( const QString& ) ) ); - connect( mComboLine, SIGNAL( activated( const QString& ) ), - this, SLOT( lineSelected( const QString& ) ) ); - connect( mComboQuote, SIGNAL( activated( const QString& ) ), - this, SLOT( textquoteSelected( const QString& ) ) ); - connect( mIgnoreDuplicates, SIGNAL( stateChanged( int ) ), - this, SLOT( ignoreDuplicatesChanged( int ) ) ); - connect( mCodecCombo, SIGNAL( activated( const QString& ) ), - this, SLOT( codecChanged() ) ); - - connect( mUrlRequester, SIGNAL( returnPressed( const QString& ) ), - this, SLOT( setFile( const QString& ) ) ); - connect( mUrlRequester, SIGNAL( urlSelected( const QString& ) ), - this, SLOT( setFile( const QString& ) ) ); - connect( mUrlRequester->lineEdit(), SIGNAL( textChanged ( const QString& ) ), - this, SLOT( urlChanged( const QString& ) ) ); - - connect( this, SIGNAL( user1Clicked() ), - this, SLOT( applyTemplate() ) ); - - connect( this, SIGNAL( user2Clicked() ), - this, SLOT( saveTemplate() ) ); + connect( mDelimiterBox, TQT_SIGNAL( clicked( int ) ), + this, TQT_SLOT( delimiterClicked( int ) ) ); + connect( mDelimiterEdit, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( returnPressed() ) ); + connect( mDelimiterEdit, TQT_SIGNAL( textChanged ( const TQString& ) ), + this, TQT_SLOT( textChanged ( const TQString& ) ) ); + connect( mComboLine, TQT_SIGNAL( activated( const TQString& ) ), + this, TQT_SLOT( lineSelected( const TQString& ) ) ); + connect( mComboQuote, TQT_SIGNAL( activated( const TQString& ) ), + this, TQT_SLOT( textquoteSelected( const TQString& ) ) ); + connect( mIgnoreDuplicates, TQT_SIGNAL( stateChanged( int ) ), + this, TQT_SLOT( ignoreDuplicatesChanged( int ) ) ); + connect( mCodecCombo, TQT_SIGNAL( activated( const TQString& ) ), + this, TQT_SLOT( codecChanged() ) ); + + connect( mUrlRequester, TQT_SIGNAL( returnPressed( const TQString& ) ), + this, TQT_SLOT( setFile( const TQString& ) ) ); + connect( mUrlRequester, TQT_SIGNAL( urlSelected( const TQString& ) ), + this, TQT_SLOT( setFile( const TQString& ) ) ); + connect( mUrlRequester->lineEdit(), TQT_SIGNAL( textChanged ( const TQString& ) ), + this, TQT_SLOT( urlChanged( const TQString& ) ) ); + + connect( this, TQT_SIGNAL( user1Clicked() ), + this, TQT_SLOT( applyTemplate() ) ); + + connect( this, TQT_SIGNAL( user2Clicked() ), + this, TQT_SLOT( saveTemplate() ) ); } CSVImportDialog::~CSVImportDialog() @@ -174,15 +174,15 @@ KABC::AddresseeList CSVImportDialog::contacts() const KABC::Address addrHome( KABC::Address::Home ); KABC::Address addrWork( KABC::Address::Work ); for ( int col = 0; col < mTable->numCols(); ++col ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + TQComboTableItem *item = static_cast<TQComboTableItem*>( mTable->item( 0, col ) ); if ( !item ) { kdError() << "ERROR: item cast failed" << endl; continue; } - QString value = mTable->text( row, col ); - if ( 1 == row && static_cast<QTableItem *>(item)->text() == value ) + TQString value = mTable->text( row, col ); + if ( 1 == row && static_cast<TQTableItem *>(item)->text() == value ) // we are looking at a header row, stop now break; @@ -367,12 +367,12 @@ void CSVImportDialog::initGUI() { mPage = plainPage(); - QGridLayout *layout = new QGridLayout( mPage, 1, 1, marginHint(), + TQGridLayout *layout = new TQGridLayout( mPage, 1, 1, marginHint(), spacingHint() ); - QHBoxLayout *hbox = new QHBoxLayout(); + TQHBoxLayout *hbox = new TQHBoxLayout(); hbox->setSpacing( spacingHint() ); - QLabel *label = new QLabel( i18n( "File to import:" ), mPage ); + TQLabel *label = new TQLabel( i18n( "File to import:" ), mPage ); hbox->addWidget( label ); mUrlRequester = new KURLRequester( mPage ); @@ -382,46 +382,46 @@ void CSVImportDialog::initGUI() layout->addMultiCellLayout( hbox, 0, 0, 0, 4 ); // Delimiter: comma, semicolon, tab, space, other - mDelimiterBox = new QButtonGroup( i18n( "Delimiter" ), mPage ); + mDelimiterBox = new TQButtonGroup( i18n( "Delimiter" ), mPage ); mDelimiterBox->setColumnLayout( 0, Qt::Vertical ); mDelimiterBox->layout()->setSpacing( spacingHint() ); mDelimiterBox->layout()->setMargin( marginHint() ); - QGridLayout *delimiterLayout = new QGridLayout( mDelimiterBox->layout() ); + TQGridLayout *delimiterLayout = new TQGridLayout( mDelimiterBox->layout() ); delimiterLayout->setAlignment( Qt::AlignTop ); layout->addMultiCellWidget( mDelimiterBox, 1, 4, 0, 0 ); - mRadioComma = new QRadioButton( i18n( "Comma" ), mDelimiterBox ); + mRadioComma = new TQRadioButton( i18n( "Comma" ), mDelimiterBox ); mRadioComma->setChecked( true ); delimiterLayout->addWidget( mRadioComma, 0, 0 ); - mRadioSemicolon = new QRadioButton( i18n( "Semicolon" ), mDelimiterBox ); + mRadioSemicolon = new TQRadioButton( i18n( "Semicolon" ), mDelimiterBox ); delimiterLayout->addWidget( mRadioSemicolon, 0, 1 ); - mRadioTab = new QRadioButton( i18n( "Tabulator" ), mDelimiterBox ); + mRadioTab = new TQRadioButton( i18n( "Tabulator" ), mDelimiterBox ); delimiterLayout->addWidget( mRadioTab, 1, 0 ); - mRadioSpace = new QRadioButton( i18n( "Space" ), mDelimiterBox ); + mRadioSpace = new TQRadioButton( i18n( "Space" ), mDelimiterBox ); delimiterLayout->addWidget( mRadioSpace, 1, 1 ); - mRadioOther = new QRadioButton( i18n( "Other" ), mDelimiterBox ); + mRadioOther = new TQRadioButton( i18n( "Other" ), mDelimiterBox ); delimiterLayout->addWidget( mRadioOther, 0, 2 ); - mDelimiterEdit = new QLineEdit( mDelimiterBox ); + mDelimiterEdit = new TQLineEdit( mDelimiterBox ); delimiterLayout->addWidget( mDelimiterEdit, 1, 2 ); - mComboLine = new QComboBox( false, mPage ); + mComboLine = new TQComboBox( false, mPage ); mComboLine->insertItem( i18n( "1" ) ); layout->addWidget( mComboLine, 2, 3 ); - mComboQuote = new QComboBox( false, mPage ); + mComboQuote = new TQComboBox( false, mPage ); mComboQuote->insertItem( i18n( "\"" ), 0 ); mComboQuote->insertItem( i18n( "'" ), 1 ); mComboQuote->insertItem( i18n( "None" ), 2 ); layout->addWidget( mComboQuote, 2, 2 ); - mDatePatternEdit = new QLineEdit( mPage ); + mDatePatternEdit = new TQLineEdit( mPage ); mDatePatternEdit->setText( "Y-M-D" ); // ISO 8601 format as default - QToolTip::add( mDatePatternEdit, i18n( "<ul><li>y: year with 2 digits</li>" + TQToolTip::add( mDatePatternEdit, i18n( "<ul><li>y: year with 2 digits</li>" "<li>Y: year with 4 digits</li>" "<li>m: month with 1 or 2 digits</li>" "<li>M: month with 2 digits</li>" @@ -429,24 +429,24 @@ void CSVImportDialog::initGUI() "<li>D: day with 2 digits</li></ul>" ) ); layout->addWidget( mDatePatternEdit, 2, 4 ); - label = new QLabel( i18n( "Start at line:" ), mPage ); + label = new TQLabel( i18n( "Start at line:" ), mPage ); layout->addWidget( label, 1, 3 ); - label = new QLabel( i18n( "Textquote:" ), mPage ); + label = new TQLabel( i18n( "Textquote:" ), mPage ); layout->addWidget( label, 1, 2 ); - label = new QLabel( i18n( "Date format:" ), mPage ); + label = new TQLabel( i18n( "Date format:" ), mPage ); layout->addWidget( label, 1, 4 ); - mIgnoreDuplicates = new QCheckBox( mPage ); + mIgnoreDuplicates = new TQCheckBox( mPage ); mIgnoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) ); layout->addMultiCellWidget( mIgnoreDuplicates, 3, 3, 2, 4 ); - mCodecCombo = new QComboBox( mPage ); + mCodecCombo = new TQComboBox( mPage ); layout->addMultiCellWidget( mCodecCombo, 4, 4, 2, 4 ); - mTable = new QTable( 0, 0, mPage ); - mTable->setSelectionMode( QTable::NoSelection ); + mTable = new TQTable( 0, 0, mPage ); + mTable->setSelectionMode( TQTable::NoSelection ); mTable->horizontalHeader()->hide(); layout->addMultiCellWidget( mTable, 5, 5, 0, 4 ); @@ -468,13 +468,13 @@ void CSVImportDialog::fillTable() enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD, S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START; - QChar x; - QString field; + TQChar x; + TQString field; // store previous assignment mTypeStore.clear(); for ( column = 0; column < mTable->numCols(); ++column ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + TQComboTableItem *item = static_cast<TQComboTableItem*>( mTable->item( 0, column ) ); if ( !item || mClearTypeStore ) mTypeStore.append( typeToPos( Undefined ) ); @@ -486,22 +486,22 @@ void CSVImportDialog::fillTable() row = column = 1; - QTextStream inputStream( mFileArray, IO_ReadOnly ); + TQTextStream inputStream( mFileArray, IO_ReadOnly ); // find the current codec int code = mCodecCombo->currentItem(); if ( code == Local ) - inputStream.setEncoding( QTextStream::Locale ); + inputStream.setEncoding( TQTextStream::Locale ); else if ( code >= Codec ) inputStream.setCodec( mCodecs.at( code - Codec ) ); else if ( code == Uni ) - inputStream.setEncoding( QTextStream::Unicode ); + inputStream.setEncoding( TQTextStream::Unicode ); else if ( code == MSBug ) - inputStream.setEncoding( QTextStream::UnicodeReverse ); + inputStream.setEncoding( TQTextStream::UnicodeReverse ); else if ( code == Latin1 ) - inputStream.setEncoding( QTextStream::Latin1 ); + inputStream.setEncoding( TQTextStream::Latin1 ); else if ( code == Guess ) { - QTextCodec* codec = QTextCodec::codecForContent( mFileArray.data(), mFileArray.size() ); + TQTextCodec* codec = TQTextCodec::codecForContent( mFileArray.data(), mFileArray.size() ); if ( codec ) { KMessageBox::information( this, i18n( "Using codec '%1'" ).arg( codec->name() ), i18n( "Encoding" ) ); inputStream.setCodec( codec ); @@ -627,7 +627,7 @@ void CSVImportDialog::fillTable() mTable->setNumCols( maxColumn ); for ( column = 0; column < mTable->numCols(); ++column ) { - QComboTableItem *item = new QComboTableItem( mTable, mTypeMap.keys() ); + TQComboTableItem *item = new TQComboTableItem( mTable, mTypeMap.keys() ); mTable->setItem( 0, column, item ); if ( column < (int)mTypeStore.count() ) item->setCurrentItem( mTypeStore[ column ] ); @@ -650,7 +650,7 @@ void CSVImportDialog::fillComboBox() { mComboLine->clear(); for ( int row = 1; row < mTable->numRows() + 1; ++row ) - mComboLine->insertItem( QString::number( row ), row - 1 ); + mComboLine->insertItem( TQString::number( row ), row - 1 ); } void CSVImportDialog::reloadCodecs() @@ -659,11 +659,11 @@ void CSVImportDialog::reloadCodecs() mCodecs.clear(); - QTextCodec *codec; - for ( int i = 0; ( codec = QTextCodec::codecForIndex( i ) ); i++ ) + TQTextCodec *codec; + for ( int i = 0; ( codec = TQTextCodec::codecForIndex( i ) ); i++ ) mCodecs.append( codec ); - mCodecCombo->insertItem( i18n( "Local (%1)" ).arg( QTextCodec::codecForLocale()->name() ), Local ); + mCodecCombo->insertItem( i18n( "Local (%1)" ).arg( TQTextCodec::codecForLocale()->name() ), Local ); mCodecCombo->insertItem( i18n( "[guess]" ), Guess ); mCodecCombo->insertItem( i18n( "Latin1" ), Latin1 ); mCodecCombo->insertItem( i18n( "Unicode" ), Uni ); @@ -673,7 +673,7 @@ void CSVImportDialog::reloadCodecs() mCodecCombo->insertItem( mCodecs.at( i )->name(), Codec + i ); } -void CSVImportDialog::setText( int row, int col, const QString& text ) +void CSVImportDialog::setText( int row, int col, const TQString& text ) { if ( row < 1 ) // skipped by the user return; @@ -702,10 +702,10 @@ void CSVImportDialog::adjustRows( int rows ) void CSVImportDialog::resizeColumns() { - QFontMetrics fm = fontMetrics(); + TQFontMetrics fm = fontMetrics(); int width = 0; - QMap<QString, uint>::ConstIterator it; + TQMap<TQString, uint>::ConstIterator it; for ( it = mTypeMap.begin(); it != mTypeMap.end(); ++it ) { width = QMAX( width, fm.width( it.key() ) ); } @@ -723,7 +723,7 @@ void CSVImportDialog::returnPressed() fillTable(); } -void CSVImportDialog::textChanged ( const QString& ) +void CSVImportDialog::textChanged ( const TQString& ) { mRadioOther->setChecked ( true ); delimiterClicked( 4 ); // other @@ -752,7 +752,7 @@ void CSVImportDialog::delimiterClicked( int id ) fillTable(); } -void CSVImportDialog::textquoteSelected( const QString& mark ) +void CSVImportDialog::textquoteSelected( const TQString& mark ) { if ( mComboQuote->currentItem() == 2 ) mTextQuote = 0; @@ -762,7 +762,7 @@ void CSVImportDialog::textquoteSelected( const QString& mark ) fillTable(); } -void CSVImportDialog::lineSelected( const QString& line ) +void CSVImportDialog::lineSelected( const TQString& line ) { mStartLine = line.toInt() - 1; fillTable(); @@ -773,7 +773,7 @@ void CSVImportDialog::slotOk() bool assigned = false; for ( int column = 0; column < mTable->numCols(); ++column ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + TQComboTableItem *item = static_cast<TQComboTableItem*>( mTable->item( 0, column ) ); if ( item && posToType( item->currentItem() ) != Undefined ) assigned = true; @@ -787,15 +787,15 @@ void CSVImportDialog::slotOk() void CSVImportDialog::applyTemplate() { - QMap<uint,int> columnMap; - QMap<QString, QString> fileMap; - QStringList templates; + TQMap<uint,int> columnMap; + TQMap<TQString, TQString> fileMap; + TQStringList templates; // load all template files - QStringList list = KGlobal::dirs()->findAllResources( "data" , QString( kapp->name() ) + + TQStringList list = KGlobal::dirs()->findAllResources( "data" , TQString( kapp->name() ) + "/csv-templates/*.desktop", true, true ); - for ( QStringList::iterator it = list.begin(); it != list.end(); ++it ) + for ( TQStringList::iterator it = list.begin(); it != list.end(); ++it ) { KSimpleConfig config( *it, true ); @@ -809,7 +809,7 @@ void CSVImportDialog::applyTemplate() // let the user chose, what to take bool ok = false; - QString tmp; + TQString tmp; tmp = KInputDialog::getItem( i18n( "Template Selection" ), i18n( "Please select a template, that matches the CSV file:" ), templates, 0, false, &ok, this ); @@ -831,14 +831,14 @@ void CSVImportDialog::applyTemplate() // create the column map config.setGroup( "csv column map" ); for ( uint i = 0; i < numColumns; ++i ) { - int col = config.readNumEntry( QString::number( i ) ); + int col = config.readNumEntry( TQString::number( i ) ); columnMap.insert( i, col ); } // apply the column map for ( uint column = 0; column < columnMap.count(); ++column ) { int type = columnMap[ column ]; - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + TQComboTableItem *item = static_cast<TQComboTableItem*>( mTable->item( 0, column ) ); if ( item ) item->setCurrentItem( typeToPos( type ) ); @@ -847,8 +847,8 @@ void CSVImportDialog::applyTemplate() void CSVImportDialog::saveTemplate() { - QString fileName = KFileDialog::getSaveFileName( - locateLocal( "data", QString( kapp->name() ) + "/csv-templates/" ), + TQString fileName = KFileDialog::getSaveFileName( + locateLocal( "data", TQString( kapp->name() ) + "/csv-templates/" ), "*.desktop", this ); if ( fileName.isEmpty() ) @@ -857,7 +857,7 @@ void CSVImportDialog::saveTemplate() if ( !fileName.contains( ".desktop" ) ) fileName += ".desktop"; - QString name = KInputDialog::getText( i18n( "Template Name" ), i18n( "Please enter a name for the template:" ) ); + TQString name = KInputDialog::getText( i18n( "Template Name" ), i18n( "Please enter a name for the template:" ) ); if ( name.isEmpty() ) return; @@ -876,19 +876,19 @@ void CSVImportDialog::saveTemplate() config.setGroup( "csv column map" ); for ( int column = 0; column < mTable->numCols(); ++column ) { - QComboTableItem *item = static_cast<QComboTableItem*>( mTable->item( 0, + TQComboTableItem *item = static_cast<TQComboTableItem*>( mTable->item( 0, column ) ); if ( item ) - config.writeEntry( QString::number( column ), posToType( + config.writeEntry( TQString::number( column ), posToType( item->currentItem() ) ); else - config.writeEntry( QString::number( column ), 0 ); + config.writeEntry( TQString::number( column ), 0 ); } config.sync(); } -QString CSVImportDialog::getText( int row, int col ) +TQString CSVImportDialog::getText( int row, int col ) { return mTable->text( row, col ); } @@ -896,7 +896,7 @@ QString CSVImportDialog::getText( int row, int col ) uint CSVImportDialog::posToType( int pos ) const { uint counter = 0; - QMap<QString, uint>::ConstIterator it; + TQMap<TQString, uint>::ConstIterator it; for ( it = mTypeMap.begin(); it != mTypeMap.end(); ++it, ++counter ) if ( counter == (uint)pos ) return it.data(); @@ -907,7 +907,7 @@ uint CSVImportDialog::posToType( int pos ) const int CSVImportDialog::typeToPos( uint type ) const { uint counter = 0; - QMap<QString, uint>::ConstIterator it; + TQMap<TQString, uint>::ConstIterator it; for ( it = mTypeMap.begin(); it != mTypeMap.end(); ++it, ++counter ) if ( it.data() == type ) return counter; @@ -920,12 +920,12 @@ void CSVImportDialog::ignoreDuplicatesChanged( int ) fillTable(); } -void CSVImportDialog::setFile( const QString &fileName ) +void CSVImportDialog::setFile( const TQString &fileName ) { if ( fileName.isEmpty() ) return; - QFile file( fileName ); + TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { KMessageBox::sorry( this, i18n( "Cannot open input file." ) ); file.close(); @@ -945,7 +945,7 @@ void CSVImportDialog::setFile( const QString &fileName ) fillComboBox(); } -void CSVImportDialog::urlChanged( const QString &file ) +void CSVImportDialog::urlChanged( const TQString &file ) { bool state = !file.isEmpty(); diff --git a/kaddressbook/xxport/csvimportdialog.h b/kaddressbook/xxport/csvimportdialog.h index 8e9dd0710..a34f681e6 100644 --- a/kaddressbook/xxport/csvimportdialog.h +++ b/kaddressbook/xxport/csvimportdialog.h @@ -26,7 +26,7 @@ #include <kabc/addresseelist.h> #include <kdialogbase.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> class KURLRequester; @@ -43,7 +43,7 @@ class CSVImportDialog : public KDialogBase Q_OBJECT public: - CSVImportDialog( KABC::AddressBook *ab, QWidget *parent, + CSVImportDialog( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); ~CSVImportDialog(); @@ -55,12 +55,12 @@ class CSVImportDialog : public KDialogBase private slots: void returnPressed(); void delimiterClicked( int id ); - void lineSelected( const QString& line ); - void textquoteSelected( const QString& mark ); - void textChanged ( const QString & ); + void lineSelected( const TQString& line ); + void textquoteSelected( const TQString& mark ); + void textChanged ( const TQString & ); void ignoreDuplicatesChanged( int ); - void setFile( const QString& ); - void urlChanged( const QString& ); + void setFile( const TQString& ); + void urlChanged( const TQString& ); void codecChanged(); void applyTemplate(); @@ -78,47 +78,47 @@ class CSVImportDialog : public KDialogBase Isdn, Pager, Email, Mailer, Title, Role, Organization, Note, URL }; - QTable* mTable; - QButtonGroup* mDelimiterBox; - QRadioButton* mRadioComma; - QRadioButton* mRadioSemicolon; - QRadioButton* mRadioTab; - QRadioButton* mRadioSpace; - QRadioButton* mRadioOther; - QLineEdit* mDelimiterEdit; - QLineEdit* mDatePatternEdit; - QComboBox* mComboLine; - QComboBox* mComboQuote; - QCheckBox* mIgnoreDuplicates; - QComboBox* mCodecCombo; - QWidget* mPage; + TQTable* mTable; + TQButtonGroup* mDelimiterBox; + TQRadioButton* mRadioComma; + TQRadioButton* mRadioSemicolon; + TQRadioButton* mRadioTab; + TQRadioButton* mRadioSpace; + TQRadioButton* mRadioOther; + TQLineEdit* mDelimiterEdit; + TQLineEdit* mDatePatternEdit; + TQComboBox* mComboLine; + TQComboBox* mComboQuote; + TQCheckBox* mIgnoreDuplicates; + TQComboBox* mCodecCombo; + TQWidget* mPage; KURLRequester* mUrlRequester; void initGUI(); void fillTable(); void clearTable(); void fillComboBox(); - void setText( int row, int col, const QString& text ); + void setText( int row, int col, const TQString& text ); void adjustRows( int rows ); void resizeColumns(); - QString getText( int row, int col ); + TQString getText( int row, int col ); uint posToType( int pos ) const; int typeToPos( uint type ) const; void reloadCodecs(); - QTextCodec *currentCodec(); - QPtrList<QTextCodec> mCodecs; + TQTextCodec *currentCodec(); + TQPtrList<TQTextCodec> mCodecs; bool mAdjustRows; int mStartLine; - QChar mTextQuote; - QString mDelimiter; - QByteArray mFileArray; - QMap<QString, uint> mTypeMap; + TQChar mTextQuote; + TQString mDelimiter; + TQByteArray mFileArray; + TQMap<TQString, uint> mTypeMap; KABC::AddressBook *mAddressBook; int mCustomCounter; bool mClearTypeStore; - QValueList<int> mTypeStore; + TQValueList<int> mTypeStore; }; #endif diff --git a/kaddressbook/xxport/dateparser.cpp b/kaddressbook/xxport/dateparser.cpp index ed485e0dd..2052407a6 100644 --- a/kaddressbook/xxport/dateparser.cpp +++ b/kaddressbook/xxport/dateparser.cpp @@ -21,11 +21,11 @@ without including the source code for Qt in the source distribution. */ -#include <qdatetime.h> +#include <tqdatetime.h> #include "dateparser.h" -DateParser::DateParser( const QString &pattern ) +DateParser::DateParser( const TQString &pattern ) : mPattern( pattern ) { } @@ -34,7 +34,7 @@ DateParser::~DateParser() { } -QDate DateParser::parse( const QString &dateStr ) const +TQDate DateParser::parse( const TQString &dateStr ) const { int year, month, day; year = month = day = 0; @@ -46,13 +46,13 @@ QDate DateParser::parse( const QString &dateStr ) const year = 1900 + dateStr.mid( currPos, 2 ).toInt(); currPos += 2; } else - return QDate(); + return TQDate(); } else if ( mPattern[ i ] == 'Y' ) { // YYYY if ( currPos + 3 < dateStr.length() ) { year = dateStr.mid( currPos, 4 ).toInt(); currPos += 4; } else - return QDate(); + return TQDate(); } else if ( mPattern[ i ] == 'm' ) { // M or MM if ( currPos + 1 < dateStr.length() ) { if ( dateStr[ currPos ].isDigit() ) { @@ -71,13 +71,13 @@ QDate DateParser::parse( const QString &dateStr ) const } } - return QDate(); + return TQDate(); } else if ( mPattern[ i ] == 'M' ) { // 0M or MM if ( currPos + 1 < dateStr.length() ) { month = dateStr.mid( currPos, 2 ).toInt(); currPos += 2; } else - return QDate(); + return TQDate(); } else if ( mPattern[ i ] == 'd' ) { // D or DD if ( currPos + 1 < dateStr.length() ) { if ( dateStr[ currPos ].isDigit() ) { @@ -96,17 +96,17 @@ QDate DateParser::parse( const QString &dateStr ) const } } - return QDate(); + return TQDate(); } else if ( mPattern[ i ] == 'D' ) { // 0D or DD if ( currPos + 1 < dateStr.length() ) { day = dateStr.mid( currPos, 2 ).toInt(); currPos += 2; } else - return QDate(); + return TQDate(); } else { currPos++; } } - return QDate( year, month, day ); + return TQDate( year, month, day ); } diff --git a/kaddressbook/xxport/dateparser.h b/kaddressbook/xxport/dateparser.h index 93eb597da..3087d339a 100644 --- a/kaddressbook/xxport/dateparser.h +++ b/kaddressbook/xxport/dateparser.h @@ -24,7 +24,7 @@ #ifndef DATEPARSER_H #define DATEPARSER_H -#include <qstring.h> +#include <tqstring.h> /** This class parses the date out of a given string with the @@ -40,12 +40,12 @@ class DateParser { public: - DateParser( const QString &pattern ); + DateParser( const TQString &pattern ); ~DateParser(); - QDate parse( const QString &dateStr ) const; + TQDate parse( const TQString &dateStr ) const; private: - QString mPattern; + TQString mPattern; }; #endif diff --git a/kaddressbook/xxport/eudora_xxport.cpp b/kaddressbook/xxport/eudora_xxport.cpp index bb4ae373b..d31cd1115 100644 --- a/kaddressbook/xxport/eudora_xxport.cpp +++ b/kaddressbook/xxport/eudora_xxport.cpp @@ -21,7 +21,7 @@ without including the source code for Qt in the source distribution. */ -#include <qfile.h> +#include <tqfile.h> #include <kfiledialog.h> #include <kio/netaccess.h> @@ -38,25 +38,25 @@ K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_eudora_xxport, EudoraXXPort ) -EudoraXXPort::EudoraXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) +EudoraXXPort::EudoraXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::XXPort( ab, parent, name ) { createImportAction( i18n( "Import Eudora Addressbook..." ) ); } -KABC::AddresseeList EudoraXXPort::importContacts( const QString& ) const +KABC::AddresseeList EudoraXXPort::importContacts( const TQString& ) const { - QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath(), + TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath(), "*.[tT][xX][tT]|" + i18n("Eudora Light Addressbook (*.txt)"), 0 ); if ( fileName.isEmpty() ) return KABC::AddresseeList(); - QFile file( fileName ); + TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) return KABC::AddresseeList(); - QString line; - QTextStream stream( &file ); + TQString line; + TQTextStream stream( &file ); KABC::Addressee *a = 0; int bytesRead = 0; @@ -65,7 +65,7 @@ KABC::AddresseeList EudoraXXPort::importContacts( const QString& ) const while( !stream.eof() ) { line = stream.readLine(); bytesRead += line.length(); - QString tmp; + TQString tmp; if ( line.startsWith( "alias" ) ) { if ( a ) { // Write it out @@ -120,10 +120,10 @@ KABC::AddresseeList EudoraXXPort::importContacts( const QString& ) const return list; } -QString EudoraXXPort::key( const QString& line) const +TQString EudoraXXPort::key( const TQString& line) const { int e; - QString result; + TQString result; int b = line.find( '\"', 0 ); if ( b == -1 ) { @@ -148,10 +148,10 @@ QString EudoraXXPort::key( const QString& line) const return result; } -QString EudoraXXPort::email( const QString& line ) const +TQString EudoraXXPort::email( const TQString& line ) const { int b; - QString result; + TQString result; b = line.findRev( '\"' ); if ( b == -1 ) { b = line.findRev( ' ' ); @@ -163,10 +163,10 @@ QString EudoraXXPort::email( const QString& line ) const return result; } -QString EudoraXXPort::comment( const QString& line ) const +TQString EudoraXXPort::comment( const TQString& line ) const { int b; - QString result; + TQString result; uint i; b = line.findRev( '>' ); if ( b == -1 ) { @@ -184,24 +184,24 @@ QString EudoraXXPort::comment( const QString& line ) const return result; } -QString EudoraXXPort::get( const QString& line, const QString& key ) const +TQString EudoraXXPort::get( const TQString& line, const TQString& key ) const { - QString fd = "<" + key + ":"; + TQString fd = "<" + key + ":"; int b, e; uint i; // Find formatted key, return on error b = line.find( fd ); if ( b == -1 ) - return QString::null; + return TQString::null; b += fd.length(); e = line.find( '>', b ); if ( e == -1 ) - return QString::null; + return TQString::null; e--; - QString result = line.mid( b, e - b + 1 ); + TQString result = line.mid( b, e - b + 1 ); for ( i = 0; i < result.length(); i++ ) { if ( result[ i ] == CTRL_C ) result[ i ] = '\n'; diff --git a/kaddressbook/xxport/eudora_xxport.h b/kaddressbook/xxport/eudora_xxport.h index be1df8ead..0181aa318 100644 --- a/kaddressbook/xxport/eudora_xxport.h +++ b/kaddressbook/xxport/eudora_xxport.h @@ -31,19 +31,19 @@ class EudoraXXPort : public KAB::XXPort Q_OBJECT public: - EudoraXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + EudoraXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); - QString identifier() const { return "eudora"; } + TQString identifier() const { return "eudora"; } public slots: - KABC::AddresseeList importContacts( const QString &data ) const; + KABC::AddresseeList importContacts( const TQString &data ) const; private: - QString get( const QString& line, const QString& key ) const; - QString comment( const QString& line ) const; - QString email( const QString& line ) const; - QString key( const QString& line ) const; - int find( const QString& key ) const; + TQString get( const TQString& line, const TQString& key ) const; + TQString comment( const TQString& line ) const; + TQString email( const TQString& line ) const; + TQString key( const TQString& line ) const; + int find( const TQString& key ) const; }; #endif diff --git a/kaddressbook/xxport/gnokii_xxport.cpp b/kaddressbook/xxport/gnokii_xxport.cpp index 60675384c..c6bd0917d 100644 --- a/kaddressbook/xxport/gnokii_xxport.cpp +++ b/kaddressbook/xxport/gnokii_xxport.cpp @@ -43,7 +43,7 @@ extern "C" { #endif #endif -#include <qcursor.h> +#include <tqcursor.h> #include <kdebug.h> #include <klocale.h> @@ -63,12 +63,12 @@ extern "C" { #define GNOKII_CHECK_ERROR(error) \ do { \ if (error) \ - kdError() << QString("ERROR %1: %2\n").arg(error).arg(gn_error_print(error));\ + kdError() << TQString("ERROR %1: %2\n").arg(error).arg(gn_error_print(error));\ } while (0) // Locale conversion routines: // Gnokii uses the local 8 Bit encoding (based on LC_ALL), kaddressbook uses Unicode -#define GN_FROM(x) QString::fromLocal8Bit(x) +#define GN_FROM(x) TQString::fromLocal8Bit(x) #define GN_TO(x) (x).local8Bit() // static variables for GUI updates @@ -77,7 +77,7 @@ static KProgressDialog *m_progressDlg; K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_gnokii_xxport, GNOKIIXXPort ) -GNOKIIXXPort::GNOKIIXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) +GNOKIIXXPort::GNOKIIXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::XXPort( ab, parent, name ) { this_filter = this; @@ -88,11 +88,11 @@ GNOKIIXXPort::GNOKIIXXPort( KABC::AddressBook *ab, QWidget *parent, const char * #ifdef HAVE_GNOKII_H -static QString makeValidPhone( const QString &number ) +static TQString makeValidPhone( const TQString &number ) { // allowed chars: 0-9, *, #, p, w, + - QString num = number.simplifyWhiteSpace(); - QString allowed("0123456789*+#pw"); + TQString num = number.simplifyWhiteSpace(); + TQString allowed("0123456789*+#pw"); for (unsigned int i=num.length(); i>=1; i--) if (allowed.find(num[i-1])==-1) num.remove(i-1,1); @@ -122,12 +122,12 @@ static void busterminate(void) gn_lib_library_free(); } -static QString businit(void) +static TQString businit(void) { GNOKII_DEBUG( "Using new gnokii version." ); - GNOKII_DEBUG( QString("Compiled with libgnokii version 0x%1\n").arg(QString::number(LIBGNOKII_VERSION,16)) ); - GNOKII_DEBUG( QString("Using libgnokii runtime version 0x%1\n").arg(QString::number(gn_lib_version(),16)) ); + GNOKII_DEBUG( TQString("Compiled with libgnokii version 0x%1\n").arg(TQString::number(LIBGNOKII_VERSION,16)) ); + GNOKII_DEBUG( TQString("Using libgnokii runtime version 0x%1\n").arg(TQString::number(gn_lib_version(),16)) ); gn_error error = gn_lib_phoneprofile_load(NULL, &state); if (error) @@ -151,10 +151,10 @@ static QString businit(void) revision = gn_lib_get_phone_revision(state); imei = gn_lib_get_phone_imei(state); - GNOKII_DEBUG( QString("Found mobile phone: %1 %2, Revision: %3, IMEI: %4\n") + GNOKII_DEBUG( TQString("Found mobile phone: %1 %2, Revision: %3, IMEI: %4\n") .arg(manufacturer, model, revision, imei) ); - return QString::null; + return TQString::null; } @@ -165,17 +165,17 @@ static gn_error read_phone_memstat( const gn_memory_type memtype, gn_memory_stat error = gn_lib_addressbook_memstat(state, memtype, &memstat->used, &memstat->free); - GNOKII_DEBUG( QString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n") + GNOKII_DEBUG( TQString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n") .arg(memtype).arg(memstat->used).arg(memstat->free).arg(memstat->used+memstat->free) ); return error; } -static QString buildPhoneInfoString( const gn_memory_status &memstat ) +static TQString buildPhoneInfoString( const gn_memory_status &memstat ) { - QString format = QString::fromLatin1("<tr><td><b>%1</b></td><td>%2</td></tr>"); + TQString format = TQString::fromLatin1("<tr><td><b>%1</b></td><td>%2</td></tr>"); - return QString::fromLatin1("<b>%1</b><br><table>%2%3%4%5%6</table><br>") + return TQString::fromLatin1("<b>%1</b><br><table>%2%3%4%5%6</table><br>") .arg(i18n("Mobile Phone information:")) .arg(format.arg(i18n("Manufacturer")).arg(GN_FROM(manufacturer))) .arg(format.arg(i18n("Phone model")).arg(GN_FROM(model))) @@ -203,9 +203,9 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty gn_memory_status memstat; error = read_phone_memstat(memtype, &memstat); - QStringList addrlist; + TQStringList addrlist; KABC::Address *addr; - QString s, country; + TQString s, country; progress->setTotalSteps(memstat.used); m_progressDlg->setLabel(i18n("<qt>Importing <b>%1</b> contacts from <b>%2</b> of the Mobile Phone.<br><br>%3</qt>") @@ -233,7 +233,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty const char *name = gn_lib_get_pb_name(state); const char *number = gn_lib_get_pb_number(state); - GNOKII_DEBUG(QString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(i) + GNOKII_DEBUG(TQString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(i) .arg(GN_FROM(name)).arg(GN_FROM(number)) .arg(gn_lib_get_pb_location(state)).arg(gn_lib_get_pb_caller_group(state)) .arg(subentries_count)); @@ -244,7 +244,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty a->setFormattedName(s); // set formatted name as in Phone if (s.find(',') == -1) { // assumed format: "givenname [... familyname]" - addrlist = QStringList::split(' ', s); + addrlist = TQStringList::split(' ', s); if (addrlist.count() == 1) { // only one string -> put it in the GivenName a->setGivenName(s); @@ -256,27 +256,27 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty } } else { // assumed format: "familyname, ... givenname" - addrlist = QStringList::split(',', s); + addrlist = TQStringList::split(',', s); a->setFamilyName(addrlist.first().simplifyWhiteSpace()); addrlist.remove(addrlist.first()); a->setGivenName(addrlist.join(" ").simplifyWhiteSpace()); } a->insertCustom(APP, "X_GSM_CALLERGROUP", s.setNum(gn_lib_get_pb_caller_group(state))); - a->insertCustom(APP, "X_GSM_STORE_AT", QString("%1%2").arg(memtypestr).arg(gn_lib_get_pb_location(state))); + a->insertCustom(APP, "X_GSM_STORE_AT", TQString("%1%2").arg(memtypestr).arg(gn_lib_get_pb_location(state))); // set ProductId - a->setProductId(QString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei)); + a->setProductId(TQString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei)); // evaluate timestamp (ignore timezone) - QDateTime datetime; + TQDateTime datetime; gn_timestamp ts = gn_lib_get_pb_date(state); if (ts.year<1998) - datetime = QDateTime::currentDateTime(); + datetime = TQDateTime::currentDateTime(); else - datetime = QDateTime( QDate(ts.year, ts.month, ts.day), - QTime(ts.hour, ts.minute, ts.second) ); - GNOKII_DEBUG(QString(" date=%1\n").arg(datetime.toString())); + datetime = TQDateTime( TQDate(ts.year, ts.month, ts.day), + TQTime(ts.hour, ts.minute, ts.second) ); + GNOKII_DEBUG(TQString(" date=%1\n").arg(datetime.toString())); a->setRevision(datetime); if (!subentries_count) @@ -293,8 +293,8 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty error = gn_lib_get_pb_subentry(state, n, &entry_type, &number_type, &number); GNOKII_CHECK_ERROR(error); - QString s = GN_FROM(number).simplifyWhiteSpace(); - GNOKII_DEBUG(QString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n") + TQString s = GN_FROM(number).simplifyWhiteSpace(); + GNOKII_DEBUG(TQString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n") .arg(n).arg(entry_type).arg(number_type).arg(s)); if (s.isEmpty()) continue; @@ -306,10 +306,10 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty a->insertEmail(s); break; case GN_PHONEBOOK_ENTRY_Postal: - addrlist = QStringList::split(';', s, true); + addrlist = TQStringList::split(';', s, true); addr = new KABC::Address(KABC::Address::Work); if (addrlist.count() <= 1) { - addrlist = QStringList::split(',', s, true); + addrlist = TQStringList::split(',', s, true); if (addrlist.count() > 1 ) { // assumed format: "Locality, ZIP, Country" addr->setLocality(addrlist[0]); @@ -361,7 +361,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty a->insertCategory(s); break; default: - GNOKII_DEBUG(QString(" Not handled id=%1, entry=%2\n") + GNOKII_DEBUG(TQString(" Not handled id=%1, entry=%2\n") .arg(entry_type).arg(s)); break; } // switch() @@ -390,7 +390,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type memtype, const KABC::Addressee *addr) { - QString s; + TQString s; /* initialize the phonebook entry values to zero */ gn_lib_phonebook_prepare_write_entry(state); @@ -410,22 +410,22 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem s = makeValidPhone(s); gn_lib_set_pb_number(state, s.ascii()); gn_lib_set_pb_memtype(state, memtype); - QString cg = addr->custom(APP, "X_GSM_CALLERGROUP"); + TQString cg = addr->custom(APP, "X_GSM_CALLERGROUP"); if (cg.isEmpty()) gn_lib_set_pb_caller_group(state, GN_PHONEBOOK_GROUP_None); // default group else gn_lib_set_pb_caller_group(state, (gn_phonebook_group_type) cg.toInt()); // set date/revision - QDateTime datetime = addr->revision(); - QDate date(datetime.date()); - QTime time(datetime.time()); + TQDateTime datetime = addr->revision(); + TQDate date(datetime.date()); + TQTime time(datetime.time()); gn_timestamp ts; gn_timestamp_set( &ts, date.year(), date.month(), date.day(), time.hour(), time.minute(), time.second(), 0 ); gn_lib_set_pb_date(state, ts); - GNOKII_DEBUG(QString("Write #%1: name=%2, number=%3\n").arg(phone_location) + GNOKII_DEBUG(TQString("Write #%1: name=%2, number=%3\n").arg(phone_location) .arg(GN_FROM(gn_lib_get_pb_name(state))).arg(GN_FROM(gn_lib_get_pb_number(state)))); const KABC::Address homeAddr = addr->address(KABC::Address::Home); @@ -460,13 +460,13 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem GN_PHONEBOOK_ENTRY_URL, GN_PHONEBOOK_NUMBER_General, GN_TO(s)); } // add E-Mails - QStringList emails = addr->emails(); + TQStringList emails = addr->emails(); for (unsigned int n=0; n<emails.count(); n++) { s = emails[n].simplifyWhiteSpace(); if (s.isEmpty()) continue; // only one email allowed if we have URLS, notes, addresses (to avoid phone limitations) if (n && !addr->url().isEmpty() && !addr->note().isEmpty() && addr->addresses().count()) { - GNOKII_DEBUG(QString(" DROPPED email %1 in favor of URLs, notes and addresses.\n") + GNOKII_DEBUG(TQString(" DROPPED email %1 in favor of URLs, notes and addresses.\n") .arg(s)); continue; } @@ -479,9 +479,9 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem for ( it2 = addresses.begin(); it2 != addresses.end(); ++it2 ) { const KABC::Address *Addr = &(*it2); if (Addr->isEmpty()) continue; - QStringList a; - QChar sem(';'); - QString sem_repl(QString::fromLatin1(",")); + TQStringList a; + TQChar sem(';'); + TQString sem_repl(TQString::fromLatin1(",")); a.append( Addr->postOfficeBox().replace( sem, sem_repl ) ); a.append( Addr->extended() .replace( sem, sem_repl ) ); a.append( Addr->street() .replace( sem, sem_repl ) ); @@ -506,7 +506,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem gn_phonebook_number_type number_type; const char *number; gn_lib_get_pb_subentry(state, st, &entry_type, &number_type, &number); - GNOKII_DEBUG(QString(" SubTel #%1: entry_type=%2, number_type=%3, number=%4\n") + GNOKII_DEBUG(TQString(" SubTel #%1: entry_type=%2, number_type=%3, number=%4\n") .arg(st).arg(entry_type) .arg(number_type).arg(GN_FROM(number))); } @@ -524,7 +524,7 @@ static gn_error xxport_phone_delete_entry( int phone_location, gn_memory_type me } -KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const +KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const { KABC::AddresseeList addrList; @@ -544,14 +544,14 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const m_progressDlg->progressBar()->setProgress(0); m_progressDlg->progressBar()->setCenterIndicator(true); m_progressDlg->setModal(true); - m_progressDlg->setInitialSize(QSize(450,350)); + m_progressDlg->setInitialSize(TQSize(450,350)); m_progressDlg->show(); processEvents(); #if (QT_VERSION >= 0x030300) m_progressDlg->setCursor( Qt::BusyCursor ); #endif - QString errStr = businit(); + TQString errStr = businit(); m_progressDlg->unsetCursor(); if (!errStr.isEmpty()) { @@ -575,7 +575,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const } -bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QString & ) +bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQString & ) { if (KMessageBox::Continue != KMessageBox::warningContinueCancel(parentWidget(), i18n("<qt>Please connect your Mobile Phone to your computer and press " @@ -593,14 +593,14 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QStrin m_progressDlg->progressBar()->setProgress(0); m_progressDlg->progressBar()->setCenterIndicator(true); m_progressDlg->setModal(true); - m_progressDlg->setInitialSize(QSize(450,350)); + m_progressDlg->setInitialSize(TQSize(450,350)); m_progressDlg->show(); processEvents(); KProgress* progress = (KProgress*)m_progressDlg->progressBar(); KABC::AddresseeList::ConstIterator it; - QStringList failedList; + TQStringList failedList; gn_error error; bool deleteLabelInitialized = false; @@ -608,7 +608,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QStrin #if (QT_VERSION >= 0x030300) m_progressDlg->setCursor( Qt::BusyCursor ); #endif - QString errStr = businit(); + TQString errStr = businit(); m_progressDlg->unsetCursor(); if (!errStr.isEmpty()) { @@ -685,7 +685,7 @@ try_next_phone_entry: if (phone_entry_no > (memstat.used + memstat.free)) break; - GNOKII_DEBUG(QString("Try to write entry '%1' at phone_entry_no=%2, phone_count=%3\n") + GNOKII_DEBUG(TQString("Try to write entry '%1' at phone_entry_no=%2, phone_count=%3\n") .arg(addr->realName()).arg(phone_entry_no).arg(phone_count)); error = GN_ERR_NONE; @@ -759,7 +759,7 @@ finish: delete m_progressDlg; if (!failedList.isEmpty()) { - GNOKII_DEBUG(QString("Failed to export: %1\n").arg(failedList.join(", "))); + GNOKII_DEBUG(TQString("Failed to export: %1\n").arg(failedList.join(", "))); KMessageBox::informationList(parentWidget(), i18n("<qt>The following contacts could not be exported to the Mobile Phone. " "Possible Reasons for this problem could be:<br><ul>" @@ -797,7 +797,7 @@ finish: static char *lockfile = NULL; static char manufacturer[64], model[GN_MODEL_MAX_LENGTH+1], revision[GN_REVISION_MAX_LENGTH+1], imei[GN_IMEI_MAX_LENGTH+1]; -static QString PhoneProductId; +static TQString PhoneProductId; static struct gn_statemachine state; static gn_data data; @@ -808,7 +808,7 @@ static void busterminate(void) if (lockfile) gn_device_unlock(lockfile); } -static QString businit(void) +static TQString businit(void) { gn_error error; char *aux; @@ -865,24 +865,24 @@ static QString businit(void) data.revision = revision; data.imei = imei; - QCString unknown(GN_TO(i18n("Unknown"))); + TQCString unknown(GN_TO(i18n("Unknown"))); qstrncpy(manufacturer, unknown, sizeof(manufacturer)-1); qstrncpy(model, unknown, sizeof(model)-1); qstrncpy(revision, unknown, sizeof(revision)-1); qstrncpy(imei, unknown, sizeof(imei)-1); if (m_progressDlg->wasCancelled()) - return QString::null; + return TQString::null; else error = gn_sm_functions(GN_OP_Identify, &data, &state); GNOKII_CHECK_ERROR(error); - GNOKII_DEBUG( QString("Found mobile phone: %1 %2, Revision: %3, IMEI: %4\n") + GNOKII_DEBUG( TQString("Found mobile phone: %1 %2, Revision: %3, IMEI: %4\n") .arg(manufacturer, model, revision, imei) ); - PhoneProductId = QString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei); + PhoneProductId = TQString("%1-%2-%3-%4").arg(APP).arg(model).arg(revision).arg(imei); - return QString::null; + return TQString::null; } @@ -911,7 +911,7 @@ static gn_error read_phone_memstat( const gn_memory_type memtype, gn_memory_stat break; } } - GNOKII_DEBUG( QString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n") + GNOKII_DEBUG( TQString("\n\nMobile phone memory status: Type: %1, used=%2, free=%3, total=%4\n\n") .arg(memtype).arg(memstat->used).arg(memstat->free).arg(memstat->used+memstat->free) ); return error; } @@ -945,11 +945,11 @@ static bool phone_entry_empty( const int index, const gn_memory_type memtype ) return false; } -static QString buildPhoneInfoString( const gn_memory_status &memstat ) +static TQString buildPhoneInfoString( const gn_memory_status &memstat ) { - QString format = QString::fromLatin1("<tr><td><b>%1</b></td><td>%2</td></tr>"); + TQString format = TQString::fromLatin1("<tr><td><b>%1</b></td><td>%2</td></tr>"); - return QString::fromLatin1("<b>%1</b><br><table>%2%3%4%5%6</table><br>") + return TQString::fromLatin1("<b>%1</b><br><table>%2%3%4%5%6</table><br>") .arg(i18n("Mobile Phone information:")) .arg(format.arg(i18n("Manufacturer")).arg(GN_FROM(manufacturer))) .arg(format.arg(i18n("Phone model")).arg(GN_FROM(model))) @@ -959,7 +959,7 @@ static QString buildPhoneInfoString( const gn_memory_status &memstat ) .arg(i18n("%1 out of %2 contacts used").arg(memstat.used).arg(memstat.used+memstat.free))); } -static QString buildMemoryTypeString( gn_memory_type memtype ) +static TQString buildMemoryTypeString( gn_memory_type memtype ) { switch (memtype) { case GN_MT_ME: return i18n("internal memory"); @@ -987,9 +987,9 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty error = read_phone_memstat(memtype, &memstat); gn_phonebook_entry entry; - QStringList addrlist; + TQStringList addrlist; KABC::Address *addr; - QString s, country; + TQString s, country; progress->setTotalSteps(memstat.used); m_progressDlg->setLabel(i18n("<qt>Importing <b>%1</b> contacts from <b>%2</b> of the Mobile Phone.<br><br>%3</qt>") @@ -1012,7 +1012,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty if (error == GN_ERR_INVALIDMEMORYTYPE) break; if (error == GN_ERR_NONE) { - GNOKII_DEBUG(QString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(i).arg(GN_FROM(entry.name)) + GNOKII_DEBUG(TQString("%1: %2, num=%3, location=%4, group=%5, count=%6\n").arg(i).arg(GN_FROM(entry.name)) .arg(GN_FROM(entry.number)).arg(entry.location).arg(entry.caller_group).arg(entry.subentries_count)); KABC::Addressee *a = new KABC::Addressee(); @@ -1021,7 +1021,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty a->setFormattedName(s); // set formatted name as in Phone if (s.find(',') == -1) { // assumed format: "givenname [... familyname]" - addrlist = QStringList::split(' ', s); + addrlist = TQStringList::split(' ', s); if (addrlist.count() == 1) { // only one string -> put it in the GivenName a->setGivenName(s); @@ -1033,26 +1033,26 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty } } else { // assumed format: "familyname, ... givenname" - addrlist = QStringList::split(',', s); + addrlist = TQStringList::split(',', s); a->setFamilyName(addrlist.first().simplifyWhiteSpace()); addrlist.remove(addrlist.first()); a->setGivenName(addrlist.join(" ").simplifyWhiteSpace()); } a->insertCustom(APP, "X_GSM_CALLERGROUP", s.setNum(entry.caller_group)); - a->insertCustom(APP, "X_GSM_STORE_AT", QString("%1%2").arg(memtypestr).arg(entry.location)); + a->insertCustom(APP, "X_GSM_STORE_AT", TQString("%1%2").arg(memtypestr).arg(entry.location)); // set ProductId a->setProductId(PhoneProductId); // evaluate timestamp (ignore timezone) - QDateTime datetime; + TQDateTime datetime; if (entry.date.year<1998) - datetime = QDateTime::currentDateTime(); + datetime = TQDateTime::currentDateTime(); else - datetime = QDateTime( QDate(entry.date.year, entry.date.month, entry.date.day), - QTime(entry.date.hour, entry.date.minute, entry.date.second) ); - GNOKII_DEBUG(QString(" date=%1\n").arg(datetime.toString())); + datetime = TQDateTime( TQDate(entry.date.year, entry.date.month, entry.date.day), + TQTime(entry.date.hour, entry.date.minute, entry.date.second) ); + GNOKII_DEBUG(TQString(" date=%1\n").arg(datetime.toString())); a->setRevision(datetime); if (!entry.subentries_count) @@ -1061,8 +1061,8 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty /* scan sub-entries */ if (entry.subentries_count) for (int n=0; n<entry.subentries_count; n++) { - QString s = GN_FROM(entry.subentries[n].data.number).simplifyWhiteSpace(); - GNOKII_DEBUG(QString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n") + TQString s = GN_FROM(entry.subentries[n].data.number).simplifyWhiteSpace(); + GNOKII_DEBUG(TQString(" Subentry#%1, entry_type=%2, number_type=%3, number=%4\n") .arg(n).arg(entry.subentries[n].entry_type) .arg(entry.subentries[n].number_type).arg(s)); if (s.isEmpty()) @@ -1075,10 +1075,10 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty a->insertEmail(s); break; case GN_PHONEBOOK_ENTRY_Postal: - addrlist = QStringList::split(';', s, true); + addrlist = TQStringList::split(';', s, true); addr = new KABC::Address(KABC::Address::Work); if (addrlist.count() <= 1) { - addrlist = QStringList::split(',', s, true); + addrlist = TQStringList::split(',', s, true); if (addrlist.count() > 1 ) { // assumed format: "Locality, ZIP, Country" addr->setLocality(addrlist[0]); @@ -1130,7 +1130,7 @@ static gn_error read_phone_entries( const char *memtypestr, gn_memory_type memty a->insertCategory(s); break; default: - GNOKII_DEBUG(QString(" Not handled id=%1, entry=%2\n") + GNOKII_DEBUG(TQString(" Not handled id=%1, entry=%2\n") .arg(entry.subentries[n].entry_type).arg(s)); break; } // switch() @@ -1161,7 +1161,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem const KABC::Addressee *addr) { gn_phonebook_entry entry; - QString s; + TQString s; memset(&entry, 0, sizeof(entry)); strncpy(entry.name, GN_TO(addr->realName()), sizeof(entry.name)-1); @@ -1177,7 +1177,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem s = makeValidPhone(s); strncpy(entry.number, s.ascii(), sizeof(entry.number)-1); entry.memory_type = memtype; - QString cg = addr->custom(APP, "X_GSM_CALLERGROUP"); + TQString cg = addr->custom(APP, "X_GSM_CALLERGROUP"); if (cg.isEmpty()) entry.caller_group = 5; // default group else @@ -1185,9 +1185,9 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem entry.location = phone_location; // set date/revision - QDateTime datetime = addr->revision(); - QDate date(datetime.date()); - QTime time(datetime.time()); + TQDateTime datetime = addr->revision(); + TQDate date(datetime.date()); + TQTime time(datetime.time()); entry.date.year = date.year(); entry.date.month = date.month(); entry.date.day = date.day(); @@ -1195,7 +1195,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem entry.date.minute = time.minute(); entry.date.second = time.second(); - GNOKII_DEBUG(QString("Write #%1: name=%2, number=%3\n").arg(phone_location) + GNOKII_DEBUG(TQString("Write #%1: name=%2, number=%3\n").arg(phone_location) .arg(GN_FROM(entry.name)).arg(GN_FROM(entry.number))); const KABC::Address homeAddr = addr->address(KABC::Address::Home); @@ -1239,7 +1239,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem subentry++; } // add E-Mails - QStringList emails = addr->emails(); + TQStringList emails = addr->emails(); for (unsigned int n=0; n<emails.count(); n++) { if (entry.subentries_count >= GN_PHONEBOOK_SUBENTRIES_MAX_NUMBER) break; // Phonebook full @@ -1247,7 +1247,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem if (s.isEmpty()) continue; // only one email allowed if we have URLS, notes, addresses (to avoid phone limitations) if (n && !addr->url().isEmpty() && !addr->note().isEmpty() && addr->addresses().count()) { - GNOKII_DEBUG(QString(" DROPPED email %1 in favor of URLs, notes and addresses.\n") + GNOKII_DEBUG(TQString(" DROPPED email %1 in favor of URLs, notes and addresses.\n") .arg(s)); continue; } @@ -1265,9 +1265,9 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem const KABC::Address *Addr = &(*it2); if (Addr->isEmpty()) continue; subentry->entry_type = GN_PHONEBOOK_ENTRY_Postal; - QStringList a; - QChar sem(';'); - QString sem_repl(QString::fromLatin1(",")); + TQStringList a; + TQChar sem(';'); + TQString sem_repl(TQString::fromLatin1(",")); a.append( Addr->postOfficeBox().replace( sem, sem_repl ) ); a.append( Addr->extended() .replace( sem, sem_repl ) ); a.append( Addr->street() .replace( sem, sem_repl ) ); @@ -1292,7 +1292,7 @@ static gn_error xxport_phone_write_entry( int phone_location, gn_memory_type mem // debug output for (int st=0; st<entry.subentries_count; st++) { gn_phonebook_subentry *subentry = &entry.subentries[st]; - GNOKII_DEBUG(QString(" SubTel #%1: entry_type=%2, number_type=%3, number=%4\n") + GNOKII_DEBUG(TQString(" SubTel #%1: entry_type=%2, number_type=%3, number=%4\n") .arg(st).arg(subentry->entry_type) .arg(subentry->number_type).arg(GN_FROM(subentry->data.number))); } @@ -1313,13 +1313,13 @@ static gn_error xxport_phone_delete_entry( int phone_location, gn_memory_type me entry.memory_type = memtype; entry.location = phone_location; data.phonebook_entry = &entry; - GNOKII_DEBUG(QString("Deleting entry %1\n").arg(phone_location)); + GNOKII_DEBUG(TQString("Deleting entry %1\n").arg(phone_location)); gn_error error = gn_sm_functions(GN_OP_WritePhonebook, &data, &state); GNOKII_CHECK_ERROR(error); return error; } -KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const +KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const { KABC::AddresseeList addrList; @@ -1339,14 +1339,14 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const m_progressDlg->progressBar()->setProgress(0); m_progressDlg->progressBar()->setCenterIndicator(true); m_progressDlg->setModal(true); - m_progressDlg->setInitialSize(QSize(450,350)); + m_progressDlg->setInitialSize(TQSize(450,350)); m_progressDlg->show(); processEvents(); #if (QT_VERSION >= 0x030300) m_progressDlg->setCursor( Qt::BusyCursor ); #endif - QString errStr = businit(); + TQString errStr = businit(); m_progressDlg->unsetCursor(); if (!errStr.isEmpty()) { @@ -1370,7 +1370,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const } -bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QString & ) +bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQString & ) { if (KMessageBox::Continue != KMessageBox::warningContinueCancel(parentWidget(), i18n("<qt>Please connect your Mobile Phone to your computer and press " @@ -1388,14 +1388,14 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QStrin m_progressDlg->progressBar()->setProgress(0); m_progressDlg->progressBar()->setCenterIndicator(true); m_progressDlg->setModal(true); - m_progressDlg->setInitialSize(QSize(450,350)); + m_progressDlg->setInitialSize(TQSize(450,350)); m_progressDlg->show(); processEvents(); KProgress* progress = (KProgress*)m_progressDlg->progressBar(); KABC::AddresseeList::ConstIterator it; - QStringList failedList; + TQStringList failedList; gn_error error; bool deleteLabelInitialized = false; @@ -1403,7 +1403,7 @@ bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QStrin #if (QT_VERSION >= 0x030300) m_progressDlg->setCursor( Qt::BusyCursor ); #endif - QString errStr = businit(); + TQString errStr = businit(); m_progressDlg->unsetCursor(); if (!errStr.isEmpty()) { @@ -1480,7 +1480,7 @@ try_next_phone_entry: if (phone_entry_no > (memstat.used + memstat.free)) break; - GNOKII_DEBUG(QString("Try to write entry '%1' at phone_entry_no=%2, phone_count=%3\n") + GNOKII_DEBUG(TQString("Try to write entry '%1' at phone_entry_no=%2, phone_count=%3\n") .arg(addr->realName()).arg(phone_entry_no).arg(phone_count)); error = GN_ERR_NONE; @@ -1554,7 +1554,7 @@ finish: delete m_progressDlg; if (!failedList.isEmpty()) { - GNOKII_DEBUG(QString("Failed to export: %1\n").arg(failedList.join(", "))); + GNOKII_DEBUG(TQString("Failed to export: %1\n").arg(failedList.join(", "))); KMessageBox::informationList(parentWidget(), i18n("<qt>The following contacts could not be exported to the Mobile Phone. " "Possible Reasons for this problem could be:<br><ul>" @@ -1580,7 +1580,7 @@ finish: #else /* no gnokii installed */ -KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const +KABC::AddresseeList GNOKIIXXPort::importContacts( const TQString& ) const { KABC::AddresseeList addrList; KMessageBox::error(parentWidget(), i18n("Gnokii interface is not available.\n" @@ -1588,7 +1588,7 @@ KABC::AddresseeList GNOKIIXXPort::importContacts( const QString& ) const return addrList; } -bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const QString & ) +bool GNOKIIXXPort::exportContacts( const KABC::AddresseeList &list, const TQString & ) { Q_UNUSED(list); KMessageBox::error(parentWidget(), i18n("Gnokii interface is not available.\n" diff --git a/kaddressbook/xxport/gnokii_xxport.h b/kaddressbook/xxport/gnokii_xxport.h index 64176fcaf..edee6abbe 100644 --- a/kaddressbook/xxport/gnokii_xxport.h +++ b/kaddressbook/xxport/gnokii_xxport.h @@ -31,13 +31,13 @@ class GNOKIIXXPort : public KAB::XXPort Q_OBJECT public: - GNOKIIXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + GNOKIIXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); - QString identifier() const { return "gnokii"; } + TQString identifier() const { return "gnokii"; } public slots: - bool exportContacts( const KABC::AddresseeList &list, const QString &data ); - KABC::AddresseeList importContacts( const QString &data ) const; + bool exportContacts( const KABC::AddresseeList &list, const TQString &data ); + KABC::AddresseeList importContacts( const TQString &data ) const; }; #endif diff --git a/kaddressbook/xxport/kde2_xxport.cpp b/kaddressbook/xxport/kde2_xxport.cpp index 03a524e9f..8e754b39c 100644 --- a/kaddressbook/xxport/kde2_xxport.cpp +++ b/kaddressbook/xxport/kde2_xxport.cpp @@ -21,7 +21,7 @@ without including the source code for Qt in the source distribution. */ -#include <qfile.h> +#include <tqfile.h> #include <kdebug.h> #include <kfiledialog.h> @@ -39,16 +39,16 @@ K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_kde2_xxport, KDE2XXPort ) -KDE2XXPort::KDE2XXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) +KDE2XXPort::KDE2XXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::XXPort( ab, parent, name ) { createImportAction( i18n( "Import KDE 2 Addressbook..." ) ); } -KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const +KABC::AddresseeList KDE2XXPort::importContacts( const TQString& ) const { - QString fileName = locateLocal( "data", "kabc/std.vcf" ); - if ( !QFile::exists( fileName ) ) { + TQString fileName = locateLocal( "data", "kabc/std.vcf" ); + if ( !TQFile::exists( fileName ) ) { KMessageBox::sorry( parentWidget(), i18n( "<qt>Could not find a KDE 2 address book <b>%1</b>.</qt>" ).arg( fileName ) ); return KABC::AddresseeList(); } diff --git a/kaddressbook/xxport/kde2_xxport.h b/kaddressbook/xxport/kde2_xxport.h index 4f5f2edb0..a56bc0288 100644 --- a/kaddressbook/xxport/kde2_xxport.h +++ b/kaddressbook/xxport/kde2_xxport.h @@ -31,12 +31,12 @@ class KDE2XXPort : public KAB::XXPort Q_OBJECT public: - KDE2XXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + KDE2XXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); - QString identifier() const { return "kde2"; } + TQString identifier() const { return "kde2"; } public slots: - KABC::AddresseeList importContacts( const QString &data ) const; + KABC::AddresseeList importContacts( const TQString &data ) const; }; #endif diff --git a/kaddressbook/xxport/ldif_xxport.cpp b/kaddressbook/xxport/ldif_xxport.cpp index 342ff9d81..d632d449b 100644 --- a/kaddressbook/xxport/ldif_xxport.cpp +++ b/kaddressbook/xxport/ldif_xxport.cpp @@ -33,7 +33,7 @@ into your KDE Addressbook. */ -#include <qfile.h> +#include <tqfile.h> #include <kfiledialog.h> #include <kio/netaccess.h> @@ -50,7 +50,7 @@ K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_ldif_xxport, LDIFXXPort ) -LDIFXXPort::LDIFXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) +LDIFXXPort::LDIFXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::XXPort( ab, parent, name ) { createImportAction( i18n( "Import LDIF Addressbook..." ) ); @@ -59,26 +59,26 @@ LDIFXXPort::LDIFXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name /* import */ -KABC::AddresseeList LDIFXXPort::importContacts( const QString& ) const +KABC::AddresseeList LDIFXXPort::importContacts( const TQString& ) const { KABC::AddresseeList addrList; - QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath(), + TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath(), "text/x-ldif", 0 ); if ( fileName.isEmpty() ) return addrList; - QFile file( fileName ); + TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { - QString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" ); + TQString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" ); KMessageBox::error( parentWidget(), msg.arg( fileName ) ); return addrList; } - QTextStream t( &file ); - t.setEncoding( QTextStream::Latin1 ); - QString wholeFile = t.read(); - QDateTime dtDefault = QFileInfo(file).lastModified(); + TQTextStream t( &file ); + t.setEncoding( TQTextStream::Latin1 ); + TQString wholeFile = t.read(); + TQDateTime dtDefault = TQFileInfo(file).lastModified(); file.close(); KABC::LDIFConverter::LDIFToAddressee( wholeFile, addrList, dtDefault ); @@ -89,9 +89,9 @@ KABC::AddresseeList LDIFXXPort::importContacts( const QString& ) const /* export */ -bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const QString& ) +bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const TQString& ) { - KURL url = KFileDialog::getSaveURL( QDir::homeDirPath() + "/addressbook.ldif", + KURL url = KFileDialog::getSaveURL( TQDir::homeDirPath() + "/addressbook.ldif", "text/x-ldif" ); if ( url.isEmpty() ) return true; @@ -99,7 +99,7 @@ bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const QString& if ( !url.isLocalFile() ) { KTempFile tmpFile; if ( tmpFile.status() != 0 ) { - QString txt = i18n( "<qt>Unable to open file <b>%1</b>.%2.</qt>" ); + TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.%2.</qt>" ); KMessageBox::error( parentWidget(), txt.arg( url.url() ) .arg( strerror( tmpFile.status() ) ) ); return false; @@ -110,11 +110,11 @@ bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const QString& return KIO::NetAccess::upload( tmpFile.name(), url, parentWidget() ); } else { - QString filename = url.path(); - QFile file( filename ); + TQString filename = url.path(); + TQFile file( filename ); if ( !file.open( IO_WriteOnly ) ) { - QString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); + TQString txt = i18n( "<qt>Unable to open file <b>%1</b>.</qt>" ); KMessageBox::error( parentWidget(), txt.arg( filename ) ); return false; } @@ -126,13 +126,13 @@ bool LDIFXXPort::exportContacts( const KABC::AddresseeList &list, const QString& } } -void LDIFXXPort::doExport( QFile *fp, const KABC::AddresseeList &list ) +void LDIFXXPort::doExport( TQFile *fp, const KABC::AddresseeList &list ) { - QString str; + TQString str; KABC::LDIFConverter::addresseeToLDIF( list, str ); - QTextStream t( fp ); - t.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream t( fp ); + t.setEncoding( TQTextStream::UnicodeUTF8 ); t << str; } diff --git a/kaddressbook/xxport/ldif_xxport.h b/kaddressbook/xxport/ldif_xxport.h index d5ae2cdd3..72c047d64 100644 --- a/kaddressbook/xxport/ldif_xxport.h +++ b/kaddressbook/xxport/ldif_xxport.h @@ -32,16 +32,16 @@ class LDIFXXPort : public KAB::XXPort Q_OBJECT public: - LDIFXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + LDIFXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); - QString identifier() const { return "ldif"; } + TQString identifier() const { return "ldif"; } public slots: - bool exportContacts( const KABC::AddresseeList &list, const QString &data ); - KABC::AddresseeList importContacts( const QString &data ) const; + bool exportContacts( const KABC::AddresseeList &list, const TQString &data ); + KABC::AddresseeList importContacts( const TQString &data ) const; private: - void doExport( QFile *fp, const KABC::AddresseeList &list ); + void doExport( TQFile *fp, const KABC::AddresseeList &list ); }; #endif diff --git a/kaddressbook/xxport/opera_xxport.cpp b/kaddressbook/xxport/opera_xxport.cpp index c3d707b88..474a66723 100644 --- a/kaddressbook/xxport/opera_xxport.cpp +++ b/kaddressbook/xxport/opera_xxport.cpp @@ -22,8 +22,8 @@ without including the source code for Qt in the source distribution. */ -#include <qfile.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqregexp.h> #include <kfiledialog.h> #include <kio/netaccess.h> @@ -38,39 +38,39 @@ K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_opera_xxport, OperaXXPort ) -OperaXXPort::OperaXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) +OperaXXPort::OperaXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::XXPort( ab, parent, name ) { createImportAction( i18n( "Import Opera Addressbook..." ) ); } -KABC::AddresseeList OperaXXPort::importContacts( const QString& ) const +KABC::AddresseeList OperaXXPort::importContacts( const TQString& ) const { KABC::AddresseeList addrList; - QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath() + QString::fromLatin1( "/.opera/contacts.adr" ) ); + TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath() + TQString::fromLatin1( "/.opera/contacts.adr" ) ); if ( fileName.isEmpty() ) return addrList; - QFile file( fileName ); + TQFile file( fileName ); if ( !file.open( IO_ReadOnly ) ) { - QString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" ); + TQString msg = i18n( "<qt>Unable to open <b>%1</b> for reading.</qt>" ); KMessageBox::error( parentWidget(), msg.arg( fileName ) ); return addrList; } - QTextStream stream( &file ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); - QString line, key, value; + TQTextStream stream( &file ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); + TQString line, key, value; bool parseContact = false; KABC::Addressee addr; - QRegExp separator( "\x02\x02" ); + TQRegExp separator( "\x02\x02" ); while ( !stream.atEnd() ) { line = stream.readLine(); line = line.stripWhiteSpace(); - if ( line == QString::fromLatin1( "#CONTACT" ) ) { + if ( line == TQString::fromLatin1( "#CONTACT" ) ) { parseContact = true; addr = KABC::Addressee(); continue; @@ -87,31 +87,31 @@ KABC::AddresseeList OperaXXPort::importContacts( const QString& ) const int sep = line.find( '=' ); key = line.left( sep ).lower(); value = line.mid( sep + 1 ); - if ( key == QString::fromLatin1( "name" ) ) + if ( key == TQString::fromLatin1( "name" ) ) addr.setNameFromString( value ); - else if ( key == QString::fromLatin1( "mail" ) ) { - QStringList emails = QStringList::split( separator, value ); + else if ( key == TQString::fromLatin1( "mail" ) ) { + TQStringList emails = TQStringList::split( separator, value ); - QStringList::Iterator it = emails.begin(); + TQStringList::Iterator it = emails.begin(); bool preferred = true; for ( ; it != emails.end(); ++it ) { addr.insertEmail( *it, preferred ); preferred = false; } - } else if ( key == QString::fromLatin1( "phone" ) ) + } else if ( key == TQString::fromLatin1( "phone" ) ) addr.insertPhoneNumber( KABC::PhoneNumber( value ) ); - else if ( key == QString::fromLatin1( "fax" ) ) + else if ( key == TQString::fromLatin1( "fax" ) ) addr.insertPhoneNumber( KABC::PhoneNumber( value, KABC::PhoneNumber::Fax | KABC::PhoneNumber::Home ) ); - else if ( key == QString::fromLatin1( "postaladdress" ) ) { + else if ( key == TQString::fromLatin1( "postaladdress" ) ) { KABC::Address address( KABC::Address::Home ); address.setLabel( value.replace( separator, "\n" ) ); addr.insertAddress( address ); - } else if ( key == QString::fromLatin1( "description" ) ) + } else if ( key == TQString::fromLatin1( "description" ) ) addr.setNote( value.replace( separator, "\n" ) ); - else if ( key == QString::fromLatin1( "url" ) ) + else if ( key == TQString::fromLatin1( "url" ) ) addr.setUrl( KURL( value ) ); - else if ( key == QString::fromLatin1( "pictureurl" ) ) { + else if ( key == TQString::fromLatin1( "pictureurl" ) ) { KABC::Picture pic( value ); addr.setPhoto( pic ); } diff --git a/kaddressbook/xxport/opera_xxport.h b/kaddressbook/xxport/opera_xxport.h index ec4838be1..7730dde56 100644 --- a/kaddressbook/xxport/opera_xxport.h +++ b/kaddressbook/xxport/opera_xxport.h @@ -32,12 +32,12 @@ class OperaXXPort : public KAB::XXPort Q_OBJECT public: - OperaXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + OperaXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); - QString identifier() const { return "opera"; } + TQString identifier() const { return "opera"; } public slots: - KABC::AddresseeList importContacts( const QString &data ) const; + KABC::AddresseeList importContacts( const TQString &data ) const; }; #endif diff --git a/kaddressbook/xxport/pab_mapihd.cpp b/kaddressbook/xxport/pab_mapihd.cpp index bcf541d75..6d61cb339 100644 --- a/kaddressbook/xxport/pab_mapihd.cpp +++ b/kaddressbook/xxport/pab_mapihd.cpp @@ -151,7 +151,7 @@ pabrec_entry e=pr_unknown; return e; } -pabfields_t::pabfields_t(pabrec & R, QWidget * /*parent*/) +pabfields_t::pabfields_t(pabrec & R, TQWidget * /*parent*/) { // Skip the first two words, because they're always the // same 000c 0014 ==> 0014 gives us the types, so we @@ -180,11 +180,11 @@ pabfields_t::pabfields_t(pabrec & R, QWidget * /*parent*/) for(i=2,k=0;i<R.N() && k<tags.size();i++,k++) { if (!isUsed(k)) { i-=1; } else {pabrec_entry e; - QString E; + TQString E; e=isWhat(k); E=R.getEntry(i); - { QString s=E; + { TQString s=E; s=s.stripWhiteSpace(); E=s; } diff --git a/kaddressbook/xxport/pab_mapihd.h b/kaddressbook/xxport/pab_mapihd.h index c4bb58a77..c54be4500 100644 --- a/kaddressbook/xxport/pab_mapihd.h +++ b/kaddressbook/xxport/pab_mapihd.h @@ -18,7 +18,7 @@ #ifndef _MAPIHD_H_ #define _MAPIHD_H_ -#include <qmemarray.h> +#include <tqmemarray.h> #include "pab_xxport.h" @@ -90,9 +90,9 @@ class pabfields_t { private: - QMemArray<mapitag_t> tags,context_tags; + TQMemArray<mapitag_t> tags,context_tags; pabrec *m_R; - QString givenName,email, + TQString givenName,email, title,firstName,additionalName,lastName, address,town,state,zip,country, organization,department,subDep,job, @@ -105,7 +105,7 @@ word_t literal(int k); content_t order(int k); public: - pabfields_t(pabrec & R, QWidget *parent); + pabfields_t(pabrec & R, TQWidget *parent); public: KABC::Addressee get( ); bool isOK(void) { return OK; } diff --git a/kaddressbook/xxport/pab_pablib.cpp b/kaddressbook/xxport/pab_pablib.cpp index c56c4e9a3..344647f6f 100644 --- a/kaddressbook/xxport/pab_pablib.cpp +++ b/kaddressbook/xxport/pab_pablib.cpp @@ -45,7 +45,7 @@ bool pab::convert(void) adr_t A; bool ret; - if (!in.isOpen()) {QString msg; + if (!in.isOpen()) {TQString msg; msg=i18n("Cannot open %1 for reading").arg(pabfile); // info->alert(msg); return false; @@ -242,7 +242,7 @@ bool pab::knownPAB(void) { content_t id; id=go(0); - if (id!=PAB_FILE_ID) {QString msg; + if (id!=PAB_FILE_ID) {TQString msg; msg=i18n("%1 has no PAB id that I know of, cannot convert this").arg(pabfile); // info->alert(msg); return false; diff --git a/kaddressbook/xxport/pab_pablib.h b/kaddressbook/xxport/pab_pablib.h index ff54a32a2..c26cbdf23 100644 --- a/kaddressbook/xxport/pab_pablib.h +++ b/kaddressbook/xxport/pab_pablib.h @@ -20,7 +20,7 @@ #define PAB_LIB_HXX #include <klocale.h> -#include <qfile.h> +#include <tqfile.h> #include "pab_mapihd.h" @@ -33,10 +33,10 @@ class pab friend class pabrec; private: - QFile in; + TQFile in; const char *pabfile; - QString cap; - QWidget *parent; + TQString cap; + TQWidget *parent; public: pab(const char *pabFile); ~pab(); diff --git a/kaddressbook/xxport/pab_xxport.cpp b/kaddressbook/xxport/pab_xxport.cpp index 621e5d2c2..21ac67c07 100644 --- a/kaddressbook/xxport/pab_xxport.cpp +++ b/kaddressbook/xxport/pab_xxport.cpp @@ -22,7 +22,7 @@ without including the source code for Qt in the source distribution. */ -#include <qfile.h> +#include <tqfile.h> #include <kdebug.h> #include <kfiledialog.h> @@ -40,26 +40,26 @@ K_EXPORT_KADDRESSBOOK_XXFILTER( libkaddrbk_pab_xxport, PABXXPort ) -PABXXPort::PABXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) +PABXXPort::PABXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::XXPort( ab, parent, name ) { createImportAction( i18n("Import MS Exchange Personal Address Book (.PAB)") ); } -KABC::AddresseeList PABXXPort::importContacts( const QString& ) const +KABC::AddresseeList PABXXPort::importContacts( const TQString& ) const { KABC::AddresseeList addrList; - QString fileName = KFileDialog::getOpenFileName( QDir::homeDirPath(), + TQString fileName = KFileDialog::getOpenFileName( TQDir::homeDirPath(), "*.[pP][aA][bB]|" + i18n("MS Exchange Personal Address Book Files (*.pab)"), 0 ); if ( fileName.isEmpty() ) return addrList; - if ( !QFile::exists( fileName ) ) { + if ( !TQFile::exists( fileName ) ) { KMessageBox::sorry( parentWidget(), i18n( "<qt>Could not find a MS Exchange Personal Address Book <b>%1</b>.</qt>" ).arg( fileName ) ); return addrList; } - // pab PAB(QFile::encodeName(file),this,info); + // pab PAB(TQFile::encodeName(file),this,info); // info->setFrom(file); // PAB.convert(); diff --git a/kaddressbook/xxport/pab_xxport.h b/kaddressbook/xxport/pab_xxport.h index 5c1edb508..e98b56bfa 100644 --- a/kaddressbook/xxport/pab_xxport.h +++ b/kaddressbook/xxport/pab_xxport.h @@ -32,15 +32,15 @@ class PABXXPort : public KAB::XXPort Q_OBJECT public: - PABXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + PABXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); - QString identifier() const { return "pab"; } + TQString identifier() const { return "pab"; } public slots: - KABC::AddresseeList importContacts( const QString &data ) const; + KABC::AddresseeList importContacts( const TQString &data ) const; private: - void doExport( QFile *fp, const KABC::AddresseeList &list ); + void doExport( TQFile *fp, const KABC::AddresseeList &list ); }; diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp index 9fb368278..85cf8c763 100644 --- a/kaddressbook/xxport/vcard_xxport.cpp +++ b/kaddressbook/xxport/vcard_xxport.cpp @@ -21,12 +21,12 @@ without including the source code for Qt in the source distribution. */ -#include <qcheckbox.h> -#include <qfile.h> -#include <qfont.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqcheckbox.h> +#include <tqfile.h> +#include <tqfont.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> #include <kabc/vcardconverter.h> #include <kdialogbase.h> @@ -56,7 +56,7 @@ class VCardViewerDialog : public KDialogBase { public: VCardViewerDialog( const KABC::Addressee::List &list, - QWidget *parent, const char *name = 0 ); + TQWidget *parent, const char *name = 0 ); KABC::Addressee::List contacts() const; @@ -78,7 +78,7 @@ class VCardViewerDialog : public KDialogBase class VCardExportSelectionDialog : public KDialogBase { public: - VCardExportSelectionDialog( QWidget *parent, const char *name = 0 ); + VCardExportSelectionDialog( TQWidget *parent, const char *name = 0 ); ~VCardExportSelectionDialog(); bool exportPrivateFields() const; @@ -87,13 +87,13 @@ class VCardExportSelectionDialog : public KDialogBase bool exportEncryptionKeys() const; private: - QCheckBox *mPrivateBox; - QCheckBox *mBusinessBox; - QCheckBox *mOtherBox; - QCheckBox *mEncryptionKeys; + TQCheckBox *mPrivateBox; + TQCheckBox *mBusinessBox; + TQCheckBox *mOtherBox; + TQCheckBox *mEncryptionKeys; }; -VCardXXPort::VCardXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) +VCardXXPort::VCardXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name ) : KAB::XXPort( ab, parent, name ) { createImportAction( i18n( "Import vCard..." ) ); @@ -101,7 +101,7 @@ VCardXXPort::VCardXXPort( KABC::AddressBook *ab, QWidget *parent, const char *na createExportAction( i18n( "Export vCard 3.0..." ), "v30" ); } -bool VCardXXPort::exportContacts( const KABC::AddresseeList &addrList, const QString &data ) +bool VCardXXPort::exportContacts( const KABC::AddresseeList &addrList, const TQString &data ) { KABC::VCardConverter converter; KURL url; @@ -122,10 +122,10 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &addrList, const QSt else ok = doExport( url, converter.createVCards( list, KABC::VCardConverter::v3_0 ) ); } else { - QString msg = i18n( "You have selected a list of contacts, shall they be " + TQString msg = i18n( "You have selected a list of contacts, shall they be " "exported to several files?" ); - switch ( KMessageBox::questionYesNo( parentWidget(), msg, QString::null, i18n("Export to Several Files"), i18n("Export to One File") ) ) { + switch ( KMessageBox::questionYesNo( parentWidget(), msg, TQString::null, i18n("Export to Several Files"), i18n("Export to One File") ) ) { case KMessageBox::Yes: { KURL baseUrl = KFileDialog::getExistingURL(); if ( baseUrl.isEmpty() ) @@ -134,15 +134,15 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &addrList, const QSt KABC::AddresseeList::ConstIterator it; uint counter = 0; for ( it = list.begin(); it != list.end(); ++it ) { - QString testUrl; + TQString testUrl; if ( (*it).givenName().isEmpty() && (*it).familyName().isEmpty() ) testUrl = baseUrl.url() + "/" + (*it).organization(); else testUrl = baseUrl.url() + "/" + (*it).givenName() + "_" + (*it).familyName(); - if ( KIO::NetAccess::exists( testUrl + (counter == 0 ? "" : QString::number( counter )) + ".vcf", false, parentWidget() ) ) { + if ( KIO::NetAccess::exists( testUrl + (counter == 0 ? "" : TQString::number( counter )) + ".vcf", false, parentWidget() ) ) { counter++; - url = testUrl + QString::number( counter ) + ".vcf"; + url = testUrl + TQString::number( counter ) + ".vcf"; } else url = testUrl + ".vcf"; @@ -176,9 +176,9 @@ bool VCardXXPort::exportContacts( const KABC::AddresseeList &addrList, const QSt return ok; } -KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const +KABC::AddresseeList VCardXXPort::importContacts( const TQString& ) const { - QString fileName; + TQString fileName; KABC::AddresseeList addrList; KURL::List urls; @@ -186,7 +186,7 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const addrList = parseVCard( XXPortManager::importData ); else { if ( XXPortManager::importURL.isEmpty() ) - urls = KFileDialog::getOpenURLs( QString::null, "*.vcf|vCards", parentWidget(), + urls = KFileDialog::getOpenURLs( TQString::null, "*.vcf|vCards", parentWidget(), i18n( "Select vCard to Import" ) ); else urls.append( XXPortManager::importURL ); @@ -194,31 +194,31 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const if ( urls.count() == 0 ) return addrList; - QString caption( i18n( "vCard Import Failed" ) ); + TQString caption( i18n( "vCard Import Failed" ) ); bool anyFailures = false; KURL::List::Iterator it; for ( it = urls.begin(); it != urls.end(); ++it ) { if ( KIO::NetAccess::download( *it, fileName, parentWidget() ) ) { - QFile file( fileName ); + TQFile file( fileName ); if ( file.open( IO_ReadOnly ) ) { - QByteArray rawData = file.readAll(); + TQByteArray rawData = file.readAll(); file.close(); if ( rawData.size() > 0 ) addrList += parseVCard( rawData ); KIO::NetAccess::removeTempFile( fileName ); } else { - QString text = i18n( "<qt>When trying to read the vCard, there was an error opening the file '%1': %2</qt>" ); + TQString text = i18n( "<qt>When trying to read the vCard, there was an error opening the file '%1': %2</qt>" ); text = text.arg( (*it).url() ); - text = text.arg( kapp->translate( "QFile", + text = text.arg( kapp->translate( "TQFile", file.errorString().latin1() ) ); KMessageBox::error( parentWidget(), text, caption ); anyFailures = true; } } else { - QString text = i18n( "<qt>Unable to access vCard: %1</qt>" ); + TQString text = i18n( "<qt>Unable to access vCard: %1</qt>" ); text = text.arg( KIO::NetAccess::lastErrorString() ); KMessageBox::error( parentWidget(), text, caption ); anyFailures = true; @@ -243,20 +243,20 @@ KABC::AddresseeList VCardXXPort::importContacts( const QString& ) const return addrList; } -KABC::AddresseeList VCardXXPort::parseVCard( const QString &data ) const +KABC::AddresseeList VCardXXPort::parseVCard( const TQString &data ) const { KABC::VCardConverter converter; return converter.parseVCards( data ); } -bool VCardXXPort::doExport( const KURL &url, const QString &data ) +bool VCardXXPort::doExport( const KURL &url, const TQString &data ) { KTempFile tmpFile; tmpFile.setAutoDelete( true ); - QTextStream stream( tmpFile.file() ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream( tmpFile.file() ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); stream << data; tmpFile.close(); @@ -364,7 +364,7 @@ KABC::AddresseeList VCardXXPort::filterContacts( const KABC::AddresseeList &addr void VCardXXPort::addKey( KABC::Addressee &addr, KABC::Key::Types type ) { - QString fingerprint = addr.custom( "KADDRESSBOOK", + TQString fingerprint = addr.custom( "KADDRESSBOOK", (type == KABC::Key::PGP ? "OPENPGPFP" : "SMIMEFP") ); if ( fingerprint.isEmpty() ) return; @@ -398,23 +398,23 @@ void VCardXXPort::addKey( KABC::Addressee &addr, KABC::Key::Types type ) // ---------- VCardViewer Dialog ---------------- // VCardViewerDialog::VCardViewerDialog( const KABC::Addressee::List &list, - QWidget *parent, const char *name ) + TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "Import vCard" ), Yes | No | Apply | Cancel, Yes, parent, name, true, true, KStdGuiItem::no(), KStdGuiItem::yes() ), mContacts( list ) { - QFrame *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() ); + TQFrame *page = plainPage(); + TQVBoxLayout *layout = new TQVBoxLayout( page, marginHint(), spacingHint() ); - QLabel *label = new QLabel( i18n( "Do you want to import this contact in your address book?" ), page ); - QFont font = label->font(); + TQLabel *label = new TQLabel( i18n( "Do you want to import this contact in your address book?" ), page ); + TQFont font = label->font(); font.setBold( true ); label->setFont( font ); layout->addWidget( label ); mView = new KPIM::AddresseeView( page ); mView->enableLinks( 0 ); - mView->setVScrollBarMode( QScrollView::Auto ); + mView->setVScrollBarMode( TQScrollView::Auto ); layout->addWidget( mView ); setButtonText( Apply, i18n( "Import All..." ) ); @@ -459,39 +459,39 @@ void VCardViewerDialog::slotUser2() void VCardViewerDialog::slotApply() { - QDialog::accept(); + TQDialog::accept(); } void VCardViewerDialog::slotCancel() { mContacts.clear(); - QDialog::accept(); + TQDialog::accept(); } // ---------- VCardExportSelection Dialog ---------------- // -VCardExportSelectionDialog::VCardExportSelectionDialog( QWidget *parent, +VCardExportSelectionDialog::VCardExportSelectionDialog( TQWidget *parent, const char *name ) : KDialogBase( Plain, i18n( "Select vCard Fields" ), Ok | Cancel, Ok, parent, name, true, true ) { - QFrame *page = plainPage(); + TQFrame *page = plainPage(); - QVBoxLayout *layout = new QVBoxLayout( page, marginHint(), spacingHint() ); + TQVBoxLayout *layout = new TQVBoxLayout( page, marginHint(), spacingHint() ); - QLabel *label = new QLabel( i18n( "Select the fields which shall be exported in the vCard." ), page ); + TQLabel *label = new TQLabel( i18n( "Select the fields which shall be exported in the vCard." ), page ); layout->addWidget( label ); - mPrivateBox = new QCheckBox( i18n( "Private fields" ), page ); + mPrivateBox = new TQCheckBox( i18n( "Private fields" ), page ); layout->addWidget( mPrivateBox ); - mBusinessBox = new QCheckBox( i18n( "Business fields" ), page ); + mBusinessBox = new TQCheckBox( i18n( "Business fields" ), page ); layout->addWidget( mBusinessBox ); - mOtherBox = new QCheckBox( i18n( "Other fields" ), page ); + mOtherBox = new TQCheckBox( i18n( "Other fields" ), page ); layout->addWidget( mOtherBox ); - mEncryptionKeys = new QCheckBox( i18n( "Encryption keys" ), page ); + mEncryptionKeys = new TQCheckBox( i18n( "Encryption keys" ), page ); layout->addWidget( mEncryptionKeys ); KConfig config( "kaddressbookrc" ); diff --git a/kaddressbook/xxport/vcard_xxport.h b/kaddressbook/xxport/vcard_xxport.h index d67aaeffe..8208e23c6 100644 --- a/kaddressbook/xxport/vcard_xxport.h +++ b/kaddressbook/xxport/vcard_xxport.h @@ -31,17 +31,17 @@ class VCardXXPort : public KAB::XXPort Q_OBJECT public: - VCardXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + VCardXXPort( KABC::AddressBook *ab, TQWidget *parent, const char *name = 0 ); - QString identifier() const { return "vcard"; } + TQString identifier() const { return "vcard"; } public slots: - bool exportContacts( const KABC::AddresseeList &list, const QString &data ); - KABC::AddresseeList importContacts( const QString &data ) const; + bool exportContacts( const KABC::AddresseeList &list, const TQString &data ); + KABC::AddresseeList importContacts( const TQString &data ) const; private: - KABC::AddresseeList parseVCard( const QString &data ) const; - bool doExport( const KURL &url, const QString &data ); + KABC::AddresseeList parseVCard( const TQString &data ) const; + bool doExport( const KURL &url, const TQString &data ); void addKey( KABC::Addressee &addr, KABC::Key::Types type ); KABC::AddresseeList filterContacts( const KABC::AddresseeList& ); diff --git a/kaddressbook/xxportmanager.cpp b/kaddressbook/xxportmanager.cpp index 3382ac439..c46855c47 100644 --- a/kaddressbook/xxportmanager.cpp +++ b/kaddressbook/xxportmanager.cpp @@ -21,7 +21,7 @@ without including the source code for Qt in the source distribution. */ -#include <qlayout.h> +#include <tqlayout.h> #include <kabc/addressbook.h> #include <kabc/resource.h> @@ -39,10 +39,10 @@ #include "xxportmanager.h" KURL XXPortManager::importURL = KURL(); -QString XXPortManager::importData = QString::null; +TQString XXPortManager::importData = TQString::null; -XXPortManager::XXPortManager( KAB::Core *core, QObject *parent, const char *name ) - : QObject( parent, name ), mCore( core ) +XXPortManager::XXPortManager( KAB::Core *core, TQObject *parent, const char *name ) + : TQObject( parent, name ), mCore( core ) { loadPlugins(); } @@ -66,14 +66,14 @@ void XXPortManager::importVCard( const KURL &url ) importURL = KURL(); } -void XXPortManager::importVCardFromData( const QString &vCard ) +void XXPortManager::importVCardFromData( const TQString &vCard ) { importData = vCard; slotImport( "vcard", "<empty>" ); importData = ""; } -void XXPortManager::slotImport( const QString &identifier, const QString &data ) +void XXPortManager::slotImport( const TQString &identifier, const TQString &data ) { KAB::XXPort *obj = mXXPortObjects[ identifier ]; if ( !obj ) { @@ -97,7 +97,7 @@ void XXPortManager::slotImport( const QString &identifier, const QString &data ) } } -void XXPortManager::slotExport( const QString &identifier, const QString &data ) +void XXPortManager::slotExport( const TQString &identifier, const TQString &data ) { KAB::XXPort *obj = mXXPortObjects[ identifier ]; if ( !obj ) { @@ -121,7 +121,7 @@ void XXPortManager::loadPlugins() mXXPortObjects.clear(); const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/XXPort", - QString( "[X-KDE-KAddressBook-XXPortPluginVersion] == %1" ).arg( KAB_XXPORT_PLUGIN_VERSION ) ); + TQString( "[X-KDE-KAddressBook-XXPortPluginVersion] == %1" ).arg( KAB_XXPORT_PLUGIN_VERSION ) ); KTrader::OfferList::ConstIterator it; for ( it = plugins.begin(); it != plugins.end(); ++it ) { if ( !(*it)->hasServiceType( "KAddressBook/XXPort" ) ) @@ -146,10 +146,10 @@ void XXPortManager::loadPlugins() mCore->guiClient()->insertChildClient( obj ); mXXPortObjects.insert( obj->identifier(), obj ); - connect( obj, SIGNAL( exportActivated( const QString&, const QString& ) ), - this, SLOT( slotExport( const QString&, const QString& ) ) ); - connect( obj, SIGNAL( importActivated( const QString&, const QString& ) ), - this, SLOT( slotImport( const QString&, const QString& ) ) ); + connect( obj, TQT_SIGNAL( exportActivated( const TQString&, const TQString& ) ), + this, TQT_SLOT( slotExport( const TQString&, const TQString& ) ) ); + connect( obj, TQT_SIGNAL( importActivated( const TQString&, const TQString& ) ), + this, TQT_SLOT( slotImport( const TQString&, const TQString& ) ) ); obj->setKApplication( kapp ); } diff --git a/kaddressbook/xxportmanager.h b/kaddressbook/xxportmanager.h index 4b52c8b5e..92bc48fa0 100644 --- a/kaddressbook/xxportmanager.h +++ b/kaddressbook/xxportmanager.h @@ -24,8 +24,8 @@ #ifndef XXPORTMANAGER_H #define XXPORTMANAGER_H -#include <qdict.h> -#include <qobject.h> +#include <tqdict.h> +#include <tqobject.h> #include <kurl.h> @@ -42,30 +42,30 @@ class KDE_EXPORT XXPortManager : public QObject Q_OBJECT public: - XXPortManager( KAB::Core *core, QObject *parent, const char *name = 0 ); + XXPortManager( KAB::Core *core, TQObject *parent, const char *name = 0 ); ~XXPortManager(); void restoreSettings(); void saveSettings(); static KURL importURL; - static QString importData; + static TQString importData; public slots: void importVCard( const KURL &url ); - void importVCardFromData( const QString &vCard ); + void importVCardFromData( const TQString &vCard ); signals: void modified(); protected slots: - void slotImport( const QString&, const QString& ); - void slotExport( const QString&, const QString& ); + void slotImport( const TQString&, const TQString& ); + void slotExport( const TQString&, const TQString& ); private: void loadPlugins(); - QDict<KAB::XXPort> mXXPortObjects; + TQDict<KAB::XXPort> mXXPortObjects; KAB::Core *mCore; }; diff --git a/kaddressbook/xxportselectdialog.cpp b/kaddressbook/xxportselectdialog.cpp index a32c10807..1cbf75a56 100644 --- a/kaddressbook/xxportselectdialog.cpp +++ b/kaddressbook/xxportselectdialog.cpp @@ -27,16 +27,16 @@ #include <kcombobox.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 "core.h" #include "kabprefs.h" @@ -44,22 +44,22 @@ #include "xxportselectdialog.h" XXPortSelectDialog::XXPortSelectDialog( KAB::Core *core, bool sort, - QWidget* parent, const char* name ) + TQWidget* parent, const char* name ) : KDialogBase( Plain, i18n( "Choose Which Contacts to Export" ), Help | Ok | Cancel, Ok, parent, name, true, true ), mCore( core ), mUseSorting( sort ) { initGUI(); - 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* ) ) ); // setup filters mFilters = Filter::restore( kapp->config(), "Filter" ); Filter::List::ConstIterator filterIt; - QStringList filters; + TQStringList filters; for ( filterIt = mFilters.begin(); filterIt != mFilters.end(); ++filterIt ) filters.append( (*filterIt).name() ); @@ -67,10 +67,10 @@ XXPortSelectDialog::XXPortSelectDialog( KAB::Core *core, bool sort, mUseFilters->setEnabled( filters.count() > 0 ); // setup categories - const QStringList categories = KABPrefs::instance()->customCategories(); - QStringList::ConstIterator it; + const TQStringList categories = KABPrefs::instance()->customCategories(); + TQStringList::ConstIterator it; for ( it = categories.begin(); it != categories.end(); ++it ) - new QCheckListItem( mCategoriesView, *it, QCheckListItem::CheckBox ); + new TQCheckListItem( mCategoriesView, *it, TQCheckListItem::CheckBox ); mUseCategories->setEnabled( categories.count() > 0 ); int count = mCore->selectedUIDs().count(); @@ -88,11 +88,11 @@ XXPortSelectDialog::XXPortSelectDialog( KAB::Core *core, bool sort, KABC::AddresseeList XXPortSelectDialog::contacts() { - const QStringList selection = mCore->selectedUIDs(); + const TQStringList selection = mCore->selectedUIDs(); KABC::AddresseeList list; if ( mUseSelection->isChecked() ) { - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for ( it = selection.begin(); it != selection.end(); ++it ) { KABC::Addressee addr = mCore->addressBook()->findByUid( *it ); if ( !addr.isEmpty() ) @@ -111,13 +111,13 @@ KABC::AddresseeList XXPortSelectDialog::contacts() list.append( *it ); } } else if ( mUseCategories->isChecked() ) { - const QStringList categorieList = categories(); + const TQStringList categorieList = categories(); KABC::AddressBook::ConstIterator it; KABC::AddressBook::ConstIterator addressBookEnd( mCore->addressBook()->end() ); for ( it = mCore->addressBook()->begin(); it != addressBookEnd; ++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 ( categorieList.contains( *tmpIt ) ) { list.append( *it ); @@ -141,13 +141,13 @@ KABC::AddresseeList XXPortSelectDialog::contacts() return list; } -QStringList XXPortSelectDialog::categories() const +TQStringList XXPortSelectDialog::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 ) ); } @@ -160,12 +160,12 @@ void XXPortSelectDialog::filterChanged( int ) mUseFilters->setChecked( true ); } -void XXPortSelectDialog::categoryClicked( QListViewItem *i ) +void XXPortSelectDialog::categoryClicked( TQListViewItem *i ) { if ( !i ) return; - QCheckListItem *qcli = static_cast<QCheckListItem*>( i ); + TQCheckListItem *qcli = static_cast<TQCheckListItem*>( i ); if ( qcli->isOn() ) mUseCategories->setChecked( true ); } @@ -177,66 +177,66 @@ void XXPortSelectDialog::slotHelp() void XXPortSelectDialog::initGUI() { - QFrame *page = plainPage(); + TQFrame *page = plainPage(); - QVBoxLayout *topLayout = new QVBoxLayout( page, KDialog::marginHint(), + TQVBoxLayout *topLayout = new TQVBoxLayout( page, KDialog::marginHint(), KDialog::spacingHint() ); - QLabel *label = new QLabel( i18n( "Which contacts do you want to export?" ), page ); + TQLabel *label = new TQLabel( i18n( "Which contacts do you want to export?" ), page ); topLayout->addWidget( label ); - mButtonGroup = new QButtonGroup( i18n( "Selection" ), page ); + mButtonGroup = new TQButtonGroup( i18n( "Selection" ), page ); 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( "Export the entire address book" ) ); + TQWhatsThis::add( mUseWholeBook, i18n( "Export the entire address book" ) ); groupLayout->addWidget( mUseWholeBook, 0, 0 ); - mUseSelection = new QRadioButton( i18n("&Selected contact", "&Selected contacts (%n selected)", mCore->selectedUIDs().count() ), mButtonGroup ); - QWhatsThis::add( mUseSelection, i18n( "Only export contacts selected in KAddressBook.\n" + mUseSelection = new TQRadioButton( i18n("&Selected contact", "&Selected contacts (%n selected)", mCore->selectedUIDs().count() ), mButtonGroup ); + TQWhatsThis::add( mUseSelection, i18n( "Only export 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 export contacts matching the selected filter.\n" + mUseFilters = new TQRadioButton( i18n( "Contacts matching &filter" ), mButtonGroup ); + TQWhatsThis::add( mUseFilters, i18n( "Only export 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 export 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 export 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 export." ) ); + mFiltersCombo = new TQComboBox( false, mButtonGroup ); + TQWhatsThis::add( mFiltersCombo, i18n( "Select a filter to decide which contacts to export." ) ); 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 export." ) ); + TQWhatsThis::add( mCategoriesView, i18n( "Check the categories whose members you want to export." ) ); groupLayout->addWidget( mCategoriesView, 3, 1 ); topLayout->addWidget( mButtonGroup ); - QButtonGroup *sortingGroup = new QButtonGroup( i18n( "Sorting" ), page ); + TQButtonGroup *sortingGroup = new TQButtonGroup( i18n( "Sorting" ), page ); sortingGroup->setColumnLayout( 0, Qt::Vertical ); - QGridLayout *sortLayout = new QGridLayout( sortingGroup->layout(), 2, 2, + TQGridLayout *sortLayout = new TQGridLayout( sortingGroup->layout(), 2, 2, KDialog::spacingHint() ); sortLayout->setAlignment( Qt::AlignTop ); - label = new QLabel( i18n( "Criterion:" ), sortingGroup ); + label = new TQLabel( i18n( "Criterion:" ), sortingGroup ); sortLayout->addWidget( label, 0, 0 ); mFieldCombo = new KComboBox( false, sortingGroup ); sortLayout->addWidget( mFieldCombo, 0, 1 ); - label = new QLabel( i18n( "Order:" ), sortingGroup ); + label = new TQLabel( i18n( "Order:" ), sortingGroup ); sortLayout->addWidget( label, 1, 0 ); mSortTypeCombo = new KComboBox( false, sortingGroup ); diff --git a/kaddressbook/xxportselectdialog.h b/kaddressbook/xxportselectdialog.h index e785ec318..535ad4743 100644 --- a/kaddressbook/xxportselectdialog.h +++ b/kaddressbook/xxportselectdialog.h @@ -47,29 +47,29 @@ class XXPortSelectDialog : public KDialogBase Q_OBJECT public: - XXPortSelectDialog( KAB::Core *core, bool sort, QWidget* parent, + XXPortSelectDialog( KAB::Core *core, bool sort, TQWidget* parent, const char* name = 0 ); KABC::AddresseeList contacts(); private slots: void filterChanged( int ); - void categoryClicked( QListViewItem * i ); + void categoryClicked( TQListViewItem * i ); protected slots: void slotHelp(); private: void initGUI(); - QStringList categories() const; - - QButtonGroup* mButtonGroup; - QRadioButton* mUseCategories; - QRadioButton* mUseFilters; - QRadioButton* mUseWholeBook; - QRadioButton* mUseSelection; - QComboBox* mFiltersCombo; - QListView* mCategoriesView; + TQStringList categories() const; + + TQButtonGroup* mButtonGroup; + TQRadioButton* mUseCategories; + TQRadioButton* mUseFilters; + TQRadioButton* mUseWholeBook; + TQRadioButton* mUseSelection; + TQComboBox* mFiltersCombo; + TQListView* mCategoriesView; KComboBox *mFieldCombo; KComboBox *mSortTypeCombo; |