From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- korn/account_input.cpp | 66 +++++++------- korn/account_input.h | 72 +++++++-------- korn/accountmanager.cpp | 68 +++++++------- korn/accountmanager.h | 22 ++--- korn/boxcontainer.cpp | 14 +-- korn/boxcontainer.h | 8 +- korn/boxcontaineritem.cpp | 132 +++++++++++++-------------- korn/boxcontaineritem.h | 28 +++--- korn/dcop_proto.cpp | 20 ++-- korn/dcop_proto.h | 14 +-- korn/dcopdrop.cpp | 42 ++++----- korn/dcopdrop.h | 20 ++-- korn/dcopdropif.cpp | 4 +- korn/dcopdropif.h | 4 +- korn/dockedcontainer.cpp | 2 +- korn/dockedcontainer.h | 2 +- korn/dockeditem.cpp | 30 +++--- korn/dockeditem.h | 10 +- korn/hvcontainer.cpp | 8 +- korn/hvcontainer.h | 4 +- korn/hvitem.cpp | 22 ++--- korn/hvitem.h | 8 +- korn/imap_proto.cpp | 52 +++++------ korn/imap_proto.h | 14 +-- korn/imaps_proto.h | 4 +- korn/intid.cpp | 4 +- korn/intid.h | 2 +- korn/kconf_update/korn-3-4-config_change.cpp | 56 ++++++------ korn/keditlistboxman.cpp | 56 ++++++------ korn/keditlistboxman.h | 28 +++--- korn/kio.cpp | 72 +++++++-------- korn/kio.h | 50 +++++----- korn/kio_count.cpp | 48 +++++----- korn/kio_count.h | 8 +- korn/kio_delete.cpp | 12 +-- korn/kio_delete.h | 8 +- korn/kio_proto.cpp | 16 ++-- korn/kio_proto.h | 30 +++--- korn/kio_read.cpp | 14 +-- korn/kio_read.h | 12 +-- korn/kio_single_subject.cpp | 38 ++++---- korn/kio_single_subject.h | 16 ++-- korn/kio_subjects.cpp | 22 ++--- korn/kio_subjects.h | 8 +- korn/kmail_proto.cpp | 62 ++++++------- korn/kmail_proto.h | 16 ++-- korn/kornaccountcfgimpl.cpp | 50 +++++----- korn/kornaccountcfgimpl.h | 14 +-- korn/kornboxcfgimpl.cpp | 52 +++++------ korn/kornboxcfgimpl.h | 10 +- korn/korncfgimpl.cpp | 72 +++++++-------- korn/korncfgimpl.h | 6 +- korn/kornshell.cpp | 16 ++-- korn/kornshell.h | 4 +- korn/label.h | 10 +- korn/maildir_proto.h | 6 +- korn/maildlg.cpp | 32 +++---- korn/maildlg.h | 6 +- korn/maildrop.cpp | 56 ++++++------ korn/maildrop.h | 94 +++++++++---------- korn/mailid.h | 4 +- korn/mailsubject.cpp | 46 +++++----- korn/mailsubject.h | 20 ++-- korn/mbox_proto.cpp | 16 ++-- korn/mbox_proto.h | 14 +-- korn/nntp_proto.cpp | 32 +++---- korn/nntp_proto.h | 12 +-- korn/password.cpp | 40 ++++---- korn/password.h | 14 +-- korn/polldrop.cpp | 4 +- korn/polldrop.h | 2 +- korn/pop3_proto.cpp | 50 +++++----- korn/pop3_proto.h | 14 +-- korn/pop3s_proto.h | 4 +- korn/process_proto.cpp | 16 ++-- korn/process_proto.h | 14 +-- korn/progress_dialog.ui.h | 2 +- korn/protocol.h | 14 +-- korn/protocols.cpp | 18 ++-- korn/protocols.h | 6 +- korn/qmail_proto.cpp | 16 ++-- korn/qmail_proto.h | 14 +-- korn/sortedmailsubject.cpp | 2 +- korn/sortedmailsubject.h | 12 +-- korn/stringid.cpp | 2 +- korn/stringid.h | 10 +- korn/subjectsdlg.cpp | 130 +++++++++++++------------- korn/subjectsdlg.h | 26 +++--- korn/systemtray.cpp | 6 +- korn/systemtray.h | 4 +- korn/utils.h | 4 +- 91 files changed, 1122 insertions(+), 1122 deletions(-) (limited to 'korn') diff --git a/korn/account_input.cpp b/korn/account_input.cpp index 363e04751..d75848052 100644 --- a/korn/account_input.cpp +++ b/korn/account_input.cpp @@ -22,15 +22,15 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -AccountInput::AccountInput( const QString& configName ) - : _configName( new QString( configName ) ) +AccountInput::AccountInput( const TQString& configName ) + : _configName( new TQString( configName ) ) { } @@ -39,33 +39,33 @@ AccountInput::~AccountInput() delete _configName; } -QString AccountInput::configName() const +TQString AccountInput::configName() const { return *_configName; } -TextInput::TextInput( QWidget *parent, const QString& title, Type type, const QString& defaul, const QString& configName ) +TextInput::TextInput( TQWidget *parent, const TQString& title, Type type, const TQString& defaul, const TQString& configName ) : AccountInput( configName ) { - _left = new QLabel( title, parent, "label" ); + _left = new TQLabel( title, parent, "label" ); _right = new KLineEdit( "", parent, "edit" ); switch( type ) { case text: break; case password: - _right->setEchoMode( QLineEdit::Password ); + _right->setEchoMode( TQLineEdit::Password ); break; } setValue( defaul ); } -TextInput::TextInput( QWidget *parent, const QString& title, int min, int max, const QString& defaul, const QString& configName ) +TextInput::TextInput( TQWidget *parent, const TQString& title, int min, int max, const TQString& defaul, const TQString& configName ) : AccountInput( configName ) { - _left = new QLabel( title, parent, "label" ); + _left = new TQLabel( title, parent, "label" ); _right = new KLineEdit( "", parent, "edit" ); - _right->setValidator( new QIntValidator( min, max, _right, "validator" ) ); + _right->setValidator( new TQIntValidator( min, max, _right, "validator" ) ); setValue( defaul ); } @@ -75,20 +75,20 @@ TextInput::~TextInput() delete _right; } -QString TextInput::value() const +TQString TextInput::value() const { return _right->text(); } -void TextInput::setValue( const QString& value ) +void TextInput::setValue( const TQString& value ) { return _right->setText( value ); } -URLInput::URLInput( QWidget *parent, const QString& title, const QString& defaul, const QString& configName ) +URLInput::URLInput( TQWidget *parent, const TQString& title, const TQString& defaul, const TQString& configName ) : AccountInput( configName ) { - _left = new QLabel( title, parent, "label" ); + _left = new TQLabel( title, parent, "label" ); _right = new KURLRequester( "", parent, "kurledit" ); setValue( defaul ); } @@ -99,24 +99,24 @@ URLInput::~URLInput() delete _right; } -QString URLInput::value() const +TQString URLInput::value() const { return _right->url(); } -void URLInput::setValue( const QString& value ) +void URLInput::setValue( const TQString& value ) { _right->setURL( value ); } -ComboInput::ComboInput( QWidget *parent, const QString& title, const QMap& list, - const QString& defaul, const QString& configName ) +ComboInput::ComboInput( TQWidget *parent, const TQString& title, const TQMap& list, + const TQString& defaul, const TQString& configName ) : AccountInput( configName ) - , _list( new QMap< QString, QString >( list ) ) + , _list( new TQMap< TQString, TQString >( list ) ) { - _left = new QLabel( title, parent, "label" ); - _right = new QComboBox( false, parent, "combo" ); - _right->insertStringList( QStringList( _list->values() ) ); + _left = new TQLabel( title, parent, "label" ); + _right = new TQComboBox( false, parent, "combo" ); + _right->insertStringList( TQStringList( _list->values() ) ); setValue( defaul ); } @@ -126,7 +126,7 @@ ComboInput::~ComboInput() delete _right; } -QString ComboInput::value() const +TQString ComboInput::value() const { if( _right->currentItem() >= 0 ) return _list->keys()[ _right->currentItem() ]; @@ -134,7 +134,7 @@ QString ComboInput::value() const return ""; } -void ComboInput::setValue( const QString& value ) +void ComboInput::setValue( const TQString& value ) { if( _list->contains( value ) ) _right->setCurrentItem( _list->keys().findIndex( value ) ); @@ -142,10 +142,10 @@ void ComboInput::setValue( const QString& value ) _right->setCurrentItem( -1 ); } -CheckboxInput::CheckboxInput( QWidget *parent, const QString& title, const QString& defaul, const QString& configName ) +CheckboxInput::CheckboxInput( TQWidget *parent, const TQString& title, const TQString& defaul, const TQString& configName ) : AccountInput( configName ) { - _right = new QCheckBox( title, parent, "checkbox" ); + _right = new TQCheckBox( title, parent, "checkbox" ); setValue( defaul ); } @@ -154,7 +154,7 @@ CheckboxInput::~CheckboxInput() delete _right; } -QString CheckboxInput::value() const +TQString CheckboxInput::value() const { if( _right->isChecked() ) return "true"; @@ -162,7 +162,7 @@ QString CheckboxInput::value() const return "false"; } -void CheckboxInput::setValue( const QString& value ) +void CheckboxInput::setValue( const TQString& value ) { if( value == "true" ) _right->setChecked( true ); diff --git a/korn/account_input.h b/korn/account_input.h index 80f989034..0f7f2e232 100644 --- a/korn/account_input.h +++ b/korn/account_input.h @@ -30,7 +30,7 @@ class KURLRequester; class QComboBox; class QCheckBox; -#include +#include /** * This classe contains methods to use in the creation of the protocol configuration box. @@ -44,7 +44,7 @@ public: * * @param configName The name as the information is stored in the configuration-file. */ - AccountInput( const QString& configName ); + AccountInput( const TQString& configName ); /** * Destructor */ @@ -55,20 +55,20 @@ public: * possible to make a left label and a right input box. * @return The pointer to the widget. */ - virtual QWidget* leftWidget() = 0; + virtual TQWidget* leftWidget() = 0; /** * Implementations should return the right widget. In the configuration, it is * possible to make a left label and a right input box. * @return The pointer to the widget. */ - virtual QWidget* rightWidget() = 0; + virtual TQWidget* rightWidget() = 0; /** * This function return the config name. This is used for stored an retrieving information. * * @return The configName as used for this config field. */ - QString configName() const; + TQString configName() const; /** * Return the value of the configuration object. In most cases, this is the value the user typed in. @@ -76,16 +76,16 @@ public: * * @return The value of the object */ - virtual QString value() const = 0; + virtual TQString value() const = 0; /** * Implementation should edit there widget such that value() would return the parameter. * * @param value The value that the object must get. */ - virtual void setValue( const QString& value ) = 0; + virtual void setValue( const TQString& value ) = 0; protected: - QString *_configName; + TQString *_configName; }; /** @@ -112,7 +112,7 @@ public: * @param defaul The default value of this object * @param configName The name it has in the configuration box. */ - TextInput( QWidget *parent, const QString& title, Type type, const QString& defaul, const QString& configName ); + TextInput( TQWidget *parent, const TQString& title, Type type, const TQString& defaul, const TQString& configName ); /** * Constructor. Use this one if you want to ensure a number is inserted. * @@ -123,7 +123,7 @@ public: * @param defaul The default value of this object * @param configName The name it has in the configuration box. */ - TextInput( QWidget *parent, const QString& title, int min, int max, const QString& defaul, const QString& configName ); + TextInput( TQWidget *parent, const TQString& title, int min, int max, const TQString& defaul, const TQString& configName ); /** * Destructor */ @@ -133,25 +133,25 @@ public: * Returns a pointer to the label. * @return A pointer to the label */ - virtual QWidget* leftWidget() { return (QWidget*)_left; } + virtual TQWidget* leftWidget() { return (TQWidget*)_left; } /** * Returns a pointer to the KLineEdit. * @return A pointer to the KLineEdit */ - virtual QWidget* rightWidget() { return (QWidget*)_right; } + virtual TQWidget* rightWidget() { return (TQWidget*)_right; } /** * The value of the lineedit. * @return The value of the lineedit. */ - virtual QString value() const; + virtual TQString value() const; /** * This function sets the text of the edit box. * @param value The value to appear in the lineedit box. */ - virtual void setValue( const QString& value ); + virtual void setValue( const TQString& value ); private: - QLabel *_left; + TQLabel *_left; KLineEdit *_right; }; @@ -168,7 +168,7 @@ public: * @param defaul The default value * @param configName The name of the configuration entry */ - URLInput( QWidget *parent, const QString& title, const QString& defaul, const QString& configName ); + URLInput( TQWidget *parent, const TQString& title, const TQString& defaul, const TQString& configName ); /** * Destructor */ @@ -178,26 +178,26 @@ public: * This return a pointer to the label of this object * @return A pointer to the label of this object */ - virtual QWidget* leftWidget() { return (QWidget*)_left; } + virtual TQWidget* leftWidget() { return (TQWidget*)_left; } /** * This return a pointer to the KURLRequestor of this object * @return A pointer to the KURLRequestor of this object */ - virtual QWidget* rightWidget() { return (QWidget*)_right; } + virtual TQWidget* rightWidget() { return (TQWidget*)_right; } /** * This function returns the url as given in the KURLRequestor * @return The currently selected url */ - virtual QString value() const; + virtual TQString value() const; /** * Sets the currently selected url * @param value The url to be set. */ - virtual void setValue( const QString& ); + virtual void setValue( const TQString& ); private: - QLabel *_left; + TQLabel *_left; KURLRequester *_right; }; @@ -217,8 +217,8 @@ public: * @param default The default value of the combo box. * @param configName The name in which the option is saved. */ - ComboInput( QWidget *parent, const QString& title, const QMap& list, - const QString& defaul, const QString& configName ); + ComboInput( TQWidget *parent, const TQString& title, const TQMap& list, + const TQString& defaul, const TQString& configName ); /** * Destructor */ @@ -228,29 +228,29 @@ public: * The left widget (a label with the title on it) * @return A pointer to the label of this object. */ - virtual QWidget* leftWidget() { return (QWidget*)_left; } + virtual TQWidget* leftWidget() { return (TQWidget*)_left; } /** * The right widget (the combo box itselfs) * @return A pointer to the combo box of this object */ - virtual QWidget* rightWidget() { return (QWidget*)_right; } + virtual TQWidget* rightWidget() { return (TQWidget*)_right; } /** * Return the value of the currently selected item * @return The value of the currently selected item */ - virtual QString value() const; + virtual TQString value() const; /** * This function sets the combo box to an item which has @p value as value. * * @param value The value to be searched */ - virtual void setValue( const QString& value ); + virtual void setValue( const TQString& value ); private: - QLabel *_left; - QComboBox *_right; - QMap< QString, QString > *_list; + TQLabel *_left; + TQComboBox *_right; + TQMap< TQString, TQString > *_list; }; @@ -269,7 +269,7 @@ public: * @param defaul The default value ("true" for checked, "false" otherwise") * @param configName The name of the configuration entry of this object */ - CheckboxInput( QWidget *parent, const QString& title, const QString& defaul, const QString& configName ); + CheckboxInput( TQWidget *parent, const TQString& title, const TQString& defaul, const TQString& configName ); /** * Destructor */ @@ -280,19 +280,19 @@ public: * * @return 0 */ - virtual QWidget* leftWidget() { return 0; } + virtual TQWidget* leftWidget() { return 0; } /** * This function returns the checkbox. * @return A pointer to the checkbox. */ - virtual QWidget* rightWidget() { return (QWidget*)_right; } + virtual TQWidget* rightWidget() { return (TQWidget*)_right; } /** * This gives the value of the checkbox: "true" if checked, "false" otherwise. * * @return "true" if the checkbox is checked, "false" otherwise. */ - virtual QString value() const; + virtual TQString value() const; /** * This function can change the state of the checkbox. * It can check or uncheck it. @@ -300,10 +300,10 @@ public: * @param value If this parameter is "true", the checkbox gets checked, * if it is "false", the checkbox get unchecked. */ - virtual void setValue( const QString& value ); + virtual void setValue( const TQString& value ); private: - QCheckBox *_right; + TQCheckBox *_right; }; #endif diff --git a/korn/accountmanager.cpp b/korn/accountmanager.cpp index d8c482e42..a791c53d4 100644 --- a/korn/accountmanager.cpp +++ b/korn/accountmanager.cpp @@ -30,15 +30,15 @@ #include #include -#include +#include KornSubjectsDlg* AccountManager::_subjectsDlg = 0; -AccountManager::AccountManager( QObject * parent, const char * name ) - : QObject( parent, name ), - _kioList( new QPtrList< KMailDrop > ), - _dcopList( new QPtrList< DCOPDrop > ), - _dropInfo( new QMap< KMailDrop*, Dropinfo* > ) +AccountManager::AccountManager( TQObject * parent, const char * name ) + : TQObject( parent, name ), + _kioList( new TQPtrList< KMailDrop > ), + _dcopList( new TQPtrList< DCOPDrop > ), + _dropInfo( new TQMap< KMailDrop*, Dropinfo* > ) { _kioList->setAutoDelete( true ); _dcopList->setAutoDelete( true ); @@ -53,14 +53,14 @@ AccountManager::~AccountManager() void AccountManager::readConfig( KConfig* config, const int index ) { - KConfigGroup *masterGroup = new KConfigGroup( config, QString( "korn-%1" ).arg( index ) ); - QStringList dcop = masterGroup->readListEntry( "dcop", ',' ); + KConfigGroup *masterGroup = new KConfigGroup( config, TQString( "korn-%1" ).arg( index ) ); + TQStringList dcop = masterGroup->readListEntry( "dcop", ',' ); KConfigGroup *accountGroup; int counter = 0; - while( config->hasGroup( QString( "korn-%1-%2" ).arg( index ).arg( counter ) ) ) + while( config->hasGroup( TQString( "korn-%1-%2" ).arg( index ).arg( counter ) ) ) { - accountGroup = new KConfigGroup( config, QString( "korn-%1-%2" ).arg( index ).arg( counter ) ); + accountGroup = new KConfigGroup( config, TQString( "korn-%1-%2" ).arg( index ).arg( counter ) ); const Protocol *proto = Protocols::getProto( accountGroup->readEntry( "protocol" ) ); if( !proto ) @@ -69,7 +69,7 @@ void AccountManager::readConfig( KConfig* config, const int index ) ++counter; continue; } - QMap< QString, QString > *configmap = proto->createConfig( accountGroup, + TQMap< TQString, TQString > *configmap = proto->createConfig( accountGroup, KOrnPassword::readKOrnPassword( index, counter, *accountGroup ) ); KMailDrop *kiodrop = proto->createMaildrop( accountGroup ); const Protocol *nproto = proto->getProtocol( accountGroup ); @@ -84,12 +84,12 @@ void AccountManager::readConfig( KConfig* config, const int index ) } //TODO: connect some stuff - connect( kiodrop, SIGNAL( changed( int, KMailDrop* ) ), this, SLOT( slotChanged( int, KMailDrop* ) ) ); - connect( kiodrop, SIGNAL( showPassivePopup( QPtrList< KornMailSubject >*, int, bool, const QString& ) ), - this, SLOT( slotShowPassivePopup( QPtrList< KornMailSubject >*, int, bool, const QString& ) ) ); - connect( kiodrop, SIGNAL( showPassivePopup( const QString&, const QString& ) ), - this, SLOT( slotShowPassivePopup( const QString&, const QString& ) ) ); - connect( kiodrop, SIGNAL( validChanged( bool ) ), this, SLOT( slotValidChanged( bool ) ) ); + connect( kiodrop, TQT_SIGNAL( changed( int, KMailDrop* ) ), this, TQT_SLOT( slotChanged( int, KMailDrop* ) ) ); + connect( kiodrop, TQT_SIGNAL( showPassivePopup( TQPtrList< KornMailSubject >*, int, bool, const TQString& ) ), + this, TQT_SLOT( slotShowPassivePopup( TQPtrList< KornMailSubject >*, int, bool, const TQString& ) ) ); + connect( kiodrop, TQT_SIGNAL( showPassivePopup( const TQString&, const TQString& ) ), + this, TQT_SLOT( slotShowPassivePopup( const TQString&, const TQString& ) ) ); + connect( kiodrop, TQT_SIGNAL( validChanged( bool ) ), this, TQT_SLOT( slotValidChanged( bool ) ) ); kiodrop->readGeneralConfigGroup( *masterGroup ); if( !kiodrop->readConfigGroup( *accountGroup ) || !kiodrop->readConfigGroup( *configmap, nproto ) ) @@ -113,15 +113,15 @@ void AccountManager::readConfig( KConfig* config, const int index ) ++counter; } - QStringList::Iterator it; + TQStringList::Iterator it; for( it = dcop.begin(); it != dcop.end(); ++it ) { DCOPDrop *dcopdrop = new DCOPDrop; Dropinfo *info = new Dropinfo; - connect( dcopdrop, SIGNAL( changed( int, KMailDrop* ) ), this, SLOT( slotChanged( int, KMailDrop* ) ) ); - connect( dcopdrop, SIGNAL( showPassivePopup( QPtrList< KornMailSubject >*, int, bool, const QString& ) ), - this, SLOT( slotShowPassivePopup( QPtrList< KornMailSubject >*, int, bool, const QString& ) ) ); + connect( dcopdrop, TQT_SIGNAL( changed( int, KMailDrop* ) ), this, TQT_SLOT( slotChanged( int, KMailDrop* ) ) ); + connect( dcopdrop, TQT_SIGNAL( showPassivePopup( TQPtrList< KornMailSubject >*, int, bool, const TQString& ) ), + this, TQT_SLOT( slotShowPassivePopup( TQPtrList< KornMailSubject >*, int, bool, const TQString& ) ) ); dcopdrop->readConfigGroup( *masterGroup ); dcopdrop->setDCOPName( *it ); @@ -141,25 +141,25 @@ void AccountManager::readConfig( KConfig* config, const int index ) void AccountManager::writeConfig( KConfig* config, const int index ) { - QMap< KMailDrop*, Dropinfo* >::Iterator it; + TQMap< KMailDrop*, Dropinfo* >::Iterator it; for( it = _dropInfo->begin(); it != _dropInfo->end(); ++it ) { - config->setGroup( QString( "korn-%1-%2" ).arg( index ).arg( it.data()->index ) ); + config->setGroup( TQString( "korn-%1-%2" ).arg( index ).arg( it.data()->index ) ); config->writeEntry( "reset", it.data()->reset ); } } -QString AccountManager::getTooltip() const +TQString AccountManager::getTooltip() const { - QStringList result; - QMap< KMailDrop*, Dropinfo* >::Iterator it; + TQStringList result; + TQMap< KMailDrop*, Dropinfo* >::Iterator it; for( it = _dropInfo->begin(); it != _dropInfo->end(); ++it ) if( it.key()->valid() ) - result.append( QString( "%1: %2" ).arg( it.key()->realName() ).arg( it.data()->msgnr - it.data()->reset )); + result.append( TQString( "%1: %2" ).arg( it.key()->realName() ).arg( it.data()->msgnr - it.data()->reset )); else - result.append( QString( "%1: invalid" ).arg( it.key()->realName() ) ); + result.append( TQString( "%1: invalid" ).arg( it.key()->realName() ) ); result.sort(); - return result.join( QChar( '\n' ) ); + return result.join( TQChar( '\n' ) ); } void AccountManager::doRecheck() @@ -171,7 +171,7 @@ void AccountManager::doRecheck() void AccountManager::doReset() { - QMap< KMailDrop*, Dropinfo* >::Iterator it; + TQMap< KMailDrop*, Dropinfo* >::Iterator it; for( it = _dropInfo->begin(); it != _dropInfo->end(); ++it ) { it.data()->reset = it.data()->msgnr; @@ -183,7 +183,7 @@ void AccountManager::doReset() void AccountManager::doView() { - QMap< KMailDrop*, Dropinfo* >::Iterator it; + TQMap< KMailDrop*, Dropinfo* >::Iterator it; if( !_subjectsDlg ) _subjectsDlg = new KornSubjectsDlg(); @@ -216,7 +216,7 @@ int AccountManager::totalMessages() { int result = 0; - QMap< KMailDrop*, Dropinfo* >::Iterator it; + TQMap< KMailDrop*, Dropinfo* >::Iterator it; for( it = _dropInfo->begin(); it != _dropInfo->end(); ++it ) //if( it.date()->msgnr - it.date()->reset > 0 ) result += it.data()->msgnr - it.data()->reset; @@ -226,7 +226,7 @@ int AccountManager::totalMessages() bool AccountManager::hasNewMessages() { - QMap< KMailDrop*, Dropinfo* >::Iterator it; + TQMap< KMailDrop*, Dropinfo* >::Iterator it; for( it = _dropInfo->begin(); it != _dropInfo->end(); ++it ) if( it.data()->newMessages ) return true; @@ -234,7 +234,7 @@ bool AccountManager::hasNewMessages() return false; } -void AccountManager::playSound( const QString& file ) +void AccountManager::playSound( const TQString& file ) { KAudioPlayer::play( file ); } diff --git a/korn/accountmanager.h b/korn/accountmanager.h index 958e5b57c..037887d4e 100644 --- a/korn/accountmanager.h +++ b/korn/accountmanager.h @@ -19,7 +19,7 @@ #ifndef MK_ACCOUNTMANAGER_H #define MK_ACCOUNTMANAGER_H -#include +#include class DCOPDrop; class KornSubjectsDlg; @@ -42,9 +42,9 @@ class AccountManager : public QObject { Q_OBJECT public: /** - * Constructor, parameters are directed to QObject. + * Constructor, parameters are directed to TQObject. */ - AccountManager( QObject * parent = 0, const char * name = 0 ); + AccountManager( TQObject * parent = 0, const char * name = 0 ); /** * Destructor @@ -72,13 +72,13 @@ public: virtual void writeConfig( KConfig* config, const int index ); /** - * This method makes a QString which can be used for a tooltip. + * This method makes a TQString which can be used for a tooltip. * In it, all accounts are summed and the number of new messages of * every account is added. * * @return A string that can be used for the Tooltip of the box. */ - QString getTooltip() const; + TQString getTooltip() const; protected: /** * This function is called when the number of emails has changed. @@ -93,14 +93,14 @@ protected: * This functions sets a new Tooltip. Boxes must override this method * @param tooltip The tooltip to be set. */ - virtual void setTooltip( const QString& tooltip ) = 0; + virtual void setTooltip( const TQString& tooltip ) = 0; /** * This funtion is called if @p command have to be executed. * For example, if new email has arrived, and the user setuped KOrn * to execute a command. Boxes must override this function. */ - virtual void runCommand( const QString& command ) = 0; + virtual void runCommand( const TQString& command ) = 0; /** * This function can be called by classes that inherit this class. @@ -135,17 +135,17 @@ private: int reset; }; - QPtrList< KMailDrop > *_kioList; - QPtrList< DCOPDrop > *_dcopList; + TQPtrList< KMailDrop > *_kioList; + TQPtrList< DCOPDrop > *_dcopList; - QMap< KMailDrop*, Dropinfo* > *_dropInfo; + TQMap< KMailDrop*, Dropinfo* > *_dropInfo; static KornSubjectsDlg *_subjectsDlg; private: int totalMessages(); bool hasNewMessages(); - void playSound( const QString& ); + void playSound( const TQString& ); private slots: void slotChanged( int, KMailDrop* ); void slotValidChanged( bool ); diff --git a/korn/boxcontainer.cpp b/korn/boxcontainer.cpp index e245004c7..934a47c53 100644 --- a/korn/boxcontainer.cpp +++ b/korn/boxcontainer.cpp @@ -22,11 +22,11 @@ #include #include -#include +#include -BoxContainer::BoxContainer( QObject * parent, const char * name ) - : QObject( parent, name ), - _items( new QPtrList< BoxContainerItem > ) +BoxContainer::BoxContainer( TQObject * parent, const char * name ) + : TQObject( parent, name ), + _items( new TQPtrList< BoxContainerItem > ) { _items->setAutoDelete( true ); } @@ -39,9 +39,9 @@ BoxContainer::~BoxContainer() void BoxContainer::readConfig( KConfig* config ) { int counter = 0; - while( config->hasGroup( QString( "korn-%1" ).arg( counter ) ) ) + while( config->hasGroup( TQString( "korn-%1" ).arg( counter ) ) ) { - config->setGroup( QString( "korn-%1" ).arg( counter ) ); + config->setGroup( TQString( "korn-%1" ).arg( counter ) ); BoxContainerItem *item = newBoxInstance(); item->readConfig( config, counter ); addItem( item ); @@ -76,7 +76,7 @@ void BoxContainer::slotShowConfiguration() void BoxContainer::addItem( BoxContainerItem* item ) { - connect( item, SIGNAL( showConfiguration() ), this, SLOT( slotShowConfiguration() ) ); + connect( item, TQT_SIGNAL( showConfiguration() ), this, TQT_SLOT( slotShowConfiguration() ) ); _items->append( item ); } diff --git a/korn/boxcontainer.h b/korn/boxcontainer.h index 800fab78e..d650657e8 100644 --- a/korn/boxcontainer.h +++ b/korn/boxcontainer.h @@ -19,7 +19,7 @@ #ifndef MK_BOXCONTAINER_H #define MK_BOXCONTAINER_H -#include +#include class BoxContainerItem; @@ -35,12 +35,12 @@ class BoxContainer : public QObject { Q_OBJECT public: /** - * Constructor: everything is passed to QObject. + * Constructor: everything is passed to TQObject. * * @param parent The parent of this object * @param name The name of this object */ - BoxContainer( QObject *parent = 0, const char * name = 0 ); + BoxContainer( TQObject *parent = 0, const char * name = 0 ); /** * Destructor */ @@ -90,7 +90,7 @@ protected: /** * The list of BoxContainerItems. */ - QPtrList< BoxContainerItem > *_items; + TQPtrList< BoxContainerItem > *_items; signals: /** diff --git a/korn/boxcontaineritem.cpp b/korn/boxcontaineritem.cpp index fec7ab41d..4dec01904 100644 --- a/korn/boxcontaineritem.cpp +++ b/korn/boxcontaineritem.cpp @@ -35,22 +35,22 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -BoxContainerItem::BoxContainerItem( QObject * parent, const char * name ) +BoxContainerItem::BoxContainerItem( TQObject * parent, const char * name ) : AccountManager( parent, name ), DCOPObject(), - _command( new QString ) + _command( new TQString ) { short i; @@ -81,48 +81,48 @@ BoxContainerItem::~BoxContainerItem() void BoxContainerItem::readConfig( KConfig* config, const int index ) { //Read information about how the thing have to look like - config->setGroup( QString( "korn-%1" ).arg( index ) ); + config->setGroup( TQString( "korn-%1" ).arg( index ) ); if( config->readBoolEntry( "hasnormalicon", false ) ) - _icons[ 0 ] = new QString( config->readEntry( "normalicon", "" ) ); + _icons[ 0 ] = new TQString( config->readEntry( "normalicon", "" ) ); else _icons[ 0 ] = 0; if( config->readBoolEntry( "hasnewicon", false ) ) - _icons[ 1 ] = new QString( config->readEntry( "newicon", "" ) ); + _icons[ 1 ] = new TQString( config->readEntry( "newicon", "" ) ); else _icons[ 1 ] = 0; if( config->readBoolEntry( "hasnormalanim", false ) ) - _anims[ 0 ] = new QString( config->readEntry( "normalanim", "" ) ); + _anims[ 0 ] = new TQString( config->readEntry( "normalanim", "" ) ); else _anims[ 0 ] = 0; if( config->readBoolEntry( "hasnewanim", false ) ) - _anims[ 1 ] = new QString( config->readEntry( "newanim", "" ) ); + _anims[ 1 ] = new TQString( config->readEntry( "newanim", "" ) ); else _anims[ 1 ] = 0; if( config->readBoolEntry( "hasnormalfgcolour", false ) ) - _fgColour[ 0 ] = new QColor( config->readColorEntry( "normalfgcolour" ) ); + _fgColour[ 0 ] = new TQColor( config->readColorEntry( "normalfgcolour" ) ); else _fgColour[ 0 ] = 0; if( config->readBoolEntry( "hasnewfgcolour", false ) ) - _fgColour[ 1 ] = new QColor( config->readColorEntry( "newfgcolour" ) ); + _fgColour[ 1 ] = new TQColor( config->readColorEntry( "newfgcolour" ) ); else _fgColour[ 1 ] = 0; if( config->readBoolEntry( "hasnormalbgcolour", false ) ) - _bgColour[ 0 ] = new QColor( config->readColorEntry( "normalbgcolour" ) ); + _bgColour[ 0 ] = new TQColor( config->readColorEntry( "normalbgcolour" ) ); else _bgColour[ 0 ] = 0; if( config->readBoolEntry( "hasnewbgcolour", false ) ) - _bgColour[ 1 ] = new QColor( config->readColorEntry( "newbgcolour" ) ); + _bgColour[ 1 ] = new TQColor( config->readColorEntry( "newbgcolour" ) ); else _bgColour[ 1 ] = 0; if( config->readBoolEntry( "hasnormalfont", false ) ) - _fonts[ 0 ] = new QFont( config->readFontEntry( "normalfont" ) ); + _fonts[ 0 ] = new TQFont( config->readFontEntry( "normalfont" ) ); else _fonts[ 0 ] = 0; if( config->readBoolEntry( "hasnewfont", false ) ) - _fonts[ 1 ] = new QFont( config->readFontEntry( "newfont" ) ); + _fonts[ 1 ] = new TQFont( config->readFontEntry( "newfont" ) ); else _fonts[ 1 ] = 0; @@ -159,12 +159,12 @@ void BoxContainerItem::readConfig( KConfig* config, const int index ) AccountManager::readConfig( config, index ); } -void BoxContainerItem::runCommand( const QString& cmd ) +void BoxContainerItem::runCommand( const TQString& cmd ) { KProcess *process = new KProcess; process->setUseShell( true ); *process << cmd; - connect( process, SIGNAL( processExited (KProcess *) ), this, SLOT( processExited( KProcess * ) ) ); + connect( process, TQT_SIGNAL( processExited (KProcess *) ), this, TQT_SLOT( processExited( KProcess * ) ) ); process->start(); } @@ -194,45 +194,45 @@ void BoxContainerItem::mouseButtonPressed( Qt::ButtonState state ) void BoxContainerItem::fillKPopupMenu( KPopupMenu* popupMenu, KActionCollection* actions ) const { - /*popupMenu->insertItem( i18n( "&Configure" ), this, SLOT( slotConfigure() ) ); - popupMenu->insertItem( i18n( "&Recheck" ), this, SLOT( slotRecheck() ) ); - popupMenu->insertItem( i18n( "R&eset Counter" ), this, SLOT( slotReset() ) ); - popupMenu->insertItem( i18n( "&View Emails" ), this, SLOT( slotView() ) ); - popupMenu->insertItem( i18n( "R&un Command" ), this, SLOT( slotRunCommand() ) );*/ - - (new KAction( i18n("&Configure"), KShortcut(), this, SLOT( slotConfigure() ), actions ))->plug( popupMenu ); - (new KAction( i18n("&Recheck"), KShortcut(), this, SLOT( slotRecheck() ), actions ))->plug( popupMenu ); - (new KAction( i18n("R&eset Counter"), KShortcut(), this, SLOT( slotReset() ), actions ))->plug( popupMenu ); - (new KAction( i18n("&View Emails"), KShortcut(), this, SLOT( slotView() ), actions ))->plug( popupMenu ); - (new KAction( i18n("R&un Command"), KShortcut(), this, SLOT( slotRunCommand() ), actions ))->plug( popupMenu ); + /*popupMenu->insertItem( i18n( "&Configure" ), this, TQT_SLOT( slotConfigure() ) ); + popupMenu->insertItem( i18n( "&Recheck" ), this, TQT_SLOT( slotRecheck() ) ); + popupMenu->insertItem( i18n( "R&eset Counter" ), this, TQT_SLOT( slotReset() ) ); + popupMenu->insertItem( i18n( "&View Emails" ), this, TQT_SLOT( slotView() ) ); + popupMenu->insertItem( i18n( "R&un Command" ), this, TQT_SLOT( slotRunCommand() ) );*/ + + (new KAction( i18n("&Configure"), KShortcut(), this, TQT_SLOT( slotConfigure() ), actions ))->plug( popupMenu ); + (new KAction( i18n("&Recheck"), KShortcut(), this, TQT_SLOT( slotRecheck() ), actions ))->plug( popupMenu ); + (new KAction( i18n("R&eset Counter"), KShortcut(), this, TQT_SLOT( slotReset() ), actions ))->plug( popupMenu ); + (new KAction( i18n("&View Emails"), KShortcut(), this, TQT_SLOT( slotView() ), actions ))->plug( popupMenu ); + (new KAction( i18n("R&un Command"), KShortcut(), this, TQT_SLOT( slotRunCommand() ), actions ))->plug( popupMenu ); popupMenu->insertSeparator(); - KStdAction::help( this, SLOT( help() ), actions )->plug( popupMenu ); - KStdAction::reportBug( this, SLOT( reportBug() ), actions )->plug( popupMenu ); - KStdAction::aboutApp( this, SLOT( about() ), actions )->plug( popupMenu ); + KStdAction::help( this, TQT_SLOT( help() ), actions )->plug( popupMenu ); + KStdAction::reportBug( this, TQT_SLOT( reportBug() ), actions )->plug( popupMenu ); + KStdAction::aboutApp( this, TQT_SLOT( about() ), actions )->plug( popupMenu ); } -void BoxContainerItem::showPassivePopup( QWidget* parent, QPtrList< KornMailSubject >* list, int total, - const QString &accountName, bool date ) +void BoxContainerItem::showPassivePopup( TQWidget* parent, TQPtrList< KornMailSubject >* list, int total, + const TQString &accountName, bool date ) { KPassivePopup *popup = new KPassivePopup( parent, "Passive popup" ); - QVBox *mainvlayout = popup->standardView( i18n( "KOrn - %1/%2 (total: %3)" ).arg( objId() ).arg( accountName ) - .arg( total ), "", QPixmap(), 0 ); - QGrid *mainglayout = new QGrid( date ? 3 : 2 ,mainvlayout, "Grid-Layout" ); + TQVBox *mainvlayout = popup->standardView( i18n( "KOrn - %1/%2 (total: %3)" ).arg( objId() ).arg( accountName ) + .arg( total ), "", TQPixmap(), 0 ); + TQGrid *mainglayout = new TQGrid( date ? 3 : 2 ,mainvlayout, "Grid-Layout" ); - QLabel *title = new QLabel( i18n("From"), mainglayout, "from_label" ); - QFont font = title->font(); + TQLabel *title = new TQLabel( i18n("From"), mainglayout, "from_label" ); + TQFont font = title->font(); font.setBold( true ); title->setFont( font ); - title = new QLabel( i18n("Subject"), mainglayout, "subject_label" ); + title = new TQLabel( i18n("Subject"), mainglayout, "subject_label" ); font = title->font(); font.setBold( true ); title->setFont( font ); if( date ) { - title = new QLabel( i18n("Date"), mainglayout, "date_label" ); + title = new TQLabel( i18n("Date"), mainglayout, "date_label" ); font = title->font(); font.setBold( true ); title->setFont( font ); @@ -240,13 +240,13 @@ void BoxContainerItem::showPassivePopup( QWidget* parent, QPtrList< KornMailSubj for( KornMailSubject* subject = list->first(); subject; subject = list->next() ) { - new QLabel( subject->getSender(), mainglayout, "from-value" ); - new QLabel( subject->getSubject(), mainglayout, "subject-value" ); + new TQLabel( subject->getSender(), mainglayout, "from-value" ); + new TQLabel( subject->getSubject(), mainglayout, "subject-value" ); if( date ) { - QDateTime tijd; + TQDateTime tijd; tijd.setTime_t( subject->getDate() ); - new QLabel( tijd.toString(), mainglayout, "date-value" ); + new TQLabel( tijd.toString(), mainglayout, "date-value" ); } } @@ -257,7 +257,7 @@ void BoxContainerItem::showPassivePopup( QWidget* parent, QPtrList< KornMailSubj popup->show(); //Display it } -void BoxContainerItem::drawLabel( QLabel *label, const int count, const bool newMessages ) +void BoxContainerItem::drawLabel( TQLabel *label, const int count, const bool newMessages ) { //This would fail if bool have fome other values. short index = newMessages ? 1 : 0; @@ -267,10 +267,10 @@ void BoxContainerItem::drawLabel( QLabel *label, const int count, const bool new bool hasBg = _bgColour[ index ] && _bgColour[ index ]->isValid(); bool hasFg = _fgColour[ index ] && _fgColour[ index ]->isValid(); - QPixmap pixmap; + TQPixmap pixmap; label->setText( "" ); - //QToolTip::add( label, this->getTooltip() ); + //TQToolTip::add( label, this->getTooltip() ); if( hasAnim ) { //An animation can't have a foreground-colour and can't have a icon. @@ -317,7 +317,7 @@ void BoxContainerItem::drawLabel( QLabel *label, const int count, const bool new label->setFont( *_fonts[ index ] ); label->setPaletteForegroundColor( *_fgColour[ index ] ); label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - label->setText( QString::number( count ) ); + label->setText( TQString::number( count ) ); } if( hasFg || hasBg || hasIcon || hasAnim ) @@ -327,14 +327,14 @@ void BoxContainerItem::drawLabel( QLabel *label, const int count, const bool new } //This function makes a pixmap which is based on icon, but has a number painted on it. -QPixmap BoxContainerItem::calcComplexPixmap( const QPixmap &icon, const QColor& fgColour, const QFont* font, const int count ) +TQPixmap BoxContainerItem::calcComplexPixmap( const TQPixmap &icon, const TQColor& fgColour, const TQFont* font, const int count ) { - QPixmap result( icon ); - QPixmap numberPixmap( icon.size() ); - QImage iconImage( icon.convertToImage() ); - QImage numberImage; + TQPixmap result( icon ); + TQPixmap numberPixmap( icon.size() ); + TQImage iconImage( icon.convertToImage() ); + TQImage numberImage; QRgb *rgbline; - QPainter p; + TQPainter p; //Make a transparent number; first make a white number on a black background. //This pixmap also is the base alpha-channel, the foreground colour is added later. @@ -343,7 +343,7 @@ QPixmap BoxContainerItem::calcComplexPixmap( const QPixmap &icon, const QColor& p.setPen( Qt::white ); if( font ) p.setFont( *font ); - p.drawText( icon.rect(), Qt::AlignCenter, QString::number( count ) ); + p.drawText( icon.rect(), Qt::AlignCenter, TQString::number( count ) ); p.end(); //Convert to image and add the alpha channel. @@ -369,10 +369,10 @@ QPixmap BoxContainerItem::calcComplexPixmap( const QPixmap &icon, const QColor& return result; } -void BoxContainerItem::setAnimIcon( QLabel* label, const QString& anim ) +void BoxContainerItem::setAnimIcon( TQLabel* label, const TQString& anim ) { label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter ); - label->setMovie( QMovie( anim ) ); + label->setMovie( TQMovie( anim ) ); label->show(); } diff --git a/korn/boxcontaineritem.h b/korn/boxcontaineritem.h index 46f85da57..0112f9acf 100644 --- a/korn/boxcontaineritem.h +++ b/korn/boxcontaineritem.h @@ -46,14 +46,14 @@ class BoxContainerItem : public AccountManager, public DCOPObject public: /** * Standaard QObject-constuctor - * This constructor implements the default arguments for any QObject. + * This constructor implements the default arguments for any TQObject. * Note that is does not give a name to DCOPObject; that name * is set in the readConfig-function. * @param parent The parent of this object, See Object::QObject - * @param name The name of this object, See QObject::QObject + * @param name The name of this object, See TQObject::QObject * @see BoxContainerItem::readConfig */ - BoxContainerItem( QObject * parent = 0, const char * name = 0 ); + BoxContainerItem( TQObject * parent = 0, const char * name = 0 ); /** * The default destructor. This only removes _command-pointer. @@ -86,7 +86,7 @@ public slots: * * @param cmd The command to be executed. */ - virtual void runCommand( const QString& cmd ); + virtual void runCommand( const TQString& cmd ); /** * This function displays the (kde) help dialog @@ -128,7 +128,7 @@ protected: * @param accountName The name of the account it belongs to * @param date Should the date be displayed? */ - void showPassivePopup( QWidget* parent, QPtrList< KornMailSubject >* list, int total, const QString& accountName, bool date ); + void showPassivePopup( TQWidget* parent, TQPtrList< KornMailSubject >* list, int total, const TQString& accountName, bool date ); //this functions should be reimplemented /** @@ -143,7 +143,7 @@ protected: * @param count the number of new messages * @param newMessages are the messages new? */ - void drawLabel( QLabel *label, const int count, const bool newMessages ); + void drawLabel( TQLabel *label, const int count, const bool newMessages ); private: /** @@ -153,14 +153,14 @@ private: * @param font the font; 0 is default font. * @param count the number of messages */ - static QPixmap calcComplexPixmap( const QPixmap &icon, const QColor& fgColour, const QFont* font, const int count ); + static TQPixmap calcComplexPixmap( const TQPixmap &icon, const TQColor& fgColour, const TQFont* font, const int count ); /** * This functions sets a movie to a specified label * @param label The label to set the movie in * @param anim The path to the animation */ - void setAnimIcon( QLabel* label, const QString& anim ); + void setAnimIcon( TQLabel* label, const TQString& anim ); private slots: void slotRecheck() { recheck(); } @@ -218,14 +218,14 @@ private slots: protected: //This settings are stored here because every implementation needs them. - QString *_icons[ 2 ]; - QString *_anims[ 2 ]; - QColor *_fgColour[ 2 ]; - QColor *_bgColour[ 2 ]; - QFont *_fonts[ 2 ]; + TQString *_icons[ 2 ]; + TQString *_anims[ 2 ]; + TQColor *_fgColour[ 2 ]; + TQColor *_bgColour[ 2 ]; + TQFont *_fonts[ 2 ]; private: - QString *_command; + TQString *_command; bool _recheckSettings[ 3 ]; bool _resetSettings[ 3 ]; bool _viewSettings[ 3 ]; diff --git a/korn/dcop_proto.cpp b/korn/dcop_proto.cpp index a5896b8f1..d1f27a616 100644 --- a/korn/dcop_proto.cpp +++ b/korn/dcop_proto.cpp @@ -25,38 +25,38 @@ #include #include -#include -#include -#include +#include +#include +#include KMailDrop* DCOP_Protocol::createMaildrop( KConfigGroup* ) const { return new DCOPDrop(); } -QMap< QString, QString > * DCOP_Protocol::createConfig( KConfigGroup* config, const QString& ) const +TQMap< TQString, TQString > * DCOP_Protocol::createConfig( KConfigGroup* config, const TQString& ) const { - QMap< QString, QString > *result = new QMap< QString, QString >; + TQMap< TQString, TQString > *result = new TQMap< TQString, TQString >; result->insert( "dcopname", config->readEntry( "dcopname", "korn_dcop" ) ); return result; } -void DCOP_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const +void DCOP_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const { groupBoxes->append( "DCOP" ); } -void DCOP_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* result ) const +void DCOP_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* result ) const { - result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "DCOP name" ), TextInput::text, "korn_dcop", "dcopname" ) ); + result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "DCOP name" ), TextInput::text, "korn_dcop", "dcopname" ) ); } -void DCOP_Protocol::readEntries( QMap< QString, QString >* ) const +void DCOP_Protocol::readEntries( TQMap< TQString, TQString >* ) const { } -void DCOP_Protocol::writeEntries( QMap< QString, QString >* ) const +void DCOP_Protocol::writeEntries( TQMap< TQString, TQString >* ) const { } diff --git a/korn/dcop_proto.h b/korn/dcop_proto.h index cb92b8bf9..38a5404dd 100644 --- a/korn/dcop_proto.h +++ b/korn/dcop_proto.h @@ -37,7 +37,7 @@ template< class T> class QPtrList; template< class T> class QPtrVector; template< class T, class S> class QMap; -#include +#include /** * This class implements a DCOP-protocol. @@ -72,19 +72,19 @@ public: * @param config The configuration instance to be mapped * @return The keys and values of the configuration in a mapping */ - virtual QMap< QString, QString > * createConfig( KConfigGroup* config, const QString& passwd ) const; + virtual TQMap< TQString, TQString > * createConfig( KConfigGroup* config, const TQString& passwd ) const; /** * This return the name of this protocol. It is always "dcop". * @return The name of this protocol: "dcop" */ - virtual QString configName() const { return "dcop"; } + virtual TQString configName() const { return "dcop"; } /** * This function sets into the list the groupboxes. * * @param list A (empty) list, which is filled with the names of group-boxes. */ - virtual void configFillGroupBoxes( QStringList* list ) const; + virtual void configFillGroupBoxes( TQStringList* list ) const; /** * This function filles the configuration field of this protocol. * It is used to construct the configuration dialog. @@ -93,15 +93,15 @@ public: * @param obj The pointer to the configDialog to connect signals to. * @param result A list with AccountInput which is used to reconstruct the configuration. */ - virtual void configFields( QPtrVector< QWidget >* vector, const QObject* obj, QPtrList< AccountInput >* result ) const; + virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject* obj, TQPtrList< AccountInput >* result ) const; /** * This function can edit some configuaration option before reading them. */ - virtual void readEntries( QMap< QString, QString >* ) const; + virtual void readEntries( TQMap< TQString, TQString >* ) const; /** * This function can edit some configuaration option before writing them. */ - virtual void writeEntries( QMap< QString, QString >* ) const; + virtual void writeEntries( TQMap< TQString, TQString >* ) const; //Functions that return a derived class. //This way, no explicit cast is needed diff --git a/korn/dcopdrop.cpp b/korn/dcopdrop.cpp index 906f268de..407a6ff06 100644 --- a/korn/dcopdrop.cpp +++ b/korn/dcopdrop.cpp @@ -26,16 +26,16 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include DCOPDrop::DCOPDrop() : KMailDrop(), _isRunning( false ), - _msgList( new QMap< int, KornMailSubject* > ), - _name( new QString( "" ) ), + _msgList( new TQMap< int, KornMailSubject* > ), + _name( new TQString( "" ) ), _counter( 1 ), _interface( 0 ) { @@ -72,7 +72,7 @@ bool DCOPDrop::readConfigGroup( const KConfigGroup &cfg ) return KMailDrop::readConfigGroup( cfg ); } -bool DCOPDrop::readConfigGroup( const QMap< QString, QString > &map, const Protocol * ) +bool DCOPDrop::readConfigGroup( const TQMap< TQString, TQString > &map, const Protocol * ) { if( !map.contains( "dcopname" ) ) //The mapping MUST contain dcopname. @@ -93,12 +93,12 @@ bool DCOPDrop::writeConfigGroup( KConfigBase& cfg ) const return true; } -QString DCOPDrop::type() const +TQString DCOPDrop::type() const { - return QString( "dcop" ); + return TQString( "dcop" ); } -QValueVector< KornMailSubject >* DCOPDrop::doReadSubjects( bool * ) +TQValueVector< KornMailSubject >* DCOPDrop::doReadSubjects( bool * ) { emit readSubjectsTotalSteps( 1 ); @@ -106,19 +106,19 @@ QValueVector< KornMailSubject >* DCOPDrop::doReadSubjects( bool * ) * This way, the function is really asynchrone. * So, the return value arraves before any data arrives. */ - QTimer::singleShot( 1, this, SLOT( doReadSubjectsASync( void ) ) ); + TQTimer::singleShot( 1, this, TQT_SLOT( doReadSubjectsASync( void ) ) ); /* - * A empty QValueVector is made here. + * A empty TQValueVector is made here. * After that, the size is expanded to the expected number of subjects. * This way, reallocation of memmory is minimized, and thus more efficient. */ - QValueVector *vector = new QValueVector( ); + TQValueVector *vector = new TQValueVector( ); vector->reserve( _msgList->count() ); return vector; } -bool DCOPDrop::deleteMails( QPtrList * ids, bool * ) +bool DCOPDrop::deleteMails( TQPtrList * ids, bool * ) { emit deleteMailsTotalSteps( 1 ); @@ -137,7 +137,7 @@ bool DCOPDrop::deleteMails( QPtrList * ids, bool * ) void DCOPDrop::eraseList( void ) { - QMap::iterator it; + TQMap::iterator it; for( it = _msgList->begin(); it != _msgList->end(); ++it ) delete it.data(); _msgList->clear(); @@ -145,24 +145,24 @@ void DCOPDrop::eraseList( void ) void DCOPDrop::doReadSubjectsASync( void ) { - QMap::iterator it; + TQMap::iterator it; for( it = _msgList->begin(); it != _msgList->end(); ++it ) emit readSubject( new KornMailSubject( *it.data() ) ); emit readSubjectsProgress( 1 ); emit readSubjectsReady( true ); } -int DCOPDrop::addMessage( const QString& subject, const QString& message ) +int DCOPDrop::addMessage( const TQString& subject, const TQString& message ) { KornIntId *id = new KornIntId( _counter ); KornMailSubject *mailsubject = new KornMailSubject( id, this ); ++_counter; mailsubject->setSubject( subject ); - mailsubject->setSender( QString( "DCOP: %1" ).arg( *_name ) ); + mailsubject->setSender( TQString( "DCOP: %1" ).arg( *_name ) ); mailsubject->setHeader( message, true ); mailsubject->setSize( message.length() ); - mailsubject->setDate( QDateTime::currentDateTime().toTime_t() ); + mailsubject->setDate( TQDateTime::currentDateTime().toTime_t() ); _msgList->insert( id->getId(), mailsubject ); @@ -184,12 +184,12 @@ bool DCOPDrop::removeMessage( int id ) return true; } -QString DCOPDrop::DCOPName() const +TQString DCOPDrop::DCOPName() const { return *_name; } -void DCOPDrop::setDCOPName( const QString& name) +void DCOPDrop::setDCOPName( const TQString& name) { *_name = name; if( _interface ) diff --git a/korn/dcopdrop.h b/korn/dcopdrop.h index 91bc8f98d..32e85066d 100644 --- a/korn/dcopdrop.h +++ b/korn/dcopdrop.h @@ -105,7 +105,7 @@ public: * * @return true is all information is retrieved succesfully. */ - virtual bool readConfigGroup( const QMap< QString, QString > & map, const Protocol * protocol ); + virtual bool readConfigGroup( const TQMap< TQString, TQString > & map, const Protocol * protocol ); /** * This function writes the information to a config group. * @@ -118,7 +118,7 @@ public: * * @return "dcop" */ - virtual QString type() const; + virtual TQString type() const; /** * This function should return true if it uses a synchrone comminucation. @@ -137,9 +137,9 @@ public: /** * This function does reads the subjects. * @param stop A variable which isn't used: only used for synchrone actions - * @return A QValueVector which KornMailSubject* instance for every new mail. + * @return A TQValueVector which KornMailSubject* instance for every new mail. */ - virtual QValueVector< KornMailSubject >* doReadSubjects( bool *stop ); + virtual TQValueVector< KornMailSubject >* doReadSubjects( bool *stop ); /** * This function should return true if it is possible to delete emails. @@ -155,7 +155,7 @@ public: * @param stop Not used: only for synchrone opererations. * @return true if deleting was succesfull */ - virtual bool deleteMails( QPtrList * ids, bool * stop ); + virtual bool deleteMails( TQPtrList * ids, bool * stop ); /** * This function returns true if it is possible to read emails. @@ -168,8 +168,8 @@ public: private: bool _isRunning; - QMap< int, KornMailSubject* > *_msgList; - QString *_name; + TQMap< int, KornMailSubject* > *_msgList; + TQString *_name; int _counter; DCOPDropInterface *_interface; @@ -179,12 +179,12 @@ private slots: void doReadSubjectsASync( void ); public: //accessed by DCOPDropInterface - int addMessage( const QString& subject, const QString& message ); + int addMessage( const TQString& subject, const TQString& message ); bool removeMessage( int id ); //accessed by DCOPDropCfg - QString DCOPName() const; - void setDCOPName( const QString& ); + TQString DCOPName() const; + void setDCOPName( const TQString& ); }; #endif diff --git a/korn/dcopdropif.cpp b/korn/dcopdropif.cpp index 709161451..94c16ca21 100644 --- a/korn/dcopdropif.cpp +++ b/korn/dcopdropif.cpp @@ -30,12 +30,12 @@ DCOPDropInterface::~DCOPDropInterface() { } -void DCOPDropInterface::changeName( const QString& name ) +void DCOPDropInterface::changeName( const TQString& name ) { this->setObjId( name.utf8() ); } -int DCOPDropInterface::addMessage( const QString& subject, const QString& message ) +int DCOPDropInterface::addMessage( const TQString& subject, const TQString& message ) { return _drop->addMessage( subject, message ); } diff --git a/korn/dcopdropif.h b/korn/dcopdropif.h index a041ab059..9e755ac69 100644 --- a/korn/dcopdropif.h +++ b/korn/dcopdropif.h @@ -46,7 +46,7 @@ public: * * @param name The new name of this dcop interface. */ - void changeName( const QString& name ); + void changeName( const TQString& name ); k_dcop: /** * This function adds a message to list of new messages. @@ -55,7 +55,7 @@ k_dcop: * @param message The body of the message * @return The id which this message got */ - int addMessage( const QString& subject, const QString& message ); + int addMessage( const TQString& subject, const TQString& message ); /** * This function removes a message from the list of new messages. * diff --git a/korn/dockedcontainer.cpp b/korn/dockedcontainer.cpp index e820c12c5..5e2463886 100644 --- a/korn/dockedcontainer.cpp +++ b/korn/dockedcontainer.cpp @@ -20,7 +20,7 @@ #include "dockeditem.h" -DockedContainer::DockedContainer( QObject * parent, const char * name ) +DockedContainer::DockedContainer( TQObject * parent, const char * name ) : BoxContainer( parent, name ) { } diff --git a/korn/dockedcontainer.h b/korn/dockedcontainer.h index 96216f16f..278de0443 100644 --- a/korn/dockedcontainer.h +++ b/korn/dockedcontainer.h @@ -30,7 +30,7 @@ class BoxContainerItem; class DockedContainer : public BoxContainer { Q_OBJECT public: - DockedContainer( QObject * parent = 0, const char * name = 0 ); + DockedContainer( TQObject * parent = 0, const char * name = 0 ); ~DockedContainer(); protected: diff --git a/korn/dockeditem.cpp b/korn/dockeditem.cpp index 2ec57a4f7..4423e7660 100644 --- a/korn/dockeditem.cpp +++ b/korn/dockeditem.cpp @@ -29,22 +29,22 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include -DockedItem::DockedItem( QWidget * parent, const char * name ) +DockedItem::DockedItem( TQWidget * parent, const char * name ) : BoxContainerItem( parent, name ), _systemtray( new SystemTray( parent, "System tray" ) ) { this->fillKPopupMenu( _systemtray->contextMenu(), _systemtray->actionCollection() ); - connect( _systemtray, SIGNAL( quitSelected() ), kapp, SLOT( quit() ) ); - connect( _systemtray, SIGNAL( mouseButtonPressed( Qt::ButtonState ) ), - this, SLOT( mouseButtonPressed( Qt::ButtonState ) ) ); + connect( _systemtray, TQT_SIGNAL( quitSelected() ), kapp, TQT_SLOT( quit() ) ); + connect( _systemtray, TQT_SIGNAL( mouseButtonPressed( Qt::ButtonState ) ), + this, TQT_SLOT( mouseButtonPressed( Qt::ButtonState ) ) ); } DockedItem::~DockedItem() @@ -69,24 +69,24 @@ void DockedItem::setCount( const int count, const bool newMessages ) drawLabel( _systemtray, count, newMessages ); } -void DockedItem::setTooltip( const QString& tooltip ) +void DockedItem::setTooltip( const TQString& tooltip ) { - QToolTip::add( _systemtray, tooltip ); + TQToolTip::add( _systemtray, tooltip ); } -void DockedItem::slotShowPassivePopup( QPtrList< KornMailSubject >* list, int total, bool date, const QString& name ) +void DockedItem::slotShowPassivePopup( TQPtrList< KornMailSubject >* list, int total, bool date, const TQString& name ) { showPassivePopup( _systemtray, list, total, name, date ); } -void DockedItem::slotShowPassivePopup( const QString& message, const QString& name ) +void DockedItem::slotShowPassivePopup( const TQString& message, const TQString& name ) { KPassivePopup::message( i18n( "Korn - %1/%2" ).arg( objId() ).arg( name ), message, _systemtray, "Passive error message" ); } void DockedItem::doPopup() { - _systemtray->contextMenu()->popup( QCursor::pos() ); + _systemtray->contextMenu()->popup( TQCursor::pos() ); } #include "dockeditem.moc" diff --git a/korn/dockeditem.h b/korn/dockeditem.h index 152fbb2cd..d9a85004d 100644 --- a/korn/dockeditem.h +++ b/korn/dockeditem.h @@ -42,7 +42,7 @@ public: * @param parant The parent window * @param name The name of the QObject's parents. */ - DockedItem( QWidget * parent = 0, const char * name = 0 ); + DockedItem( TQWidget * parent = 0, const char * name = 0 ); /** * Empty destructor; does nothing at the moment */ @@ -74,11 +74,11 @@ public slots: * This function sets the tooltip @p string to a box. * @param string The tooltip to be added. */ - virtual void setTooltip( const QString& string ); + virtual void setTooltip( const TQString& string ); - void slotShowPassivePopup( QPtrList< KornMailSubject >* list, int total, bool date, const QString& ); + void slotShowPassivePopup( TQPtrList< KornMailSubject >* list, int total, bool date, const TQString& ); - void slotShowPassivePopup( const QString& error, const QString& ); + void slotShowPassivePopup( const TQString& error, const TQString& ); protected: /** @@ -87,7 +87,7 @@ protected: virtual void doPopup(); private: - void setAnimIcon( const QString& anim ); + void setAnimIcon( const TQString& anim ); private: SystemTray *_systemtray; diff --git a/korn/hvcontainer.cpp b/korn/hvcontainer.cpp index f0268ba3a..fa815179d 100644 --- a/korn/hvcontainer.cpp +++ b/korn/hvcontainer.cpp @@ -22,16 +22,16 @@ #include -#include +#include -HVContainer::HVContainer( Qt::Orientation orientation, QObject * parent, const char * name ) +HVContainer::HVContainer( Qt::Orientation orientation, TQObject * parent, const char * name ) : BoxContainer( parent, name ), box( 0 ) { if( orientation == Qt::Horizontal ) - box = new QHBox( 0, "hbox" ); + box = new TQHBox( 0, "hbox" ); else - box = new QVBox( 0, "vbox" ); + box = new TQVBox( 0, "vbox" ); } HVContainer::~HVContainer() diff --git a/korn/hvcontainer.h b/korn/hvcontainer.h index 9bae17b28..54a96cd81 100644 --- a/korn/hvcontainer.h +++ b/korn/hvcontainer.h @@ -37,7 +37,7 @@ public: * * @param orientation The orientation of the box: it is a vertical or horizontal box? */ - HVContainer( Qt::Orientation orientation, QObject * parent = 0 , const char * name = 0 ); + HVContainer( Qt::Orientation orientation, TQObject * parent = 0 , const char * name = 0 ); ~HVContainer(); /** @@ -52,7 +52,7 @@ protected: */ virtual BoxContainerItem* newBoxInstance() const; private: - QHBox *box; + TQHBox *box; }; #endif //MK_HVCONTAINER_H diff --git a/korn/hvitem.cpp b/korn/hvitem.cpp index e8cc2483d..7d836da3c 100644 --- a/korn/hvitem.cpp +++ b/korn/hvitem.cpp @@ -27,10 +27,10 @@ #include #include -#include -#include +#include +#include -HVItem::HVItem( QWidget *parent, const char *name ) +HVItem::HVItem( TQWidget *parent, const char *name ) : BoxContainerItem( 0, name ), _label( new Label( parent, "label" ) ), _popup( new KPopupMenu( _label, "popupmenu" ) ), @@ -39,9 +39,9 @@ HVItem::HVItem( QWidget *parent, const char *name ) _popup->insertTitle( kapp->miniIcon(), kapp->caption() ); this->fillKPopupMenu( _popup, _actions ); _popup->insertSeparator(); - KStdAction::quit( kapp, SLOT( quit() ), _actions )->plug( _popup ); + KStdAction::quit( kapp, TQT_SLOT( quit() ), _actions )->plug( _popup ); - connect( _label, SIGNAL( mouseButtonPressed( Qt::ButtonState ) ), this, SLOT( mouseButtonPressed( Qt::ButtonState ) ) ); + connect( _label, TQT_SIGNAL( mouseButtonPressed( Qt::ButtonState ) ), this, TQT_SLOT( mouseButtonPressed( Qt::ButtonState ) ) ); } HVItem::~HVItem() @@ -59,24 +59,24 @@ void HVItem::setCount( const int count, const bool newMessages ) drawLabel( _label, count, newMessages ); } -void HVItem::setTooltip( const QString& string ) +void HVItem::setTooltip( const TQString& string ) { - QToolTip::add( _label, string ); + TQToolTip::add( _label, string ); } -void HVItem::slotShowPassivePopup( QPtrList< KornMailSubject >* list, int total, bool date, const QString& name ) +void HVItem::slotShowPassivePopup( TQPtrList< KornMailSubject >* list, int total, bool date, const TQString& name ) { showPassivePopup( _label, list, total, name, date ); } -void HVItem::slotShowPassivePopup( const QString& errorMessage, const QString& name ) +void HVItem::slotShowPassivePopup( const TQString& errorMessage, const TQString& name ) { - KPassivePopup::message( QString( "korn-%1-%2" ).arg( objId() ).arg( name ), errorMessage, _label, "Passive error message" ); + KPassivePopup::message( TQString( "korn-%1-%2" ).arg( objId() ).arg( name ), errorMessage, _label, "Passive error message" ); } void HVItem::doPopup() { - _popup->popup( QCursor::pos() ); + _popup->popup( TQCursor::pos() ); } #include "hvitem.moc" diff --git a/korn/hvitem.h b/korn/hvitem.h index ced99eb4d..e728846a3 100644 --- a/korn/hvitem.h +++ b/korn/hvitem.h @@ -32,7 +32,7 @@ class Label; class HVItem : public BoxContainerItem { Q_OBJECT public: - HVItem( QWidget *parent = 0, const char *name = 0 ); + HVItem( TQWidget *parent = 0, const char *name = 0 ); ~HVItem(); /** @@ -53,19 +53,19 @@ public slots: * This function sets the tooltip @p string to a box. * @param string The tooltip to be added. */ - virtual void setTooltip( const QString& string ); + virtual void setTooltip( const TQString& string ); /** * This slot triggered when the passive popup is to be shown. It is transported * to BoxContainerItem, but so it is possible to change the arguments. */ - void slotShowPassivePopup( QPtrList< KornMailSubject >* list, int total, bool date, const QString& ); + void slotShowPassivePopup( TQPtrList< KornMailSubject >* list, int total, bool date, const TQString& ); /** * This slot triggered when the passive popup is to be shown. It is transported * to BoxContainerItem, but so it is possible to change the arguments. */ - void slotShowPassivePopup( const QString& errorMessage, const QString& name ); + void slotShowPassivePopup( const TQString& errorMessage, const TQString& name ); /** * Trigered if the popup-menu is to be shown diff --git a/korn/imap_proto.cpp b/korn/imap_proto.cpp index d0be64360..caedb4597 100644 --- a/korn/imap_proto.cpp +++ b/korn/imap_proto.cpp @@ -21,61 +21,61 @@ #include "account_input.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -void Imap_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const +void Imap_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const { groupBoxes->append( "Server" ); groupBoxes->append( "Identity" ); } -void Imap_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject* configDialog, QPtrList< AccountInput > * result ) const +void Imap_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject* configDialog, TQPtrList< AccountInput > * result ) const { - QMap< QString, QString > encrList; + TQMap< TQString, TQString > encrList; encrList.insert( "ssl", i18n( "SSL" ) ); encrList.insert( "tls=auto", i18n( "TLS if possible" ) ); encrList.insert( "tls=on", i18n( "Always TLS" ) ); encrList.insert( "tls=off", i18n( "Never TLS" ) ); - QMap< QString, QString > authList; + TQMap< TQString, TQString > authList; authList.insert( "auth=*", i18n( "Default" ) ); authList.insert( "auth=LOGIN", i18n( "LOGIN" ) ); //Note: LOGIN is an authentication method authList.insert( "auth=ANONTMOUS", i18n( "Anonymous" ) ); //Note: ANONYMOUS is an authentication method authList.insert( "auth=CRAM-MD5", i18n( "CRAM-MD5" ) ); //Note: CRAM-MD5 is an authentication method - result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "Server" ), TextInput::text, "", "server" ) ); - result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "Port" ), 0, 65535, "143", "port" ) ); - result->append( new ComboInput( (QWidget*)vector->at( 0 ), i18n( "Encryption" ), encrList, "tls=auto", "encryption" ) ); - QObject::connect( (QObject*)result->last()->rightWidget(), SIGNAL( activated( int) ), - configDialog, SLOT( slotSSLChanged() ) ); + result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "Server" ), TextInput::text, "", "server" ) ); + result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "Port" ), 0, 65535, "143", "port" ) ); + result->append( new ComboInput( (TQWidget*)vector->at( 0 ), i18n( "Encryption" ), encrList, "tls=auto", "encryption" ) ); + TQObject::connect( (TQObject*)result->last()->rightWidget(), TQT_SIGNAL( activated( int) ), + configDialog, TQT_SLOT( slotSSLChanged() ) ); - result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Username" ), TextInput::text, "", "username" ) ); - result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Mailbox" ), TextInput::text, "INBOX", "mailbox" ) ); - result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Password" ), TextInput::password, "", "password" ) ); - result->append( new CheckboxInput( (QWidget*)vector->at( 1 ), i18n( "Save password" ), "true", "savepassword" ) ); - QObject::connect( (QObject*)result->last()->rightWidget(), SIGNAL( toggled( bool ) ), - (QObject*)result->prev()->rightWidget(), SLOT( setEnabled( bool ) ) ); + result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Username" ), TextInput::text, "", "username" ) ); + result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Mailbox" ), TextInput::text, "INBOX", "mailbox" ) ); + result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Password" ), TextInput::password, "", "password" ) ); + result->append( new CheckboxInput( (TQWidget*)vector->at( 1 ), i18n( "Save password" ), "true", "savepassword" ) ); + TQObject::connect( (TQObject*)result->last()->rightWidget(), TQT_SIGNAL( toggled( bool ) ), + (TQObject*)result->prev()->rightWidget(), TQT_SLOT( setEnabled( bool ) ) ); result->last()->setValue( "false" ); - result->append( new ComboInput( (QWidget*)vector->at( 1 ), i18n( "Authentication" ), authList, "auth=*", "auth" ) ); + result->append( new ComboInput( (TQWidget*)vector->at( 1 ), i18n( "Authentication" ), authList, "auth=*", "auth" ) ); } -void Imap_Protocol::readEntries( QMap< QString, QString >* map, QMap< QString, QString > *metadata ) const +void Imap_Protocol::readEntries( TQMap< TQString, TQString >* map, TQMap< TQString, TQString > *metadata ) const { if( map->contains( "ssl" ) && *map->find( "ssl" ) == "true" ) map->insert( "encryption", "ssl" ); if( metadata->contains( "tls" ) ) - map->insert( "encryption", QString( "tls=%1" ).arg( *metadata->find( "tls" ) ) ); + map->insert( "encryption", TQString( "tls=%1" ).arg( *metadata->find( "tls" ) ) ); if( metadata->contains( "auth" ) ) - map->insert( "auth", QString( "auth=%1" ).arg( *metadata->find( "auth" ) ) ); + map->insert( "auth", TQString( "auth=%1" ).arg( *metadata->find( "auth" ) ) ); } -void Imap_Protocol::writeEntries( QMap< QString, QString >* map ) const +void Imap_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const { - QString metadata; + TQString metadata; if( map->contains( "encryption" ) ) { if( *map->find( "encryption" ) == "ssl" ) diff --git a/korn/imap_proto.h b/korn/imap_proto.h index c4dfc896d..97fb209ad 100644 --- a/korn/imap_proto.h +++ b/korn/imap_proto.h @@ -59,13 +59,13 @@ public: * @param ssl true if ssl is selected. * @return "imaps" if ssl is true, "imap" otherwise */ - virtual QString protocol( bool ssl ) const { return ssl ? "imaps" : "imap"; } + virtual TQString protocol( bool ssl ) const { return ssl ? "imaps" : "imap"; } /** * This name of this protocol: it goed in the configuration under this name. * * @return The name of this protocol: "imap" */ - virtual QString configName() const { return "imap"; } + virtual TQString configName() const { return "imap"; } /** * true, because it is possible to read subjects with imap. * @@ -95,7 +95,7 @@ public: */ virtual unsigned short defaultPort( bool ssl ) const { return ssl ? 993 : 143; } - virtual QStringList authList() const { return QStringList::split( '|', "*|LOGIN|ANONYMOUS|CRAM-MD5", false); } + virtual TQStringList authList() const { return TQStringList::split( '|', "*|LOGIN|ANONYMOUS|CRAM-MD5", false); } //Could not test did, my server don't support other authentication methods. /** @@ -113,7 +113,7 @@ public: * * @param list A list to add the name of groupboxes in. */ - virtual void configFillGroupBoxes( QStringList* list ) const; + virtual void configFillGroupBoxes( TQStringList* list ) const; /** * This function adds elements to the groupbox. * @@ -121,7 +121,7 @@ public: * @param object The object to connect signals to * @param ptrlist A list with object which is filled in this function. The list must already be created. */ - virtual void configFields( QPtrVector< QWidget >* vector, const QObject* object, QPtrList< AccountInput >* ptrlist ) const; + virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject* object, TQPtrList< AccountInput >* ptrlist ) const; /** * This function is used to change the configuration. * In the case, the metadata-key is splitted out, and put in the @p metadata parameter. @@ -129,7 +129,7 @@ public: * @param map The mapping containing the configuration. This object can change in this function. * @param metadata An empty mapping at the begin, a mapping containing metadata at the end. */ - virtual void readEntries( QMap< QString, QString >* map, QMap< QString, QString >* metadata ) const; + virtual void readEntries( TQMap< TQString, TQString >* map, TQMap< TQString, TQString >* metadata ) const; /** * This function edits writeEntry. It merge things back to a metadata-key and adds this * key to the configuration. @@ -137,7 +137,7 @@ public: * @param map The mapping which contains the information to be written to a configuarion file. * the contents of this mapping can change in this function. */ - virtual void writeEntries( QMap< QString, QString >* map ) const; + virtual void writeEntries( TQMap< TQString, TQString >* map ) const; }; #endif diff --git a/korn/imaps_proto.h b/korn/imaps_proto.h index 06b4920bc..00964dab5 100644 --- a/korn/imaps_proto.h +++ b/korn/imaps_proto.h @@ -31,8 +31,8 @@ public: virtual KIO_Protocol * clone() const { return new Imaps_Protocol; } - virtual QString protocol() const { return "imaps"; } - virtual QString configName() const { return "imaps"; } + virtual TQString protocol() const { return "imaps"; } + virtual TQString configName() const { return "imaps"; } virtual unsigned short defaultPort() const { return 993; } }; diff --git a/korn/intid.cpp b/korn/intid.cpp index 060f9c962..4cad2e0b8 100644 --- a/korn/intid.cpp +++ b/korn/intid.cpp @@ -14,9 +14,9 @@ KornIntId::~KornIntId() { } -QString KornIntId::toString() const +TQString KornIntId::toString() const { - return QString("KornIntId, Id: ") + QString::number(_id); + return TQString("KornIntId, Id: ") + TQString::number(_id); } KornMailId * KornIntId::clone() const diff --git a/korn/intid.h b/korn/intid.h index ab4b4d3cc..34a68092e 100644 --- a/korn/intid.h +++ b/korn/intid.h @@ -40,7 +40,7 @@ public: * Return a string representation of this (for debugging purposes only) * @return a string representation */ - virtual QString toString() const; + virtual TQString toString() const; /** * Create an exact copy of this. diff --git a/korn/kconf_update/korn-3-4-config_change.cpp b/korn/kconf_update/korn-3-4-config_change.cpp index f8afa1ff4..08ca732bd 100644 --- a/korn/kconf_update/korn-3-4-config_change.cpp +++ b/korn/kconf_update/korn-3-4-config_change.cpp @@ -16,19 +16,19 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -QString decodeString( const QString &password ) +TQString decodeString( const TQString &password ) { unsigned int i, val; unsigned int len = password.length(); - QString result=""; + TQString result=""; for ( i=0; i < len; i++ ) { val = password[i].latin1() - ' '; @@ -38,7 +38,7 @@ QString decodeString( const QString &password ) return result; } -void printToprint( QTextStream &out, QMap &to_printed, const QString type ) +void printToprint( TQTextStream &out, TQMap &to_printed, const TQString type ) { out << "printToprint( " << type << " )" << endl; @@ -104,26 +104,26 @@ void printToprint( QTextStream &out, QMap &to_printed, const QS int main( int, char** ) { - QString line = QString::null; - QString currentGroup1 = QString::null; - QString currentGroup2 = QString::null; - QString type = QString::null; - QString password = QString::null; - QRegExp interesting_group( "^\\[box-(\\d+)\\]" ); - QRegExp key_value( "^(\\w*)=(.*)$" ); - QValueList tobe_deleted; + TQString line = TQString::null; + TQString currentGroup1 = TQString::null; + TQString currentGroup2 = TQString::null; + TQString type = TQString::null; + TQString password = TQString::null; + TQRegExp interesting_group( "^\\[box-(\\d+)\\]" ); + TQRegExp key_value( "^(\\w*)=(.*)$" ); + TQValueList tobe_deleted; int numboxes = -1; bool isKey = false; - QTextStream in( stdin, IO_ReadOnly ); - QTextStream out( stdout, IO_WriteOnly ); + TQTextStream in( stdin, IO_ReadOnly ); + TQTextStream out( stdout, IO_WriteOnly ); - in.setEncoding( QTextStream::UnicodeUTF8 ); - out.setEncoding( QTextStream::UnicodeUTF8 ); + in.setEncoding( TQTextStream::UnicodeUTF8 ); + out.setEncoding( TQTextStream::UnicodeUTF8 ); - QMap mapping1; - QValueList mapping2; - QMap to_printed; + TQMap mapping1; + TQValueList mapping2; + TQMap to_printed; mapping1.insert( "caption", "name" ); mapping1.insert( "onclick", "command" ); @@ -168,15 +168,15 @@ int main( int, char** ) printToprint( out, to_printed, type ); } - currentGroup1 = QString::null; + currentGroup1 = TQString::null; } if( interesting_group.search( line ) >= 0 ) { if( numboxes > -1 && interesting_group.cap( 1 ).toInt() < numboxes ) { - currentGroup1 = QString( "[korn-%1]" ).arg( interesting_group.cap( 1 ) ); - currentGroup2 = QString( "[korn-%1-0]" ).arg( interesting_group.cap( 1 ) ); + currentGroup1 = TQString( "[korn-%1]" ).arg( interesting_group.cap( 1 ) ); + currentGroup2 = TQString( "[korn-%1-0]" ).arg( interesting_group.cap( 1 ) ); } tobe_deleted.append( line ); continue; @@ -250,8 +250,8 @@ int main( int, char** ) printToprint( out, to_printed, type ); } - QValueList::Iterator it1 = tobe_deleted.begin(); - QValueList::Iterator it1_end = tobe_deleted.end(); + TQValueList::Iterator it1 = tobe_deleted.begin(); + TQValueList::Iterator it1_end = tobe_deleted.end(); for( ; it1 != it1_end; ++it1 ) out << "# DELETEGROUP " << *it1 << endl; diff --git a/korn/keditlistboxman.cpp b/korn/keditlistboxman.cpp index 43cce8318..cab1d777a 100644 --- a/korn/keditlistboxman.cpp +++ b/korn/keditlistboxman.cpp @@ -21,10 +21,10 @@ #include #include -#include -#include +#include +#include -KEditListBoxManager::KEditListBoxManager( QWidget *parent, const char *name, +KEditListBoxManager::KEditListBoxManager( TQWidget *parent, const char *name, bool checkAtEntering, int buttons ) : KEditListBox( parent, name, checkAtEntering, buttons ), _config( 0 ), @@ -35,7 +35,7 @@ KEditListBoxManager::KEditListBoxManager( QWidget *parent, const char *name, init(); } -KEditListBoxManager::KEditListBoxManager( const QString& title, QWidget *parent, +KEditListBoxManager::KEditListBoxManager( const TQString& title, TQWidget *parent, const char *name, bool checkAtEntering, int buttons) : KEditListBox( title, parent, name, checkAtEntering, buttons ), @@ -47,9 +47,9 @@ KEditListBoxManager::KEditListBoxManager( const QString& title, QWidget *parent, init(); } -KEditListBoxManager::KEditListBoxManager( const QString& title, +KEditListBoxManager::KEditListBoxManager( const TQString& title, const KEditListBox::CustomEditor &customEditor, - QWidget *parent, const char *name, + TQWidget *parent, const char *name, bool checkAtEntering, int buttons ) : KEditListBox( title, customEditor, parent, name, checkAtEntering, buttons ), _config( 0 ), @@ -72,23 +72,23 @@ void KEditListBoxManager::setConfig( KConfig* config ) readNames(); } -void KEditListBoxManager::setGroupName( const QString& name ) +void KEditListBoxManager::setGroupName( const TQString& name ) { if( _groupName ) *_groupName = name; else - _groupName = new QString( name ); + _groupName = new TQString( name ); if( _config ) readNames(); } -void KEditListBoxManager::setSubGroupName( const QString& name ) +void KEditListBoxManager::setSubGroupName( const TQString& name ) { if( _subGroupName ) *_subGroupName = name; else - _subGroupName = new QString( name ); + _subGroupName = new TQString( name ); if( _config && _groupName ) readNames(); @@ -96,12 +96,12 @@ void KEditListBoxManager::setSubGroupName( const QString& name ) void KEditListBoxManager::init() { - connect( this, SIGNAL( changed() ), this, SLOT( slotChanged() ) ); - connect( this, SIGNAL( added( const QString& ) ), this, SLOT( slotAdded( const QString& ) ) ); - connect( this, SIGNAL( removed( const QString& ) ), this, SLOT( slotRemoved( const QString& ) ) ); + connect( this, TQT_SIGNAL( changed() ), this, TQT_SLOT( slotChanged() ) ); + connect( this, TQT_SIGNAL( added( const TQString& ) ), this, TQT_SLOT( slotAdded( const TQString& ) ) ); + connect( this, TQT_SIGNAL( removed( const TQString& ) ), this, TQT_SLOT( slotRemoved( const TQString& ) ) ); - connect( this->listBox(), SIGNAL( doubleClicked( QListBoxItem * ) ), this, SLOT( slotActivated( QListBoxItem * ) ) ); - connect( this->listBox(), SIGNAL( returnPressed( QListBoxItem * ) ), this, SLOT( slotActivated( QListBoxItem * ) ) ); + connect( this->listBox(), TQT_SIGNAL( doubleClicked( TQListBoxItem * ) ), this, TQT_SLOT( slotActivated( TQListBoxItem * ) ) ); + connect( this->listBox(), TQT_SIGNAL( returnPressed( TQListBoxItem * ) ), this, TQT_SLOT( slotActivated( TQListBoxItem * ) ) ); } void KEditListBoxManager::readNames() @@ -112,7 +112,7 @@ void KEditListBoxManager::readNames() while( _config->hasGroup( _groupName->arg( number ) ) ) { _config->setGroup( _groupName->arg( number ) ); - this->insertItem( _config->readEntry( "name", QString::null ) ); + this->insertItem( _config->readEntry( "name", TQString::null ) ); ++number; } @@ -140,16 +140,16 @@ void KEditListBoxManager::slotChanged() _config->setGroup( _groupName->arg( this->currentItem() ) ); - if( this->currentItem() > 0 && this->text( this->currentItem() - 1 ) == _config->readEntry( "name", QString::null ) ) + if( this->currentItem() > 0 && this->text( this->currentItem() - 1 ) == _config->readEntry( "name", TQString::null ) ) changeItem( this->currentItem() - 1, this->currentItem() ); //moved down else if( this->currentItem() < this->count() - 1 && - this->text( this->currentItem() + 1 ) == _config->readEntry( "name", QString::null ) ) + this->text( this->currentItem() + 1 ) == _config->readEntry( "name", TQString::null ) ) changeItem( this->currentItem(), this->currentItem() + 1 ); //moved up - else if( this->currentText() != _config->readEntry( "name", QString::null ) ) + else if( this->currentText() != _config->readEntry( "name", TQString::null ) ) changedText(); //changed } -void KEditListBoxManager::slotAdded( const QString& name ) +void KEditListBoxManager::slotAdded( const TQString& name ) { //Update _prevCount _prevCount = this->count(); @@ -167,7 +167,7 @@ void KEditListBoxManager::slotAdded( const QString& name ) emit setDefaults( name, number, _config ); } -void KEditListBoxManager::slotRemoved( const QString& name ) +void KEditListBoxManager::slotRemoved( const TQString& name ) { //Update prevCount _prevCount = this->count(); @@ -186,7 +186,7 @@ void KEditListBoxManager::slotRemoved( const QString& name ) break; } _config->setGroup( _groupName->arg( number ) ); - if( name == _config->readEntry( "name", QString::null ) ) + if( name == _config->readEntry( "name", TQString::null ) ) break; //found ++number; //Try next group @@ -212,7 +212,7 @@ void KEditListBoxManager::slotRemoved( const QString& name ) } } -void KEditListBoxManager::slotActivated( QListBoxItem* item ) +void KEditListBoxManager::slotActivated( TQListBoxItem* item ) { if( item ) emit activated( item->text() ); @@ -220,8 +220,8 @@ void KEditListBoxManager::slotActivated( QListBoxItem* item ) void KEditListBoxManager::moveItem( int src, int dest ) { - QMap *srcList = new QMap; - QMap::iterator it; + TQMap *srcList = new TQMap; + TQMap::iterator it; int subnumber = 0; *srcList = _config->entryMap( _groupName->arg( src ) ); @@ -248,9 +248,9 @@ void KEditListBoxManager::moveItem( int src, int dest ) void KEditListBoxManager::changeItem( int first, int last ) { - QMap *firstList = new QMap; - QMap *lastList = new QMap; - QMap::iterator it; + TQMap *firstList = new TQMap; + TQMap *lastList = new TQMap; + TQMap::iterator it; int subnumber = 0; *firstList = _config->entryMap( _groupName->arg( first ) ); diff --git a/korn/keditlistboxman.h b/korn/keditlistboxman.h index 6792ee814..ffc2920e7 100644 --- a/korn/keditlistboxman.h +++ b/korn/keditlistboxman.h @@ -35,24 +35,24 @@ class KEditListBoxManager : public KEditListBox { Q_OBJECT public: /** - * Constructor: @see KEditListBoxManager::KEditListBoxManager( const QString&, QWidget, const char * name, bool, int ) + * Constructor: @see KEditListBoxManager::KEditListBoxManager( const TQString&, TQWidget, const char * name, bool, int ) */ - KEditListBoxManager( QWidget *parent = 0, const char *name = 0, + KEditListBoxManager( TQWidget *parent = 0, const char *name = 0, bool checkAtEntering=true, int buttons = All ); /** * The save as above, but with other options for KEditListBox. */ - KEditListBoxManager( const QString& title, QWidget *parent = 0, + KEditListBoxManager( const TQString& title, TQWidget *parent = 0, const char *name = 0, bool checkAtEntering=true, int buttons = All ); /** * The save as above, but with other options for KEditListBox. */ - KEditListBoxManager( const QString& title, + KEditListBoxManager( const TQString& title, const KEditListBox::CustomEditor &customEditor, - QWidget *parent = 0, const char *name = 0, + TQWidget *parent = 0, const char *name = 0, bool checkAtEntering = true, int buttons = All ); /** @@ -71,14 +71,14 @@ public: * It is used for makeing groupnames. * @param name The groupname */ - void setGroupName( const QString& name ); + void setGroupName( const TQString& name ); /** * Sets the subGroupName. subGroupName should contain %1 and %2. * It is used to execute operations on a group and its subgroups. * @param name The groupname */ - void setSubGroupName( const QString& name ); + void setSubGroupName( const TQString& name ); private: /** * This functions is called from and only from the constructor to prevent writing the @@ -92,17 +92,17 @@ private: void readNames(); private: KConfig *_config; //Stores the KConfig-object - QString *_groupName; //Stores the groupName string. - QString *_subGroupName; + TQString *_groupName; //Stores the groupName string. + TQString *_subGroupName; int _prevCount; private slots: //These comes directly from the KEditListBox itselfs. void slotChanged(); - void slotAdded( const QString& ); - void slotRemoved( const QString& ); + void slotAdded( const TQString& ); + void slotRemoved( const TQString& ); - void slotActivated( QListBoxItem* ); + void slotActivated( TQListBoxItem* ); private: /** * This private method moves an item. It is called from slotChanged(). @@ -128,7 +128,7 @@ signals: * This signal is emitted when somebody selects an item * @param text The text of the newly selected item. */ - void activated( const QString& text ); + void activated( const TQString& text ); /** * This signal is emitted when defaults have to be set. @@ -137,7 +137,7 @@ signals: * @param index The number of the item. * this config is already in the right group. */ - void setDefaults( const QString& name, const int index, KConfig* config ); + void setDefaults( const TQString& name, const int index, KConfig* config ); void elementsSwapped( int, int ); void elementDeleted( int ); diff --git a/korn/kio.cpp b/korn/kio.cpp index 4677c81cf..8015595c0 100644 --- a/korn/kio.cpp +++ b/korn/kio.cpp @@ -46,10 +46,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -109,7 +109,7 @@ KKioDrop::KKioDrop() //This class can delete mails. _delete = new KIO_Delete( this, "kio_delete" ); - _mailurls = new QValueList; + _mailurls = new TQValueList; } KKioDrop::KKioDrop( KConfigGroup* ) @@ -147,21 +147,21 @@ KKioDrop::KKioDrop( KConfigGroup* ) //This class can delete mails. _delete = new KIO_Delete( this, "kio_delete" ); - _mailurls = new QValueList; + _mailurls = new TQValueList; //readConfigGroup( *config ); } -void KKioDrop::setKioServer( const QString & proto, const QString & server, int port ) +void KKioDrop::setKioServer( const TQString & proto, const TQString & server, int port ) { //Settings default for last vars; could not inline because KIO::MetaData-object is not defined in header. setKioServer( proto, server, port, KIO::MetaData(), false, true ); } -void KKioDrop::setKioServer(const QString & proto, const QString & server, int port, const KIO::MetaData metadata, bool ssl, +void KKioDrop::setKioServer(const TQString & proto, const TQString & server, int port, const KIO::MetaData metadata, bool ssl, bool setProtocol ) { - QString auth; + TQString auth; if( port == -1 ) port = _protocol->defaultPort( ssl ); @@ -192,8 +192,8 @@ void KKioDrop::setKioServer(const QString & proto, const QString & server, int p _count->stopActiveCount(); } -void KKioDrop::setUser(const QString & user, const QString & password, - const QString & mailbox, const QString & auth ) +void KKioDrop::setUser(const TQString & user, const TQString & password, + const TQString & mailbox, const TQString & auth ) { _kurl->setUser( user ); _password = password ; @@ -213,12 +213,12 @@ void KKioDrop::setUser(const QString & user, const QString & password, _count->stopActiveCount(); } -QString KKioDrop::protocol() const +TQString KKioDrop::protocol() const { return _protocol->configName(); } -QString KKioDrop::server() const +TQString KKioDrop::server() const { return _kurl->host(); } @@ -227,19 +227,19 @@ int KKioDrop::port() const return _kurl->port(); } -QString KKioDrop::user() const +TQString KKioDrop::user() const { return _kurl->user(); } -QString KKioDrop::password() const +TQString KKioDrop::password() const { return _password ; } -QString KKioDrop::mailbox() const +TQString KKioDrop::mailbox() const { return _kurl->path(); } -QString KKioDrop::auth() const +TQString KKioDrop::auth() const { return ( _metadata->contains("auth")?(*_metadata)["auth"]:"" ); } @@ -287,16 +287,16 @@ bool KKioDrop::canReadSubjects( ) return (_protocol!=0?_protocol->canReadSubjects():false); } -QValueVector * KKioDrop::doReadSubjects(bool * ) +TQValueVector * KKioDrop::doReadSubjects(bool * ) { _subjects->doReadSubjects( this ); /* - * A empty QValueVector is made here. + * A empty TQValueVector is made here. * After that, the size is expanded to the expected number of subjects. * This way, reallocation of memmory is minimized, and thus more efficient. */ - QValueVector *vector = new QValueVector( ); + TQValueVector *vector = new TQValueVector( ); vector->reserve( _mailurls->count() ); return vector; } @@ -306,7 +306,7 @@ bool KKioDrop::canReadMail( ) return (_protocol!=0?_protocol->canReadMail():false); } -bool KKioDrop::deleteMails(QPtrList * ids, bool * /*stop*/) +bool KKioDrop::deleteMails(TQPtrList * ids, bool * /*stop*/) { _delete->deleteMails( ids, this ); return _delete->valid(); @@ -317,7 +317,7 @@ bool KKioDrop::canDeleteMails () return (_protocol!=0?_protocol->canDeleteMail():false); } -QString KKioDrop::readMail(const KornMailId * item, bool * ) +TQString KKioDrop::readMail(const KornMailId * item, bool * ) { _read->readMail( item, this ); @@ -333,9 +333,9 @@ KMailDrop* KKioDrop::clone() const return clone; } -bool KKioDrop::readConfigGroup( const QMap< QString, QString > &map, const Protocol* protocol ) +bool KKioDrop::readConfigGroup( const TQMap< TQString, TQString > &map, const Protocol* protocol ) { - QString val, val2; + TQString val, val2; if( !map.contains( "server" ) || !map.contains( "port" ) || !map.contains( "ssl" ) || !map.contains( "username" ) || !map.contains( "mailbox" ) || !map.contains( "password" ) || !map.contains( "metadata" ) || !map.contains( "name" ) ) @@ -358,8 +358,8 @@ bool KKioDrop::readConfigGroup( const QMap< QString, QString > &map, const Proto _kurl->setPass( *map.find( "password" ) ); - QStringList list = QStringList::split( ',', *map.find( "metadata" ) ); - QStringList::Iterator it; + TQStringList list = TQStringList::split( ',', *map.find( "metadata" ) ); + TQStringList::Iterator it; for( it = list.begin(); it != list.end(); ++it ) { int split = (*it).find( "=" ); @@ -376,7 +376,7 @@ bool KKioDrop::readConfigGroup( const QMap< QString, QString > &map, const Proto bool KKioDrop::writeConfigGroup( KConfigBase& cfg ) const { KPollableDrop::writeConfigGroup( cfg ); - /*QString p; + /*TQString p; if( _kurl->hasPass() ) { p = _kurl->pass(); @@ -429,19 +429,19 @@ void KKioDrop::deleteMailsCanceled() } //Private slots for displaying connection errors -void KKioDrop::slotConnectionError( int number, const QString& arg ) +void KKioDrop::slotConnectionError( int number, const TQString& arg ) { kdError() << KIO::buildErrorString( number, arg ) << endl; // if( passivePopup() ) emitShowPassivePopup( KIO::buildErrorString( number, arg ) ); } -void KKioDrop::slotConnectionWarning( const QString& msg ) +void KKioDrop::slotConnectionWarning( const TQString& msg ) { kdWarning() << msg << endl; } -void KKioDrop::slotConnectionInfoMessage( const QString& msg ) +void KKioDrop::slotConnectionInfoMessage( const TQString& msg ) { kdDebug() << msg << endl; //Display only in debug modes } @@ -466,10 +466,10 @@ bool KKioDrop::startProcess() // only reading stdin yet - connect( _process,SIGNAL(receivedStdout( KProcess *, char *, int)), - this, SLOT(receivedStdout( KProcess *,char *,int)) ); - connect( _process, SIGNAL(processExited(KProcess*)), - this, SLOT(processExit(KProcess*)) ); + connect( _process,TQT_SIGNAL(receivedStdout( KProcess *, char *, int)), + this, TQT_SLOT(receivedStdout( KProcess *,char *,int)) ); + connect( _process, TQT_SIGNAL(processExited(KProcess*)), + this, TQT_SLOT(processExit(KProcess*)) ); *_process << _kurl->path(); _process->start( KProcess::NotifyOnExit, KProcess::Stdout ); @@ -529,8 +529,8 @@ void KKioDrop::receivedStdout( KProcess *proc, char * buffer, int /*len*/ ) delete [] buf;*/ //Alternatieve code - QString buf = buffer; - QRegExp regexp( "^(.*\\D+|\\D*)(\\d+)\\D*$" ); + TQString buf = buffer; + TQRegExp regexp( "^(.*\\D+|\\D*)(\\d+)\\D*$" ); if( regexp.search( buf ) == 0 ) { //Number found diff --git a/korn/kio.h b/korn/kio.h index 8ffde2f4b..a2d396e32 100644 --- a/korn/kio.h +++ b/korn/kio.h @@ -54,7 +54,7 @@ private: KURL *_kurl; KIO::MetaData *_metadata; - QString _password; + TQString _password; bool _valid; @@ -73,10 +73,10 @@ private: //List of mailurls fetched by the last time emails were counted struct FileInfo { - QString name; + TQString name; long size; }; - QValueList *_mailurls; + TQValueList *_mailurls; /* * The help-classes of this functions are friend functions, because this way, they can @@ -108,22 +108,22 @@ public: /** * Set the server that will be checked for new mail. */ - void setKioServer( const QString & proto, const QString & server, int port = -1 ); - void setKioServer( const QString & proto, const QString & server, int port, + void setKioServer( const TQString & proto, const TQString & server, int port = -1 ); + void setKioServer( const TQString & proto, const TQString & server, int port, const KIO::MetaData metadata, bool ssl, bool setProtocol = true ); //Last argument inits _protocol /** Set the account information for the PROTO server. */ - void setUser( const QString & user, const QString & password, const QString & mailbox, const QString & auth ); + void setUser( const TQString & user, const TQString & password, const TQString & mailbox, const TQString & auth ); // The next functions return settings - QString protocol() const; - QString server() const; + TQString protocol() const; + TQString server() const; int port() const; - QString user() const; - QString password() const; - QString mailbox() const; - QString auth() const; + TQString user() const; + TQString password() const; + TQString mailbox() const; + TQString auth() const; virtual void recheck(); virtual void forceRecheck(); @@ -136,18 +136,18 @@ public: virtual ~KKioDrop(); virtual bool canReadSubjects(void); - virtual QValueVector * doReadSubjects(bool * stop); + virtual TQValueVector * doReadSubjects(bool * stop); virtual bool canDeleteMails(); - virtual bool deleteMails(QPtrList * ids, bool * stop); + virtual bool deleteMails(TQPtrList * ids, bool * stop); virtual bool canReadMail (); - virtual QString readMail(const KornMailId * id, bool * stop); + virtual TQString readMail(const KornMailId * id, bool * stop); virtual KMailDrop* clone () const ; - virtual bool readConfigGroup ( const QMap< QString, QString >& map, const Protocol * protocol ); + virtual bool readConfigGroup ( const TQMap< TQString, TQString >& map, const Protocol * protocol ); virtual bool writeConfigGroup ( KConfigBase& cfg ) const; - virtual QString type() const { return QString::fromUtf8("kio"); } + virtual TQString type() const { return TQString::fromUtf8("kio"); } virtual bool synchrone() const { return false; } //class is not synchrone @@ -157,8 +157,8 @@ public: private: KKioDrop& operator = ( const KKioDrop& ); - //static void encrypt( QString& str ); - //static void decrypt( QString& str ); + //static void encrypt( TQString& str ); + //static void decrypt( TQString& str ); /* * The next functions are called from the help-classes (which are friend of the class). @@ -172,22 +172,22 @@ private: void emitReadSubjectsTotalSteps( int value ) { _readSubjectsTotalSteps = value; emit readSubjectsTotalSteps( value ); } void emitReadSubjectsProgress( int value ) { emit readSubjectsProgress( _readSubjectsTotalSteps - value ); } - void emitReadMailReady( QString* msg ) { emit readMailReady( msg ); } + void emitReadMailReady( TQString* msg ) { emit readMailReady( msg ); } void emitDeleteMailsReady( bool value ) { emit deleteMailsReady( value ); } void emitDeleteMailsTotalSteps( int value ) { _deleteMailsTotalSteps = value; emit deleteMailsTotalSteps( value ); } void emitDeleteMailsProgress( int value ) { emit deleteMailsProgress( _deleteMailsTotalSteps - value ); } - void emitShowPassivePopup( QPtrList< KornMailSubject > *subject, int total ) + void emitShowPassivePopup( TQPtrList< KornMailSubject > *subject, int total ) { emit showPassivePopup( subject, total, passiveDate(), this->realName() ); } - void emitShowPassivePopup( const QString& error ) + void emitShowPassivePopup( const TQString& error ) { if( passivePopup() ) { emit showPassivePopup( error, this->realName() ); } } void emitValidChanged() { emit validChanged( valid() ); } private slots: - void slotConnectionError( int, const QString& ); - void slotConnectionWarning( const QString& ); - void slotConnectionInfoMessage( const QString& ); + void slotConnectionError( int, const TQString& ); + void slotConnectionWarning( const TQString& ); + void slotConnectionInfoMessage( const TQString& ); protected: //The next functions are needed for Process; diff --git a/korn/kio_count.cpp b/korn/kio_count.cpp index e82827bb4..d97fa1e92 100644 --- a/korn/kio_count.cpp +++ b/korn/kio_count.cpp @@ -30,12 +30,12 @@ #include #include #include -#include +#include -#include +#include -KIO_Count::KIO_Count( QObject * parent, const char * name ) - : QObject ( parent, name ), +KIO_Count::KIO_Count( TQObject * parent, const char * name ) + : TQObject ( parent, name ), _kurl( 0 ), _metadata( 0 ), _protocol( 0 ), @@ -95,9 +95,9 @@ void KIO_Count::count( KKioDrop *drop ) return; } - connect( _slave, SIGNAL( error( int, const QString& ) ), _kio, SLOT( slotConnectionError( int, const QString& ) ) ); - connect( _slave, SIGNAL( warning( const QString& ) ), _kio, SLOT( slotConnectionWarning( const QString& ) ) ); - connect( _slave, SIGNAL( infoMessage( const QString& ) ), _kio, SLOT( slotConnectionInfoMessage( const QString& ) ) ); + connect( _slave, TQT_SIGNAL( error( int, const TQString& ) ), _kio, TQT_SLOT( slotConnectionError( int, const TQString& ) ) ); + connect( _slave, TQT_SIGNAL( warning( const TQString& ) ), _kio, TQT_SLOT( slotConnectionWarning( const TQString& ) ) ); + connect( _slave, TQT_SIGNAL( infoMessage( const TQString& ) ), _kio, TQT_SLOT( slotConnectionInfoMessage( const TQString& ) ) ); /* * _protocol->recheckConnectKURL could have change kurl and metadata in order to have the right @@ -113,7 +113,7 @@ void KIO_Count::count( KKioDrop *drop ) } /* Blocking this function: no new counts can be started from now */ - _new_mailurls = new QValueList< KKioDrop::FileInfo >; + _new_mailurls = new TQValueList< KKioDrop::FileInfo >; _protocol->recheckKURL( kurl, metadata ); @@ -125,9 +125,9 @@ void KIO_Count::count( KKioDrop *drop ) _job = KIO::listDir( kurl, false ); _job->addMetaData( metadata ); - connect( _job, SIGNAL( result( KIO::Job* ) ), this, SLOT( result( KIO::Job* ) ) ); - connect( _job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), - this, SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) ); + connect( _job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( result( KIO::Job* ) ) ); + connect( _job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), + this, TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) ); if( _protocol->connectionBased() ) KIO::Scheduler::assignJobToSlave( _slave, _job ); @@ -140,9 +140,9 @@ void KIO_Count::stopActiveCount() if( !_new_mailurls ) return; - disconnect( _job, SIGNAL( result( KIO::Job* ) ), this, SLOT( result( KIO::Job* ) ) ); - disconnect( _job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), - this, SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) ); + disconnect( _job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( result( KIO::Job* ) ) ); + disconnect( _job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), + this, TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) ); KIO::Scheduler::cancelJob( _job ); @@ -160,7 +160,7 @@ void KIO_Count::stopActiveCount() delete _new_mailurls; _new_mailurls = 0; } -void KIO_Count::showPassive( const QString& id ) +void KIO_Count::showPassive( const TQString& id ) { KURL kurl = *_kio->_kurl; KIO::MetaData metadata = *_kio->_metadata; @@ -175,8 +175,8 @@ void KIO_Count::showPassive( const QString& id ) _subjects_pending++; - connect( subject, SIGNAL( readSubject( KornMailSubject* ) ), this, SLOT( addtoPassivePopup( KornMailSubject* ) ) ); - connect( subject, SIGNAL( finished( KIO_Single_Subject* ) ), this, SLOT( deleteSingleSubject( KIO_Single_Subject* ) ) ); + connect( subject, TQT_SIGNAL( readSubject( KornMailSubject* ) ), this, TQT_SLOT( addtoPassivePopup( KornMailSubject* ) ) ); + connect( subject, TQT_SIGNAL( finished( KIO_Single_Subject* ) ), this, TQT_SLOT( deleteSingleSubject( KIO_Single_Subject* ) ) ); } void KIO_Count::disconnectSlave() @@ -213,9 +213,9 @@ void KIO_Count::result( KIO::Job* job ) _kio->emitValidChanged(); } - disconnect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( result( KIO::Job* ) ) ); - disconnect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), - this, SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) ); + disconnect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( result( KIO::Job* ) ) ); + disconnect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), + this, TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList& ) ) ); disconnectSlave(); @@ -242,7 +242,7 @@ void KIO_Count::result( KIO::Job* job ) //An file list is ready; now save it in _kio->_mailurls. void KIO_Count::entries( KIO::Job* job, const KIO::UDSEntryList &list ) { - QStringList old_list; + TQStringList old_list; KIO::UDSEntryListConstIterator it1 ; KIO::UDSEntry::ConstIterator it2 ; KIO::MetaData metadata; @@ -253,7 +253,7 @@ void KIO_Count::entries( KIO::Job* job, const KIO::UDSEntryList &list ) if( job != _job ) kdError() << i18n( "Got unknown job; something must be wrong..." ) << endl; - for( QValueListConstIterator it = _kio->_mailurls->begin(); it != _kio->_mailurls->end(); ++it ) + for( TQValueListConstIterator it = _kio->_mailurls->begin(); it != _kio->_mailurls->end(); ++it ) old_list.append( (*it).name ); for ( it1 = list.begin() ; it1 != list.end() ; it1++ ) @@ -264,7 +264,7 @@ void KIO_Count::entries( KIO::Job* job, const KIO::UDSEntryList &list ) */ isFile=false; KKioDrop::FileInfo fileinfo; - fileinfo.name = QString::null; + fileinfo.name = TQString::null; fileinfo.size = 0; for ( it2 = (*it1).begin() ; it2 != (*it1).end() ; it2++ ) @@ -314,7 +314,7 @@ void KIO_Count::addtoPassivePopup( KornMailSubject* subject ) _total_new_messages++; if( _subjects_pending == 0 ) { - _kio->emitShowPassivePopup( dynamic_cast< QPtrList* >( _popup_subjects ), _total_new_messages ); + _kio->emitShowPassivePopup( dynamic_cast< TQPtrList* >( _popup_subjects ), _total_new_messages ); delete _popup_subjects; _popup_subjects = 0; _total_new_messages = 0; diff --git a/korn/kio_count.h b/korn/kio_count.h index c9a1b9f08..ed5ef584d 100644 --- a/korn/kio_count.h +++ b/korn/kio_count.h @@ -21,7 +21,7 @@ //This class count the number of message available. -#include +#include #include "kio.h" //Alsewise, no access to KKioDrop::FileInfo (needed in template) @@ -44,7 +44,7 @@ class QString; class KIO_Count : public QObject { Q_OBJECT public: - KIO_Count( QObject * parent = 0, const char * name = 0 ); + KIO_Count( TQObject * parent = 0, const char * name = 0 ); ~KIO_Count(); //This function starts counting @@ -62,12 +62,12 @@ private: KIO::MetaData *_metadata; const KIO_Protocol *_protocol; bool _valid; - QValueList *_new_mailurls; //entries can come with more function calls. + TQValueList *_new_mailurls; //entries can come with more function calls. int _subjects_pending; int _total_new_messages; SortedMailSubject *_popup_subjects; private: - void showPassive( const QString& ); + void showPassive( const TQString& ); void disconnectSlave(); private slots: diff --git a/korn/kio_delete.cpp b/korn/kio_delete.cpp index 78c2d88ac..db27e28d9 100644 --- a/korn/kio_delete.cpp +++ b/korn/kio_delete.cpp @@ -30,16 +30,16 @@ #include #include -#include +#include -KIO_Delete::KIO_Delete( QObject * parent, const char * name ) : QObject( parent, name ), +KIO_Delete::KIO_Delete( TQObject * parent, const char * name ) : TQObject( parent, name ), _kio( 0 ), _total( 0 ), _jobs( 0 ), _slave( 0 ), _valid( true ) { - _jobs = new QPtrList< KIO::Job >; + _jobs = new TQPtrList< KIO::Job >; } KIO_Delete::~KIO_Delete( ) @@ -48,7 +48,7 @@ KIO_Delete::~KIO_Delete( ) delete _jobs; } -bool KIO_Delete::deleteMails( QPtrList< const KornMailId > * ids, KKioDrop *drop ) +bool KIO_Delete::deleteMails( TQPtrList< const KornMailId > * ids, KKioDrop *drop ) { KURL kurl = *drop->_kurl; KIO::MetaData metadata = *drop->_metadata; @@ -142,7 +142,7 @@ void KIO_Delete::deleteItem( const KornMailId *item, KURL kurl, KIO::MetaData me else return; //Unknown deleteFunction - connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) ); job->addMetaData( metadata ); @@ -161,7 +161,7 @@ void KIO_Delete::commitDelete( KURL kurl, KIO::MetaData metadata, const KIO_Prot KIO::TransferJob *job = KIO::get( kurl, true, false ); job->addMetaData( metadata ); - connect( job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) ); _jobs->append( dynamic_cast< KIO::Job* >( job ) ); diff --git a/korn/kio_delete.h b/korn/kio_delete.h index a22c6f17f..469ff29a2 100644 --- a/korn/kio_delete.h +++ b/korn/kio_delete.h @@ -24,7 +24,7 @@ * This class starts working when deleteMails() is called. */ -#include +#include class KKioDrop; class KIO_Protocol; class KornMailId; @@ -38,11 +38,11 @@ class KIO_Delete : public QObject { Q_OBJECT public: //constructors - KIO_Delete( QObject * parent = 0, const char * name = 0 ); + KIO_Delete( TQObject * parent = 0, const char * name = 0 ); ~KIO_Delete( ); //This function should be called if there are messages to be deleted. - bool deleteMails( QPtrList< const KornMailId > *, KKioDrop* ); + bool deleteMails( TQPtrList< const KornMailId > *, KKioDrop* ); //This function should return false then and only then if an error occurred. bool valid( ) { return _valid; } @@ -61,7 +61,7 @@ private: KKioDrop *_kio; unsigned int _total; - QPtrList< KIO::Job > *_jobs; + TQPtrList< KIO::Job > *_jobs; KIO::Slave *_slave; bool _valid; }; diff --git a/korn/kio_proto.cpp b/korn/kio_proto.cpp index a3de22723..8434fe44b 100644 --- a/korn/kio_proto.cpp +++ b/korn/kio_proto.cpp @@ -22,11 +22,11 @@ #include #include -#include +#include -QMap< QString, QString >* KIO_Protocol::createConfig( KConfigGroup * group, const QString& password ) const +TQMap< TQString, TQString >* KIO_Protocol::createConfig( KConfigGroup * group, const TQString& password ) const { - QMap< QString, QString > *result = new QMap< QString, QString >; + TQMap< TQString, TQString > *result = new TQMap< TQString, TQString >; result->insert( "name", group->readEntry( "name", "" ) ); result->insert( "server", group->readEntry( "server", "" ) ); @@ -41,7 +41,7 @@ QMap< QString, QString >* KIO_Protocol::createConfig( KConfigGroup * group, cons return result; } -void KIO_Protocol::clearFields( QMap *map, const KIO_Protocol::Fields fields ) const +void KIO_Protocol::clearFields( TQMap *map, const KIO_Protocol::Fields fields ) const { if( fields & server ) map->insert( "server", "" ); @@ -59,14 +59,14 @@ void KIO_Protocol::clearFields( QMap *map, const KIO_Protocol: map->insert( "metadata", "" ); } -void KIO_Protocol::readEntries( QMap< QString, QString >* map ) const +void KIO_Protocol::readEntries( TQMap< TQString, TQString >* map ) const { - QMap< QString, QString> *metadata = new QMap< QString, QString >; + TQMap< TQString, TQString> *metadata = new TQMap< TQString, TQString >; if( map->contains( "metadata" ) ) { - QStringList list = QStringList::split( ",", *map->find( "metadata" ) ); - QStringList::Iterator it; + TQStringList list = TQStringList::split( ",", *map->find( "metadata" ) ); + TQStringList::Iterator it; for( it = list.begin(); it != list.end(); ++it ) { int split = (*it).find( '=' ); diff --git a/korn/kio_proto.h b/korn/kio_proto.h index 3770f1209..216b58263 100644 --- a/korn/kio_proto.h +++ b/korn/kio_proto.h @@ -29,7 +29,7 @@ class QString; #include #include -#include +#include #include "protocol.h" #include "kio.h" @@ -58,17 +58,17 @@ public: virtual KMailDrop* createMaildrop( KConfigGroup* config ) const { return new KKioDrop( config ); } - virtual QMap< QString, QString >* createConfig( KConfigGroup *group, const QString& password ) const; + virtual TQMap< TQString, TQString >* createConfig( KConfigGroup *group, const TQString& password ) const; /* * @return: the name of the kio_slave */ - virtual QString protocol( bool ) const { return "file"; } + virtual TQString protocol( bool ) const { return "file"; } /* * @return: the name of the protocol used by the configuration */ - virtual QString configName() const { return "not specified"; } + virtual TQString configName() const { return "not specified"; } virtual bool connectionBased() const { return false; } @@ -94,13 +94,13 @@ public: /* * This sets the string of such fields in Configuration */ - virtual QString serverName() const { return i18n( "Server:" ); } - virtual QString portName() const { return i18n( "Port:" ); } - virtual QString usernameName() const { return i18n( "Username:" ); } - virtual QString mailboxName() const { return i18n( "Mailbox:" ); } - virtual QString passwordName() const { return i18n( "Password:" ); } - virtual QString savePasswordName() const { return i18n( "Save password" ); } - virtual QString authName() const { return i18n( "Authentication:" ); } + virtual TQString serverName() const { return i18n( "Server:" ); } + virtual TQString portName() const { return i18n( "Port:" ); } + virtual TQString usernameName() const { return i18n( "Username:" ); } + virtual TQString mailboxName() const { return i18n( "Mailbox:" ); } + virtual TQString passwordName() const { return i18n( "Password:" ); } + virtual TQString savePasswordName() const { return i18n( "Save password" ); } + virtual TQString authName() const { return i18n( "Authentication:" ); } /* * The next function returns the method of deleting: some protoocols @@ -112,7 +112,7 @@ public: * The next options are the input for the Authentication Combo, seperated by '|'. * The name should be the same as the auth-metadata. */ - virtual QStringList authList() const { return QStringList::split( '|', "Plain", false ); } + virtual TQStringList authList() const { return TQStringList::split( '|', "Plain", false ); } /* * The next functions are manipulations of an KURL. @@ -141,8 +141,8 @@ public: virtual const KIO_Protocol* getKIOProtocol() const { return this; } - virtual void readEntries( QMap< QString, QString >* ) const; - virtual void readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const = 0; + virtual void readEntries( TQMap< TQString, TQString >* ) const; + virtual void readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const = 0; protected: /* @@ -151,7 +151,7 @@ protected: enum Fields { no_fields = 0, server = 1, port = 2, username = 4, password = 8, mailbox = 16, save_password = 32, metadata = 64 }; - void clearFields( QMap< QString, QString > *map, const Fields fields ) const; + void clearFields( TQMap< TQString, TQString > *map, const Fields fields ) const; }; #endif //MK_KIO_PROTO_H diff --git a/korn/kio_read.cpp b/korn/kio_read.cpp index e1f5211e4..54466990c 100644 --- a/korn/kio_read.cpp +++ b/korn/kio_read.cpp @@ -30,11 +30,11 @@ #include #include -#include -#include +#include +#include -KIO_Read::KIO_Read( QObject * parent, const char * name ) - : QObject( parent, name ), +KIO_Read::KIO_Read( TQObject * parent, const char * name ) + : TQObject( parent, name ), _job( 0 ), _message( 0 ) { @@ -60,8 +60,8 @@ void KIO_Read::readMail( const KornMailId *& mailid, KKioDrop* drop ) _job = KIO::get( kurl, false, false ); _job->addMetaData( metadata ); - connect( _job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotResult( KIO::Job* ) ) ); - connect( _job, SIGNAL( data( KIO::Job*, const QByteArray& ) ), this, SLOT( slotData( KIO::Job*, const QByteArray & ) ) ); + connect( _job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) ); + connect( _job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ), this, TQT_SLOT( slotData( KIO::Job*, const TQByteArray & ) ) ); } void KIO_Read::canceled( ) @@ -85,7 +85,7 @@ void KIO_Read::slotResult( KIO::Job* job ) _job = 0; } -void KIO_Read::slotData( KIO::Job* job, const QByteArray & data ) +void KIO_Read::slotData( KIO::Job* job, const TQByteArray & data ) { if( job != _job ) kdWarning() << i18n( "Unknown job returned; I will try if this one will do... " ) << endl; diff --git a/korn/kio_read.h b/korn/kio_read.h index 52dd986ab..970e3c8cc 100644 --- a/korn/kio_read.h +++ b/korn/kio_read.h @@ -21,7 +21,7 @@ //This class should be used if someone wants to read the Full Message -#include +#include class KKioDrop; class KornMailId; @@ -35,7 +35,7 @@ class QString; class KIO_Read : public QObject { Q_OBJECT public: - KIO_Read( QObject * parent = 0, const char * name = 0 ); + KIO_Read( TQObject * parent = 0, const char * name = 0 ); ~KIO_Read(); public slots: @@ -46,15 +46,15 @@ public slots: private: KKioDrop *_kio; KIO::Job *_job; - QString *_message; + TQString *_message; signals: - //This signal is emitted when the whole message is read; the message got passed as QString* - void ready( QString* ); + //This signal is emitted when the whole message is read; the message got passed as TQString* + void ready( TQString* ); private slots: void slotResult( KIO::Job* ); - void slotData( KIO::Job*, const QByteArray& ); + void slotData( KIO::Job*, const TQByteArray& ); }; #endif //MK_KIO_READ_H diff --git a/korn/kio_single_subject.cpp b/korn/kio_single_subject.cpp index cdb70733f..6d797efd8 100644 --- a/korn/kio_single_subject.cpp +++ b/korn/kio_single_subject.cpp @@ -31,19 +31,19 @@ #include #include -#include -#include -#include +#include +#include +#include -KIO_Single_Subject::KIO_Single_Subject( QObject * parent, const char * name, +KIO_Single_Subject::KIO_Single_Subject( TQObject * parent, const char * name, KURL &kurl, KIO::MetaData &metadata, const KIO_Protocol * protocol, KIO::Slave *& slave, - const QString &url, const long size ) - : QObject( parent, name ) + const TQString &url, const long size ) + : TQObject( parent, name ) { _kurl = new KURL( kurl ); _metadata = new KIO::MetaData( metadata ); _protocol = protocol; - _name = new QString( url ); + _name = new TQString( url ); _size = size; _message = new QString; @@ -65,9 +65,9 @@ void KIO_Single_Subject::init( KIO::Slave *& slave) _job = KIO::get( *_kurl, false, false ); _job->addMetaData( *_metadata ); - connect( _job, SIGNAL( result( KIO::Job* ) ), this, SLOT( slotResult( KIO::Job* ) ) ); - connect( _job, SIGNAL( data (KIO::Job *, const QByteArray &) ), - this, SLOT( slotData(KIO::Job *, const QByteArray &) ) ); + connect( _job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( slotResult( KIO::Job* ) ) ); + connect( _job, TQT_SIGNAL( data (KIO::Job *, const TQByteArray &) ), + this, TQT_SLOT( slotData(KIO::Job *, const TQByteArray &) ) ); if( _protocol->connectionBased( ) && slave ) KIO::Scheduler::assignJobToSlave( slave , _job ); @@ -76,15 +76,15 @@ void KIO_Single_Subject::init( KIO::Slave *& slave) } -void KIO_Single_Subject::parseMail( QString * message, KornMailSubject *subject, bool fullMessage ) +void KIO_Single_Subject::parseMail( TQString * message, KornMailSubject *subject, bool fullMessage ) { - QTextStream stream( message, IO_ReadOnly ); - QString line; - QRegExp rx_sender( "^[fF]rom: " ); //Ex: From: ... - QRegExp rx_sender_has_name1( "^[fF]rom:\\s*(\\w+[\\w\\s]*)\\<" ); //Ex: From: A name - QRegExp rx_sender_has_name2( "^[fF]rom:\\s*\\\"\\s*(\\w+[\\w\\s]*)\\\""); //Ex: From: "A name" - QRegExp rx_subject( "^[sS]ubject: " ); //Ex: Subject: ... - QRegExp rx_date ( "^[dD]ate: "); + TQTextStream stream( message, IO_ReadOnly ); + TQString line; + TQRegExp rx_sender( "^[fF]rom: " ); //Ex: From: ... + TQRegExp rx_sender_has_name1( "^[fF]rom:\\s*(\\w+[\\w\\s]*)\\<" ); //Ex: From: A name + TQRegExp rx_sender_has_name2( "^[fF]rom:\\s*\\\"\\s*(\\w+[\\w\\s]*)\\\""); //Ex: From: "A name" + TQRegExp rx_subject( "^[sS]ubject: " ); //Ex: Subject: ... + TQRegExp rx_date ( "^[dD]ate: "); bool inheader = true; int fieldnumber = 0; @@ -122,7 +122,7 @@ void KIO_Single_Subject::parseMail( QString * message, KornMailSubject *subject, subject->setHeader( *message, fullMessage ); } -void KIO_Single_Subject::slotData( KIO::Job* job, const QByteArray& data ) +void KIO_Single_Subject::slotData( KIO::Job* job, const TQByteArray& data ) { if( job != _job ) kdWarning() << i18n( "Got invalid job; something strange happened?" ) << endl; diff --git a/korn/kio_single_subject.h b/korn/kio_single_subject.h index d235680ab..662d2e538 100644 --- a/korn/kio_single_subject.h +++ b/korn/kio_single_subject.h @@ -21,7 +21,7 @@ //This function reads a single subject -#include +#include class KornMailSubject; @@ -31,21 +31,21 @@ class KIO_Protocol; class QString; template class QMemArray; -typedef QMemArray QByteArray; +typedef TQMemArray QByteArray; class KIO_Single_Subject : public QObject { Q_OBJECT public: - KIO_Single_Subject( QObject * parent, const char * name, KURL &, KIO::MetaData &, const KIO_Protocol *, - KIO::Slave *&, const QString &, const long ); + KIO_Single_Subject( TQObject * parent, const char * name, KURL &, KIO::MetaData &, const KIO_Protocol *, + KIO::Slave *&, const TQString &, const long ); ~KIO_Single_Subject( ); //This functions try's te parse EMail; data, sender names and so on... - static void parseMail( QString * message, KornMailSubject *subject, bool ); + static void parseMail( TQString * message, KornMailSubject *subject, bool ); private: - QString *_message; - QString *_name; + TQString *_message; + TQString *_name; KURL *_kurl; const KIO_Protocol *_protocol; KIO::MetaData *_metadata; @@ -56,7 +56,7 @@ private: private slots: void slotResult( KIO::Job* ); - void slotData( KIO::Job*, const QByteArray& ); + void slotData( KIO::Job*, const TQByteArray& ); signals: //This signal is emitted if the headers are read and put into a KornMailSubject* diff --git a/korn/kio_subjects.cpp b/korn/kio_subjects.cpp index ba4278ff8..2de6ac59a 100644 --- a/korn/kio_subjects.cpp +++ b/korn/kio_subjects.cpp @@ -27,17 +27,17 @@ #include #include -#include -#include -#include +#include +#include +#include -KIO_Subjects::KIO_Subjects( QObject * parent, const char * name ) - : QObject( parent, name ), +KIO_Subjects::KIO_Subjects( TQObject * parent, const char * name ) + : TQObject( parent, name ), _protocol( 0 ), _slave( 0 ), _valid( true ) { - _jobs = new QPtrList; + _jobs = new TQPtrList; _kurl = new KURL; _metadata = new KIO::MetaData; @@ -54,8 +54,8 @@ KIO_Subjects::~KIO_Subjects( ) void KIO_Subjects::doReadSubjects( KKioDrop *drop ) { - QValueList::ConstIterator it; - QValueList::ConstIterator end_it = drop->_mailurls->end(); + TQValueList::ConstIterator it; + TQValueList::ConstIterator end_it = drop->_mailurls->end(); _kio = drop; _protocol = _kio->_protocol; @@ -112,7 +112,7 @@ void KIO_Subjects::getConnection( ) } } -void KIO_Subjects::startJob( const QString &name, const long size ) +void KIO_Subjects::startJob( const TQString &name, const long size ) { KURL kurl = *_kurl; KIO::MetaData metadata = *_metadata; @@ -127,8 +127,8 @@ void KIO_Subjects::startJob( const QString &name, const long size ) subject = new KIO_Single_Subject( this, name.latin1(), kurl, metadata, _protocol, _slave, name, size ); - connect( subject, SIGNAL( readSubject( KornMailSubject* ) ), this, SLOT( slotReadSubject( KornMailSubject* ) ) ); - connect( subject, SIGNAL( finished( KIO_Single_Subject* ) ), this, SLOT( slotFinished( KIO_Single_Subject* ) ) ); + connect( subject, TQT_SIGNAL( readSubject( KornMailSubject* ) ), this, TQT_SLOT( slotReadSubject( KornMailSubject* ) ) ); + connect( subject, TQT_SIGNAL( finished( KIO_Single_Subject* ) ), this, TQT_SLOT( slotFinished( KIO_Single_Subject* ) ) ); _jobs->append( subject ); } diff --git a/korn/kio_subjects.h b/korn/kio_subjects.h index c14ff43be..d51e1ec5f 100644 --- a/korn/kio_subjects.h +++ b/korn/kio_subjects.h @@ -21,7 +21,7 @@ //This class calls other class to read all the subjects -#include +#include class KKioDrop; class KIO_Single_Subject; class KIO_Protocol; @@ -37,7 +37,7 @@ template class QValueList; class KIO_Subjects : public QObject { Q_OBJECT public: - KIO_Subjects( QObject * parent, const char * name ); + KIO_Subjects( TQObject * parent, const char * name ); ~KIO_Subjects( ); //This function let it start fetching headers. @@ -51,14 +51,14 @@ private: KURL *_kurl; KIO::MetaData *_metadata; const KIO_Protocol *_protocol; - QPtrList *_jobs; + TQPtrList *_jobs; KIO::Slave *_slave; bool _valid; //Opens a connection. void getConnection( ); //Start a job; the job itself is executed in KIO_Single_Subject - void startJob( const QString&, const long ); + void startJob( const TQString&, const long ); //Disconnect the connection void disConnect( bool ); diff --git a/korn/kmail_proto.cpp b/korn/kmail_proto.cpp index 15b228f39..b0b65233c 100644 --- a/korn/kmail_proto.cpp +++ b/korn/kmail_proto.cpp @@ -28,10 +28,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include const char* KMail_Protocol::kmailGroupName = "Account %1"; const char* KMail_Protocol::kmailKeyType = "Type"; @@ -55,7 +55,7 @@ const Protocol* KMail_Protocol::getProtocol( KConfigGroup* config ) const { KConfig kmailconfig( "kmailrc", true, false ); int id; - QString type = getTypeAndConfig( config->readEntry( "kmailname" ), kmailconfig, id ); + TQString type = getTypeAndConfig( config->readEntry( "kmailname" ), kmailconfig, id ); if( type == "imap" ) return Protocols::getProto( "imap" ); @@ -77,7 +77,7 @@ KMailDrop* KMail_Protocol::createMaildrop( KConfigGroup *config ) const { int id; KConfig kmailconfig( "kmailrc", true, false ); - QString type = getTypeAndConfig( config->readEntry( "kmailname" ), kmailconfig, id ); + TQString type = getTypeAndConfig( config->readEntry( "kmailname" ), kmailconfig, id ); if( type == "imap" || type == "cachedimap" || type == "pop" || type == "local" || type == "maildir" ) return new KKioDrop(); @@ -86,20 +86,20 @@ KMailDrop* KMail_Protocol::createMaildrop( KConfigGroup *config ) const return 0; } -QMap< QString, QString > * KMail_Protocol::createConfig( KConfigGroup* config, const QString& ) const +TQMap< TQString, TQString > * KMail_Protocol::createConfig( KConfigGroup* config, const TQString& ) const { - QMap< QString, QString > *result = new QMap; + TQMap< TQString, TQString > *result = new TQMap; int id; KConfig kmailconfig( "kmailrc", true, false ); //First: find the account in the configuration and get the type and id out of it. - QString type = getTypeAndConfig( config->readEntry( "kmailname" ), kmailconfig, id ); - QString metadata; + TQString type = getTypeAndConfig( config->readEntry( "kmailname" ), kmailconfig, id ); + TQString metadata; if( type == "imap" || type == "cachedimap" ) { //Construct metadata if( kmailconfig.hasKey( "auth" ) ) - metadata += QString( "auth=%1," ).arg( kmailconfig.readEntry( "auth" ) ); + metadata += TQString( "auth=%1," ).arg( kmailconfig.readEntry( "auth" ) ); if( !kmailconfig.hasKey( "use-tls" ) ) metadata += "tls=auto"; else @@ -124,7 +124,7 @@ QMap< QString, QString > * KMail_Protocol::createConfig( KConfigGroup* config, c { //Constructing metadata if( kmailconfig.hasKey( "auth" ) ) - metadata += QString( "auth=%1," ).arg( kmailconfig.readEntry( "auth" ) ); + metadata += TQString( "auth=%1," ).arg( kmailconfig.readEntry( "auth" ) ); if( !kmailconfig.hasKey( "use-tls" ) ) metadata += "tls=auto"; else @@ -172,44 +172,44 @@ QMap< QString, QString > * KMail_Protocol::createConfig( KConfigGroup* config, c return result; } -void KMail_Protocol::configFillGroupBoxes( QStringList* lijst ) const +void KMail_Protocol::configFillGroupBoxes( TQStringList* lijst ) const { lijst->append( "KMail" ); } -void KMail_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* result ) const +void KMail_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* result ) const { - QMap< QString, QString > accountList; - QString type; - QString name; + TQMap< TQString, TQString > accountList; + TQString type; + TQString name; int nummer = kmailFirstGroup - 1; KConfig kmailconfig( "kmailrc", true, false ); - while( kmailconfig.hasGroup( QString( kmailGroupName ).arg( ++nummer ) ) ) + while( kmailconfig.hasGroup( TQString( kmailGroupName ).arg( ++nummer ) ) ) { - kmailconfig.setGroup( QString( kmailGroupName ).arg( nummer ) ); - type = kmailconfig.readEntry( kmailKeyType, QString::null ); - name = kmailconfig.readEntry( kmailKeyName, QString::null ); + kmailconfig.setGroup( TQString( kmailGroupName ).arg( nummer ) ); + type = kmailconfig.readEntry( kmailKeyType, TQString::null ); + name = kmailconfig.readEntry( kmailKeyName, TQString::null ); if( type == "imap" || type == "cachedimap" || type == "pop" || type == "local" ) { accountList.insert( name, name ); } } - result->append( new ComboInput( (QWidget*)vector->at( 0 ), i18n( "KMail name" ), accountList, *accountList.begin(), "kmailname" ) ); + result->append( new ComboInput( (TQWidget*)vector->at( 0 ), i18n( "KMail name" ), accountList, *accountList.begin(), "kmailname" ) ); } -void KMail_Protocol::readEntries( QMap< QString, QString >* ) const +void KMail_Protocol::readEntries( TQMap< TQString, TQString >* ) const { //The configuartion is read out on the right way } -void KMail_Protocol::writeEntries( QMap< QString, QString >* ) const +void KMail_Protocol::writeEntries( TQMap< TQString, TQString >* ) const { //The configuartion is read out on the right way } -QString KMail_Protocol::readPassword( bool store, const KConfigBase& config, int id ) const +TQString KMail_Protocol::readPassword( bool store, const KConfigBase& config, int id ) const { if( !store ) return ""; @@ -217,17 +217,17 @@ QString KMail_Protocol::readPassword( bool store, const KConfigBase& config, int return KOrnPassword::readKMailPassword( id, config ); } -QString KMail_Protocol::getTypeAndConfig( const QString& kmailname, KConfig &kmailconfig, int &id ) const +TQString KMail_Protocol::getTypeAndConfig( const TQString& kmailname, KConfig &kmailconfig, int &id ) const { int nummer = kmailFirstGroup - 1; bool found = false; id = -1; - while( kmailconfig.hasGroup( QString( kmailGroupName ).arg( ++nummer ) ) ) + while( kmailconfig.hasGroup( TQString( kmailGroupName ).arg( ++nummer ) ) ) { - kmailconfig.setGroup( QString( kmailGroupName ).arg( nummer ) ); - if( kmailconfig.readEntry( kmailKeyName, QString::null ) == kmailname ) + kmailconfig.setGroup( TQString( kmailGroupName ).arg( nummer ) ); + if( kmailconfig.readEntry( kmailKeyName, TQString::null ) == kmailname ) { id = kmailconfig.readNumEntry( kmailKeyId, 0 ); found = true; @@ -237,10 +237,10 @@ QString KMail_Protocol::getTypeAndConfig( const QString& kmailname, KConfig &kma if( !found ) { nummer = -1; - return QString::null; + return TQString::null; } //The correct group is found, and kmailconfig.setGroup() is already called for the right group. - return kmailconfig.readEntry( kmailKeyType, QString::null ); + return kmailconfig.readEntry( kmailKeyType, TQString::null ); } diff --git a/korn/kmail_proto.h b/korn/kmail_proto.h index 6e055b406..9a255ad0d 100644 --- a/korn/kmail_proto.h +++ b/korn/kmail_proto.h @@ -67,20 +67,20 @@ public: * @param password The password fetched out of the configuration or KWallet. * @return A mapping containing the configuration if success, and empty mapping otherwise. */ - virtual QMap< QString, QString > * createConfig( KConfigGroup* config, const QString& password ) const; + virtual TQMap< TQString, TQString > * createConfig( KConfigGroup* config, const TQString& password ) const; /** * The name of thes protocol * * @return "kmail" */ - virtual QString configName() const { return "kmail"; } + virtual TQString configName() const { return "kmail"; } /** * This adds the names of the groupboxes neccesairy for configuration to list. * * @param list A empty list at calling; after this function, "KMail" is added, because KMail is the only group here. */ - virtual void configFillGroupBoxes( QStringList* list ) const; + virtual void configFillGroupBoxes( TQStringList* list ) const; /** * This filles the config fields of the configuration. * There is only one config field, containing the accounts of KMail. @@ -89,14 +89,14 @@ public: * @param object An object to connect slots to. * @param result The resulting object. */ - virtual void configFields( QPtrVector< QWidget >* vector, const QObject* object, QPtrList< AccountInput >* result ) const; + virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject* object, TQPtrList< AccountInput >* result ) const; /** * This can manipulate entries that are readed from the configuartion. * This function does nothing here. * * @param config The configuration mapping as read from the configuration file */ - virtual void readEntries( QMap< QString, QString >* config ) const; + virtual void readEntries( TQMap< TQString, TQString >* config ) const; /** * This can manipulate entries that are writed to the configuartion file. @@ -104,11 +104,11 @@ public: * * @param config The configuration mapping as to be written to the configuration file (can be modified) */ - virtual void writeEntries( QMap< QString, QString >* config ) const; + virtual void writeEntries( TQMap< TQString, TQString >* config ) const; private: - QString readPassword( bool store, const KConfigBase &config, int id ) const; - QString getTypeAndConfig( const QString& kmailname, KConfig &config, int &nummer ) const; + TQString readPassword( bool store, const KConfigBase &config, int id ) const; + TQString getTypeAndConfig( const TQString& kmailname, KConfig &config, int &nummer ) const; static const char* kmailGroupName; static const char* kmailKeyName; diff --git a/korn/kornaccountcfgimpl.cpp b/korn/kornaccountcfgimpl.cpp index f4980ca97..43493d998 100644 --- a/korn/kornaccountcfgimpl.cpp +++ b/korn/kornaccountcfgimpl.cpp @@ -29,15 +29,15 @@ #include #include -#include -#include -#include -#include -#include -#include -#include - -KornAccountCfgImpl::KornAccountCfgImpl( QWidget * parent, const char * name ) +#include +#include +#include +#include +#include +#include +#include + +KornAccountCfgImpl::KornAccountCfgImpl( TQWidget * parent, const char * name ) : KornAccountCfg( parent, name ), _config( 0 ), _fields( 0 ), @@ -47,10 +47,10 @@ KornAccountCfgImpl::KornAccountCfgImpl( QWidget * parent, const char * name ) _vlayout( 0 ), _protocolLayout( 0 ), _groupBoxes( 0 ), - _accountinput( new QPtrList< AccountInput >() ) + _accountinput( new TQPtrList< AccountInput >() ) { - connect( parent, SIGNAL( okClicked() ), this, SLOT( slotOK() ) ); - connect( parent, SIGNAL( cancelClicked() ), this, SLOT( slotCancel() ) ); + connect( parent, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOK() ) ); + connect( parent, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( slotCancel() ) ); this->cbProtocol->insertStringList( Protocols::getProtocols() ); @@ -63,7 +63,7 @@ KornAccountCfgImpl::~KornAccountCfgImpl() delete _accountinput; } -void KornAccountCfgImpl::readConfig( KConfigGroup *config, QMap< QString, QString > *entries, int boxnr, int accountnr ) +void KornAccountCfgImpl::readConfig( KConfigGroup *config, TQMap< TQString, TQString > *entries, int boxnr, int accountnr ) { AccountInput *input; @@ -108,8 +108,8 @@ void KornAccountCfgImpl::writeConfig() _config->writeEntry( "protocol", this->cbProtocol->currentText() ); - QMap< QString, QString > *map = new QMap< QString, QString >; - QMap< QString, QString >::ConstIterator it; + TQMap< TQString, TQString > *map = new TQMap< TQString, TQString >; + TQMap< TQString, TQString >::ConstIterator it; for( input = _accountinput->first(); input; input = _accountinput->next() ) map->insert( input->configName(), input->value() ); @@ -149,8 +149,8 @@ void KornAccountCfgImpl::slotSSLChanged() ssl = true; for( input = _accountinput->first(); input; input = _accountinput->next() ) - if( input->configName() == "port" && ( input->value() == QString::number( protocol->defaultPort( !ssl ) ) ) ) - input->setValue( QString::number( protocol->defaultPort( ssl ) ) ); + if( input->configName() == "port" && ( input->value() == TQString::number( protocol->defaultPort( !ssl ) ) ) ) + input->setValue( TQString::number( protocol->defaultPort( ssl ) ) ); } void KornAccountCfgImpl::slotOK() @@ -162,10 +162,10 @@ void KornAccountCfgImpl::slotCancel() { } -void KornAccountCfgImpl::slotProtocolChanged( const QString& proto ) +void KornAccountCfgImpl::slotProtocolChanged( const TQString& proto ) { const Protocol *protocol = Protocols::getProto( proto ); - QStringList *groupBoxes = new QStringList; + TQStringList *groupBoxes = new QStringList; int counter = 1; protocol->configFillGroupBoxes( groupBoxes ); @@ -174,21 +174,21 @@ void KornAccountCfgImpl::slotProtocolChanged( const QString& proto ) delete _groupBoxes; delete _protocolLayout; delete _vlayout; - _vlayout = new QVBoxLayout( this->server_tab, groupBoxes->count() + 1 ); + _vlayout = new TQVBoxLayout( this->server_tab, groupBoxes->count() + 1 ); _vlayout->setSpacing( 10 ); _vlayout->setMargin( 10 ); - _protocolLayout = new QHBoxLayout( _vlayout ); + _protocolLayout = new TQHBoxLayout( _vlayout ); _protocolLayout->addWidget( this->lbProtocol ); _protocolLayout->addWidget( this->cbProtocol ); - QStringList::iterator it; + TQStringList::iterator it; counter = 0; - _groupBoxes = new QPtrVector< QWidget >( groupBoxes->count() ); + _groupBoxes = new TQPtrVector< TQWidget >( groupBoxes->count() ); _groupBoxes->setAutoDelete( true ); for( it = groupBoxes->begin(); it != groupBoxes->end(); ++it ) { - _groupBoxes->insert( counter, new QGroupBox( (*it), this->server_tab, "groupbox" ) ); + _groupBoxes->insert( counter, new TQGroupBox( (*it), this->server_tab, "groupbox" ) ); _vlayout->addWidget( _groupBoxes->at( counter ) ); ++counter; } @@ -200,7 +200,7 @@ void KornAccountCfgImpl::slotProtocolChanged( const QString& proto ) for( unsigned int groupCounter = 0; groupCounter < _groupBoxes->count(); ++groupCounter ) { int counter = 0; - QGridLayout *grid = new QGridLayout( _groupBoxes->at( groupCounter ), 0, 2 ); + TQGridLayout *grid = new TQGridLayout( _groupBoxes->at( groupCounter ), 0, 2 ); grid->setSpacing( 10 ); grid->setMargin( 15 ); for( input = _accountinput->first(); input; input = _accountinput->next() ) diff --git a/korn/kornaccountcfgimpl.h b/korn/kornaccountcfgimpl.h index 1bbb44c3b..bfaf5c517 100644 --- a/korn/kornaccountcfgimpl.h +++ b/korn/kornaccountcfgimpl.h @@ -38,17 +38,17 @@ template< class T > class QPtrVector; class KornAccountCfgImpl : public KornAccountCfg { Q_OBJECT public: - KornAccountCfgImpl( QWidget * parent = 0, const char * name = 0 ); + KornAccountCfgImpl( TQWidget * parent = 0, const char * name = 0 ); ~KornAccountCfgImpl(); - void readConfig( KConfigGroup *config, QMap< QString, QString > *entries, int boxnr, int accountnr ); + void readConfig( KConfigGroup *config, TQMap< TQString, TQString > *entries, int boxnr, int accountnr ); void writeConfig(); public slots: void slotSSLChanged(); protected slots: - virtual void slotProtocolChanged( const QString& ); + virtual void slotProtocolChanged( const TQString& ); private slots: void slotOK(); @@ -59,11 +59,11 @@ private: int _urlfields; int _boxnr, _accountnr; - QVBoxLayout *_vlayout; - QHBoxLayout *_protocolLayout; - QPtrVector< QWidget > *_groupBoxes; + TQVBoxLayout *_vlayout; + TQHBoxLayout *_protocolLayout; + TQPtrVector< TQWidget > *_groupBoxes; - QPtrList< AccountInput > *_accountinput; + TQPtrList< AccountInput > *_accountinput; }; #endif //MK_KORNACCOUNTCFGIMPL_H diff --git a/korn/kornboxcfgimpl.cpp b/korn/kornboxcfgimpl.cpp index 6ab6ce5e0..5667a5f28 100644 --- a/korn/kornboxcfgimpl.cpp +++ b/korn/kornboxcfgimpl.cpp @@ -32,13 +32,13 @@ class KConfig; #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -KornBoxCfgImpl::KornBoxCfgImpl( QWidget * parent, const char * name ) +KornBoxCfgImpl::KornBoxCfgImpl( TQWidget * parent, const char * name ) : KornBoxCfg( parent, name ), _config( 0 ), _base( 0 ), @@ -56,13 +56,13 @@ KornBoxCfgImpl::KornBoxCfgImpl( QWidget * parent, const char * name ) if( lbRight->text() == "Right" ) lbRight->setText( i18n( "Right" ) ); - connect( parent, SIGNAL( okClicked() ), this, SLOT( slotOK() ) ); - connect( parent, SIGNAL( cancelClicked() ), this, SLOT( slotCancel() ) ); + connect( parent, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOK() ) ); + connect( parent, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( slotCancel() ) ); elbAccounts->setTitle( i18n( "Accounts" ) ); - connect( elbAccounts, SIGNAL( elementsSwapped( int, int ) ), this, SLOT( slotAccountsSwapped( int, int ) ) ); - connect( elbAccounts, SIGNAL( elementDeleted( int ) ), this, SLOT( slotAccountDeleted( int ) ) ); + connect( elbAccounts, TQT_SIGNAL( elementsSwapped( int, int ) ), this, TQT_SLOT( slotAccountsSwapped( int, int ) ) ); + connect( elbAccounts, TQT_SIGNAL( elementDeleted( int ) ), this, TQT_SLOT( slotAccountDeleted( int ) ) ); } KornBoxCfgImpl::~KornBoxCfgImpl() @@ -78,7 +78,7 @@ void KornBoxCfgImpl::readConfig( KConfig * config, const int index ) _config = config; _index = index; - _config->setGroup( QString( "korn-%1" ).arg( index ) ); + _config->setGroup( TQString( "korn-%1" ).arg( index ) ); readViewConfig(); readEventConfig(); @@ -88,7 +88,7 @@ void KornBoxCfgImpl::readConfig( KConfig * config, const int index ) void KornBoxCfgImpl::writeConfig( KConfig * config, const int index ) { - config->setGroup( QString( "korn-%1" ).arg( index ) ); + config->setGroup( TQString( "korn-%1" ).arg( index ) ); writeViewConfig( config ); writeEventConfig( config ); @@ -155,7 +155,7 @@ void KornBoxCfgImpl::readEventConfig() void KornBoxCfgImpl::readAccountsConfig() { - elbAccounts->setGroupName( QString( "korn-%1-%2" ).arg( _index ) ); + elbAccounts->setGroupName( TQString( "korn-%1-%2" ).arg( _index ) ); elbAccounts->setConfig( _config ); } @@ -167,7 +167,7 @@ void KornBoxCfgImpl::readDCOPConfig() void KornBoxCfgImpl::writeViewConfig( KConfig* config ) { - QColor invalid; + TQColor invalid; config->writeEntry( "hasnormalfgcolour", this->chNormalText->isChecked() ); config->writeEntry( "normalfgcolour", this->chNormalText->isChecked() ? this->cbNormalText->color() : invalid ); @@ -184,9 +184,9 @@ void KornBoxCfgImpl::writeViewConfig( KConfig* config ) config->writeEntry( "newicon", this->chNewIcon->isChecked() ? this->ibNewIcon->icon() : "" ); config->writeEntry( "hasnormalfont", this->chNormalFont->isChecked() ); - config->writeEntry( "normalfont", this->chNormalFont->isChecked() ? *_fonts[ 0 ] : QFont() ); + config->writeEntry( "normalfont", this->chNormalFont->isChecked() ? *_fonts[ 0 ] : TQFont() ); config->writeEntry( "hasnewfont", this->chNewFont->isChecked() ); - config->writeEntry( "newfont", this->chNewFont->isChecked() ? *_fonts[ 1 ] : QFont() ); + config->writeEntry( "newfont", this->chNewFont->isChecked() ? *_fonts[ 1 ] : TQFont() ); config->writeEntry( "hasnormalanim", this->chNormalAnim->isChecked() ); config->writeEntry( "normalanim", this->chNormalAnim->isChecked() ? *_anims[ 0 ] : "" ); config->writeEntry( "hasnewanim", this->chNewAnim->isChecked() ); @@ -247,12 +247,12 @@ void KornBoxCfgImpl::slotEditBox() _base->setMainWidget( widget ); - connect( _base, SIGNAL( finished() ), this, SLOT( slotDialogDestroyed() ) ); + connect( _base, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotDialogDestroyed() ) ); - _group = new KConfigGroup( _config, QString( "korn-%1-%2" ). + _group = new KConfigGroup( _config, TQString( "korn-%1-%2" ). arg( _index ).arg(elbAccounts->listBox()->currentItem() ) ); - QMap< QString, QString > *map = new QMap< QString, QString >( _config->entryMap( QString( "korn-%1-%2" ). + TQMap< TQString, TQString > *map = new TQMap< TQString, TQString >( _config->entryMap( TQString( "korn-%1-%2" ). arg( _index ).arg(elbAccounts->listBox()->currentItem() ) ) ); widget->readConfig( _group, map, _index, elbAccounts->listBox()->currentItem() ); delete map; @@ -260,7 +260,7 @@ void KornBoxCfgImpl::slotEditBox() _base->show(); } -void KornBoxCfgImpl::slotActivated( const QString& ) +void KornBoxCfgImpl::slotActivated( const TQString& ) { slotEditBox(); } @@ -270,17 +270,17 @@ void KornBoxCfgImpl::slotActivated( const int ) slotEditBox(); } -void KornBoxCfgImpl::slotSetDefaults( const QString& name, const int, KConfig* config ) +void KornBoxCfgImpl::slotSetDefaults( const TQString& name, const int, KConfig* config ) { config->writeEntry( "name", name ); config->writeEntry( "protocol", "mbox" ); - config->writeEntry( "host", QString::null ); - config->writeEntry( "port", QString::null ); - config->writeEntry( "username", QString::null ); + config->writeEntry( "host", TQString::null ); + config->writeEntry( "port", TQString::null ); + config->writeEntry( "username", TQString::null ); config->writeEntry( "mailbox", "/var/spool/mail/" ); config->writeEntry( "savepassword", 0 ); - config->writeEntry( "password", QString::null ); - config->writeEntry( "auth", QString::null ); + config->writeEntry( "password", TQString::null ); + config->writeEntry( "auth", TQString::null ); config->writeEntry( "interval", 300 ); config->writeEntry( "boxsettings", true ); config->writeEntry( "command", "" ); diff --git a/korn/kornboxcfgimpl.h b/korn/kornboxcfgimpl.h index 3a3ea2eec..23b6bf53c 100644 --- a/korn/kornboxcfgimpl.h +++ b/korn/kornboxcfgimpl.h @@ -32,7 +32,7 @@ class QWidget; class KornBoxCfgImpl : public KornBoxCfg { Q_OBJECT public: - KornBoxCfgImpl( QWidget *parent, const char * name ); + KornBoxCfgImpl( TQWidget *parent, const char * name ); ~KornBoxCfgImpl(); /** @@ -66,14 +66,14 @@ private: KConfigGroup *_group; KDialogBase *_base; int _index; - QString *_anims[ 2 ]; - QFont *_fonts[ 2 ]; + TQString *_anims[ 2 ]; + TQFont *_fonts[ 2 ]; protected slots: virtual void slotEditBox(); - virtual void slotActivated( const QString& ); + virtual void slotActivated( const TQString& ); virtual void slotActivated( const int ); - virtual void slotSetDefaults( const QString&, const int, KConfig* ); + virtual void slotSetDefaults( const TQString&, const int, KConfig* ); virtual void slotChangeNormalAnim(); virtual void slotChangeNewAnim(); virtual void slotChangeNormalFont(); diff --git a/korn/korncfgimpl.cpp b/korn/korncfgimpl.cpp index 6860c17e9..ae49765cf 100644 --- a/korn/korncfgimpl.cpp +++ b/korn/korncfgimpl.cpp @@ -27,17 +27,17 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* * parent should be of type KDialogBase */ -KornCfgImpl::KornCfgImpl( QWidget * parent, const char * name ) +KornCfgImpl::KornCfgImpl( TQWidget * parent, const char * name ) : KornCfgWidget( parent, name ), _config( new KConfig( "kornrc" ) ), _base( 0 ) @@ -47,12 +47,12 @@ KornCfgImpl::KornCfgImpl( QWidget * parent, const char * name ) elbBoxes->setConfig( _config ); elbBoxes->setTitle( i18n( "Boxes" ) ); - connect( parent, SIGNAL( okClicked() ), this, SLOT( slotOK() ) ); - connect( parent, SIGNAL( cancelClicked() ), this, SLOT( slotCancel() ) ); - connect( parent, SIGNAL( applyClicked() ), this, SLOT( slotApply() ) ); + connect( parent, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOK() ) ); + connect( parent, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( slotCancel() ) ); + connect( parent, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( slotApply() ) ); - connect( elbBoxes, SIGNAL( elementsSwapped( int, int ) ), this, SLOT( slotElementsSwapped( int, int ) ) ); - connect( elbBoxes, SIGNAL( elementDeleted( int ) ), this, SLOT( slotElementDeleted( int ) ) ); + connect( elbBoxes, TQT_SIGNAL( elementsSwapped( int, int ) ), this, TQT_SLOT( slotElementsSwapped( int, int ) ) ); + connect( elbBoxes, TQT_SIGNAL( elementDeleted( int ) ), this, TQT_SLOT( slotElementDeleted( int ) ) ); readConfig(); } @@ -74,7 +74,7 @@ void KornCfgImpl::slotEditBox() KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, true ); KornBoxCfgImpl *widget = new KornBoxCfgImpl( _base, "Box Widget" ); - connect( _base, SIGNAL( finished() ), this, SLOT( slotDialogDestroyed() ) ); + connect( _base, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotDialogDestroyed() ) ); _base->setMainWidget( widget ); widget->readConfig( _config, elbBoxes->listBox()->currentItem() ); @@ -91,10 +91,10 @@ void KornCfgImpl::slotDialogDestroyed() void KornCfgImpl::slotElementsSwapped( int box1, int box2 ) { int accountnumber1 = 0, accountnumber2 = 0; - while( _config->hasGroup( QString( "korn-%1-%2" ).arg( box1 ).arg( accountnumber1 ) ) ) + while( _config->hasGroup( TQString( "korn-%1-%2" ).arg( box1 ).arg( accountnumber1 ) ) ) ++accountnumber1; - while( _config->hasGroup( QString( "korn-%1-%2" ).arg( box2 ).arg( accountnumber2 ) ) ) + while( _config->hasGroup( TQString( "korn-%1-%2" ).arg( box2 ).arg( accountnumber2 ) ) ) ++accountnumber2; KOrnPassword::swapKOrnWalletPasswords( box1, accountnumber1, box2, accountnumber2 ); @@ -103,14 +103,14 @@ void KornCfgImpl::slotElementsSwapped( int box1, int box2 ) void KornCfgImpl::slotElementDeleted( int box ) { int accountnumber = 0; - while( _config->hasGroup( QString( "korn-%1-%2" ).arg( box ).arg( accountnumber ) ) ) + while( _config->hasGroup( TQString( "korn-%1-%2" ).arg( box ).arg( accountnumber ) ) ) { KOrnPassword::deleteKOrnPassword( box, accountnumber ); ++accountnumber; } } -void KornCfgImpl::slotActivated( const QString& ) +void KornCfgImpl::slotActivated( const TQString& ) { slotEditBox(); } @@ -120,7 +120,7 @@ void KornCfgImpl::slotActivated( const int ) slotEditBox(); } -void KornCfgImpl::slotSetDefaults( const QString& name, const int index, KConfig* config ) +void KornCfgImpl::slotSetDefaults( const TQString& name, const int index, KConfig* config ) { config->writeEntry( "name", name ); config->writeEntry( "hasnormalfgcolour", true ); @@ -133,12 +133,12 @@ void KornCfgImpl::slotSetDefaults( const QString& name, const int index, KConfig config->writeEntry( "hasnewanim", false ); config->writeEntry( "normalfgcolour", Qt::black ); config->writeEntry( "newfgcolour", Qt::black ); - config->writeEntry( "normalbgcolour", QString::null ); - config->writeEntry( "newbgcolour", QString::null ); - config->writeEntry( "normalicon", QString::null ); - config->writeEntry( "newicon", QString::null ); - config->writeEntry( "normalanim", QString::null ); - config->writeEntry( "newanim", QString::null ); + config->writeEntry( "normalbgcolour", TQString::null ); + config->writeEntry( "newbgcolour", TQString::null ); + config->writeEntry( "normalicon", TQString::null ); + config->writeEntry( "newicon", TQString::null ); + config->writeEntry( "normalanim", TQString::null ); + config->writeEntry( "newanim", TQString::null ); config->writeEntry( "leftrecheck", true ); config->writeEntry( "middlerecheck", false ); config->writeEntry( "rightrecheck", false ); @@ -160,17 +160,17 @@ void KornCfgImpl::slotSetDefaults( const QString& name, const int index, KConfig config->writeEntry( "passivepopup", false ); config->writeEntry( "passivedate", false ); config->writeEntry( "numaccounts", 1 ); - config->writeEntry( "dcop", QStringList() ); - config->setGroup( QString( "korn-%1-0" ).arg( index ) ); + config->writeEntry( "dcop", TQStringList() ); + config->setGroup( TQString( "korn-%1-0" ).arg( index ) ); config->writeEntry( "name", name ); config->writeEntry( "protocol", "mbox" ); - config->writeEntry( "server", QString::null ); - config->writeEntry( "port", QString::null ); - config->writeEntry( "username", QString::null ); + config->writeEntry( "server", TQString::null ); + config->writeEntry( "port", TQString::null ); + config->writeEntry( "username", TQString::null ); config->writeEntry( "mailbox", "/var/spool/mail/" ); config->writeEntry( "savepassword", 0 ); - config->writeEntry( "password", QString::null ); - config->writeEntry( "auth", QString::null ); + config->writeEntry( "password", TQString::null ); + config->writeEntry( "auth", TQString::null ); config->writeEntry( "interval", 300 ); config->writeEntry( "boxsettings", true ); config->writeEntry( "command", "" ); @@ -198,10 +198,10 @@ void KornCfgImpl::readConfig() { _config->setGroup( "korn" ); - QChar layout = _config->readEntry( "layout" ).stripWhiteSpace()[0].upper(); - if( layout == QChar( 'H' ) ) + TQChar layout = _config->readEntry( "layout" ).stripWhiteSpace()[0].upper(); + if( layout == TQChar( 'H' ) ) rbHorizontal->setChecked( true ); - else if( layout == QChar( 'V' ) ) + else if( layout == TQChar( 'V' ) ) rbVertical->setChecked( true ); else rbDocked->setChecked( true ); @@ -236,12 +236,12 @@ void KornCfgImpl::rewritePasswords() int account = 0 - 1; KConfigGroup *group; - while( _config->hasGroup( QString( "korn-%1" ).arg( ++box ) ) ) + while( _config->hasGroup( TQString( "korn-%1" ).arg( ++box ) ) ) { account = 0 - 1; - while( _config->hasGroup( QString( "korn-%1-%2" ).arg( box ).arg( ++account ) ) ) + while( _config->hasGroup( TQString( "korn-%1-%2" ).arg( box ).arg( ++account ) ) ) { - group = new KConfigGroup( _config, QString( "korn-%1-%2" ).arg( box ).arg( account ) ); + group = new KConfigGroup( _config, TQString( "korn-%1-%2" ).arg( box ).arg( account ) ); KOrnPassword::rewritePassword( box, account, *group, chUseWallet->isChecked() ); delete group; } diff --git a/korn/korncfgimpl.h b/korn/korncfgimpl.h index fc86a4fad..322ba3d54 100644 --- a/korn/korncfgimpl.h +++ b/korn/korncfgimpl.h @@ -30,7 +30,7 @@ class QString; class KornCfgImpl : public KornCfgWidget { Q_OBJECT public: - KornCfgImpl( QWidget * parent = 0, const char * name = 0 ); + KornCfgImpl( TQWidget * parent = 0, const char * name = 0 ); ~KornCfgImpl(); private slots: @@ -39,9 +39,9 @@ private slots: void slotElementDeleted( int box ); protected slots: virtual void slotEditBox(); - virtual void slotActivated( const QString& ); + virtual void slotActivated( const TQString& ); virtual void slotActivated( const int ); - virtual void slotSetDefaults( const QString&, const int, KConfig* ); + virtual void slotSetDefaults( const TQString&, const int, KConfig* ); public slots: virtual void slotOK(); virtual void slotCancel(); diff --git a/korn/kornshell.cpp b/korn/kornshell.cpp index 3e87ba42f..4fccd0754 100644 --- a/korn/kornshell.cpp +++ b/korn/kornshell.cpp @@ -30,10 +30,10 @@ #include #include -#include +#include -KornShell::KornShell( QWidget * parent, const char * name ) - : QWidget( parent, name ), +KornShell::KornShell( TQWidget * parent, const char * name ) + : TQWidget( parent, name ), _config( new KConfig( "kornrc" ) ), _box( 0 ), _configDialog( 0 ), @@ -43,7 +43,7 @@ KornShell::KornShell( QWidget * parent, const char * name ) if( kapp->isRestored() ) { _config->setGroup( "korn" ); - QTimer::singleShot( _config->readNumEntry( "session_startup_delay", 2000 ), this, SLOT(readConfig()) ); + TQTimer::singleShot( _config->readNumEntry( "session_startup_delay", 2000 ), this, TQT_SLOT(readConfig()) ); kdDebug() << "startup delayed" << endl; } else @@ -84,8 +84,8 @@ void KornShell::optionDlg() KornCfgImpl *widget = new KornCfgImpl( _configDialog, "Configuration widget" ); _configDialog->setMainWidget( widget ); - connect( _configDialog, SIGNAL( finished() ), this, SLOT( slotDialogClosed() ) ); - connect( _configDialog, SIGNAL( applyClicked() ), this, SLOT( slotApply() ) ); + connect( _configDialog, TQT_SIGNAL( finished() ), this, TQT_SLOT( slotDialogClosed() ) ); + connect( _configDialog, TQT_SIGNAL( applyClicked() ), this, TQT_SLOT( slotApply() ) ); _configDialog->show(); } @@ -95,7 +95,7 @@ void KornShell::readConfig() static bool shownConfig = false; _config->setGroup( "korn" ); - QChar layout = _config->readEntry( "layout", "Docked" )[0].upper(); + TQChar layout = _config->readEntry( "layout", "Docked" )[0].upper(); KOrnPassword::setUseWallet( _config->readBoolEntry( "usewallet", false ) ); if( layout == 'H' ) @@ -105,7 +105,7 @@ void KornShell::readConfig() else _box = new DockedContainer( this, "docked container" ); - connect( _box, SIGNAL( showConfiguration() ), this, SLOT( optionDlg() ) ); + connect( _box, TQT_SIGNAL( showConfiguration() ), this, TQT_SLOT( optionDlg() ) ); _box->readConfig( _config ); diff --git a/korn/kornshell.h b/korn/kornshell.h index b999bfed4..1e94173af 100644 --- a/korn/kornshell.h +++ b/korn/kornshell.h @@ -24,7 +24,7 @@ class KDialogBase; class KConfig; -#include +#include /** * This is a rewritten KornShell class. It is rewritten because the depending classes changed. @@ -32,7 +32,7 @@ class KConfig; class KornShell : public QWidget { Q_OBJECT public: - KornShell( QWidget * parent = 0, const char * name = 0 ); + KornShell( TQWidget * parent = 0, const char * name = 0 ); ~KornShell(); void show(); diff --git a/korn/label.h b/korn/label.h index d3c87ae9c..18d4cb298 100644 --- a/korn/label.h +++ b/korn/label.h @@ -19,20 +19,20 @@ #ifndef MK_LABEL_H #define MK_LABEL_H -#include -#include +#include +#include /** - * A simple overriding of the QLabel class to get a mouseButtonPressed() signal + * A simple overriding of the TQLabel class to get a mouseButtonPressed() signal */ class Label : public QLabel { Q_OBJECT public: - Label( QWidget * parent = 0, const char * name = 0 ) : QLabel( parent, name ) {} + Label( TQWidget * parent = 0, const char * name = 0 ) : TQLabel( parent, name ) {} virtual ~Label() {} protected: - virtual void mousePressEvent( QMouseEvent *e ) { emit mouseButtonPressed( e->button() ); } + virtual void mousePressEvent( TQMouseEvent *e ) { emit mouseButtonPressed( e->button() ); } signals: /** * Emitted when a button is pressed. diff --git a/korn/maildir_proto.h b/korn/maildir_proto.h index b3b7ae3a1..2ce5e9dbb 100644 --- a/korn/maildir_proto.h +++ b/korn/maildir_proto.h @@ -33,8 +33,8 @@ public: virtual KIO_Protocol * clone() const { return new Maildir_Protocol; } - virtual QString protocol() const { return "file"; } - virtual QString configName() const { return "maildir"; } + virtual TQString protocol() const { return "file"; } + virtual TQString configName() const { return "maildir"; } virtual bool canReadSubjects() const { return true; } virtual bool canDeleteMail() const { return true; } @@ -44,7 +44,7 @@ public: virtual int fields() const { return server | mailbox; } virtual int urlFields() const { return no_fields; } - virtual QString serverName() const { return i18n( "Path:" ); } + virtual TQString serverName() const { return i18n( "Path:" ); } virtual void recheckKURL( KURL &kurl, KIO::MetaData & ) { kurl.setPath( kurl.host() + "/." + kurl.path().replace( '/' , '.' ) + "/new" ); kurl.setHost( "" ); } diff --git a/korn/maildlg.cpp b/korn/maildlg.cpp index 3e6cd4cce..086796c8a 100644 --- a/korn/maildlg.cpp +++ b/korn/maildlg.cpp @@ -1,24 +1,24 @@ #include "maildlg.h" -#include +#include #include #include -#include +#include #include "mailsubject.h" -#include +#include #include "maildrop.h" -KornMailDlg::KornMailDlg( QWidget *parent ) +KornMailDlg::KornMailDlg( TQWidget *parent ) : KDialogBase( parent, "maildialog", true, i18n("Mail Details"), User1|Close, Close, true, KGuiItem(i18n("&Full Message"))), _progress( 0 ) { - QWidget * page = new QWidget( this ); + TQWidget * page = new TQWidget( this ); setMainWidget(page); - QVBoxLayout * topLayout = new QVBoxLayout( page, 0, spacingHint() ); + TQVBoxLayout * topLayout = new TQVBoxLayout( page, 0, spacingHint() ); _editCtrl = new KEdit(page); topLayout->addWidget(_editCtrl, 10); _editCtrl->setReadOnly(true); - connect(this, SIGNAL(user1Clicked()), this, SLOT(showFullMessage())); - setInitialSize(QSize(QApplication::desktop()->width()*9/10, QApplication::desktop()->height()/2)); + connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(showFullMessage())); + setInitialSize(TQSize(TQApplication::desktop()->width()*9/10, TQApplication::desktop()->height()/2)); } KornMailDlg::~KornMailDlg() @@ -36,7 +36,7 @@ void KornMailDlg::showFullMessage() _loadMailCanceled = false; // create progress dialog - _progress = new QProgressDialog(this, "bla", TRUE); + _progress = new TQProgressDialog(this, "bla", TRUE); _progress->setMinimumDuration(0); _progress->setLabelText(i18n("Loading full mail. Please wait...")); @@ -46,19 +46,19 @@ void KornMailDlg::showFullMessage() qApp->processEvents(); // connect the mailbox with the progress dialog in case it supports progress bars - connect(_mailDrop, SIGNAL(readMailTotalSteps(int)), _progress, SLOT(setTotalSteps(int))); - connect(_mailDrop, SIGNAL(readMailProgress(int)), _progress, SLOT(setProgress(int))); + connect(_mailDrop, TQT_SIGNAL(readMailTotalSteps(int)), _progress, TQT_SLOT(setTotalSteps(int))); + connect(_mailDrop, TQT_SIGNAL(readMailProgress(int)), _progress, TQT_SLOT(setProgress(int))); qApp->processEvents(); // connect the mailbox's cancel button - connect(_progress, SIGNAL(canceled()), this, SLOT(loadMailCanceled())); + connect(_progress, TQT_SIGNAL(canceled()), this, TQT_SLOT(loadMailCanceled())); - connect(_mailDrop, SIGNAL(readMailReady(QString*)), this, SLOT(readMailReady(QString*))); + connect(_mailDrop, TQT_SIGNAL(readMailReady(TQString*)), this, TQT_SLOT(readMailReady(TQString*))); // now load the mail fully if( _mailDrop->synchrone() ) { - QString mail = _mailDrop->readMail(_mailSubject->getId(), &_loadMailCanceled); + TQString mail = _mailDrop->readMail(_mailSubject->getId(), &_loadMailCanceled); readMailReady( &mail ); } else @@ -77,7 +77,7 @@ void KornMailDlg::setMailSubject( KornMailSubject * mailSubject ) enableButton(User1, !_mailSubject->isHeaderFullMessage() && _mailDrop->canReadMail()); } -void KornMailDlg::readMailReady( QString* mail ) +void KornMailDlg::readMailReady( TQString* mail ) { deleteProgress(); @@ -100,7 +100,7 @@ void KornMailDlg::deleteProgress() _progress->setProgress(_progress->totalSteps()); _progress->hide(); - disconnect( _mailDrop, SIGNAL(readMailReady(QString*)), this, SLOT(readMailReady(QString*))); + disconnect( _mailDrop, TQT_SIGNAL(readMailReady(TQString*)), this, TQT_SLOT(readMailReady(TQString*))); delete _progress; _progress = 0; diff --git a/korn/maildlg.h b/korn/maildlg.h index 0d222a706..93bfe0988 100644 --- a/korn/maildlg.h +++ b/korn/maildlg.h @@ -41,13 +41,13 @@ class KornMailDlg : public KDialogBase /** * Progress bar */ - QProgressDialog *_progress; + TQProgressDialog *_progress; public: /** * KornMailDlg Constructor * @param parent parent widget */ - KornMailDlg( QWidget *parent=0 ); + KornMailDlg( TQWidget *parent=0 ); /** * Set the mail details to show. The mails body is transfered to the edit control @@ -76,7 +76,7 @@ private slots: */ void loadMailCanceled(); - void readMailReady( QString* ); + void readMailReady( TQString* ); }; #endif diff --git a/korn/maildrop.cpp b/korn/maildrop.cpp index 7a1dd4443..9d2f12f67 100644 --- a/korn/maildrop.cpp +++ b/korn/maildrop.cpp @@ -6,7 +6,7 @@ */ #include -#include +#include #include #include @@ -37,13 +37,13 @@ KMailDrop::KMailDrop() : _style(Plain), _lastCount(0) { - connect(this, SIGNAL(changed( int, KMailDrop* )), SLOT(setCount( int, KMailDrop* ))); + connect(this, TQT_SIGNAL(changed( int, KMailDrop* )), TQT_SLOT(setCount( int, KMailDrop* ))); - //Set default colours; this prevents black (QColor::invalid) boxes after creating a new box. - _bgColour = QApplication::palette().active().background(); - _fgColour = QApplication::palette().active().text(); - _nbgColour = QApplication::palette().active().background(); - _nfgColour = QApplication::palette().active().text(); + //Set default colours; this prevents black (TQColor::invalid) boxes after creating a new box. + _bgColour = TQApplication::palette().active().background(); + _fgColour = TQApplication::palette().active().text(); + _nbgColour = TQApplication::palette().active().background(); + _nfgColour = TQApplication::palette().active().text(); } KMailDrop::~KMailDrop() @@ -87,10 +87,10 @@ bool KMailDrop::readConfigGroup(const KConfigBase & c) _caption = c.readEntry(fu(CaptionConfigKey)); _clickCmd = c.readPathEntry(fu(ClickConfigKey)); _style = Style(c.readUnsignedNumEntry(fu(DisplayStyleConfigKey), Plain)); - _bgColour = c.readColorEntry(fu(BgColourConfigKey), &QApplication::palette().active().background()); - _fgColour = c.readColorEntry(fu(FgColourConfigKey), &QApplication::palette().active().text()); - _nbgColour = c.readColorEntry(fu(NBgColourConfigKey), &QApplication::palette().active().background()); - _nfgColour = c.readColorEntry(fu(NFgColourConfigKey), &QApplication::palette().active().text()); + _bgColour = c.readColorEntry(fu(BgColourConfigKey), &TQApplication::palette().active().background()); + _fgColour = c.readColorEntry(fu(FgColourConfigKey), &TQApplication::palette().active().text()); + _nbgColour = c.readColorEntry(fu(NBgColourConfigKey), &TQApplication::palette().active().background()); + _nfgColour = c.readColorEntry(fu(NFgColourConfigKey), &TQApplication::palette().active().text()); _icon = c.readEntry(fu(IconConfigKey)); _nIcon = c.readEntry(fu(NewMailIconConfigKey)); _realName = c.readEntry(fu(RealNameConfigKey)); @@ -123,12 +123,12 @@ bool KMailDrop::writeConfigGroup(KConfigBase & c) const return true; } -QValueVector * KMailDrop::doReadSubjects(bool * /*stop*/) +TQValueVector * KMailDrop::doReadSubjects(bool * /*stop*/) { - return new QValueVector(); // empty vector + return new TQValueVector(); // empty vector } -QValueVector * KMailDrop::readSubjects(bool * stop) +TQValueVector * KMailDrop::readSubjects(bool * stop) { // remember timer status bool timerWasRunning = running(); @@ -138,7 +138,7 @@ QValueVector * KMailDrop::readSubjects(bool * stop) stopMonitor(); // read the subjects - QValueVector * result = doReadSubjects(stop); + TQValueVector * result = doReadSubjects(stop); int newcount = result->size(); // if the mail count has changed: notify the button! @@ -154,35 +154,35 @@ QValueVector * KMailDrop::readSubjects(bool * stop) } -bool KMailDrop::deleteMails(QPtrList * /*ids*/, bool * /*stop*/) +bool KMailDrop::deleteMails(TQPtrList * /*ids*/, bool * /*stop*/) { return false; } -QString KMailDrop::readMail(const KornMailId * /*id*/, bool * /*stop*/) +TQString KMailDrop::readMail(const KornMailId * /*id*/, bool * /*stop*/) { return ""; } -void KMailDrop::setCaption(QString s) +void KMailDrop::setCaption(TQString s) { _caption = s; emit(configChanged()); } -void KMailDrop::setClickCmd(QString s) +void KMailDrop::setClickCmd(TQString s) { _clickCmd = s; emit(configChanged()); } -void KMailDrop::setNewMailCmd(QString s) +void KMailDrop::setNewMailCmd(TQString s) { _nMailCmd = s; emit(configChanged()); } -void KMailDrop::setSoundFile(QString s) +void KMailDrop::setSoundFile(TQString s) { _soundFile = s; emit(configChanged()); @@ -194,37 +194,37 @@ void KMailDrop::setDisplayStyle(Style s) emit(configChanged()); } -void KMailDrop::setBgColour(QColor c) +void KMailDrop::setBgColour(TQColor c) { _bgColour = c; emit(configChanged()); } -void KMailDrop::setFgColour(QColor c) +void KMailDrop::setFgColour(TQColor c) { _fgColour = c; emit(configChanged()); } -void KMailDrop::setNewBgColour(QColor c) +void KMailDrop::setNewBgColour(TQColor c) { _nbgColour = c; emit(configChanged()); } -void KMailDrop::setNewFgColour(QColor c) +void KMailDrop::setNewFgColour(TQColor c) { _nfgColour = c; emit(configChanged()); } -void KMailDrop::setIcon(QString s) +void KMailDrop::setIcon(TQString s) { _icon = s; emit(configChanged()); } -void KMailDrop::setNewIcon(QString s) +void KMailDrop::setNewIcon(TQString s) { _nIcon = s; emit(configChanged()); @@ -242,7 +242,7 @@ void KMailDrop::setPassiveDate( bool pd ) emit(configChanged()); } -void KMailDrop::setRealName(QString str) +void KMailDrop::setRealName(TQString str) { _realName = str; } diff --git a/korn/maildrop.h b/korn/maildrop.h index 4bf8f0faa..0c937c626 100644 --- a/korn/maildrop.h +++ b/korn/maildrop.h @@ -5,11 +5,11 @@ #ifndef SSK_MAILDROP_H #define SSK_MAILDROP_H -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include class Protocol; @@ -37,19 +37,19 @@ class KMailDrop : public QObject private: - QString _caption; - QString _clickCmd; - QString _nMailCmd; - QString _soundFile; + TQString _caption; + TQString _clickCmd; + TQString _nMailCmd; + TQString _soundFile; Style _style; - QColor _bgColour; - QColor _fgColour; - QColor _nbgColour; - QColor _nfgColour; - QString _icon; - QString _nIcon; + TQColor _bgColour; + TQColor _fgColour; + TQColor _nbgColour; + TQColor _nfgColour; + TQString _icon; + TQString _nIcon; int _lastCount; - QString _realName; + TQString _realName; bool _passivePopup; bool _passiveDate; @@ -160,7 +160,7 @@ class KMailDrop : public QObject * @return true if read was successful, false otherwise. */ virtual bool readConfigGroup( const KConfigBase& cfg ); - virtual bool readConfigGroup( const QMap< QString, QString > &, const Protocol * ) { return true; } + virtual bool readConfigGroup( const TQMap< TQString, TQString > &, const Protocol * ) { return true; } /** * Write box configuration to a config group. Subclasses that @@ -177,7 +177,7 @@ class KMailDrop : public QObject * configuration purposes. Each concrete subclass should return a * unique identifier. */ - virtual QString type() const = 0; + virtual TQString type() const = 0; /** * Return if the maildrop is synchrone (true) or asynchrone (false). @@ -205,7 +205,7 @@ class KMailDrop : public QObject * terminate before all mail subjects are loaded. * @return all new mails subjects as a vector. */ - virtual QValueVector * readSubjects(bool * stop); + virtual TQValueVector * readSubjects(bool * stop); /** * Read the subjects of all new mails. The concrete subclass has @@ -216,7 +216,7 @@ class KMailDrop : public QObject * terminate before all mail subjects are loaded. * @return all new mails subjects as a vector. */ - virtual QValueVector * doReadSubjects(bool * stop); + virtual TQValueVector * doReadSubjects(bool * stop); /** * Return true if the concrete subclass can delete individual mails. @@ -241,7 +241,7 @@ class KMailDrop : public QObject * the KornMailSubject instances of the remaining mails might be used * further more. */ - virtual bool deleteMails(QPtrList * ids, bool * stop); + virtual bool deleteMails(TQPtrList * ids, bool * stop); /** * Return true if the concrete subclass can load individual mails fully. @@ -260,40 +260,40 @@ class KMailDrop : public QObject * terminate before the mail is loaded. * @return the fully loaded mail (header and body) or "" on error. */ - virtual QString readMail(const KornMailId * id, bool * stop); + virtual TQString readMail(const KornMailId * id, bool * stop); // data that belongs in every monitor - QString caption() const { return _caption; } - QString clickCmd() const { return _clickCmd; } - QString newMailCmd() const { return _nMailCmd; } - QString soundFile() const { return _soundFile;} - QColor bgColour() const { return _bgColour; } - QColor fgColour() const { return _fgColour; } - QColor newBgColour() const { return _nbgColour; } - QColor newFgColour() const { return _nfgColour; } - QString icon() const { return _icon; } - QString newIcon() const { return _nIcon; } + TQString caption() const { return _caption; } + TQString clickCmd() const { return _clickCmd; } + TQString newMailCmd() const { return _nMailCmd; } + TQString soundFile() const { return _soundFile;} + TQColor bgColour() const { return _bgColour; } + TQColor fgColour() const { return _fgColour; } + TQColor newBgColour() const { return _nbgColour; } + TQColor newFgColour() const { return _nfgColour; } + TQString icon() const { return _icon; } + TQString newIcon() const { return _nIcon; } Style displayStyle() const { return _style; } bool passivePopup() const { return _passivePopup; } bool passiveDate() const { return _passiveDate; } - QString realName() const { return _realName; } + TQString realName() const { return _realName; } ; - void setCaption(QString); - void setClickCmd(QString); - void setNewMailCmd(QString); - void setSoundFile(QString); + void setCaption(TQString); + void setClickCmd(TQString); + void setNewMailCmd(TQString); + void setSoundFile(TQString); void setDisplayStyle(Style); - void setBgColour(QColor); - void setFgColour(QColor); - void setNewBgColour(QColor); - void setNewFgColour(QColor); - void setIcon(QString); - void setNewIcon(QString); + void setBgColour(TQColor); + void setFgColour(TQColor); + void setNewBgColour(TQColor); + void setNewFgColour(TQColor); + void setIcon(TQString); + void setNewIcon(TQString); void setResetCounter(int); void setPassivePopup(bool); void setPassiveDate(bool); - void setRealName(QString); + void setRealName(TQString); /** * This is called by the manager when it wishes to delete @@ -361,7 +361,7 @@ signals: * As argument, there is a KornSubject, which contains a subject and * some more info that could be used with the popup. */ - void showPassivePopup( QPtrList< KornMailSubject >*, int, bool, const QString& realname ); + void showPassivePopup( TQPtrList< KornMailSubject >*, int, bool, const TQString& realname ); /** * This signal is emitted when a passive error message should be displayed. @@ -369,7 +369,7 @@ signals: * @param error The error message * @param realName The real name of this object. */ - void showPassivePopup( const QString& error, const QString& realname ); + void showPassivePopup( const TQString& error, const TQString& realname ); /** * readSubjects() might signal readSubject() if @@ -450,7 +450,7 @@ signals: * in asynchrone situations. * @param pointer to the full email-message. */ - void readMailReady( QString* ); + void readMailReady( TQString* ); }; #endif // SSK_MAILDROP_H diff --git a/korn/mailid.h b/korn/mailid.h index d640bfe7f..3ad3af97a 100644 --- a/korn/mailid.h +++ b/korn/mailid.h @@ -1,7 +1,7 @@ #ifndef MailId_h #define MailId_h -#include +#include /** * Abstract base class for mail ids. Concrete mail ids store the id. @@ -20,7 +20,7 @@ public: * Return a string representation of this (for debuggin purposes only) * @return a string representation */ - virtual QString toString() const = 0; + virtual TQString toString() const = 0; /** * Create an exact copy of this. diff --git a/korn/mailsubject.cpp b/korn/mailsubject.cpp index 1f2011a02..d431f4402 100644 --- a/korn/mailsubject.cpp +++ b/korn/mailsubject.cpp @@ -5,8 +5,8 @@ #include #include #include -#include -#include +#include +#include #include KornMailSubject::KornMailSubject() : _id(0), _drop(0), _size(-1), _date(-1), _fullMessage(false) @@ -48,32 +48,32 @@ KornMailSubject::~KornMailSubject() _id = 0; } -QString KornMailSubject::toString() const +TQString KornMailSubject::toString() const { - QDateTime date; + TQDateTime date; date.setTime_t(_date); - return QString("KornMailSubject, Id: ") + (_id?_id->toString():QString("NULL")) + ", " + i18n("Subject:") + " " + _subject - + ", " + i18n("Sender:") + " " + _sender + ", " + i18n("Size:") + " " + QString::number(_size) + return TQString("KornMailSubject, Id: ") + (_id?_id->toString():TQString("NULL")) + ", " + i18n("Subject:") + " " + _subject + + ", " + i18n("Sender:") + " " + _sender + ", " + i18n("Size:") + " " + TQString::number(_size) + ", " + i18n("Date:") + " " + date.toString(Qt::ISODate); } -QString KornMailSubject::decodeRFC2047String(const QCString& aStr) +TQString KornMailSubject::decodeRFC2047String(const TQCString& aStr) { if ( aStr.isEmpty() ) - return QString::null; + return TQString::null; - const QCString str = unfold( aStr ); + const TQCString str = unfold( aStr ); if ( str.isEmpty() ) - return QString::null; + return TQString::null; if ( str.find( "=?" ) < 0 ) { // No need to decode - return QString(str); + return TQString(str); } - QString result; - QCString LWSP_buffer; + TQString result; + TQCString LWSP_buffer; bool lastWasEncodedWord = false; for ( const char * pos = str.data() ; *pos ; ++pos ) { @@ -95,7 +95,7 @@ QString KornMailSubject::decodeRFC2047String(const QCString& aStr) const char * const beg = pos; { // parse charset name - QCString charset; + TQCString charset; int i = 2; pos += 2; for ( ; *pos != '?' && ( *pos==' ' || ispunct(*pos) || isalnum(*pos) ); ++i, ++pos ) { @@ -123,12 +123,12 @@ QString KornMailSubject::decodeRFC2047String(const QCString& aStr) const KMime::Codec * c = KMime::Codec::codecForName( encoding ); kdFatal( !c ) << "No \"" << encoding << "\" codec!?" << endl; - QByteArray in; in.setRawData( enc_start, pos - enc_start ); - const QByteArray enc = c->decode( in ); + TQByteArray in; in.setRawData( enc_start, pos - enc_start ); + const TQByteArray enc = c->decode( in ); in.resetRawData( enc_start, pos - enc_start ); - const QTextCodec * codec = codecForName(charset); - if (!codec) return QString::null; + const TQTextCodec * codec = codecForName(charset); + if (!codec) return TQString::null; result += codec->toUnicode(enc); lastWasEncodedWord = true; @@ -149,12 +149,12 @@ invalid_encoded_word: return result; } -QCString KornMailSubject::unfold( const QCString & header ) +TQCString KornMailSubject::unfold( const TQCString & header ) { if ( header.isEmpty() ) - return QCString(); + return TQCString(); - QCString result( header.size() ); // size() >= length()+1 and size() is O(1) + TQCString result( header.size() ); // size() >= length()+1 and size() is O(1) char * d = result.data(); for ( const char * s = header.data() ; *s ; ) @@ -174,10 +174,10 @@ QCString KornMailSubject::unfold( const QCString & header ) } //----------------------------------------------------------------------------- -const QTextCodec* KornMailSubject::codecForName(const QCString& _str) +const TQTextCodec* KornMailSubject::codecForName(const TQCString& _str) { if (_str.isEmpty()) return 0; - QCString codec = _str; + TQCString codec = _str; return KGlobal::charsets()->codecForName(codec); } diff --git a/korn/mailsubject.h b/korn/mailsubject.h index f3e2e4577..aecd19f5c 100644 --- a/korn/mailsubject.h +++ b/korn/mailsubject.h @@ -69,38 +69,38 @@ public: * Set the mails subject. * @param subject the mails subject. */ - void setSubject(const QString & subject) {_subject = subject;} + void setSubject(const TQString & subject) {_subject = subject;} /** * Return the subject. * @return the subject. */ - const QString & getSubject() const {return _subject;} + const TQString & getSubject() const {return _subject;} /** * Set the mails sender. * @param sender the mails sender. */ - void setSender(const QString & sender) {_sender = sender;} + void setSender(const TQString & sender) {_sender = sender;} /** * Return the sender. * @return the sender. */ - const QString & getSender() const {return _sender;} + const TQString & getSender() const {return _sender;} /** * Set the mails header and (if possible) body. * @param header the mails header with or without body (see fullMessage parameter). * @param fullMessage true, if header contains the message body as well, false otherwise. */ - void setHeader(const QString & header, bool fullMessage) {_header = header; _fullMessage = fullMessage;} + void setHeader(const TQString & header, bool fullMessage) {_header = header; _fullMessage = fullMessage;} /** * Return the header or the full message (if isHeaderFullMessage() is true). * @return the header or the full message. */ - const QString & getHeader() const {return _header;} + const TQString & getHeader() const {return _header;} /** * Return true, if the header contains the header and the full message. @@ -137,7 +137,7 @@ public: * Return a string representation of this (for debugging purposes only) * @return a string representation */ - QString toString() const; + TQString toString() const; /** * Sets the KMailDrop field. @@ -160,12 +160,12 @@ private: /** * Decode a string based on RFC2047 */ - QString decodeRFC2047String(const QCString& aStr); + TQString decodeRFC2047String(const TQCString& aStr); /** * Unfolding a string (basically changing tabs to spaces */ - QCString unfold( const QCString & header ); + TQCString unfold( const TQCString & header ); /** * Returns true if the parameter is a blank (or tab) @@ -181,7 +181,7 @@ private: /** * ?? */ - const QTextCodec* codecForName(const QCString& _str); + const TQTextCodec* codecForName(const TQCString& _str); }; #endif diff --git a/korn/mbox_proto.cpp b/korn/mbox_proto.cpp index 5ee327114..eb53449d0 100644 --- a/korn/mbox_proto.cpp +++ b/korn/mbox_proto.cpp @@ -21,27 +21,27 @@ #include -#include -#include -#include +#include +#include +#include #include "account_input.h" -void MBox_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const +void MBox_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const { groupBoxes->append( "mbox" ); } -void MBox_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput > *result ) const +void MBox_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput > *result ) const { - result->append( new URLInput( (QWidget*)vector->at( 0 ), i18n( "File:" ), "", "mailbox" ) ); + result->append( new URLInput( (TQWidget*)vector->at( 0 ), i18n( "File:" ), "", "mailbox" ) ); } -void MBox_Protocol::readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const +void MBox_Protocol::readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const { } -void MBox_Protocol::writeEntries( QMap< QString, QString >* map ) const +void MBox_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const { clearFields( map, (KIO_Protocol::Fields)( server | port | username | password | save_password | metadata ) ); } diff --git a/korn/mbox_proto.h b/korn/mbox_proto.h index d33ff8944..78b01abfb 100644 --- a/korn/mbox_proto.h +++ b/korn/mbox_proto.h @@ -30,8 +30,8 @@ public: MBox_Protocol() {} virtual ~MBox_Protocol() {} - virtual QString protocol( bool ) const { return "mbox"; } - virtual QString configName() const { return "mbox"; } + virtual TQString protocol( bool ) const { return "mbox"; } + virtual TQString configName() const { return "mbox"; } virtual bool canReadSubjects() const { return true; } virtual bool canDeleteMail() const { return false; } @@ -41,7 +41,7 @@ public: //virtual int fields() const { return no_fields; } //virtual int urlFields() const { return mailbox; } - virtual QString mailboxName() const { return i18n( "File:" ); } + virtual TQString mailboxName() const { return i18n( "File:" ); } virtual void recheckKURL( KURL &, KIO::MetaData & md ) const { md.insert( "onlynew", "" ); md.insert( "savetime", "" ); } @@ -49,10 +49,10 @@ public: virtual void deleteMailKURL( KURL &, KIO::MetaData & ) const { } virtual void readMailKURL( KURL &, KIO::MetaData & ) const { } - virtual void configFillGroupBoxes( QStringList* ) const; - virtual void configFields( QPtrVector< QWidget >*, const QObject*, QPtrList< AccountInput >* ) const; - virtual void readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const; - virtual void writeEntries( QMap< QString, QString >* ) const; + virtual void configFillGroupBoxes( TQStringList* ) const; + virtual void configFields( TQPtrVector< TQWidget >*, const TQObject*, TQPtrList< AccountInput >* ) const; + virtual void readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const; + virtual void writeEntries( TQMap< TQString, TQString >* ) const; }; #endif diff --git a/korn/nntp_proto.cpp b/korn/nntp_proto.cpp index 532ac47a9..bc2f85251 100644 --- a/korn/nntp_proto.cpp +++ b/korn/nntp_proto.cpp @@ -21,36 +21,36 @@ #include "account_input.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -void Nntp_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const +void Nntp_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const { groupBoxes->append( "server" ); groupBoxes->append( "user" ); } -void Nntp_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput > * result ) const +void Nntp_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput > * result ) const { - result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "Server" ), TextInput::text, "", "server" ) ); - result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "Port" ), 0, 65535, "119", "port" ) ); + result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "Server" ), TextInput::text, "", "server" ) ); + result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "Port" ), 0, 65535, "119", "port" ) ); - result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Username" ), TextInput::text, "", "username" ) ); - result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Password" ), TextInput::password, "", "password" ) ); - result->append( new CheckboxInput( (QWidget*)vector->at( 1 ), i18n( "Save password" ), "true", "savepassword" ) ); - QObject::connect( (QObject*)result->last()->rightWidget(), SIGNAL( toggled( bool ) ), - (QObject*)result->prev()->rightWidget(), SLOT( setEnabled( bool ) ) ); + result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Username" ), TextInput::text, "", "username" ) ); + result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Password" ), TextInput::password, "", "password" ) ); + result->append( new CheckboxInput( (TQWidget*)vector->at( 1 ), i18n( "Save password" ), "true", "savepassword" ) ); + TQObject::connect( (TQObject*)result->last()->rightWidget(), TQT_SIGNAL( toggled( bool ) ), + (TQObject*)result->prev()->rightWidget(), TQT_SLOT( setEnabled( bool ) ) ); result->last()->setValue( "false" ); } -void Nntp_Protocol::readEntries( QMap< QString, QString >*, QMap< QString, QString > * ) const +void Nntp_Protocol::readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString > * ) const { } -void Nntp_Protocol::writeEntries( QMap< QString, QString >* map ) const +void Nntp_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const { clearFields( map, (KIO_Protocol::Fields)( KIO_Protocol::mailbox | KIO_Protocol::metadata ) ); } diff --git a/korn/nntp_proto.h b/korn/nntp_proto.h index c32a50b6d..c08c0d078 100644 --- a/korn/nntp_proto.h +++ b/korn/nntp_proto.h @@ -31,8 +31,8 @@ public: virtual bool connectionBased() const { return true; } - virtual QString protocol() const { return "nntp"; } - virtual QString configName() const { return "nntp"; } + virtual TQString protocol() const { return "nntp"; } + virtual TQString configName() const { return "nntp"; } virtual bool canReadSubjects() const { return true; } virtual bool canDeleteMail() const { return false; } @@ -43,10 +43,10 @@ public: //virtual int urlFields() const { return no_fields; } virtual unsigned short defaultPort( bool ) const { return 119; } - virtual void configFillGroupBoxes( QStringList* ) const; - virtual void configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* ) const; - virtual void readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const; - virtual void writeEntries( QMap< QString, QString >* ) const; + virtual void configFillGroupBoxes( TQStringList* ) const; + virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* ) const; + virtual void readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const; + virtual void writeEntries( TQMap< TQString, TQString >* ) const; }; #endif diff --git a/korn/password.cpp b/korn/password.cpp index a3eb76ed9..764b90f98 100644 --- a/korn/password.cpp +++ b/korn/password.cpp @@ -23,16 +23,16 @@ #include #include -#include -#include +#include +#include KWallet::Wallet* KOrnPassword::m_wallet = 0; bool KOrnPassword::m_openFailed = false; bool KOrnPassword::m_useWallet = false; //Not default true until moving works -QString KOrnPassword::readKOrnPassword( int box, int account, const KConfigBase &fallbackConfig ) +TQString KOrnPassword::readKOrnPassword( int box, int account, const KConfigBase &fallbackConfig ) { - QString result; + TQString result; if( readKOrnPassword( box, account, result ) ) return result; @@ -40,9 +40,9 @@ QString KOrnPassword::readKOrnPassword( int box, int account, const KConfigBase return fallbackConfig.readEntry( "password" ); } -QString KOrnPassword::readKMailPassword( int accountnr, const KConfigBase& fallbackConfig ) +TQString KOrnPassword::readKMailPassword( int accountnr, const KConfigBase& fallbackConfig ) { - QString password; + TQString password; open(); if( !m_wallet || !m_wallet->isOpen() || m_openFailed ) @@ -52,13 +52,13 @@ QString KOrnPassword::readKMailPassword( int accountnr, const KConfigBase& fallb return KMailDecrypt( fallbackConfig.readEntry( "pass" )); m_wallet->setFolder( "kmail" ); - if( m_wallet->readPassword( QString( "account-%1" ).arg( accountnr ), password ) != 0 ) + if( m_wallet->readPassword( TQString( "account-%1" ).arg( accountnr ), password ) != 0 ) return fallbackConfig.readEntry( "password" ); return password; } -void KOrnPassword::writeKOrnPassword( int box, int account, KConfigBase& fallbackConfig, const QString& password ) +void KOrnPassword::writeKOrnPassword( int box, int account, KConfigBase& fallbackConfig, const TQString& password ) { if( writeKOrnPassword( box, account, password ) ) { @@ -95,7 +95,7 @@ bool KOrnPassword::deleteKOrnPassword( int box, int account ) m_wallet->setFolder( "korn" ); //Write to wallet - if( m_wallet->removeEntry( QString( "account-%1-%2" ).arg( box ).arg( account ) ) != 0 ) + if( m_wallet->removeEntry( TQString( "account-%1-%2" ).arg( box ).arg( account ) ) != 0 ) //Writing failed return false; @@ -106,7 +106,7 @@ bool KOrnPassword::deleteKOrnPassword( int box, int account ) void KOrnPassword::moveKOrnPassword( int boxSrc, int accountSrc, KConfigBase& configSrc, int boxDest, int accountDest, KConfigBase &configDest ) { - QString password; + TQString password; password = readKOrnPassword( boxSrc, accountSrc, configSrc ); deleteKOrnPassword( boxSrc, accountSrc, configSrc ); @@ -115,7 +115,7 @@ void KOrnPassword::moveKOrnPassword( int boxSrc, int accountSrc, KConfigBase& co void KOrnPassword::swapKOrnPassword( int box1, int account1, KConfigBase &config1, int box2, int account2, KConfigBase &config2 ) { - QString password1, password2; + TQString password1, password2; password1 = readKOrnPassword( box1, account1, config1 ); password2 = readKOrnPassword( box2, account2, config2 ); deleteKOrnPassword( box1, account1, config1 ); @@ -126,7 +126,7 @@ void KOrnPassword::swapKOrnPassword( int box1, int account1, KConfigBase &config void KOrnPassword::swapKOrnWalletPassword( int box1, int account1, int box2, int account2 ) { - QString password1, password2; + TQString password1, password2; bool passExist1, passExist2; passExist1 = readKOrnPassword( box1, account1, password1 ); passExist2 = readKOrnPassword( box2, account2, password2 ); @@ -152,7 +152,7 @@ void KOrnPassword::swapKOrnWalletPasswords( int box1, int accountnumber1 ,int bo void KOrnPassword::rewritePassword( int box, int account, KConfigBase &config, bool newUseWalletValue ) { bool useWallet = m_useWallet; - QString password; + TQString password; setUseWallet( !newUseWalletValue ); password = readKOrnPassword( box, account, config ); @@ -184,7 +184,7 @@ void KOrnPassword::open() m_openFailed = true; } -bool KOrnPassword::readKOrnPassword( int box, int account, QString& password ) +bool KOrnPassword::readKOrnPassword( int box, int account, TQString& password ) { if( !m_useWallet ) return false; @@ -201,7 +201,7 @@ bool KOrnPassword::readKOrnPassword( int box, int account, QString& password ) return false; m_wallet->setFolder( "korn" ); - if( m_wallet->readPassword( QString( "account-%1-%2" ).arg( box ).arg( account ), password ) != 0 ) + if( m_wallet->readPassword( TQString( "account-%1-%2" ).arg( box ).arg( account ), password ) != 0 ) //Error during reading the password: use the one in the config file return false; @@ -209,7 +209,7 @@ bool KOrnPassword::readKOrnPassword( int box, int account, QString& password ) return true; } -bool KOrnPassword::writeKOrnPassword( int box, int account, const QString& password ) +bool KOrnPassword::writeKOrnPassword( int box, int account, const TQString& password ) { if( !m_useWallet ) //Wallet should not be used => saving in the config file @@ -228,7 +228,7 @@ bool KOrnPassword::writeKOrnPassword( int box, int account, const QString& passw m_wallet->setFolder( "korn" ); //Write to wallet - if( m_wallet->writePassword( QString( "account-%1-%2" ).arg( box ).arg( account ), password ) != 0 ) + if( m_wallet->writePassword( TQString( "account-%1-%2" ).arg( box ).arg( account ), password ) != 0 ) //Writing failed return false; @@ -237,11 +237,11 @@ bool KOrnPassword::writeKOrnPassword( int box, int account, const QString& passw } //This function is copyed from kmail/kmaccount.cpp -QString KOrnPassword::KMailDecrypt( const QString& enc ) +TQString KOrnPassword::KMailDecrypt( const TQString& enc ) { - QString result; + TQString result; for (uint i = 0; i < enc.length(); i++) - result += (enc[i].unicode() <= 0x21) ? enc[i] : QChar(0x1001F - enc[i].unicode()); + result += (enc[i].unicode() <= 0x21) ? enc[i] : TQChar(0x1001F - enc[i].unicode()); return result; } diff --git a/korn/password.h b/korn/password.h index b024fa842..c8ecdd1d2 100644 --- a/korn/password.h +++ b/korn/password.h @@ -47,9 +47,9 @@ public: * @param box The boxnumber of the account * @param account The accountnumber of the account * @param fallbackConfig The configuration file if KWallet cannot be used. - * @return The password, or QString::null if it failes. + * @return The password, or TQString::null if it failes. */ - static QString readKOrnPassword( int box, int account, const KConfigBase& fallbackConfig ); + static TQString readKOrnPassword( int box, int account, const KConfigBase& fallbackConfig ); /** * This function gets a password with is puts in KWallet by KMail * @@ -57,7 +57,7 @@ public: * @param fallbackConfig The configuration used if KWallet isn't available. * @return The password, QStirng::null if it failes. */ - static QString readKMailPassword( int accountnr, const KConfigBase& fallbackConfig ); + static TQString readKMailPassword( int accountnr, const KConfigBase& fallbackConfig ); /** * This function saves a password for usage in KOrn. @@ -67,7 +67,7 @@ public: * @param fallbackConfig The configuration file if KWallet isn't available. * @param password The password to be stored. */ - static void writeKOrnPassword( int box, int account, KConfigBase& fallbackConfig, const QString& password ); + static void writeKOrnPassword( int box, int account, KConfigBase& fallbackConfig, const TQString& password ); /** * This function deletes a password from both KWallet and the configuration file @@ -154,10 +154,10 @@ public: private: static void open(); - static bool readKOrnPassword( int box, int account, QString& password ); - static bool writeKOrnPassword( int box, int account, const QString& password ); + static bool readKOrnPassword( int box, int account, TQString& password ); + static bool writeKOrnPassword( int box, int account, const TQString& password ); - static QString KMailDecrypt( const QString& enc ); + static TQString KMailDecrypt( const TQString& enc ); static KWallet::Wallet *m_wallet; static bool m_openFailed; diff --git a/korn/polldrop.cpp b/korn/polldrop.cpp index 32a44be43..8d05a03be 100644 --- a/korn/polldrop.cpp +++ b/korn/polldrop.cpp @@ -48,14 +48,14 @@ bool KPollableDrop::stopMonitor() } -void KPollableDrop::timerEvent( QTimerEvent *ev ) +void KPollableDrop::timerEvent( TQTimerEvent *ev ) { if( _timerRunning && (ev->timerId() == _timerId) ) { // this event is ours. recheck(); // should be reimplemented by children. } else { - QObject::timerEvent( ev ); + TQObject::timerEvent( ev ); } } diff --git a/korn/polldrop.h b/korn/polldrop.h index b7ea69aba..49e400b20 100644 --- a/korn/polldrop.h +++ b/korn/polldrop.h @@ -52,7 +52,7 @@ public: //virtual void addConfigPage( KDropCfgDialog * ); protected: - void timerEvent( QTimerEvent * ); + void timerEvent( TQTimerEvent * ); }; inline void KPollableDrop::setFreq( int freq ) diff --git a/korn/pop3_proto.cpp b/korn/pop3_proto.cpp index 7e88f7fb2..b42a63ec2 100644 --- a/korn/pop3_proto.cpp +++ b/korn/pop3_proto.cpp @@ -23,58 +23,58 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include -void Pop3_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const +void Pop3_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const { groupBoxes->append( "Server" ); groupBoxes->append( "Identify" ); } -void Pop3_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject* configDialog, QPtrList< AccountInput > * result ) const +void Pop3_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject* configDialog, TQPtrList< AccountInput > * result ) const { - QMap< QString, QString > encrList; + TQMap< TQString, TQString > encrList; encrList.insert( "ssl", i18n( "SSL" ) ); encrList.insert( "tls=auto", i18n( "TLS if possible" ) ); encrList.insert( "tls=on", i18n( "Always TLS" ) ); encrList.insert( "tls=off", i18n( "Never TLS" ) ); - QMap< QString, QString > authList; + TQMap< TQString, TQString > authList; authList.insert( "", i18n( "Plain" ) ); authList.insert( "auth=APOP", i18n( "APOP" ) ); - result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "Server" ), TextInput::text, "", "server" ) ); - result->append( new TextInput( (QWidget*)vector->at( 0 ), i18n( "Port" ), 0, 65535, "110", "port" ) ); - result->append( new ComboInput( (QWidget*)vector->at( 0 ), i18n( "Encryption" ), encrList, "tls=auto", "encryption" ) ); - QObject::connect( (QObject*)result->last()->rightWidget(), SIGNAL( activated( int) ), - configDialog, SLOT( slotSSLChanged() ) ); + result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "Server" ), TextInput::text, "", "server" ) ); + result->append( new TextInput( (TQWidget*)vector->at( 0 ), i18n( "Port" ), 0, 65535, "110", "port" ) ); + result->append( new ComboInput( (TQWidget*)vector->at( 0 ), i18n( "Encryption" ), encrList, "tls=auto", "encryption" ) ); + TQObject::connect( (TQObject*)result->last()->rightWidget(), TQT_SIGNAL( activated( int) ), + configDialog, TQT_SLOT( slotSSLChanged() ) ); - result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Username" ), TextInput::text, "", "username" ) ); - result->append( new TextInput( (QWidget*)vector->at( 1 ), i18n( "Password" ), TextInput::password, "", "password" ) ); - result->append( new CheckboxInput( (QWidget*)vector->at( 1 ), i18n( "Save password" ), "true", "savepassword" ) ); - QObject::connect( (QObject*)result->last()->rightWidget(), SIGNAL( toggled( bool ) ), - (QObject*)result->prev()->rightWidget(), SLOT( setEnabled( bool ) ) ); + result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Username" ), TextInput::text, "", "username" ) ); + result->append( new TextInput( (TQWidget*)vector->at( 1 ), i18n( "Password" ), TextInput::password, "", "password" ) ); + result->append( new CheckboxInput( (TQWidget*)vector->at( 1 ), i18n( "Save password" ), "true", "savepassword" ) ); + TQObject::connect( (TQObject*)result->last()->rightWidget(), TQT_SIGNAL( toggled( bool ) ), + (TQObject*)result->prev()->rightWidget(), TQT_SLOT( setEnabled( bool ) ) ); result->last()->setValue( "false" ); - result->append( new ComboInput( (QWidget*)vector->at( 1 ), i18n( "Authentication" ), authList, "", "auth" ) ); + result->append( new ComboInput( (TQWidget*)vector->at( 1 ), i18n( "Authentication" ), authList, "", "auth" ) ); } -void Pop3_Protocol::readEntries( QMap< QString, QString >* map, QMap< QString, QString > *metadata ) const +void Pop3_Protocol::readEntries( TQMap< TQString, TQString >* map, TQMap< TQString, TQString > *metadata ) const { if( map->contains( "ssl" ) && *map->find( "ssl" ) == "true" ) map->insert( "encryption", "ssl" ); if( metadata->contains( "tls" ) ) - map->insert( "encryption", QString( "tls=%1" ).arg( *metadata->find( "tls" ) ) ); + map->insert( "encryption", TQString( "tls=%1" ).arg( *metadata->find( "tls" ) ) ); if( metadata->contains( "auth" ) ) - map->insert( "auth", QString( "auth=APOP" ) ); + map->insert( "auth", TQString( "auth=APOP" ) ); } -void Pop3_Protocol::writeEntries( QMap< QString, QString >* map ) const +void Pop3_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const { - QString metadata; + TQString metadata; if( map->contains( "encryption" ) ) { if( *map->find( "encryption" ) == "ssl" ) diff --git a/korn/pop3_proto.h b/korn/pop3_proto.h index bf67896bd..c828e595f 100644 --- a/korn/pop3_proto.h +++ b/korn/pop3_proto.h @@ -32,8 +32,8 @@ public: virtual bool connectionBased() const { return true; } - virtual QString protocol( bool ssl ) const { return ssl ? "pop3s" : "pop3"; } - virtual QString configName() const { return "pop3"; } + virtual TQString protocol( bool ssl ) const { return ssl ? "pop3s" : "pop3"; } + virtual TQString configName() const { return "pop3"; } virtual bool canReadSubjects() const { return true; } virtual bool canDeleteMail() const { return true; } virtual bool canReadMail() const { return true; } @@ -42,17 +42,17 @@ public: virtual DeleteTypeEnum deleteFunction() const { return get; } - virtual QStringList authList() const { return QStringList::split( '|', "Plain|APOP", false ); } + virtual TQStringList authList() const { return TQStringList::split( '|', "Plain|APOP", false ); } virtual void readSubjectKURL( KURL & kurl, KIO::MetaData & ) const { kurl.setPath( kurl.path().replace( "/download/", "/headers/" ) ); } virtual void deleteMailKURL ( KURL & kurl, KIO::MetaData & ) const { kurl.setPath( kurl.path().replace( "/download/", "/remove/" ) ); } virtual bool commitDelete () const { return true; } virtual void deleteCommitKURL(KURL & kurl, KIO::MetaData & ) const { kurl.setPath( "commit" ); } - virtual void configFillGroupBoxes( QStringList* ) const; - virtual void configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* ) const; - virtual void readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const; - virtual void writeEntries( QMap< QString, QString >* ) const; + virtual void configFillGroupBoxes( TQStringList* ) const; + virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* ) const; + virtual void readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const; + virtual void writeEntries( TQMap< TQString, TQString >* ) const; }; #endif diff --git a/korn/pop3s_proto.h b/korn/pop3s_proto.h index 32beb4a06..4e10dca1f 100644 --- a/korn/pop3s_proto.h +++ b/korn/pop3s_proto.h @@ -31,8 +31,8 @@ public: virtual KIO_Protocol * clone() const { return new Pop3s_Protocol; } - virtual QString protocol() const { return "pop3s"; } - virtual QString configName() const { return "pop3s"; } + virtual TQString protocol() const { return "pop3s"; } + virtual TQString configName() const { return "pop3s"; } virtual unsigned short defaultPort() const { return 995; } }; diff --git a/korn/process_proto.cpp b/korn/process_proto.cpp index 30cb6f4d5..2d4885fdf 100644 --- a/korn/process_proto.cpp +++ b/korn/process_proto.cpp @@ -21,27 +21,27 @@ #include -#include -#include -#include +#include +#include +#include #include "account_input.h" -void Process_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const +void Process_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const { groupBoxes->append( "Process" ); } -void Process_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput > *result ) const +void Process_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput > *result ) const { - result->append( new URLInput( (QWidget*)vector->at( 0 ), i18n( "Program:" ), "", "mailbox" ) ); + result->append( new URLInput( (TQWidget*)vector->at( 0 ), i18n( "Program:" ), "", "mailbox" ) ); } -void Process_Protocol::readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const +void Process_Protocol::readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const { } -void Process_Protocol::writeEntries( QMap< QString, QString >* map ) const +void Process_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const { clearFields( map, (KIO_Protocol::Fields)( server | port | username | password | save_password | metadata ) ); } diff --git a/korn/process_proto.h b/korn/process_proto.h index 6275be2c6..70c8cb671 100644 --- a/korn/process_proto.h +++ b/korn/process_proto.h @@ -29,20 +29,20 @@ public: virtual KIO_Protocol * clone() const { return new Process_Protocol; } - virtual QString protocol() const { return "process"; } - virtual QString configName() const { return "process"; } + virtual TQString protocol() const { return "process"; } + virtual TQString configName() const { return "process"; } virtual bool canReadSubjects() const { return false; } virtual bool canDeleteMail() const { return false; } virtual bool canReadMail() const { return false; } virtual bool fullMessage() const { return false; } - virtual QString mailboxName() const { return i18n("Program: "); } + virtual TQString mailboxName() const { return i18n("Program: "); } - virtual void configFillGroupBoxes( QStringList* ) const; - virtual void configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* ) const; - virtual void readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const; - virtual void writeEntries( QMap< QString, QString >* ) const; + virtual void configFillGroupBoxes( TQStringList* ) const; + virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* ) const; + virtual void readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const; + virtual void writeEntries( TQMap< TQString, TQString >* ) const; }; #endif diff --git a/korn/progress_dialog.ui.h b/korn/progress_dialog.ui.h index fc982b8a0..2407ca530 100644 --- a/korn/progress_dialog.ui.h +++ b/korn/progress_dialog.ui.h @@ -29,7 +29,7 @@ *****************************************************************************/ -void DoubleProgressDialog::setText( const QString & str ) +void DoubleProgressDialog::setText( const TQString & str ) { lbText->setText( str ); } diff --git a/korn/protocol.h b/korn/protocol.h index 75062b515..148e9e7f7 100644 --- a/korn/protocol.h +++ b/korn/protocol.h @@ -34,7 +34,7 @@ template< class T> class QPtrList; template< class T> class QPtrVector; template< class T, class S> class QMap; -#include +#include class Protocol { @@ -44,13 +44,13 @@ public: virtual const Protocol* getProtocol( KConfigGroup* ) const = 0; virtual KMailDrop* createMaildrop( KConfigGroup* ) const = 0; - virtual QMap< QString, QString > * createConfig( KConfigGroup* config, const QString& password ) const = 0; - virtual QString configName() const { return "not specified"; } + virtual TQMap< TQString, TQString > * createConfig( KConfigGroup* config, const TQString& password ) const = 0; + virtual TQString configName() const { return "not specified"; } - virtual void configFillGroupBoxes( QStringList* ) const = 0; - virtual void configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* ) const = 0; - virtual void readEntries( QMap< QString, QString >* ) const = 0; - virtual void writeEntries( QMap< QString, QString >* ) const = 0; + virtual void configFillGroupBoxes( TQStringList* ) const = 0; + virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* ) const = 0; + virtual void readEntries( TQMap< TQString, TQString >* ) const = 0; + virtual void writeEntries( TQMap< TQString, TQString >* ) const = 0; virtual unsigned short defaultPort( bool ) const { return 0; } diff --git a/korn/protocols.cpp b/korn/protocols.cpp index 60fac95a1..526c099b3 100644 --- a/korn/protocols.cpp +++ b/korn/protocols.cpp @@ -31,13 +31,13 @@ #include "dcop_proto.h" #include "kmail_proto.h" -#include -#include -#include +#include +#include +#include -QDict* Protocols::protocols = 0; +TQDict* Protocols::protocols = 0; -const Protocol* Protocols::getProto( const QString& proto ) +const Protocol* Protocols::getProto( const TQString& proto ) { if( !protocols ) fillProtocols(); @@ -50,14 +50,14 @@ const Protocol* Protocols::firstProtocol() return getProto( "mbox" ); } -QStringList Protocols::getProtocols() +TQStringList Protocols::getProtocols() { - QStringList output; + TQStringList output; if( !protocols ) fillProtocols(); - QDictIterator it( *protocols ); + TQDictIterator it( *protocols ); for( ; it.current(); ++it ) output.append( it.currentKey() ); @@ -68,7 +68,7 @@ QStringList Protocols::getProtocols() void Protocols::fillProtocols() { - protocols = new QDict< Protocol>; + protocols = new TQDict< Protocol>; protocols->setAutoDelete( true ); addProtocol( new Imap_Protocol ); addProtocol( new MBox_Protocol ); diff --git a/korn/protocols.h b/korn/protocols.h index 02492ce13..d77a61754 100644 --- a/korn/protocols.h +++ b/korn/protocols.h @@ -31,16 +31,16 @@ public: Protocols() {} ~Protocols() {} - static const Protocol* getProto( const QString& ); + static const Protocol* getProto( const TQString& ); static const Protocol* firstProtocol(); - static QStringList getProtocols(); + static TQStringList getProtocols(); static void fillProtocols(); private: static void addProtocol( Protocol* ); - static QDict *protocols; + static TQDict *protocols; }; #endif //MK_PROTOCOLS_H diff --git a/korn/qmail_proto.cpp b/korn/qmail_proto.cpp index 8accfbdb1..55b98123d 100644 --- a/korn/qmail_proto.cpp +++ b/korn/qmail_proto.cpp @@ -22,28 +22,28 @@ #include #include -#include -#include -#include +#include +#include +#include #include "account_input.h" -void QMail_Protocol::configFillGroupBoxes( QStringList* groupBoxes ) const +void QMail_Protocol::configFillGroupBoxes( TQStringList* groupBoxes ) const { groupBoxes->append( "Maildir" ); } -void QMail_Protocol::configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput > *result ) const +void QMail_Protocol::configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput > *result ) const { - result->append( new URLInput( (QWidget*)vector->at( 0 ), i18n( "Path:" ), "", "mailbox" ) ); + result->append( new URLInput( (TQWidget*)vector->at( 0 ), i18n( "Path:" ), "", "mailbox" ) ); dynamic_cast(result->last()->rightWidget())->setMode( KFile::Directory ); } -void QMail_Protocol::readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const +void QMail_Protocol::readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const { } -void QMail_Protocol::writeEntries( QMap< QString, QString >* map ) const +void QMail_Protocol::writeEntries( TQMap< TQString, TQString >* map ) const { clearFields( map, (KIO_Protocol::Fields)( server | port | username | password | save_password | metadata ) ); } diff --git a/korn/qmail_proto.h b/korn/qmail_proto.h index 90c1bc381..aaa722ee2 100644 --- a/korn/qmail_proto.h +++ b/korn/qmail_proto.h @@ -31,8 +31,8 @@ public: virtual bool connectionBased() const { return false; } - virtual QString protocol() const { return "file"; } - virtual QString configName() const { return "qmail"; } + virtual TQString protocol() const { return "file"; } + virtual TQString configName() const { return "qmail"; } virtual bool canReadSubjects() const { return true; } virtual bool canDeleteMail() const { return true; } @@ -47,12 +47,12 @@ public: } - virtual QString mailboxName() const { return i18n( "Path:" ); } + virtual TQString mailboxName() const { return i18n( "Path:" ); } - virtual void configFillGroupBoxes( QStringList* ) const; - virtual void configFields( QPtrVector< QWidget >* vector, const QObject*, QPtrList< AccountInput >* ) const; - virtual void readEntries( QMap< QString, QString >*, QMap< QString, QString >* ) const; - virtual void writeEntries( QMap< QString, QString >* ) const; + virtual void configFillGroupBoxes( TQStringList* ) const; + virtual void configFields( TQPtrVector< TQWidget >* vector, const TQObject*, TQPtrList< AccountInput >* ) const; + virtual void readEntries( TQMap< TQString, TQString >*, TQMap< TQString, TQString >* ) const; + virtual void writeEntries( TQMap< TQString, TQString >* ) const; }; #endif diff --git a/korn/sortedmailsubject.cpp b/korn/sortedmailsubject.cpp index 5b9da297b..8b1e20bde 100644 --- a/korn/sortedmailsubject.cpp +++ b/korn/sortedmailsubject.cpp @@ -18,7 +18,7 @@ #include "sortedmailsubject.h" -int SortedMailSubject::compareItems ( QPtrCollection::Item item1, QPtrCollection::Item item2 ) +int SortedMailSubject::compareItems ( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) { int date1, date2; date1 = ( (KornMailSubject*)item1 )->getDate(); diff --git a/korn/sortedmailsubject.h b/korn/sortedmailsubject.h index e0011c122..7699fa6e0 100644 --- a/korn/sortedmailsubject.h +++ b/korn/sortedmailsubject.h @@ -20,21 +20,21 @@ #define MK_SORTEDMAILSUBJECT_H #include "mailsubject.h" -#include +#include /* - * This class is a normal QPtrList with an overloaded function compareItems. + * This class is a normal TQPtrList with an overloaded function compareItems. * This way, it is possible to sort this list on date. */ -class SortedMailSubject : public QPtrList< KornMailSubject > +class SortedMailSubject : public TQPtrList< KornMailSubject > { public: - SortedMailSubject() : QPtrList< KornMailSubject >() {} - SortedMailSubject( const SortedMailSubject& sms ) : QPtrList< KornMailSubject >( sms ) {} + SortedMailSubject() : TQPtrList< KornMailSubject >() {} + SortedMailSubject( const SortedMailSubject& sms ) : TQPtrList< KornMailSubject >( sms ) {} ~SortedMailSubject() {} - virtual int compareItems ( QPtrCollection::Item item1, QPtrCollection::Item item2 ); + virtual int compareItems ( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ); }; #endif //MK_SORTEDMAILSUBJECT_H diff --git a/korn/stringid.cpp b/korn/stringid.cpp index 43f5ea4a1..e28411ac0 100644 --- a/korn/stringid.cpp +++ b/korn/stringid.cpp @@ -23,7 +23,7 @@ #include "stringid.h" -KornStringId::KornStringId( const QString & id ) : _id( id ) +KornStringId::KornStringId( const TQString & id ) : _id( id ) { } diff --git a/korn/stringid.h b/korn/stringid.h index 871f97ec2..f60b21d21 100644 --- a/korn/stringid.h +++ b/korn/stringid.h @@ -25,20 +25,20 @@ * Author Mart Kelder */ -#include +#include #include"mailid.h" class KornStringId : public KornMailId { private: - QString _id; + TQString _id; public: - KornStringId( const QString & id ); + KornStringId( const TQString & id ); KornStringId( const KornStringId & src ); ~KornStringId() {} - QString getId() const { return _id; } - virtual QString toString() const { return _id; } + TQString getId() const { return _id; } + virtual TQString toString() const { return _id; } virtual KornMailId *clone() const; }; diff --git a/korn/subjectsdlg.cpp b/korn/subjectsdlg.cpp index 9b675e0bf..f16d3a913 100644 --- a/korn/subjectsdlg.cpp +++ b/korn/subjectsdlg.cpp @@ -1,25 +1,25 @@ #include "subjectsdlg.h" #include "maildrop.h" -#include +#include #include #include -#include -#include -#include +#include +#include +#include #include "mailsubject.h" #include -#include +#include #include #include "maildlg.h" #include "progress_dialog.h" -KornSubjectsDlg::SubjectListViewItem::SubjectListViewItem( QListView *parent, KornMailSubject * item) +KornSubjectsDlg::SubjectListViewItem::SubjectListViewItem( TQListView *parent, KornMailSubject * item) // set the column strings except column 2 (date) : KListViewItem(parent, item->getSender(), item->getSubject(), "", KGlobal::locale()->formatNumber(item->getSize(), 0)) , _mailSubject( new KornMailSubject( *item ) ) { // convert the date according to the user settings and show it in column 2 - QDateTime date; + TQDateTime date; date.setTime_t(_mailSubject->getDate()); setText(2, KGlobal::locale()->formatDateTime(date, true, true)); } @@ -29,12 +29,12 @@ KornSubjectsDlg::SubjectListViewItem::~SubjectListViewItem() delete _mailSubject; } -int KornSubjectsDlg::SubjectListViewItem::compare( QListViewItem* item, int column, bool ascending ) const +int KornSubjectsDlg::SubjectListViewItem::compare( TQListViewItem* item, int column, bool ascending ) const { if ( column == 2 ) { // if column 2 was clicked, compare the dates. - QDateTime d, e; + TQDateTime d, e; d.setTime_t(_mailSubject->getDate()); e.setTime_t(((SubjectListViewItem *)item)->_mailSubject->getDate()); return e.secsTo( d ); @@ -53,8 +53,8 @@ int KornSubjectsDlg::SubjectListViewItem::compare( QListViewItem* item, int colu } } -KornSubjectsDlg::KornSubjectsDlg( QWidget *parent ) - : KDialogBase( parent, "urldialog", true, "test", Close, Close, true), _mailDrop( new QPtrList< KMailDrop > ), +KornSubjectsDlg::KornSubjectsDlg( TQWidget *parent ) + : KDialogBase( parent, "urldialog", true, "test", Close, Close, true), _mailDrop( new TQPtrList< KMailDrop > ), _subjects(0), _delete(0), mailDlg(0), _canDeleteMaildrop( true ) { _loadSubjectsCanceled = false; @@ -62,7 +62,7 @@ KornSubjectsDlg::KornSubjectsDlg( QWidget *parent ) // The dialog contains a list view and several buttons. // Two box layouts hol dthem. - QWidget * page = new QWidget( this ); + TQWidget * page = new TQWidget( this ); setMainWidget(page); invertSelButton = new KPushButton(i18n("&Invert Selection"), page); clearSelButton = new KPushButton(i18n("&Remove Selection"), page); @@ -70,8 +70,8 @@ KornSubjectsDlg::KornSubjectsDlg( QWidget *parent ) showButton = new KPushButton(i18n("&Show"), page); deleteButton->setEnabled(false); showButton->setEnabled(false); - QVBoxLayout * topLayout = new QVBoxLayout( page, 0, spacingHint() ); - QHBoxLayout * buttons = new QHBoxLayout(); + TQVBoxLayout * topLayout = new TQVBoxLayout( page, 0, spacingHint() ); + TQHBoxLayout * buttons = new TQHBoxLayout(); _list = new KListView(page); topLayout->addWidget(_list, 10); topLayout->addLayout(buttons, 0); @@ -82,7 +82,7 @@ KornSubjectsDlg::KornSubjectsDlg( QWidget *parent ) buttons->addStretch(10); // feed the list view with its colums - _list->setSelectionMode(QListView::Multi); + _list->setSelectionMode(TQListView::Multi); _list->addColumn(i18n("From")); _list->addColumn(i18n("Subject")); _list->addColumn(i18n("Date")); @@ -93,15 +93,15 @@ KornSubjectsDlg::KornSubjectsDlg( QWidget *parent ) _list->setItemMargin(3); // connect the selection changed and double click events of the list view - connect(_list, SIGNAL(selectionChanged()), this, SLOT(listSelectionChanged())); - connect(_list, SIGNAL(executed(QListViewItem *)), this, SLOT(doubleClicked(QListViewItem *))); + connect(_list, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(listSelectionChanged())); + connect(_list, TQT_SIGNAL(executed(TQListViewItem *)), this, TQT_SLOT(doubleClicked(TQListViewItem *))); // connect the buttons - connect(invertSelButton, SIGNAL(clicked()), this, SLOT(invertSelection())); - connect(clearSelButton, SIGNAL(clicked()), this, SLOT(removeSelection())); - connect(showButton, SIGNAL(clicked()), this, SLOT(showMessage())); - connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteMessage())); - setInitialSize(QSize(QApplication::desktop()->width(), QApplication::desktop()->height())); + connect(invertSelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(invertSelection())); + connect(clearSelButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeSelection())); + connect(showButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(showMessage())); + connect(deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteMessage())); + setInitialSize(TQSize(TQApplication::desktop()->width(), TQApplication::desktop()->height())); } void KornSubjectsDlg::clear() @@ -122,7 +122,7 @@ void KornSubjectsDlg::loadMessages() void KornSubjectsDlg::listSelectionChanged() { - QPtrList< QListViewItem > list( _list->selectedItems() ); + TQPtrList< TQListViewItem > list( _list->selectedItems() ); if (!_mailDrop) return; @@ -147,7 +147,7 @@ void KornSubjectsDlg::listSelectionChanged() deleteButton->setEnabled(enableDelete); } -void KornSubjectsDlg::doubleClicked(QListViewItem * item) +void KornSubjectsDlg::doubleClicked(TQListViewItem * item) { // show the message showMessage(item); @@ -181,14 +181,14 @@ void KornSubjectsDlg::showMessage() return; // get selcted item - QPtrList messages = _list->selectedItems(); - QListViewItem * item = messages.first(); + TQPtrList messages = _list->selectedItems(); + TQListViewItem * item = messages.first(); // and show it showMessage(item); } -void KornSubjectsDlg::showMessage(QListViewItem * item ) +void KornSubjectsDlg::showMessage(TQListViewItem * item ) { if (!item) return; @@ -202,7 +202,7 @@ void KornSubjectsDlg::showMessage(QListViewItem * item ) mailDlg->exec(); } -void KornSubjectsDlg::showSubjectsDlg( const QString& name ) +void KornSubjectsDlg::showSubjectsDlg( const TQString& name ) { setCaption( i18n("Mails in Box: %1").arg( name ) ); @@ -215,7 +215,7 @@ void KornSubjectsDlg::showSubjectsDlg( const QString& name ) void KornSubjectsDlg::closeDialog( ) { - disconnect( this, SIGNAL( finished() ), this, SLOT( closeDialog() ) ); + disconnect( this, TQT_SIGNAL( finished() ), this, TQT_SLOT( closeDialog() ) ); } //---------------------------- @@ -253,13 +253,13 @@ void KornSubjectsDlg::prepareStep1Subjects( KMailDrop *drop ) _subjects->progress->setProgress( 0 ); _subjects->atRechecking = true; - connect( drop, SIGNAL( rechecked() ), this, SLOT( slotReloadRechecked() ) ); + connect( drop, TQT_SIGNAL( rechecked() ), this, TQT_SLOT( slotReloadRechecked() ) ); drop->recheck(); } void KornSubjectsDlg::removeStep1Subjects( KMailDrop *drop ) { - disconnect( drop, SIGNAL( rechecked() ), this, SLOT( slotReloadRechecked() ) ); + disconnect( drop, TQT_SIGNAL( rechecked() ), this, TQT_SLOT( slotReloadRechecked() ) ); } void KornSubjectsDlg::prepareStep2Subjects( KMailDrop *drop ) @@ -267,11 +267,11 @@ void KornSubjectsDlg::prepareStep2Subjects( KMailDrop *drop ) _subjects->progress->setText( i18n( "Fetching messages..." ) ); _subjects->atRechecking = false; - connect( drop, SIGNAL( readSubject( KornMailSubject* ) ), this, SLOT( subjectAvailable( KornMailSubject* ) ) ); - connect( drop, SIGNAL( readSubjectsReady( bool ) ), this, SLOT( subjectsReady( bool ) ) ); - connect( drop, SIGNAL( readSubjectsTotalSteps( int ) ), _subjects->progress, SLOT( setNumberOfSteps( int ) ) ); - connect( drop, SIGNAL( readSubjectsProgress( int ) ), _subjects->progress, SLOT( setProgress( int ) ) ); - connect( _subjects->progress, SIGNAL( cancelPressed() ), drop, SLOT( readSubjectsCanceled() ) ); + connect( drop, TQT_SIGNAL( readSubject( KornMailSubject* ) ), this, TQT_SLOT( subjectAvailable( KornMailSubject* ) ) ); + connect( drop, TQT_SIGNAL( readSubjectsReady( bool ) ), this, TQT_SLOT( subjectsReady( bool ) ) ); + connect( drop, TQT_SIGNAL( readSubjectsTotalSteps( int ) ), _subjects->progress, TQT_SLOT( setNumberOfSteps( int ) ) ); + connect( drop, TQT_SIGNAL( readSubjectsProgress( int ) ), _subjects->progress, TQT_SLOT( setProgress( int ) ) ); + connect( _subjects->progress, TQT_SIGNAL( cancelPressed() ), drop, TQT_SLOT( readSubjectsCanceled() ) ); if( _subjects->it->current()->canReadSubjects() ) _subjects->it->current()->readSubjects( 0 ); @@ -281,11 +281,11 @@ void KornSubjectsDlg::prepareStep2Subjects( KMailDrop *drop ) void KornSubjectsDlg::removeStep2Subjects( KMailDrop *drop ) { - disconnect( drop, SIGNAL( readSubject( KornMailSubject* ) ), this, SLOT( subjectAvailable( KornMailSubject* ) ) ); - disconnect( drop, SIGNAL( readSubjectsReady( bool ) ), this, SLOT( subjectsReady( bool ) ) ); - disconnect( drop, SIGNAL( readSubjectsTotalSteps( int ) ), _subjects->progress, SLOT( setNumberOfSteps( int ) ) ); - disconnect( drop, SIGNAL( readSubjectsProgress( int ) ), _subjects->progress, SLOT( setProgress( int ) ) ); - disconnect( _subjects->progress, SIGNAL( cancelPressed() ), drop, SLOT( readSubjectsCanceled() ) ); + disconnect( drop, TQT_SIGNAL( readSubject( KornMailSubject* ) ), this, TQT_SLOT( subjectAvailable( KornMailSubject* ) ) ); + disconnect( drop, TQT_SIGNAL( readSubjectsReady( bool ) ), this, TQT_SLOT( subjectsReady( bool ) ) ); + disconnect( drop, TQT_SIGNAL( readSubjectsTotalSteps( int ) ), _subjects->progress, TQT_SLOT( setNumberOfSteps( int ) ) ); + disconnect( drop, TQT_SIGNAL( readSubjectsProgress( int ) ), _subjects->progress, TQT_SLOT( setProgress( int ) ) ); + disconnect( _subjects->progress, TQT_SIGNAL( cancelPressed() ), drop, TQT_SLOT( readSubjectsCanceled() ) ); } bool KornSubjectsDlg::makeSubjectsStruct() @@ -294,12 +294,12 @@ bool KornSubjectsDlg::makeSubjectsStruct() return false; _subjects = new SubjectsData; - _subjects->it = new QPtrListIterator< KMailDrop >( *_mailDrop ); - _subjects->subjects = new QValueVector< KornMailSubject >; + _subjects->it = new TQPtrListIterator< KMailDrop >( *_mailDrop ); + _subjects->subjects = new TQValueVector< KornMailSubject >; _subjects->progress = new DoubleProgressDialog( this, "progress" ); _subjects->atRechecking = true; - connect( _subjects->progress, SIGNAL( cancelPressed() ), this, SLOT( slotSubjectsCanceled() ) ); + connect( _subjects->progress, TQT_SIGNAL( cancelPressed() ), this, TQT_SLOT( slotSubjectsCanceled() ) ); return true; } @@ -309,7 +309,7 @@ void KornSubjectsDlg::deleteSubjectsStruct() if( !_subjects ) return; - disconnect( _subjects->progress, SIGNAL( cancelPressed() ), this, SLOT( slotSubjectsCanceled() ) ); + disconnect( _subjects->progress, TQT_SIGNAL( cancelPressed() ), this, TQT_SLOT( slotSubjectsCanceled() ) ); this->unsetCursor(); @@ -325,7 +325,7 @@ void KornSubjectsDlg::slotReloadRechecked() _subjects->progress->setText( i18n( "Downloading subjects..." ) ); //Progress message when fetching messages removeStep1Subjects( _subjects->it->current() ); - _subjects->subjects->reserve( _subjects->it->current()->count() ); //enlarge QValueVector to speed adding up. + _subjects->subjects->reserve( _subjects->it->current()->count() ); //enlarge TQValueVector to speed adding up. prepareStep2Subjects( _subjects->it->current() ); } @@ -377,7 +377,7 @@ void KornSubjectsDlg::subjectsReady( bool success ) _list->clear(); //All subjects downloaded - for( QValueVector::iterator it = _subjects->subjects->begin(); it != _subjects->subjects->end(); + for( TQValueVector::iterator it = _subjects->subjects->begin(); it != _subjects->subjects->end(); ++it ) { //Draw entry's new SubjectListViewItem(_list, &(*it)); @@ -415,7 +415,7 @@ void KornSubjectsDlg::deleteMessage() _delete->totalNumberOfMessages = _delete->messages->count(); } - QString confirmation = i18n( "Do you really want to delete %n message?", + TQString confirmation = i18n( "Do you really want to delete %n message?", "Do you really want to delete %n messages?", _delete->messages->count() ); if( KMessageBox::questionYesNo( this, confirmation, i18n( "Confirmation" ), KStdGuiItem::del(), KStdGuiItem::cancel() ) != KMessageBox::Yes ) @@ -436,17 +436,17 @@ void KornSubjectsDlg::deleteMessage() void KornSubjectsDlg::makeDeleteStruct() { _delete = new DeleteData; - _delete->messages = new QPtrList< KornMailSubject >; - _delete->ids = new QPtrList< const KornMailId >; - _delete->progress = new QProgressDialog( this, "progress" ); + _delete->messages = new TQPtrList< KornMailSubject >; + _delete->ids = new TQPtrList< const KornMailId >; + _delete->progress = new TQProgressDialog( this, "progress" ); _delete->totalNumberOfMessages = 0; - connect( _delete->progress, SIGNAL( canceled() ), this, SLOT( slotDeleteCanceled() ) ); + connect( _delete->progress, TQT_SIGNAL( canceled() ), this, TQT_SLOT( slotDeleteCanceled() ) ); } void KornSubjectsDlg::deleteDeleteStruct() { - disconnect( _delete->progress, SIGNAL( canceled() ), this, SLOT( slotDeleteCanceled() ) ); + disconnect( _delete->progress, TQT_SIGNAL( canceled() ), this, TQT_SLOT( slotDeleteCanceled() ) ); delete _delete->messages; delete _delete->ids; @@ -456,8 +456,8 @@ void KornSubjectsDlg::deleteDeleteStruct() void KornSubjectsDlg::fillDeleteMessageList() { - QListViewItem *current; - QPtrList< QListViewItem > list( _list->selectedItems() ); + TQListViewItem *current; + TQPtrList< TQListViewItem > list( _list->selectedItems() ); for( current = list.first(); current; current = list.next() ) _delete->messages->append( ( ( KornSubjectsDlg::SubjectListViewItem * ) current )->getMailSubject() ); @@ -487,24 +487,24 @@ void KornSubjectsDlg::deleteNextMessage() { if( _delete->messages->count() == 0 ) //No more messages to delete { - QTimer::singleShot( 100, this, SLOT( reloadSubjects() ) ); + TQTimer::singleShot( 100, this, TQT_SLOT( reloadSubjects() ) ); deleteDeleteStruct(); //reloadSubjects(); //Reload all subjects again return; } - _delete->ids = new QPtrList< const KornMailId >; + _delete->ids = new TQPtrList< const KornMailId >; _delete->drop = _delete->messages->getFirst()->getMailDrop(); fillDeleteIdList( _delete->drop ); // Connect the progress bar signals of the mail box - connect( _delete->drop, SIGNAL( deleteMailsTotalSteps( int ) ), _delete->progress, SLOT( setTotalSteps( int ) ) ); - connect( _delete->drop, SIGNAL( deleteMailsProgress( int ) ), _delete->progress, SLOT( setProgress( int ) ) ); - connect( _delete->drop, SIGNAL( deleteMailsReady( bool ) ), this, SLOT( deleteMailsReady( bool ) ) ); + connect( _delete->drop, TQT_SIGNAL( deleteMailsTotalSteps( int ) ), _delete->progress, TQT_SLOT( setTotalSteps( int ) ) ); + connect( _delete->drop, TQT_SIGNAL( deleteMailsProgress( int ) ), _delete->progress, TQT_SLOT( setProgress( int ) ) ); + connect( _delete->drop, TQT_SIGNAL( deleteMailsReady( bool ) ), this, TQT_SLOT( deleteMailsReady( bool ) ) ); // connect the cancel button of the progress bar - connect( _delete->progress, SIGNAL( canceled() ), _delete->drop, SLOT( deleteMailsCanceled() ) ); + connect( _delete->progress, TQT_SIGNAL( canceled() ), _delete->drop, TQT_SLOT( deleteMailsCanceled() ) ); // delete the mails _delete->drop->deleteMails( _delete->ids, 0 ); @@ -515,12 +515,12 @@ void KornSubjectsDlg::deleteMailsReady( bool /*success*/ ) if( !_delete ) return; - disconnect( _delete->drop, SIGNAL( deleteMailsTotalSteps( int ) ), _delete->progress, SLOT( setTotalSteps( int ) ) ); - disconnect( _delete->drop, SIGNAL( deleteMailsProgress( int ) ), _delete->progress, SLOT( setProgress( int ) ) ); - disconnect( _delete->drop, SIGNAL( deleteMailsReady( bool ) ), this, SLOT( deleteMailsReady( bool ) ) ); + disconnect( _delete->drop, TQT_SIGNAL( deleteMailsTotalSteps( int ) ), _delete->progress, TQT_SLOT( setTotalSteps( int ) ) ); + disconnect( _delete->drop, TQT_SIGNAL( deleteMailsProgress( int ) ), _delete->progress, TQT_SLOT( setProgress( int ) ) ); + disconnect( _delete->drop, TQT_SIGNAL( deleteMailsReady( bool ) ), this, TQT_SLOT( deleteMailsReady( bool ) ) ); // disconnect the cancel button of the progress bar - disconnect( _delete->progress, SIGNAL( canceled() ), _delete->drop, SLOT( deleteMailsCanceled() ) ); + disconnect( _delete->progress, TQT_SIGNAL( canceled() ), _delete->drop, TQT_SLOT( deleteMailsCanceled() ) ); deleteNextMessage(); } diff --git a/korn/subjectsdlg.h b/korn/subjectsdlg.h index 064b6c8ef..02a3e0396 100644 --- a/korn/subjectsdlg.h +++ b/korn/subjectsdlg.h @@ -3,7 +3,7 @@ #include #include -#include +#include #include class KMailDrop; @@ -39,7 +39,7 @@ class KornSubjectsDlg: public KDialogBase * @param item KornMailSubject this item should represent. It is NOT deleted * if SubjectListViewItem is deleted. */ - SubjectListViewItem( QListView *parent, KornMailSubject * item); + SubjectListViewItem( TQListView *parent, KornMailSubject * item); /** * SubjectListViewItem Destructor @@ -52,7 +52,7 @@ class KornSubjectsDlg: public KDialogBase * @param column column to compare * @param ascending search order */ - int compare( QListViewItem* item, int column, bool ascending ) const; + int compare( TQListViewItem* item, int column, bool ascending ) const; /** * Return the mail subject. @@ -61,20 +61,20 @@ class KornSubjectsDlg: public KDialogBase KornMailSubject * getMailSubject() const {return _mailSubject;} }; - QPtrList< KMailDrop > *_mailDrop; + TQPtrList< KMailDrop > *_mailDrop; struct SubjectsData { - QPtrListIterator< KMailDrop > *it; - QValueVector< KornMailSubject > *subjects; + TQPtrListIterator< KMailDrop > *it; + TQValueVector< KornMailSubject > *subjects; DoubleProgressDialog *progress; bool atRechecking; } *_subjects; struct DeleteData { - QPtrList< KornMailSubject > *messages; - QPtrList< const KornMailId > *ids; - QProgressDialog *progress; + TQPtrList< KornMailSubject > *messages; + TQPtrList< const KornMailId > *ids; + TQProgressDialog *progress; KMailDrop *drop; int totalNumberOfMessages; } *_delete; @@ -99,13 +99,13 @@ class KornSubjectsDlg: public KDialogBase * Show a message in a separate dialog * @param item message to show */ - void showMessage(QListViewItem * item); + void showMessage(TQListViewItem * item); public: /** * KornSubjectsDlg Constructor * @param parent parent widget */ - KornSubjectsDlg( QWidget *parent=0 ); + KornSubjectsDlg( TQWidget *parent=0 ); /** * This functions clears all available KMailDrop's. @@ -127,7 +127,7 @@ public: * Show the KornSubjectsDlg as a modal dialog. * @param name The name of the box */ - void showSubjectsDlg( const QString& name ); + void showSubjectsDlg( const TQString& name ); /** * KornSubjectsDlg Destructor @@ -164,7 +164,7 @@ private slots: /** * called if a list view item was double clicked */ - void doubleClicked ( QListViewItem *item ); + void doubleClicked ( TQListViewItem *item ); void closeDialog(); diff --git a/korn/systemtray.cpp b/korn/systemtray.cpp index f3681d550..e7ca45f73 100644 --- a/korn/systemtray.cpp +++ b/korn/systemtray.cpp @@ -22,9 +22,9 @@ #include #include -#include +#include -SystemTray::SystemTray( QWidget * parent, const char * name ) +SystemTray::SystemTray( TQWidget * parent, const char * name ) : KSystemTray( parent, name ) { } @@ -33,7 +33,7 @@ SystemTray::~SystemTray() { } -void SystemTray::mousePressEvent( QMouseEvent* ee ) +void SystemTray::mousePressEvent( TQMouseEvent* ee ) { //Use the general function to determe what must be done emit mouseButtonPressed( ee->button() ); diff --git a/korn/systemtray.h b/korn/systemtray.h index 4b8aa616f..4f9f70eda 100644 --- a/korn/systemtray.h +++ b/korn/systemtray.h @@ -37,7 +37,7 @@ public: * @param parant The parent window * @param name The name of the QObject's parents. */ - SystemTray( QWidget * parent = 0, const char * name = 0 ); + SystemTray( TQWidget * parent = 0, const char * name = 0 ); /** * Empty destructor; does nothing at the moment */ @@ -49,7 +49,7 @@ protected: * In this implemention, the action depends on the settings. * @param me An object which contains the mousebutton which is pressed. */ - virtual void mousePressEvent( QMouseEvent* me ); + virtual void mousePressEvent( TQMouseEvent* me ); signals: void mouseButtonPressed( Qt::ButtonState ); diff --git a/korn/utils.h b/korn/utils.h index 4dc279556..fe64099a0 100644 --- a/korn/utils.h +++ b/korn/utils.h @@ -1,5 +1,5 @@ #ifndef KORN_UTILS_H #define KORN_UTILS_H -#include -inline QString fu(const char * s) { return QString::fromUtf8(s); } +#include +inline TQString fu(const char * s) { return TQString::fromUtf8(s); } #endif -- cgit v1.2.1