diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kmail/antispamwizard.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/antispamwizard.cpp')
-rw-r--r-- | kmail/antispamwizard.cpp | 294 |
1 files changed, 147 insertions, 147 deletions
diff --git a/kmail/antispamwizard.cpp b/kmail/antispamwizard.cpp index bb8d74bbb..e01093fd3 100644 --- a/kmail/antispamwizard.cpp +++ b/kmail/antispamwizard.cpp @@ -49,16 +49,16 @@ #include <kmessagebox.h> #include <kprocess.h> -#include <qdom.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qtooltip.h> -#include <qwhatsthis.h> +#include <tqdom.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqtooltip.h> +#include <tqwhatsthis.h> using namespace KMail; AntiSpamWizard::AntiSpamWizard( WizardMode mode, - QWidget* parent, KMFolderTree * mainFolderTree ) + TQWidget* parent, KMFolderTree * mainFolderTree ) : KWizard( parent ), mInfoPage( 0 ), mSpamRulesPage( 0 ), @@ -77,7 +77,7 @@ AntiSpamWizard::AntiSpamWizard( WizardMode mode, else kdDebug(5006) << endl << "Considered anti-virus tools: " << endl; #endif - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { #ifndef NDEBUG kdDebug(5006) << "Predefined tool: " << (*it).getId() << endl; @@ -105,24 +105,24 @@ AntiSpamWizard::AntiSpamWizard( WizardMode mode, ( mMode == AntiSpam ) ? i18n( "Welcome to the KMail Anti-Spam Wizard" ) : i18n( "Welcome to the KMail Anti-Virus Wizard" ) ); - connect( mInfoPage, SIGNAL( selectionChanged( void ) ), - this, SLOT( checkProgramsSelections( void ) ) ); + connect( mInfoPage, TQT_SIGNAL( selectionChanged( void ) ), + this, TQT_SLOT( checkProgramsSelections( void ) ) ); if ( mMode == AntiSpam ) { mSpamRulesPage = new ASWizSpamRulesPage( 0, "", mainFolderTree ); addPage( mSpamRulesPage, i18n( "Options to fine-tune the handling of spam messages" )); - connect( mSpamRulesPage, SIGNAL( selectionChanged( void ) ), - this, SLOT( slotBuildSummary( void ) ) ); + connect( mSpamRulesPage, TQT_SIGNAL( selectionChanged( void ) ), + this, TQT_SLOT( slotBuildSummary( void ) ) ); } else { mVirusRulesPage = new ASWizVirusRulesPage( 0, "", mainFolderTree ); addPage( mVirusRulesPage, i18n( "Options to fine-tune the handling of virus messages" )); - connect( mVirusRulesPage, SIGNAL( selectionChanged( void ) ), - this, SLOT( checkVirusRulesSelections( void ) ) ); + connect( mVirusRulesPage, TQT_SIGNAL( selectionChanged( void ) ), + this, TQT_SLOT( checkVirusRulesSelections( void ) ) ); } - connect( this, SIGNAL( helpClicked( void) ), - this, SLOT( slotHelpClicked( void ) ) ); + connect( this, TQT_SIGNAL( helpClicked( void) ), + this, TQT_SLOT( slotHelpClicked( void ) ) ); setNextEnabled( mInfoPage, false ); @@ -133,7 +133,7 @@ AntiSpamWizard::AntiSpamWizard( WizardMode mode, setFinishEnabled( mSummaryPage, true ); } - QTimer::singleShot( 0, this, SLOT( checkToolAvailability( void ) ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( checkToolAvailability( void ) ) ); } @@ -150,13 +150,13 @@ void AntiSpamWizard::accept() << mVirusRulesPage->selectedFolderName() << endl; KMFilterActionDict dict; - QValueList<KMFilter*> filterList; + TQValueList<KMFilter*> filterList; bool replaceExistingFilters = false; // Let's start with virus detection and handling, // so we can avoid spam checks for viral messages if ( mMode == AntiVirus ) { - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) && ( mVirusRulesPage->pipeRulesSelected() && (*it).isVirusTool() ) ) @@ -165,7 +165,7 @@ void AntiSpamWizard::accept() // one single filter for each tool // (could get combined but so it's easier to understand for the user) KMFilter* pipeFilter = new KMFilter(); - QPtrList<KMFilterAction>* pipeFilterActions = pipeFilter->actions(); + TQPtrList<KMFilterAction>* pipeFilterActions = pipeFilter->actions(); KMFilterAction* pipeFilterAction = dict["filter app"]->create(); pipeFilterAction->argsFromString( (*it).getDetectCmd() ); pipeFilterActions->append( pipeFilterAction ); @@ -187,7 +187,7 @@ void AntiSpamWizard::accept() { // Sort out viruses depending on header fields set by the tools KMFilter* virusFilter = new KMFilter(); - QPtrList<KMFilterAction>* virusFilterActions = virusFilter->actions(); + TQPtrList<KMFilterAction>* virusFilterActions = virusFilter->actions(); KMFilterAction* virusFilterAction1 = dict["transfer"]->create(); virusFilterAction1->argsFromString( mVirusRulesPage->selectedFolderName() ); virusFilterActions->append( virusFilterAction1 ); @@ -199,14 +199,14 @@ void AntiSpamWizard::accept() KMSearchPattern* virusFilterPattern = virusFilter->pattern(); virusFilterPattern->setName( uniqueNameFor( i18n( "Virus handling" ) ) ); virusFilterPattern->setOp( KMSearchPattern::OpOr ); - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() )) { if ( (*it).isVirusTool() ) { - const QCString header = (*it).getDetectionHeader().ascii(); - const QString & pattern = (*it).getDetectionPattern(); + const TQCString header = (*it).getDetectionHeader().ascii(); + const TQString & pattern = (*it).getDetectionPattern(); if ( (*it).isUseRegExp() ) virusFilterPattern->append( KMSearchRule::createInstance( header, @@ -232,7 +232,7 @@ void AntiSpamWizard::accept() // ATM and needs to be replaced with a value from a (still missing) // checkbox in the GUI. At least, the replacement is announced in the GUI. replaceExistingFilters = true; - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) && (*it).isSpamTool() && !(*it).isDetectionOnly() ) @@ -241,7 +241,7 @@ void AntiSpamWizard::accept() // one single filter for each tool // (could get combined but so it's easier to understand for the user) KMFilter* pipeFilter = new KMFilter(); - QPtrList<KMFilterAction>* pipeFilterActions = pipeFilter->actions(); + TQPtrList<KMFilterAction>* pipeFilterActions = pipeFilter->actions(); KMFilterAction* pipeFilterAction = dict["filter app"]->create(); pipeFilterAction->argsFromString( (*it).getDetectCmd() ); pipeFilterActions->append( pipeFilterAction ); @@ -264,7 +264,7 @@ void AntiSpamWizard::accept() // Sort out spam depending on header fields set by the tools KMFilter* spamFilter = new KMFilter(); - QPtrList<KMFilterAction>* spamFilterActions = spamFilter->actions(); + TQPtrList<KMFilterAction>* spamFilterActions = spamFilter->actions(); if ( mSpamRulesPage->moveSpamSelected() ) { KMFilterAction* spamFilterAction1 = dict["transfer"]->create(); @@ -285,14 +285,14 @@ void AntiSpamWizard::accept() else spamFilterPattern->setName( uniqueNameFor( i18n( "Spam handling" ) ) ); spamFilterPattern->setOp( KMSearchPattern::OpOr ); - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) ) { if ( (*it).isSpamTool() ) { - const QCString header = (*it).getDetectionHeader().ascii(); - const QString & pattern = (*it).getDetectionPattern(); + const TQCString header = (*it).getDetectionHeader().ascii(); + const TQString & pattern = (*it).getDetectionPattern(); if ( (*it).isUseRegExp() ) spamFilterPattern->append( KMSearchRule::createInstance( header, @@ -316,7 +316,7 @@ void AntiSpamWizard::accept() // Sort out messages classified as unsure bool atLeastOneUnsurePattern = false; KMFilter* unsureFilter = new KMFilter(); - QPtrList<KMFilterAction>* unsureFilterActions = unsureFilter->actions(); + TQPtrList<KMFilterAction>* unsureFilterActions = unsureFilter->actions(); KMFilterAction* unsureFilterAction1 = dict["transfer"]->create(); unsureFilterAction1->argsFromString( mSpamRulesPage->selectedUnsureFolderName() ); unsureFilterActions->append( unsureFilterAction1 ); @@ -326,15 +326,15 @@ void AntiSpamWizard::accept() else unsureFilterPattern->setName( uniqueNameFor( i18n( "Semi spam (unsure) handling" ) ) ); unsureFilterPattern->setOp( KMSearchPattern::OpOr ); - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) ) { if ( (*it).isSpamTool() && (*it).hasTristateDetection()) { atLeastOneUnsurePattern = true; - const QCString header = (*it).getDetectionHeader().ascii(); - const QString & pattern = (*it).getDetectionPattern2(); + const TQCString header = (*it).getDetectionHeader().ascii(); + const TQString & pattern = (*it).getDetectionPattern2(); if ( (*it).isUseRegExp() ) unsureFilterPattern->append( KMSearchRule::createInstance( header, @@ -361,11 +361,11 @@ void AntiSpamWizard::accept() // Classify messages manually as Spam KMFilter* classSpamFilter = new KMFilter(); classSpamFilter->setIcon( "mail_spam" ); - QPtrList<KMFilterAction>* classSpamFilterActions = classSpamFilter->actions(); + TQPtrList<KMFilterAction>* classSpamFilterActions = classSpamFilter->actions(); KMFilterAction* classSpamFilterActionFirst = dict["set status"]->create(); classSpamFilterActionFirst->argsFromString( "P" ); classSpamFilterActions->append( classSpamFilterActionFirst ); - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) && (*it).useBayesFilter() && !(*it).isDetectionOnly() ) @@ -400,11 +400,11 @@ void AntiSpamWizard::accept() // Classify messages manually as not Spam / as Ham KMFilter* classHamFilter = new KMFilter(); classHamFilter->setIcon( "mail_ham" ); - QPtrList<KMFilterAction>* classHamFilterActions = classHamFilter->actions(); + TQPtrList<KMFilterAction>* classHamFilterActions = classHamFilter->actions(); KMFilterAction* classHamFilterActionFirst = dict["set status"]->create(); classHamFilterActionFirst->argsFromString( "H" ); classHamFilterActions->append( classHamFilterActionFirst ); - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) && (*it).useBayesFilter() && !(*it).isDetectionOnly() ) @@ -438,7 +438,7 @@ void AntiSpamWizard::accept() KMKernel::self()->filterMgr()->appendFilters( filterList, replaceExistingFilters ); - QDialog::accept(); + TQDialog::accept(); } @@ -449,7 +449,7 @@ void AntiSpamWizard::checkProgramsSelections() mSpamToolsUsed = false; mVirusToolsUsed = false; - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) ) { @@ -488,13 +488,13 @@ void AntiSpamWizard::checkToolAvailability() KCursorSaver busy( KBusyPtr::busy() ); bool found = false; - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { - QString text( i18n("Scanning for %1...").arg( (*it).getId() ) ); + TQString text( i18n("Scanning for %1...").arg( (*it).getId() ) ); mInfoPage->setScanProgressText( text ); if ( (*it).isSpamTool() && (*it).isServerBased() ) { // check the configured account for pattern in <server> - QString pattern = (*it).getServerPattern(); + TQString pattern = (*it).getServerPattern(); kdDebug(5006) << "Testing for server pattern:" << pattern << endl; AccountManager* mgr = kmkernel->acctMgr(); @@ -543,9 +543,9 @@ void AntiSpamWizard::slotHelpClicked() void AntiSpamWizard::slotBuildSummary() { - QString text; - QString newFilters; - QString replaceFilters; + TQString text; + TQString newFilters; + TQString replaceFilters; if ( mMode == AntiVirus ) { text = ""; // TODO add summary for the virus part @@ -562,7 +562,7 @@ void AntiSpamWizard::slotBuildSummary() else text += i18n( "<br>Spam messages are not moved into a certain folder.</p>" ); - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) && (*it).isSpamTool() && !(*it).isDetectionOnly() ) { @@ -574,7 +574,7 @@ void AntiSpamWizard::slotBuildSummary() // The need for a andling of status "probably spam" depends on the tools chosen if ( mSpamRulesPage->moveUnsureSelected() ) { bool atLeastOneUnsurePattern = false; - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( mInfoPage->isProgramSelected( (*it).getVisibleName() ) ) { if ( (*it).isSpamTool() && (*it).hasTristateDetection()) @@ -608,7 +608,7 @@ void AntiSpamWizard::slotBuildSummary() } -int AntiSpamWizard::checkForProgram( const QString &executable ) +int AntiSpamWizard::checkForProgram( const TQString &executable ) { kdDebug(5006) << "Testing for executable:" << executable << endl; KProcess process; @@ -626,15 +626,15 @@ bool AntiSpamWizard::anyVirusOptionChecked() } -const QString AntiSpamWizard::uniqueNameFor( const QString & name ) +const TQString AntiSpamWizard::uniqueNameFor( const TQString & name ) { return KMKernel::self()->filterMgr()->createUniqueName( name ); } void AntiSpamWizard::sortFilterOnExistance( - const QString & intendedFilterName, - QString & newFilters, QString & replaceFilters ) + const TQString & intendedFilterName, + TQString & newFilters, TQString & replaceFilters ) { if ( uniqueNameFor( intendedFilterName ) == intendedFilterName ) newFilters += "<li>" + intendedFilterName + "</li>"; @@ -644,10 +644,10 @@ void AntiSpamWizard::sortFilterOnExistance( //--------------------------------------------------------------------------- -AntiSpamWizard::SpamToolConfig::SpamToolConfig( QString toolId, - int configVersion, int prio, QString name, QString exec, - QString url, QString filter, QString detection, QString spam, QString ham, - QString header, QString pattern, QString pattern2, QString serverPattern, +AntiSpamWizard::SpamToolConfig::SpamToolConfig( TQString toolId, + int configVersion, int prio, TQString name, TQString exec, + TQString url, TQString filter, TQString detection, TQString spam, TQString ham, + TQString header, TQString pattern, TQString pattern2, TQString serverPattern, bool detectionOnly, bool regExp, bool bayesFilter, bool tristateDetection, WizardMode type ) : mId( toolId ), mVersion( configVersion ), mPrio( prio ), @@ -670,7 +670,7 @@ bool AntiSpamWizard::SpamToolConfig::isServerBased() const //--------------------------------------------------------------------------- AntiSpamWizard::ConfigReader::ConfigReader( WizardMode mode, - QValueList<SpamToolConfig> & configList ) + TQValueList<SpamToolConfig> & configList ) : mToolList( configList ), mMode( mode ) { @@ -688,9 +688,9 @@ AntiSpamWizard::ConfigReader::~ConfigReader( ) void AntiSpamWizard::ConfigReader::readAndMergeConfig() { - QString groupName = ( mMode == AntiSpam ) - ? QString("Spamtool #%1") - : QString("Virustool #%1"); + TQString groupName = ( mMode == AntiSpam ) + ? TQString("Spamtool #%1") + : TQString("Virustool #%1"); // read the configuration from the global config file mConfig->setReadDefaults( true ); KConfigGroup general( mConfig, "General" ); @@ -727,24 +727,24 @@ void AntiSpamWizard::ConfigReader::readAndMergeConfig() AntiSpamWizard::SpamToolConfig AntiSpamWizard::ConfigReader::readToolConfig( KConfigGroup & configGroup ) { - QString id = configGroup.readEntry( "Ident" ); + TQString id = configGroup.readEntry( "Ident" ); int version = configGroup.readNumEntry( "Version" ); #ifndef NDEBUG kdDebug(5006) << "Found predefined tool: " << id << endl; kdDebug(5006) << "With config version : " << version << endl; #endif int prio = configGroup.readNumEntry( "Priority", 1 ); - QString name = configGroup.readEntry( "VisibleName" ); - QString executable = configGroup.readEntry( "Executable" ); - QString url = configGroup.readEntry( "URL" ); - QString filterName = configGroup.readEntry( "PipeFilterName" ); - QString detectCmd = configGroup.readEntry( "PipeCmdDetect" ); - QString spamCmd = configGroup.readEntry( "ExecCmdSpam" ); - QString hamCmd = configGroup.readEntry( "ExecCmdHam" ); - QString header = configGroup.readEntry( "DetectionHeader" ); - QString pattern = configGroup.readEntry( "DetectionPattern" ); - QString pattern2 = configGroup.readEntry( "DetectionPattern2" ); - QString serverPattern = configGroup.readEntry( "ServerPattern" ); + TQString name = configGroup.readEntry( "VisibleName" ); + TQString executable = configGroup.readEntry( "Executable" ); + TQString url = configGroup.readEntry( "URL" ); + TQString filterName = configGroup.readEntry( "PipeFilterName" ); + TQString detectCmd = configGroup.readEntry( "PipeCmdDetect" ); + TQString spamCmd = configGroup.readEntry( "ExecCmdSpam" ); + TQString hamCmd = configGroup.readEntry( "ExecCmdHam" ); + TQString header = configGroup.readEntry( "DetectionHeader" ); + TQString pattern = configGroup.readEntry( "DetectionPattern" ); + TQString pattern2 = configGroup.readEntry( "DetectionPattern2" ); + TQString serverPattern = configGroup.readEntry( "ServerPattern" ); bool detectionOnly = configGroup.readBoolEntry( "DetectionOnly", false ); bool useRegExp = configGroup.readBoolEntry( "UseRegExp" ); bool supportsBayes = configGroup.readBoolEntry( "SupportsBayes", false ); @@ -773,7 +773,7 @@ AntiSpamWizard::SpamToolConfig AntiSpamWizard::ConfigReader::createDummyConfig() void AntiSpamWizard::ConfigReader::mergeToolConfig( AntiSpamWizard::SpamToolConfig config ) { bool found = false; - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { #ifndef NDEBUG kdDebug(5006) << "Check against tool: " << (*it).getId() << endl; @@ -800,13 +800,13 @@ void AntiSpamWizard::ConfigReader::mergeToolConfig( AntiSpamWizard::SpamToolConf void AntiSpamWizard::ConfigReader::sortToolList() { - QValueList<SpamToolConfig> tmpList; + TQValueList<SpamToolConfig> tmpList; SpamToolConfig config; while ( !mToolList.isEmpty() ) { - QValueListIterator<SpamToolConfig> highest; + TQValueListIterator<SpamToolConfig> highest; int priority = 0; // ascending - for ( QValueListIterator<SpamToolConfig> it = mToolList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = mToolList.begin(); it != mToolList.end(); ++it ) { if ( (*it).getPrio() > priority ) { priority = (*it).getPrio(); @@ -817,7 +817,7 @@ void AntiSpamWizard::ConfigReader::sortToolList() tmpList.append( config ); mToolList.remove( highest ); } - for ( QValueListIterator<SpamToolConfig> it = tmpList.begin(); + for ( TQValueListIterator<SpamToolConfig> it = tmpList.begin(); it != tmpList.end(); ++it ) { mToolList.append( (*it) ); } @@ -825,35 +825,35 @@ void AntiSpamWizard::ConfigReader::sortToolList() //--------------------------------------------------------------------------- -ASWizPage::ASWizPage( QWidget * parent, const char * name, - const QString *bannerName ) - : QWidget( parent, name ) +ASWizPage::ASWizPage( TQWidget * parent, const char * name, + const TQString *bannerName ) + : TQWidget( parent, name ) { - QString banner = "kmwizard.png"; + TQString banner = "kmwizard.png"; if ( bannerName && !bannerName->isEmpty() ) banner = *bannerName; - mLayout = new QHBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); - mPixmap = new QPixmap( UserIcon(banner) ); - mBannerLabel = new QLabel( this ); + mLayout = new TQHBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + mPixmap = new TQPixmap( UserIcon(banner) ); + mBannerLabel = new TQLabel( this ); mBannerLabel->setPixmap( *mPixmap ); mBannerLabel->setScaledContents( false ); - mBannerLabel->setFrameShape( QFrame::StyledPanel ); - mBannerLabel->setFrameShadow( QFrame::Sunken ); + mBannerLabel->setFrameShape( TQFrame::StyledPanel ); + mBannerLabel->setFrameShadow( TQFrame::Sunken ); mLayout->addWidget( mBannerLabel ); - mLayout->addItem( new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); + mLayout->addItem( new TQSpacerItem( 5, 5, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) ); } //--------------------------------------------------------------------------- ASWizInfoPage::ASWizInfoPage( AntiSpamWizard::WizardMode mode, - QWidget * parent, const char * name ) + TQWidget * parent, const char * name ) : ASWizPage( parent, name ) { - QBoxLayout * layout = new QVBoxLayout( mLayout ); + TQBoxLayout * layout = new TQVBoxLayout( mLayout ); - mIntroText = new QLabel( this ); + mIntroText = new TQLabel( this ); mIntroText->setText( ( mode == AntiSpamWizard::AntiSpam ) ? i18n( @@ -877,20 +877,20 @@ ASWizInfoPage::ASWizInfoPage( AntiSpamWizard::WizardMode mode, ) ); layout->addWidget( mIntroText ); - mScanProgressText = new QLabel( this ); + mScanProgressText = new TQLabel( this ); mScanProgressText->setText( "" ) ; layout->addWidget( mScanProgressText ); mToolsList = new KListBox( this ); mToolsList->hide(); - mToolsList->setSelectionMode( QListBox::Multi ); - mToolsList->setRowMode( QListBox::FixedNumber ); + mToolsList->setSelectionMode( TQListBox::Multi ); + mToolsList->setRowMode( TQListBox::FixedNumber ); mToolsList->setRowMode( 10 ); layout->addWidget( mToolsList ); - connect( mToolsList, SIGNAL(selectionChanged()), - this, SLOT(processSelectionChange(void)) ); + connect( mToolsList, TQT_SIGNAL(selectionChanged()), + this, TQT_SLOT(processSelectionChange(void)) ); - mSelectionHint = new QLabel( this ); + mSelectionHint = new TQLabel( this ); mSelectionHint->setText( "" ); layout->addWidget( mSelectionHint ); @@ -898,15 +898,15 @@ ASWizInfoPage::ASWizInfoPage( AntiSpamWizard::WizardMode mode, } -void ASWizInfoPage::setScanProgressText( const QString &toolName ) +void ASWizInfoPage::setScanProgressText( const TQString &toolName ) { mScanProgressText->setText( toolName ); } -void ASWizInfoPage::addAvailableTool( const QString &visibleName ) +void ASWizInfoPage::addAvailableTool( const TQString &visibleName ) { - QString listName = visibleName; + TQString listName = visibleName; mToolsList->insertItem( listName ); if ( !mToolsList->isVisible() ) { @@ -918,9 +918,9 @@ void ASWizInfoPage::addAvailableTool( const QString &visibleName ) } } -bool ASWizInfoPage::isProgramSelected( const QString &visibleName ) +bool ASWizInfoPage::isProgramSelected( const TQString &visibleName ) { - QString listName = visibleName; + TQString listName = visibleName; return mToolsList->isSelected( mToolsList->findItem( listName ) ); } @@ -932,19 +932,19 @@ void ASWizInfoPage::processSelectionChange() //--------------------------------------------------------------------------- -ASWizSpamRulesPage::ASWizSpamRulesPage( QWidget * parent, const char * name, +ASWizSpamRulesPage::ASWizSpamRulesPage( TQWidget * parent, const char * name, KMFolderTree * mainFolderTree ) : ASWizPage( parent, name ) { - QVBoxLayout *layout = new QVBoxLayout( mLayout ); + TQVBoxLayout *layout = new TQVBoxLayout( mLayout ); - mMarkRules = new QCheckBox( i18n("&Mark detected spam messages as read"), this ); - QWhatsThis::add( mMarkRules, + mMarkRules = new TQCheckBox( i18n("&Mark detected spam messages as read"), this ); + TQWhatsThis::add( mMarkRules, i18n( "Mark messages which have been classified as spam as read.") ); layout->addWidget( mMarkRules); - mMoveSpamRules = new QCheckBox( i18n("Move &known spam to:"), this ); - QWhatsThis::add( mMoveSpamRules, + mMoveSpamRules = new TQCheckBox( i18n("Move &known spam to:"), this ); + TQWhatsThis::add( mMoveSpamRules, i18n( "The default folder for spam messages is the trash folder, " "but you may change that in the folder view below.") ); layout->addWidget( mMoveSpamRules ); @@ -955,12 +955,12 @@ ASWizSpamRulesPage::ASWizSpamRulesPage( QWidget * parent, const char * name, mFolderReqForSpamFolder->setShowOutbox( false ); mFolderReqForSpamFolder->setShowImapFolders( false ); - QHBoxLayout *hLayout1 = new QHBoxLayout( layout ); + TQHBoxLayout *hLayout1 = new TQHBoxLayout( layout ); hLayout1->addSpacing( KDialog::spacingHint() * 3 ); hLayout1->addWidget( mFolderReqForSpamFolder ); - mMoveUnsureRules = new QCheckBox( i18n("Move &probable spam to:"), this ); - QWhatsThis::add( mMoveUnsureRules, + mMoveUnsureRules = new TQCheckBox( i18n("Move &probable spam to:"), this ); + TQWhatsThis::add( mMoveUnsureRules, i18n( "The default folder is the inbox folder, but you may change that " "in the folder view below.<p>" "Not all tools support a classification as unsure. If you haven't " @@ -973,22 +973,22 @@ ASWizSpamRulesPage::ASWizSpamRulesPage( QWidget * parent, const char * name, mFolderReqForUnsureFolder->setShowOutbox( false ); mFolderReqForUnsureFolder->setShowImapFolders( false ); - QHBoxLayout *hLayout2 = new QHBoxLayout( layout ); + TQHBoxLayout *hLayout2 = new TQHBoxLayout( layout ); hLayout2->addSpacing( KDialog::spacingHint() * 3 ); hLayout2->addWidget( mFolderReqForUnsureFolder ); layout->addStretch(); - connect( mMarkRules, SIGNAL(clicked()), - this, SLOT(processSelectionChange(void)) ); - connect( mMoveSpamRules, SIGNAL(clicked()), - this, SLOT(processSelectionChange(void)) ); - connect( mMoveUnsureRules, SIGNAL(clicked()), - this, SLOT(processSelectionChange(void)) ); - connect( mFolderReqForSpamFolder, SIGNAL(folderChanged(KMFolder*)), - this, SLOT(processSelectionChange(KMFolder*)) ); - connect( mFolderReqForUnsureFolder, SIGNAL(folderChanged(KMFolder*)), - this, SLOT(processSelectionChange(KMFolder*)) ); + connect( mMarkRules, TQT_SIGNAL(clicked()), + this, TQT_SLOT(processSelectionChange(void)) ); + connect( mMoveSpamRules, TQT_SIGNAL(clicked()), + this, TQT_SLOT(processSelectionChange(void)) ); + connect( mMoveUnsureRules, TQT_SIGNAL(clicked()), + this, TQT_SLOT(processSelectionChange(void)) ); + connect( mFolderReqForSpamFolder, TQT_SIGNAL(folderChanged(KMFolder*)), + this, TQT_SLOT(processSelectionChange(KMFolder*)) ); + connect( mFolderReqForUnsureFolder, TQT_SIGNAL(folderChanged(KMFolder*)), + this, TQT_SLOT(processSelectionChange(KMFolder*)) ); mMarkRules->setChecked( true ); mMoveSpamRules->setChecked( true ); @@ -1013,18 +1013,18 @@ bool ASWizSpamRulesPage::moveUnsureSelected() const } -QString ASWizSpamRulesPage::selectedSpamFolderName() const +TQString ASWizSpamRulesPage::selectedSpamFolderName() const { - QString name = "trash"; + TQString name = "trash"; if ( mFolderReqForSpamFolder->folder() ) name = mFolderReqForSpamFolder->folder()->idString(); return name; } -QString ASWizSpamRulesPage::selectedUnsureFolderName() const +TQString ASWizSpamRulesPage::selectedUnsureFolderName() const { - QString name = "inbox"; + TQString name = "inbox"; if ( mFolderReqForUnsureFolder->folder() ) name = mFolderReqForUnsureFolder->folder()->idString(); return name; @@ -1055,48 +1055,48 @@ void ASWizSpamRulesPage::allowUnsureFolderSelection( bool enabled ) //--------------------------------------------------------------------------- -ASWizVirusRulesPage::ASWizVirusRulesPage( QWidget * parent, const char * name, +ASWizVirusRulesPage::ASWizVirusRulesPage( TQWidget * parent, const char * name, KMFolderTree * mainFolderTree ) : ASWizPage( parent, name ) { - QGridLayout *grid = new QGridLayout( mLayout, 5, 1, KDialog::spacingHint() ); + TQGridLayout *grid = new TQGridLayout( mLayout, 5, 1, KDialog::spacingHint() ); - mPipeRules = new QCheckBox( i18n("Check messages using the anti-virus tools"), this ); - QWhatsThis::add( mPipeRules, + mPipeRules = new TQCheckBox( i18n("Check messages using the anti-virus tools"), this ); + TQWhatsThis::add( mPipeRules, i18n( "Let the anti-virus tools check your messages. The wizard " "will create appropriate filters. The messages are usually " "marked by the tools so that following filters can react " "on this and, for example, move virus messages to a special folder.") ); grid->addWidget( mPipeRules, 0, 0 ); - mMoveRules = new QCheckBox( i18n("Move detected viral messages to the selected folder"), this ); - QWhatsThis::add( mMoveRules, + mMoveRules = new TQCheckBox( i18n("Move detected viral messages to the selected folder"), this ); + TQWhatsThis::add( mMoveRules, i18n( "A filter to detect messages classified as virus-infected and to move " "those messages into a predefined folder is created. The " "default folder is the trash folder, but you may change that " "in the folder view.") ); grid->addWidget( mMoveRules, 1, 0 ); - mMarkRules = new QCheckBox( i18n("Additionally, mark detected viral messages as read"), this ); + mMarkRules = new TQCheckBox( i18n("Additionally, mark detected viral messages as read"), this ); mMarkRules->setEnabled( false ); - QWhatsThis::add( mMarkRules, + TQWhatsThis::add( mMarkRules, i18n( "Mark messages which have been classified as " "virus-infected as read, as well as moving them " "to the selected folder.") ); grid->addWidget( mMarkRules, 2, 0 ); - QString s = "trash"; + TQString s = "trash"; mFolderTree = new SimpleFolderTree( this, mainFolderTree, s, true ); grid->addWidget( mFolderTree, 3, 0 ); - connect( mPipeRules, SIGNAL(clicked()), - this, SLOT(processSelectionChange(void)) ); - connect( mMoveRules, SIGNAL(clicked()), - this, SLOT(processSelectionChange(void)) ); - connect( mMarkRules, SIGNAL(clicked()), - this, SLOT(processSelectionChange(void)) ); - connect( mMoveRules, SIGNAL( toggled( bool ) ), - mMarkRules, SLOT( setEnabled( bool ) ) ); + connect( mPipeRules, TQT_SIGNAL(clicked()), + this, TQT_SLOT(processSelectionChange(void)) ); + connect( mMoveRules, TQT_SIGNAL(clicked()), + this, TQT_SLOT(processSelectionChange(void)) ); + connect( mMarkRules, TQT_SIGNAL(clicked()), + this, TQT_SLOT(processSelectionChange(void)) ); + connect( mMoveRules, TQT_SIGNAL( toggled( bool ) ), + mMarkRules, TQT_SLOT( setEnabled( bool ) ) ); } bool ASWizVirusRulesPage::pipeRulesSelected() const @@ -1116,9 +1116,9 @@ bool ASWizVirusRulesPage::markReadRulesSelected() const } -QString ASWizVirusRulesPage::selectedFolderName() const +TQString ASWizVirusRulesPage::selectedFolderName() const { - QString name = "trash"; + TQString name = "trash"; if ( mFolderTree->folder() ) name = mFolderTree->folder()->idString(); return name; @@ -1131,18 +1131,18 @@ void ASWizVirusRulesPage::processSelectionChange() //--------------------------------------------------------------------------- -ASWizSummaryPage::ASWizSummaryPage( QWidget * parent, const char * name ) +ASWizSummaryPage::ASWizSummaryPage( TQWidget * parent, const char * name ) : ASWizPage( parent, name ) { - QBoxLayout * layout = new QVBoxLayout( mLayout ); + TQBoxLayout * layout = new TQVBoxLayout( mLayout ); - mSummaryText = new QLabel( this ); + mSummaryText = new TQLabel( this ); layout->addWidget( mSummaryText ); layout->addStretch(); } -void ASWizSummaryPage::setSummaryText( const QString & text ) +void ASWizSummaryPage::setSummaryText( const TQString & text ) { mSummaryText->setText( text ); } |