summaryrefslogtreecommitdiffstats
path: root/kmail/kmfilteraction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmfilteraction.cpp')
-rw-r--r--kmail/kmfilteraction.cpp448
1 files changed, 224 insertions, 224 deletions
diff --git a/kmail/kmfilteraction.cpp b/kmail/kmfilteraction.cpp
index ea77e14b4..9fce0565b 100644
--- a/kmail/kmfilteraction.cpp
+++ b/kmail/kmfilteraction.cpp
@@ -42,12 +42,12 @@ using KMail::RegExpLineEdit;
#include <kaudioplayer.h>
#include <kurlrequester.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtextcodec.h>
-#include <qtimer.h>
-#include <qobject.h>
-#include <qstylesheet.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtextcodec.h>
+#include <tqtimer.h>
+#include <tqobject.h>
+#include <tqstylesheet.h>
#include <assert.h>
@@ -57,7 +57,7 @@ using KMail::RegExpLineEdit;
//
//=============================================================================
-KMFilterAction::KMFilterAction( const char* aName, const QString aLabel )
+KMFilterAction::KMFilterAction( const char* aName, const TQString aLabel )
{
mName = aName;
mLabel = aLabel;
@@ -85,20 +85,20 @@ KMFilterAction* KMFilterAction::newAction()
return 0;
}
-QWidget* KMFilterAction::createParamWidget(QWidget* parent) const
+TQWidget* KMFilterAction::createParamWidget(TQWidget* parent) const
{
- return new QWidget(parent);
+ return new TQWidget(parent);
}
-void KMFilterAction::applyParamWidgetValue(QWidget*)
+void KMFilterAction::applyParamWidgetValue(TQWidget*)
{
}
-void KMFilterAction::setParamWidgetValue( QWidget * ) const
+void KMFilterAction::setParamWidgetValue( TQWidget * ) const
{
}
-void KMFilterAction::clearParamWidget( QWidget * ) const
+void KMFilterAction::clearParamWidget( TQWidget * ) const
{
}
@@ -113,15 +113,15 @@ int KMFilterAction::tempOpenFolder(KMFolder* aFolder)
}
void KMFilterAction::sendMDN( KMMessage * msg, KMime::MDN::DispositionType d,
- const QValueList<KMime::MDN::DispositionModifier> & m ) {
+ const TQValueList<KMime::MDN::DispositionModifier> & m ) {
if ( !msg ) return;
/* createMDN requires Return-Path and Disposition-Notification-To
* if it is not set in the message we assume that the notification should go to the
* sender
*/
- const QString returnPath = msg->headerField( "Return-Path" );
- const QString dispNoteTo = msg->headerField( "Disposition-Notification-To" );
+ const TQString returnPath = msg->headerField( "Return-Path" );
+ const TQString dispNoteTo = msg->headerField( "Disposition-Notification-To" );
if ( returnPath.isEmpty() )
msg->setHeaderField( "Return-Path", msg->from() );
if ( dispNoteTo.isEmpty() )
@@ -147,12 +147,12 @@ void KMFilterAction::sendMDN( KMMessage * msg, KMime::MDN::DispositionType d,
//
//=============================================================================
-KMFilterActionWithNone::KMFilterActionWithNone( const char* aName, const QString aLabel )
+KMFilterActionWithNone::KMFilterActionWithNone( const char* aName, const TQString aLabel )
: KMFilterAction( aName, aLabel )
{
}
-const QString KMFilterActionWithNone::displayString() const
+const TQString KMFilterActionWithNone::displayString() const
{
return label();
}
@@ -164,26 +164,26 @@ const QString KMFilterActionWithNone::displayString() const
//
//=============================================================================
-KMFilterActionWithUOID::KMFilterActionWithUOID( const char* aName, const QString aLabel )
+KMFilterActionWithUOID::KMFilterActionWithUOID( const char* aName, const TQString aLabel )
: KMFilterAction( aName, aLabel ), mParameter( 0 )
{
}
-void KMFilterActionWithUOID::argsFromString( const QString argsStr )
+void KMFilterActionWithUOID::argsFromString( const TQString argsStr )
{
mParameter = argsStr.stripWhiteSpace().toUInt();
}
-const QString KMFilterActionWithUOID::argsAsString() const
+const TQString KMFilterActionWithUOID::argsAsString() const
{
- return QString::number( mParameter );
+ return TQString::number( mParameter );
}
-const QString KMFilterActionWithUOID::displayString() const
+const TQString KMFilterActionWithUOID::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
@@ -193,48 +193,48 @@ const QString KMFilterActionWithUOID::displayString() const
//
//=============================================================================
-KMFilterActionWithString::KMFilterActionWithString( const char* aName, const QString aLabel )
+KMFilterActionWithString::KMFilterActionWithString( const char* aName, const TQString aLabel )
: KMFilterAction( aName, aLabel )
{
}
-QWidget* KMFilterActionWithString::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithString::createParamWidget( TQWidget* parent ) const
{
- QLineEdit *le = new KLineEdit(parent);
+ TQLineEdit *le = new KLineEdit(parent);
le->setText( mParameter );
return le;
}
-void KMFilterActionWithString::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithString::applyParamWidgetValue( TQWidget* paramWidget )
{
- mParameter = ((QLineEdit*)paramWidget)->text();
+ mParameter = ((TQLineEdit*)paramWidget)->text();
}
-void KMFilterActionWithString::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithString::setParamWidgetValue( TQWidget* paramWidget ) const
{
- ((QLineEdit*)paramWidget)->setText( mParameter );
+ ((TQLineEdit*)paramWidget)->setText( mParameter );
}
-void KMFilterActionWithString::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithString::clearParamWidget( TQWidget* paramWidget ) const
{
- ((QLineEdit*)paramWidget)->clear();
+ ((TQLineEdit*)paramWidget)->clear();
}
-void KMFilterActionWithString::argsFromString( const QString argsStr )
+void KMFilterActionWithString::argsFromString( const TQString argsStr )
{
mParameter = argsStr;
}
-const QString KMFilterActionWithString::argsAsString() const
+const TQString KMFilterActionWithString::argsAsString() const
{
return mParameter;
}
-const QString KMFilterActionWithString::displayString() const
+const TQString KMFilterActionWithString::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
//=============================================================================
@@ -243,36 +243,36 @@ const QString KMFilterActionWithString::displayString() const
//
//=============================================================================
-KMFilterActionWithStringList::KMFilterActionWithStringList( const char* aName, const QString aLabel )
+KMFilterActionWithStringList::KMFilterActionWithStringList( const char* aName, const TQString aLabel )
: KMFilterActionWithString( aName, aLabel )
{
}
-QWidget* KMFilterActionWithStringList::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithStringList::createParamWidget( TQWidget* parent ) const
{
- QComboBox *cb = new QComboBox( false, parent );
+ TQComboBox *cb = new TQComboBox( false, parent );
cb->insertStringList( mParameterList );
setParamWidgetValue( cb );
return cb;
}
-void KMFilterActionWithStringList::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithStringList::applyParamWidgetValue( TQWidget* paramWidget )
{
- mParameter = ((QComboBox*)paramWidget)->currentText();
+ mParameter = ((TQComboBox*)paramWidget)->currentText();
}
-void KMFilterActionWithStringList::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithStringList::setParamWidgetValue( TQWidget* paramWidget ) const
{
int idx = mParameterList.findIndex( mParameter );
- ((QComboBox*)paramWidget)->setCurrentItem( idx >= 0 ? idx : 0 );
+ ((TQComboBox*)paramWidget)->setCurrentItem( idx >= 0 ? idx : 0 );
}
-void KMFilterActionWithStringList::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithStringList::clearParamWidget( TQWidget* paramWidget ) const
{
- ((QComboBox*)paramWidget)->setCurrentItem(0);
+ ((TQComboBox*)paramWidget)->setCurrentItem(0);
}
-void KMFilterActionWithStringList::argsFromString( const QString argsStr )
+void KMFilterActionWithStringList::argsFromString( const TQString argsStr )
{
int idx = mParameterList.findIndex( argsStr );
if ( idx < 0 ) {
@@ -289,13 +289,13 @@ void KMFilterActionWithStringList::argsFromString( const QString argsStr )
//
//=============================================================================
-KMFilterActionWithFolder::KMFilterActionWithFolder( const char* aName, const QString aLabel )
+KMFilterActionWithFolder::KMFilterActionWithFolder( const char* aName, const TQString aLabel )
: KMFilterAction( aName, aLabel )
{
mFolder = 0;
}
-QWidget* KMFilterActionWithFolder::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithFolder::createParamWidget( TQWidget* parent ) const
{
FolderRequester *req = new FolderRequester( parent,
kmkernel->getKMMainWidget()->folderTree() );
@@ -303,13 +303,13 @@ QWidget* KMFilterActionWithFolder::createParamWidget( QWidget* parent ) const
return req;
}
-void KMFilterActionWithFolder::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithFolder::applyParamWidgetValue( TQWidget* paramWidget )
{
mFolder = ((FolderRequester *)paramWidget)->folder();
mFolderName = ((FolderRequester *)paramWidget)->folderId();
}
-void KMFilterActionWithFolder::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithFolder::setParamWidgetValue( TQWidget* paramWidget ) const
{
if ( mFolder )
((FolderRequester *)paramWidget)->setFolder( mFolder );
@@ -317,12 +317,12 @@ void KMFilterActionWithFolder::setParamWidgetValue( QWidget* paramWidget ) const
((FolderRequester *)paramWidget)->setFolder( mFolderName );
}
-void KMFilterActionWithFolder::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithFolder::clearParamWidget( TQWidget* paramWidget ) const
{
((FolderRequester *)paramWidget)->setFolder( kmkernel->draftsFolder() );
}
-void KMFilterActionWithFolder::argsFromString( const QString argsStr )
+void KMFilterActionWithFolder::argsFromString( const TQString argsStr )
{
mFolder = kmkernel->folderMgr()->findIdString( argsStr );
if (!mFolder)
@@ -335,9 +335,9 @@ void KMFilterActionWithFolder::argsFromString( const QString argsStr )
mFolderName = argsStr;
}
-const QString KMFilterActionWithFolder::argsAsString() const
+const TQString KMFilterActionWithFolder::argsAsString() const
{
- QString result;
+ TQString result;
if ( mFolder )
result = mFolder->idString();
else
@@ -345,14 +345,14 @@ const QString KMFilterActionWithFolder::argsAsString() const
return result;
}
-const QString KMFilterActionWithFolder::displayString() const
+const TQString KMFilterActionWithFolder::displayString() const
{
- QString result;
+ TQString result;
if ( mFolder )
result = mFolder->prettyURL();
else
result = mFolderName;
- return label() + " \"" + QStyleSheet::escape( result ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( result ) + "\"";
}
bool KMFilterActionWithFolder::folderRemoved( KMFolder* aFolder, KMFolder* aNewFolder )
@@ -372,29 +372,29 @@ bool KMFilterActionWithFolder::folderRemoved( KMFolder* aFolder, KMFolder* aNewF
//
//=============================================================================
-KMFilterActionWithAddress::KMFilterActionWithAddress( const char* aName, const QString aLabel )
+KMFilterActionWithAddress::KMFilterActionWithAddress( const char* aName, const TQString aLabel )
: KMFilterActionWithString( aName, aLabel )
{
}
-QWidget* KMFilterActionWithAddress::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithAddress::createParamWidget( TQWidget* parent ) const
{
KMFilterActionWithAddressWidget *w = new KMFilterActionWithAddressWidget(parent);
w->setText( mParameter );
return w;
}
-void KMFilterActionWithAddress::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithAddress::applyParamWidgetValue( TQWidget* paramWidget )
{
mParameter = ((KMFilterActionWithAddressWidget*)paramWidget)->text();
}
-void KMFilterActionWithAddress::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithAddress::setParamWidgetValue( TQWidget* paramWidget ) const
{
((KMFilterActionWithAddressWidget*)paramWidget)->setText( mParameter );
}
-void KMFilterActionWithAddress::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithAddress::clearParamWidget( TQWidget* paramWidget ) const
{
((KMFilterActionWithAddressWidget*)paramWidget)->clear();
}
@@ -405,36 +405,36 @@ void KMFilterActionWithAddress::clearParamWidget( QWidget* paramWidget ) const
//
//=============================================================================
-KMFilterActionWithCommand::KMFilterActionWithCommand( const char* aName, const QString aLabel )
+KMFilterActionWithCommand::KMFilterActionWithCommand( const char* aName, const TQString aLabel )
: KMFilterActionWithUrl( aName, aLabel )
{
}
-QWidget* KMFilterActionWithCommand::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithCommand::createParamWidget( TQWidget* parent ) const
{
return KMFilterActionWithUrl::createParamWidget( parent );
}
-void KMFilterActionWithCommand::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithCommand::applyParamWidgetValue( TQWidget* paramWidget )
{
KMFilterActionWithUrl::applyParamWidgetValue( paramWidget );
}
-void KMFilterActionWithCommand::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithCommand::setParamWidgetValue( TQWidget* paramWidget ) const
{
KMFilterActionWithUrl::setParamWidgetValue( paramWidget );
}
-void KMFilterActionWithCommand::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithCommand::clearParamWidget( TQWidget* paramWidget ) const
{
KMFilterActionWithUrl::clearParamWidget( paramWidget );
}
-QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg, QPtrList<KTempFile> & aTempFileList ) const
+TQString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg, TQPtrList<KTempFile> & aTempFileList ) const
{
- QString result = mParameter;
- QValueList<int> argList;
- QRegExp r( "%[0-9-]+" );
+ TQString result = mParameter;
+ TQValueList<int> argList;
+ TQRegExp r( "%[0-9-]+" );
// search for '%n'
int start = -1;
@@ -450,10 +450,10 @@ QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg
// sort the list of n's
qHeapSort( argList );
- // and use QString::arg to substitute filenames for the %n's.
+ // and use TQString::arg to substitute filenames for the %n's.
int lastSeen = -2;
- QString tempFileName;
- for ( QValueList<int>::Iterator it = argList.begin() ; it != argList.end() ; ++it ) {
+ TQString tempFileName;
+ for ( TQValueList<int>::Iterator it = argList.begin() ; it != argList.end() ; ++it ) {
// setup temp files with check for duplicate %n's
if ( (*it) != lastSeen ) {
KTempFile *tf = new KTempFile();
@@ -461,7 +461,7 @@ QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg
tf->close();
delete tf;
kdDebug(5006) << "KMFilterActionWithCommand: Could not create temp file!" << endl;
- return QString::null;
+ return TQString::null;
}
tf->setAutoDelete(true);
aTempFileList.append( tf );
@@ -480,7 +480,7 @@ QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg
}
tf->close();
}
- // QString( "%0 and %1 and %1" ).arg( 0 ).arg( 1 )
+ // TQString( "%0 and %1 and %1" ).arg( 0 ).arg( 1 )
// returns "0 and 1 and %1", so we must call .arg as
// many times as there are %n's, regardless of their multiplicity.
if ((*it) == -1) result.replace( "%-1", tempFileName );
@@ -489,10 +489,10 @@ QString KMFilterActionWithCommand::substituteCommandLineArgsFor( KMMessage *aMsg
// And finally, replace the %{foo} with the content of the foo
// header field:
- QRegExp header_rx( "%\\{([a-z0-9-]+)\\}", false );
+ TQRegExp header_rx( "%\\{([a-z0-9-]+)\\}", false );
int idx = 0;
while ( ( idx = header_rx.search( result, idx ) ) != -1 ) {
- QString replacement = KProcess::quote( aMsg->headerField( header_rx.cap(1).latin1() ) );
+ TQString replacement = KProcess::quote( aMsg->headerField( header_rx.cap(1).latin1() ) );
result.replace( idx, header_rx.matchedLength(), replacement );
idx += replacement.length();
}
@@ -508,16 +508,16 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage*
if ( mParameter.isEmpty() )
return ErrorButGoOn;
- // KProcess doesn't support a QProcess::launch() equivalent, so
+ // KProcess doesn't support a TQProcess::launch() equivalent, so
// we must use a temp file :-(
KTempFile * inFile = new KTempFile;
inFile->setAutoDelete(true);
- QPtrList<KTempFile> atmList;
+ TQPtrList<KTempFile> atmList;
atmList.setAutoDelete(true);
atmList.append( inFile );
- QString commandLine = substituteCommandLineArgsFor( aMsg , atmList );
+ TQString commandLine = substituteCommandLineArgsFor( aMsg , atmList );
if ( commandLine.isEmpty() )
return ErrorButGoOn;
@@ -531,7 +531,7 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage*
commandLine = "(" + commandLine + ") <" + inFile->name();
// write message to file
- QString tempFileName = inFile->name();
+ TQString tempFileName = inFile->name();
KPIM::kCStringToFile( aMsg->asString(), tempFileName, //###
false, false, false );
inFile->close();
@@ -552,7 +552,7 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage*
if ( withOutput ) {
// read altered message:
- QByteArray msgText = shProc.collectedStdout();
+ TQByteArray msgText = shProc.collectedStdout();
if ( !msgText.isEmpty() ) {
/* If the pipe through alters the message, it could very well
@@ -560,7 +560,7 @@ KMFilterAction::ReturnCode KMFilterActionWithCommand::genericProcess(KMMessage*
unfortunate, as we need to removed the original from the folder
using that, and look it up in the message. When the (new) message
is uploaded, the header is stripped anyhow. */
- QString uid = aMsg->headerField("X-UID");
+ TQString uid = aMsg->headerField("X-UID");
aMsg->fromByteArray( msgText );
aMsg->setHeaderField("X-UID",uid);
}
@@ -686,10 +686,10 @@ public:
virtual ReturnCode process(KMMessage* msg) const;
static KMFilterAction* newAction();
- QWidget * createParamWidget( QWidget * parent ) const;
- void applyParamWidgetValue( QWidget * parent );
- void setParamWidgetValue( QWidget * parent ) const;
- void clearParamWidget( QWidget * param ) const;
+ TQWidget * createParamWidget( TQWidget * parent ) const;
+ void applyParamWidgetValue( TQWidget * parent );
+ void setParamWidgetValue( TQWidget * parent ) const;
+ void clearParamWidget( TQWidget * param ) const;
};
KMFilterAction* KMFilterActionIdentity::newAction()
@@ -705,25 +705,25 @@ KMFilterActionIdentity::KMFilterActionIdentity()
KMFilterAction::ReturnCode KMFilterActionIdentity::process(KMMessage* msg) const
{
- msg->setHeaderField( "X-KMail-Identity", QString::number( mParameter ) );
+ msg->setHeaderField( "X-KMail-Identity", TQString::number( mParameter ) );
return GoOn;
}
-QWidget * KMFilterActionIdentity::createParamWidget( QWidget * parent ) const
+TQWidget * KMFilterActionIdentity::createParamWidget( TQWidget * parent ) const
{
KPIM::IdentityCombo * ic = new KPIM::IdentityCombo( kmkernel->identityManager(), parent );
ic->setCurrentIdentity( mParameter );
return ic;
}
-void KMFilterActionIdentity::applyParamWidgetValue( QWidget * paramWidget )
+void KMFilterActionIdentity::applyParamWidgetValue( TQWidget * paramWidget )
{
KPIM::IdentityCombo * ic = dynamic_cast<KPIM::IdentityCombo*>( paramWidget );
assert( ic );
mParameter = ic->currentIdentity();
}
-void KMFilterActionIdentity::clearParamWidget( QWidget * paramWidget ) const
+void KMFilterActionIdentity::clearParamWidget( TQWidget * paramWidget ) const
{
KPIM::IdentityCombo * ic = dynamic_cast<KPIM::IdentityCombo*>( paramWidget );
assert( ic );
@@ -731,7 +731,7 @@ void KMFilterActionIdentity::clearParamWidget( QWidget * paramWidget ) const
//ic->setCurrentIdentity( kmkernel->identityManager()->defaultIdentity() );
}
-void KMFilterActionIdentity::setParamWidgetValue( QWidget * paramWidget ) const
+void KMFilterActionIdentity::setParamWidgetValue( TQWidget * paramWidget ) const
{
KPIM::IdentityCombo * ic = dynamic_cast<KPIM::IdentityCombo*>( paramWidget );
assert( ic );
@@ -753,9 +753,9 @@ public:
virtual bool isEmpty() const { return false; }
- virtual void argsFromString( const QString argsStr );
- virtual const QString argsAsString() const;
- virtual const QString displayString() const;
+ virtual void argsFromString( const TQString argsStr );
+ virtual const TQString argsAsString() const;
+ virtual const TQString displayString() const;
};
@@ -816,7 +816,7 @@ bool KMFilterActionSetStatus::requiresBody(KMMsgBase*) const
return false;
}
-void KMFilterActionSetStatus::argsFromString( const QString argsStr )
+void KMFilterActionSetStatus::argsFromString( const TQString argsStr )
{
if ( argsStr.length() == 1 ) {
for ( int i = 0 ; i < StatiCount ; i++ )
@@ -828,20 +828,20 @@ void KMFilterActionSetStatus::argsFromString( const QString argsStr )
mParameter = *mParameterList.at(0);
}
-const QString KMFilterActionSetStatus::argsAsString() const
+const TQString KMFilterActionSetStatus::argsAsString() const
{
int idx = mParameterList.findIndex( mParameter );
- if ( idx < 1 ) return QString::null;
+ if ( idx < 1 ) return TQString::null;
KMMsgStatus status = stati[idx-1];
return KMMsgBase::statusToStr(status);
}
-const QString KMFilterActionSetStatus::displayString() const
+const TQString KMFilterActionSetStatus::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
//=============================================================================
@@ -859,9 +859,9 @@ public:
virtual bool isEmpty() const { return false; }
- virtual void argsFromString( const QString argsStr );
- virtual const QString argsAsString() const;
- virtual const QString displayString() const;
+ virtual void argsFromString( const TQString argsStr );
+ virtual const TQString argsAsString() const;
+ virtual const TQString displayString() const;
};
@@ -908,7 +908,7 @@ KMFilterAction::ReturnCode KMFilterActionFakeDisposition::process(KMMessage* msg
return GoOn;
}
-void KMFilterActionFakeDisposition::argsFromString( const QString argsStr )
+void KMFilterActionFakeDisposition::argsFromString( const TQString argsStr )
{
if ( argsStr.length() == 1 ) {
if ( argsStr[0] == 'I' ) { // ignore
@@ -924,19 +924,19 @@ void KMFilterActionFakeDisposition::argsFromString( const QString argsStr )
mParameter = *mParameterList.at(0);
}
-const QString KMFilterActionFakeDisposition::argsAsString() const
+const TQString KMFilterActionFakeDisposition::argsAsString() const
{
int idx = mParameterList.findIndex( mParameter );
- if ( idx < 1 ) return QString::null;
+ if ( idx < 1 ) return TQString::null;
- return QString( QChar( idx < 2 ? 'I' : char(mdns[idx-2]) ) );
+ return TQString( TQChar( idx < 2 ? 'I' : char(mdns[idx-2]) ) );
}
-const QString KMFilterActionFakeDisposition::displayString() const
+const TQString KMFilterActionFakeDisposition::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
//=============================================================================
@@ -948,8 +948,8 @@ class KMFilterActionRemoveHeader: public KMFilterActionWithStringList
public:
KMFilterActionRemoveHeader();
virtual ReturnCode process(KMMessage* msg) const;
- virtual QWidget* createParamWidget( QWidget* parent ) const;
- virtual void setParamWidgetValue( QWidget* paramWidget ) const;
+ virtual TQWidget* createParamWidget( TQWidget* parent ) const;
+ virtual void setParamWidgetValue( TQWidget* paramWidget ) const;
static KMFilterAction* newAction();
};
@@ -971,10 +971,10 @@ KMFilterActionRemoveHeader::KMFilterActionRemoveHeader()
mParameter = *mParameterList.at(0);
}
-QWidget* KMFilterActionRemoveHeader::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionRemoveHeader::createParamWidget( TQWidget* parent ) const
{
- QComboBox *cb = new QComboBox( true/*editable*/, parent );
- cb->setInsertionPolicy( QComboBox::AtBottom );
+ TQComboBox *cb = new TQComboBox( true/*editable*/, parent );
+ cb->setInsertionPolicy( TQComboBox::AtBottom );
setParamWidgetValue( cb );
return cb;
}
@@ -988,9 +988,9 @@ KMFilterAction::ReturnCode KMFilterActionRemoveHeader::process(KMMessage* msg) c
return GoOn;
}
-void KMFilterActionRemoveHeader::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionRemoveHeader::setParamWidgetValue( TQWidget* paramWidget ) const
{
- QComboBox * cb = dynamic_cast<QComboBox*>(paramWidget);
+ TQComboBox * cb = dynamic_cast<TQComboBox*>(paramWidget);
Q_ASSERT( cb );
int idx = mParameterList.findIndex( mParameter );
@@ -1014,22 +1014,22 @@ class KMFilterActionAddHeader: public KMFilterActionWithStringList
public:
KMFilterActionAddHeader();
virtual ReturnCode process(KMMessage* msg) const;
- virtual QWidget* createParamWidget( QWidget* parent ) const;
- virtual void setParamWidgetValue( QWidget* paramWidget ) const;
- virtual void applyParamWidgetValue( QWidget* paramWidget );
- virtual void clearParamWidget( QWidget* paramWidget ) const;
+ virtual TQWidget* createParamWidget( TQWidget* parent ) const;
+ virtual void setParamWidgetValue( TQWidget* paramWidget ) const;
+ virtual void applyParamWidgetValue( TQWidget* paramWidget );
+ virtual void clearParamWidget( TQWidget* paramWidget ) const;
- virtual const QString argsAsString() const;
- virtual void argsFromString( const QString argsStr );
+ virtual const TQString argsAsString() const;
+ virtual void argsFromString( const TQString argsStr );
- virtual const QString displayString() const;
+ virtual const TQString displayString() const;
static KMFilterAction* newAction()
{
return (new KMFilterActionAddHeader);
}
private:
- QString mValue;
+ TQString mValue;
};
KMFilterActionAddHeader::KMFilterActionAddHeader()
@@ -1052,27 +1052,27 @@ KMFilterAction::ReturnCode KMFilterActionAddHeader::process(KMMessage* msg) cons
return GoOn;
}
-QWidget* KMFilterActionAddHeader::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionAddHeader::createParamWidget( TQWidget* parent ) const
{
- QWidget *w = new QWidget( parent );
- QHBoxLayout *hbl = new QHBoxLayout( w );
+ TQWidget *w = new TQWidget( parent );
+ TQHBoxLayout *hbl = new TQHBoxLayout( w );
hbl->setSpacing( 4 );
- QComboBox *cb = new QComboBox( true, w, "combo" );
- cb->setInsertionPolicy( QComboBox::AtBottom );
+ TQComboBox *cb = new TQComboBox( true, w, "combo" );
+ cb->setInsertionPolicy( TQComboBox::AtBottom );
hbl->addWidget( cb, 0 /* stretch */ );
- QLabel *l = new QLabel( i18n("With value:"), w );
+ TQLabel *l = new TQLabel( i18n("With value:"), w );
l->setFixedWidth( l->sizeHint().width() );
hbl->addWidget( l, 0 );
- QLineEdit *le = new KLineEdit( w, "ledit" );
+ TQLineEdit *le = new KLineEdit( w, "ledit" );
hbl->addWidget( le, 1 );
setParamWidgetValue( w );
return w;
}
-void KMFilterActionAddHeader::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionAddHeader::setParamWidgetValue( TQWidget* paramWidget ) const
{
int idx = mParameterList.findIndex( mParameter );
- QComboBox *cb = (QComboBox*)paramWidget->child("combo");
+ TQComboBox *cb = (TQComboBox*)paramWidget->child("combo");
Q_ASSERT( cb );
cb->clear();
cb->insertStringList( mParameterList );
@@ -1082,52 +1082,52 @@ void KMFilterActionAddHeader::setParamWidgetValue( QWidget* paramWidget ) const
} else {
cb->setCurrentItem( idx );
}
- QLineEdit *le = (QLineEdit*)paramWidget->child("ledit");
+ TQLineEdit *le = (TQLineEdit*)paramWidget->child("ledit");
Q_ASSERT( le );
le->setText( mValue );
}
-void KMFilterActionAddHeader::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionAddHeader::applyParamWidgetValue( TQWidget* paramWidget )
{
- QComboBox *cb = (QComboBox*)paramWidget->child("combo");
+ TQComboBox *cb = (TQComboBox*)paramWidget->child("combo");
Q_ASSERT( cb );
mParameter = cb->currentText();
- QLineEdit *le = (QLineEdit*)paramWidget->child("ledit");
+ TQLineEdit *le = (TQLineEdit*)paramWidget->child("ledit");
Q_ASSERT( le );
mValue = le->text();
}
-void KMFilterActionAddHeader::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionAddHeader::clearParamWidget( TQWidget* paramWidget ) const
{
- QComboBox *cb = (QComboBox*)paramWidget->child("combo");
+ TQComboBox *cb = (TQComboBox*)paramWidget->child("combo");
Q_ASSERT( cb );
cb->setCurrentItem(0);
- QLineEdit *le = (QLineEdit*)paramWidget->child("ledit");
+ TQLineEdit *le = (TQLineEdit*)paramWidget->child("ledit");
Q_ASSERT( le );
le->clear();
}
-const QString KMFilterActionAddHeader::argsAsString() const
+const TQString KMFilterActionAddHeader::argsAsString() const
{
- QString result = mParameter;
+ TQString result = mParameter;
result += '\t';
result += mValue;
return result;
}
-const QString KMFilterActionAddHeader::displayString() const
+const TQString KMFilterActionAddHeader::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
-void KMFilterActionAddHeader::argsFromString( const QString argsStr )
+void KMFilterActionAddHeader::argsFromString( const TQString argsStr )
{
- QStringList l = QStringList::split( '\t', argsStr, true /*allow empty entries*/ );
- QString s;
+ TQStringList l = TQStringList::split( '\t', argsStr, true /*allow empty entries*/ );
+ TQString s;
if ( l.count() < 2 ) {
s = l[0];
mValue = "";
@@ -1154,15 +1154,15 @@ class KMFilterActionRewriteHeader: public KMFilterActionWithStringList
public:
KMFilterActionRewriteHeader();
virtual ReturnCode process(KMMessage* msg) const;
- virtual QWidget* createParamWidget( QWidget* parent ) const;
- virtual void setParamWidgetValue( QWidget* paramWidget ) const;
- virtual void applyParamWidgetValue( QWidget* paramWidget );
- virtual void clearParamWidget( QWidget* paramWidget ) const;
+ virtual TQWidget* createParamWidget( TQWidget* parent ) const;
+ virtual void setParamWidgetValue( TQWidget* paramWidget ) const;
+ virtual void applyParamWidgetValue( TQWidget* paramWidget );
+ virtual void clearParamWidget( TQWidget* paramWidget ) const;
- virtual const QString argsAsString() const;
- virtual void argsFromString( const QString argsStr );
+ virtual const TQString argsAsString() const;
+ virtual void argsFromString( const TQString argsStr );
- virtual const QString displayString() const;
+ virtual const TQString displayString() const;
static KMFilterAction* newAction()
{
@@ -1170,7 +1170,7 @@ public:
}
private:
KRegExp3 mRegExp;
- QString mReplacementString;
+ TQString mReplacementString;
};
KMFilterActionRewriteHeader::KMFilterActionRewriteHeader()
@@ -1193,45 +1193,45 @@ KMFilterAction::ReturnCode KMFilterActionRewriteHeader::process(KMMessage* msg)
KRegExp3 rx = mRegExp; // KRegExp3::replace is not const.
- QString newValue = rx.replace( msg->headerField( mParameter.latin1() ),
+ TQString newValue = rx.replace( msg->headerField( mParameter.latin1() ),
mReplacementString );
msg->setHeaderField( mParameter.latin1(), newValue );
return GoOn;
}
-QWidget* KMFilterActionRewriteHeader::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionRewriteHeader::createParamWidget( TQWidget* parent ) const
{
- QWidget *w = new QWidget( parent );
- QHBoxLayout *hbl = new QHBoxLayout( w );
+ TQWidget *w = new TQWidget( parent );
+ TQHBoxLayout *hbl = new TQHBoxLayout( w );
hbl->setSpacing( 4 );
- QComboBox *cb = new QComboBox( true, w, "combo" );
- cb->setInsertionPolicy( QComboBox::AtBottom );
+ TQComboBox *cb = new TQComboBox( true, w, "combo" );
+ cb->setInsertionPolicy( TQComboBox::AtBottom );
hbl->addWidget( cb, 0 /* stretch */ );
- QLabel *l = new QLabel( i18n("Replace:"), w );
+ TQLabel *l = new TQLabel( i18n("Replace:"), w );
l->setFixedWidth( l->sizeHint().width() );
hbl->addWidget( l, 0 );
RegExpLineEdit *rele = new RegExpLineEdit( w, "search" );
hbl->addWidget( rele, 1 );
- l = new QLabel( i18n("With:"), w );
+ l = new TQLabel( i18n("With:"), w );
l->setFixedWidth( l->sizeHint().width() );
hbl->addWidget( l, 0 );
- QLineEdit *le = new KLineEdit( w, "replace" );
+ TQLineEdit *le = new KLineEdit( w, "replace" );
hbl->addWidget( le, 1 );
setParamWidgetValue( w );
return w;
}
-void KMFilterActionRewriteHeader::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionRewriteHeader::setParamWidgetValue( TQWidget* paramWidget ) const
{
int idx = mParameterList.findIndex( mParameter );
- QComboBox *cb = (QComboBox*)paramWidget->child("combo");
+ TQComboBox *cb = (TQComboBox*)paramWidget->child("combo");
Q_ASSERT( cb );
cb->clear();
@@ -1247,14 +1247,14 @@ void KMFilterActionRewriteHeader::setParamWidgetValue( QWidget* paramWidget ) co
Q_ASSERT( rele );
rele->setText( mRegExp.pattern() );
- QLineEdit *le = (QLineEdit*)paramWidget->child("replace");
+ TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace");
Q_ASSERT( le );
le->setText( mReplacementString );
}
-void KMFilterActionRewriteHeader::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionRewriteHeader::applyParamWidgetValue( TQWidget* paramWidget )
{
- QComboBox *cb = (QComboBox*)paramWidget->child("combo");
+ TQComboBox *cb = (TQComboBox*)paramWidget->child("combo");
Q_ASSERT( cb );
mParameter = cb->currentText();
@@ -1262,14 +1262,14 @@ void KMFilterActionRewriteHeader::applyParamWidgetValue( QWidget* paramWidget )
Q_ASSERT( rele );
mRegExp.setPattern( rele->text() );
- QLineEdit *le = (QLineEdit*)paramWidget->child("replace");
+ TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace");
Q_ASSERT( le );
mReplacementString = le->text();
}
-void KMFilterActionRewriteHeader::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionRewriteHeader::clearParamWidget( TQWidget* paramWidget ) const
{
- QComboBox *cb = (QComboBox*)paramWidget->child("combo");
+ TQComboBox *cb = (TQComboBox*)paramWidget->child("combo");
Q_ASSERT( cb );
cb->setCurrentItem(0);
@@ -1277,14 +1277,14 @@ void KMFilterActionRewriteHeader::clearParamWidget( QWidget* paramWidget ) const
Q_ASSERT( rele );
rele->clear();
- QLineEdit *le = (QLineEdit*)paramWidget->child("replace");
+ TQLineEdit *le = (TQLineEdit*)paramWidget->child("replace");
Q_ASSERT( le );
le->clear();
}
-const QString KMFilterActionRewriteHeader::argsAsString() const
+const TQString KMFilterActionRewriteHeader::argsAsString() const
{
- QString result = mParameter;
+ TQString result = mParameter;
result += '\t';
result += mRegExp.pattern();
result += '\t';
@@ -1293,17 +1293,17 @@ const QString KMFilterActionRewriteHeader::argsAsString() const
return result;
}
-const QString KMFilterActionRewriteHeader::displayString() const
+const TQString KMFilterActionRewriteHeader::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
-void KMFilterActionRewriteHeader::argsFromString( const QString argsStr )
+void KMFilterActionRewriteHeader::argsFromString( const TQString argsStr )
{
- QStringList l = QStringList::split( '\t', argsStr, true /*allow empty entries*/ );
- QString s;
+ TQStringList l = TQStringList::split( '\t', argsStr, true /*allow empty entries*/ );
+ TQString s;
s = l[0];
mRegExp.setPattern( l[1] );
@@ -1420,8 +1420,8 @@ void KMFilterActionCopy::processAsync(KMMessage* msg) const
ActionScheduler *handler = MessageProperty::filterHandler( msg );
KMCommand *cmd = new KMCopyCommand( mFolder, msg );
- QObject::connect( cmd, SIGNAL( completed( KMCommand * ) ),
- handler, SLOT( copyMessageFinished( KMCommand * ) ) );
+ TQObject::connect( cmd, TQT_SIGNAL( completed( KMCommand * ) ),
+ handler, TQT_SLOT( copyMessageFinished( KMCommand * ) ) );
cmd->start();
}
@@ -1473,7 +1473,7 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const
msg->initFromMessage( aMsg );
- // QString st = QString::fromUtf8( aMsg->createForwardBody() );
+ // TQString st = TQString::fromUtf8( aMsg->createForwardBody() );
TemplateParser parser( msg, TemplateParser::Forward,
aMsg->body(), false, false, false, false);
@@ -1485,7 +1485,7 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const
msg->body() );
if( encoding.isEmpty() )
encoding = "utf-8";
- QCString str = KMMsgBase::codecForName( encoding )->fromUnicode( msg->body() );
+ TQCString str = KMMsgBase::codecForName( encoding )->fromUnicode( msg->body() );
msg->setCharset( encoding );
msg->setTo( mParameter );
@@ -1498,7 +1498,7 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const
msg->setAutomaticFields( true );
msg->setHeaderField( "Content-Type", "text/plain" );
// msg->setCteStr( isQP ? "quoted-printable": "8bit" );
- QValueList<int> dummy;
+ TQValueList<int> dummy;
msg->setBodyAndGuessCte(str, dummy, !isQP);
msg->setCharset( encoding );
if( isQP )
@@ -1518,7 +1518,7 @@ KMFilterAction::ReturnCode KMFilterActionForward::process(KMMessage* aMsg) const
bodyPart.setTypeStr( "text" );
bodyPart.setSubtypeStr( "plain" );
// bodyPart.setCteStr( isQP ? "quoted-printable": "8bit" );
- QValueList<int> dummy;
+ TQValueList<int> dummy;
bodyPart.setBodyAndGuessCte(str, dummy, !isQP);
bodyPart.setCharset( encoding );
bodyPart.setBodyEncoded( str );
@@ -1621,7 +1621,7 @@ KMFilterAction::ReturnCode KMFilterActionExec::process(KMMessage *aMsg) const
class PipeJob : public KPIM::ThreadWeaver::Job
{
public:
- PipeJob(QObject* parent = 0 , const char* name = 0, KMMessage* aMsg = 0, QString cmd = 0, QString tempFileName = 0 )
+ PipeJob(TQObject* parent = 0 , const char* name = 0, KMMessage* aMsg = 0, TQString cmd = 0, TQString tempFileName = 0 )
: Job (parent, name),
mTempFileName(tempFileName),
mCmd(cmd),
@@ -1641,12 +1641,12 @@ class PipeJob : public KPIM::ThreadWeaver::Job
{
KPIM::ThreadWeaver::debug (1, "PipeJob::run: doing it .\n");
FILE *p;
- QByteArray ba;
+ TQByteArray ba;
// backup the serial number in case the header gets lost
- QString origSerNum = mMsg->headerField( "X-KMail-Filtered" );
+ TQString origSerNum = mMsg->headerField( "X-KMail-Filtered" );
- p = popen(QFile::encodeName(mCmd), "r");
+ p = popen(TQFile::encodeName(mCmd), "r");
int len =100;
char buffer[100];
// append data to ba:
@@ -1658,7 +1658,7 @@ class PipeJob : public KPIM::ThreadWeaver::Job
}
pclose(p);
if ( !ba.isEmpty() ) {
- KPIM::ThreadWeaver::debug (1, "PipeJob::run: %s", QString(ba).latin1() );
+ KPIM::ThreadWeaver::debug (1, "PipeJob::run: %s", TQString(ba).latin1() );
KMFolder *filterFolder = mMsg->parent();
ActionScheduler *handler = MessageProperty::filterHandler( mMsg->getMsgSerNum() );
@@ -1677,10 +1677,10 @@ class PipeJob : public KPIM::ThreadWeaver::Job
KPIM::ThreadWeaver::debug (1, "PipeJob::run: done.\n" );
// unlink the tempFile
- QFile::remove(mTempFileName);
+ TQFile::remove(mTempFileName);
}
- QString mTempFileName;
- QString mCmd;
+ TQString mTempFileName;
+ TQString mCmd;
KMMessage *mMsg;
};
@@ -1714,11 +1714,11 @@ void KMFilterActionExtFilter::processAsync(KMMessage* aMsg) const
KTempFile * inFile = new KTempFile;
inFile->setAutoDelete(false);
- QPtrList<KTempFile> atmList;
+ TQPtrList<KTempFile> atmList;
atmList.setAutoDelete(true);
atmList.append( inFile );
- QString commandLine = substituteCommandLineArgsFor( aMsg , atmList );
+ TQString commandLine = substituteCommandLineArgsFor( aMsg , atmList );
if ( commandLine.isEmpty() )
handler->actionMessage( ErrorButGoOn );
@@ -1732,13 +1732,13 @@ void KMFilterActionExtFilter::processAsync(KMMessage* aMsg) const
commandLine = "(" + commandLine + ") <" + inFile->name();
// write message to file
- QString tempFileName = inFile->name();
+ TQString tempFileName = inFile->name();
KPIM::kCStringToFile( aMsg->asString(), tempFileName, //###
false, false, false );
inFile->close();
PipeJob *job = new PipeJob(0, 0, aMsg, commandLine, tempFileName);
- QObject::connect ( job, SIGNAL( done() ), handler, SLOT( actionMessage() ) );
+ TQObject::connect ( job, TQT_SIGNAL( done() ), handler, TQT_SLOT( actionMessage() ) );
kmkernel->weaver()->enqueue(job);
}
@@ -1755,7 +1755,7 @@ public:
static KMFilterAction* newAction(void);
};
-KMFilterActionWithTest::KMFilterActionWithTest( const char* aName, const QString aLabel )
+KMFilterActionWithTest::KMFilterActionWithTest( const char* aName, const TQString aLabel )
: KMFilterAction( aName, aLabel )
{
}
@@ -1764,7 +1764,7 @@ KMFilterActionWithTest::~KMFilterActionWithTest()
{
}
-QWidget* KMFilterActionWithTest::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithTest::createParamWidget( TQWidget* parent ) const
{
KMSoundTestWidget *le = new KMSoundTestWidget(parent);
le->setUrl( mParameter );
@@ -1772,36 +1772,36 @@ QWidget* KMFilterActionWithTest::createParamWidget( QWidget* parent ) const
}
-void KMFilterActionWithTest::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithTest::applyParamWidgetValue( TQWidget* paramWidget )
{
mParameter = ((KMSoundTestWidget*)paramWidget)->url();
}
-void KMFilterActionWithTest::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithTest::setParamWidgetValue( TQWidget* paramWidget ) const
{
((KMSoundTestWidget*)paramWidget)->setUrl( mParameter );
}
-void KMFilterActionWithTest::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithTest::clearParamWidget( TQWidget* paramWidget ) const
{
((KMSoundTestWidget*)paramWidget)->clear();
}
-void KMFilterActionWithTest::argsFromString( const QString argsStr )
+void KMFilterActionWithTest::argsFromString( const TQString argsStr )
{
mParameter = argsStr;
}
-const QString KMFilterActionWithTest::argsAsString() const
+const TQString KMFilterActionWithTest::argsAsString() const
{
return mParameter;
}
-const QString KMFilterActionWithTest::displayString() const
+const TQString KMFilterActionWithTest::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
@@ -1819,11 +1819,11 @@ KMFilterAction::ReturnCode KMFilterActionExecSound::process(KMMessage*) const
{
if ( mParameter.isEmpty() )
return ErrorButGoOn;
- QString play = mParameter;
- QString file = QString::fromLatin1("file:");
+ TQString play = mParameter;
+ TQString file = TQString::fromLatin1("file:");
if (mParameter.startsWith(file))
play = mParameter.mid(file.length());
- KAudioPlayer::play(QFile::encodeName(play));
+ KAudioPlayer::play(TQFile::encodeName(play));
return GoOn;
}
@@ -1832,7 +1832,7 @@ bool KMFilterActionExecSound::requiresBody(KMMsgBase*) const
return false;
}
-KMFilterActionWithUrl::KMFilterActionWithUrl( const char* aName, const QString aLabel )
+KMFilterActionWithUrl::KMFilterActionWithUrl( const char* aName, const TQString aLabel )
: KMFilterAction( aName, aLabel )
{
}
@@ -1841,7 +1841,7 @@ KMFilterActionWithUrl::~KMFilterActionWithUrl()
{
}
-QWidget* KMFilterActionWithUrl::createParamWidget( QWidget* parent ) const
+TQWidget* KMFilterActionWithUrl::createParamWidget( TQWidget* parent ) const
{
KURLRequester *le = new KURLRequester(parent);
le->setURL( mParameter );
@@ -1849,36 +1849,36 @@ QWidget* KMFilterActionWithUrl::createParamWidget( QWidget* parent ) const
}
-void KMFilterActionWithUrl::applyParamWidgetValue( QWidget* paramWidget )
+void KMFilterActionWithUrl::applyParamWidgetValue( TQWidget* paramWidget )
{
mParameter = ((KURLRequester*)paramWidget)->url();
}
-void KMFilterActionWithUrl::setParamWidgetValue( QWidget* paramWidget ) const
+void KMFilterActionWithUrl::setParamWidgetValue( TQWidget* paramWidget ) const
{
((KURLRequester*)paramWidget)->setURL( mParameter );
}
-void KMFilterActionWithUrl::clearParamWidget( QWidget* paramWidget ) const
+void KMFilterActionWithUrl::clearParamWidget( TQWidget* paramWidget ) const
{
((KURLRequester*)paramWidget)->clear();
}
-void KMFilterActionWithUrl::argsFromString( const QString argsStr )
+void KMFilterActionWithUrl::argsFromString( const TQString argsStr )
{
mParameter = argsStr;
}
-const QString KMFilterActionWithUrl::argsAsString() const
+const TQString KMFilterActionWithUrl::argsAsString() const
{
return mParameter;
}
-const QString KMFilterActionWithUrl::displayString() const
+const TQString KMFilterActionWithUrl::displayString() const
{
// FIXME after string freeze:
// return i18n("").arg( );
- return label() + " \"" + QStyleSheet::escape( argsAsString() ) + "\"";
+ return label() + " \"" + TQStyleSheet::escape( argsAsString() ) + "\"";
}
@@ -1907,10 +1907,10 @@ void KMFilterActionDict::init(void)
insert( KMFilterActionExecSound::newAction );
// Register custom filter actions below this line.
}
-// The int in the QDict constructor (41) must be a prime
+// The int in the TQDict constructor (41) must be a prime
// and should be greater than the double number of KMFilterAction types
KMFilterActionDict::KMFilterActionDict()
- : QDict<KMFilterActionDesc>(41)
+ : TQDict<KMFilterActionDesc>(41)
{
mList.setAutoDelete(true);
init();
@@ -1923,8 +1923,8 @@ void KMFilterActionDict::insert( KMFilterActionNewFunc aNewFunc )
desc->name = action->name();
desc->label = action->label();
desc->create = aNewFunc;
- QDict<KMFilterActionDesc>::insert( desc->name, desc );
- QDict<KMFilterActionDesc>::insert( desc->label, desc );
+ TQDict<KMFilterActionDesc>::insert( desc->name, desc );
+ TQDict<KMFilterActionDesc>::insert( desc->label, desc );
mList.append( desc );
delete action;
}