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/searchwindow.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/searchwindow.cpp')
-rw-r--r-- | kmail/searchwindow.cpp | 236 |
1 files changed, 118 insertions, 118 deletions
diff --git a/kmail/searchwindow.cpp b/kmail/searchwindow.cpp index 7b9ef5588..81d64167f 100644 --- a/kmail/searchwindow.cpp +++ b/kmail/searchwindow.cpp @@ -43,16 +43,16 @@ #include <kstdaction.h> #include <kiconloader.h> -#include <qcheckbox.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqlayout.h> #include <klineedit.h> -#include <qpushbutton.h> -#include <qradiobutton.h> -#include <qbuttongroup.h> -#include <qcombobox.h> -#include <qobjectlist.h> //for mPatternEdit->queryList( 0, "mRuleField" )->first(); -#include <qcursor.h> -#include <qpopupmenu.h> +#include <tqpushbutton.h> +#include <tqradiobutton.h> +#include <tqbuttongroup.h> +#include <tqcombobox.h> +#include <tqobjectlist.h> //for mPatternEdit->queryList( 0, "mRuleField" )->first(); +#include <tqcursor.h> +#include <tqpopupmenu.h> #include <maillistdrag.h> using namespace KPIM; @@ -71,13 +71,13 @@ const int SearchWindow::MSGID_COLUMN = 4; class MatchListView : public KListView { public: - MatchListView( QWidget *parent, SearchWindow* sw, const char* name = 0 ) : + MatchListView( TQWidget *parent, SearchWindow* sw, const char* name = 0 ) : KListView( parent, name ), mSearchWindow( sw ) {} protected: - virtual QDragObject* dragObject() + virtual TQDragObject* dragObject() { KMMessageList list = mSearchWindow->selectedMessages(); MailList mailList; @@ -91,11 +91,11 @@ class MatchListView : public KListView } MailListDrag *d = new MailListDrag( mailList, viewport(), new KMTextSource ); - QPixmap pixmap; + TQPixmap pixmap; if( mailList.count() == 1 ) - pixmap = QPixmap( DesktopIcon("message", KIcon::SizeSmall) ); + pixmap = TQPixmap( DesktopIcon("message", KIcon::SizeSmall) ); else - pixmap = QPixmap( DesktopIcon("kmultiple", KIcon::SizeSmall) ); + pixmap = TQPixmap( DesktopIcon("kmultiple", KIcon::SizeSmall) ); d->setPixmap( pixmap ); return d; @@ -117,7 +117,7 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, mSortColumn(0), mSortOrder(Ascending), mFolder(0), - mTimer(new QTimer(this, "mTimer")), + mTimer(new TQTimer(this, "mTimer")), mLastFocus(0), mKMMainWidget(w) { @@ -132,18 +132,18 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, KConfig* config = KMKernel::config(); config->setGroup("SearchDialog"); - QWidget* searchWidget = new QWidget(this); - QVBoxLayout *vbl = new QVBoxLayout( searchWidget, 0, spacingHint(), "kmfs_vbl" ); + TQWidget* searchWidget = new TQWidget(this); + TQVBoxLayout *vbl = new TQVBoxLayout( searchWidget, 0, spacingHint(), "kmfs_vbl" ); - QButtonGroup * radioGroup = new QButtonGroup( searchWidget ); + TQButtonGroup * radioGroup = new TQButtonGroup( searchWidget ); radioGroup->hide(); - mChkbxAllFolders = new QRadioButton(i18n("Search in &all local folders"), searchWidget); + mChkbxAllFolders = new TQRadioButton(i18n("Search in &all local folders"), searchWidget); vbl->addWidget( mChkbxAllFolders ); radioGroup->insert( mChkbxAllFolders ); - QHBoxLayout *hbl = new QHBoxLayout( vbl, spacingHint(), "kmfs_hbl" ); - mChkbxSpecificFolders = new QRadioButton(i18n("Search &only in:"), searchWidget); + TQHBoxLayout *hbl = new TQHBoxLayout( vbl, spacingHint(), "kmfs_hbl" ); + mChkbxSpecificFolders = new TQRadioButton(i18n("Search &only in:"), searchWidget); hbl->addWidget(mChkbxSpecificFolders); mChkbxSpecificFolders->setChecked(true); radioGroup->insert( mChkbxSpecificFolders ); @@ -154,16 +154,16 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, mCbxFolders->setFolder(curFolder); hbl->addWidget(mCbxFolders); - mChkSubFolders = new QCheckBox(i18n("I&nclude sub-folders"), searchWidget); + mChkSubFolders = new TQCheckBox(i18n("I&nclude sub-folders"), searchWidget); mChkSubFolders->setChecked(true); hbl->addWidget(mChkSubFolders); - QWidget *spacer = new QWidget( searchWidget, "spacer" ); + TQWidget *spacer = new TQWidget( searchWidget, "spacer" ); spacer->setMinimumHeight( 2 ); vbl->addWidget( spacer ); mPatternEdit = new KMSearchPatternEdit( "", searchWidget , "spe", false, true ); - mPatternEdit->setFrameStyle( QFrame::NoFrame | QFrame::Plain ); + mPatternEdit->setFrameStyle( TQFrame::NoFrame | TQFrame::Plain ); mPatternEdit->setInsideMargin( 0 ); mSearchPattern = new KMSearchPattern(); KMFolderSearch *searchFolder = 0; @@ -184,23 +184,23 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, mFolder = searchFolder; } mPatternEdit->setSearchPattern( mSearchPattern ); - QObjectList *list = mPatternEdit->queryList( 0, "mRuleField" ); - QObject *object = 0; + TQObjectList *list = mPatternEdit->queryList( 0, "mRuleField" ); + TQObject *object = 0; if ( list ) object = list->first(); delete list; - if (!searchFolder && object && ::qt_cast<QComboBox*>(object)) - static_cast<QComboBox*>(object)->setCurrentText("Subject"); + if (!searchFolder && object && ::qt_cast<TQComboBox*>(object)) + static_cast<TQComboBox*>(object)->setCurrentText("Subject"); vbl->addWidget( mPatternEdit ); // enable/disable widgets depending on radio buttons: - connect( mChkbxSpecificFolders, SIGNAL(toggled(bool)), - mCbxFolders, SLOT(setEnabled(bool)) ); - connect( mChkbxSpecificFolders, SIGNAL(toggled(bool)), - mChkSubFolders, SLOT(setEnabled(bool)) ); - connect( mChkbxAllFolders, SIGNAL(toggled(bool)), - this, SLOT(setEnabledSearchButton(bool)) ); + connect( mChkbxSpecificFolders, TQT_SIGNAL(toggled(bool)), + mCbxFolders, TQT_SLOT(setEnabled(bool)) ); + connect( mChkbxSpecificFolders, TQT_SIGNAL(toggled(bool)), + mChkSubFolders, TQT_SLOT(setEnabled(bool)) ); + connect( mChkbxAllFolders, TQT_SIGNAL(toggled(bool)), + this, TQT_SLOT(setEnabledSearchButton(bool)) ); mLbxMatches = new MatchListView(searchWidget, this, "Find Messages"); @@ -231,22 +231,22 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, config->readNumEntry("FolderWidth", 100)); mLbxMatches->addColumn(""); // should be hidden - mLbxMatches->setColumnWidthMode( MSGID_COLUMN, QListView::Manual ); + mLbxMatches->setColumnWidthMode( MSGID_COLUMN, TQListView::Manual ); mLbxMatches->setColumnWidth(MSGID_COLUMN, 0); mLbxMatches->header()->setResizeEnabled(false, MSGID_COLUMN); mLbxMatches->setDragEnabled( true ); - connect(mLbxMatches, SIGNAL(doubleClicked(QListViewItem *)), - this, SLOT(slotShowMsg(QListViewItem *))); - connect(mLbxMatches, SIGNAL(currentChanged(QListViewItem *)), - this, SLOT(slotCurrentChanged(QListViewItem *))); - connect( mLbxMatches, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint &, int )), - this, SLOT( slotContextMenuRequested( QListViewItem*, const QPoint &, int ))); + connect(mLbxMatches, TQT_SIGNAL(doubleClicked(TQListViewItem *)), + this, TQT_SLOT(slotShowMsg(TQListViewItem *))); + connect(mLbxMatches, TQT_SIGNAL(currentChanged(TQListViewItem *)), + this, TQT_SLOT(slotCurrentChanged(TQListViewItem *))); + connect( mLbxMatches, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint &, int )), + this, TQT_SLOT( slotContextMenuRequested( TQListViewItem*, const TQPoint &, int ))); vbl->addWidget(mLbxMatches); - QHBoxLayout *hbl2 = new QHBoxLayout( vbl, spacingHint(), "kmfs_hbl2" ); - mSearchFolderLbl = new QLabel(i18n("Search folder &name:"), searchWidget); + TQHBoxLayout *hbl2 = new TQHBoxLayout( vbl, spacingHint(), "kmfs_hbl2" ); + mSearchFolderLbl = new TQLabel(i18n("Search folder &name:"), searchWidget); hbl2->addWidget(mSearchFolderLbl); mSearchFolderEdt = new KLineEdit(searchWidget); if (searchFolder) @@ -256,25 +256,25 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, mSearchFolderLbl->setBuddy(mSearchFolderEdt); hbl2->addWidget(mSearchFolderEdt); - mSearchFolderOpenBtn = new QPushButton(i18n("Op&en Search Folder"), searchWidget); + mSearchFolderOpenBtn = new TQPushButton(i18n("Op&en Search Folder"), searchWidget); mSearchFolderOpenBtn->setEnabled(false); hbl2->addWidget(mSearchFolderOpenBtn); - connect( mSearchFolderEdt, SIGNAL( textChanged( const QString &)), - this, SLOT( scheduleRename( const QString & ))); - connect( &mRenameTimer, SIGNAL( timeout() ), - this, SLOT( renameSearchFolder() )); - connect( mSearchFolderOpenBtn, SIGNAL( clicked() ), - this, SLOT( openSearchFolder() )); - mSearchResultOpenBtn = new QPushButton(i18n("Open &Message"), searchWidget); + connect( mSearchFolderEdt, TQT_SIGNAL( textChanged( const TQString &)), + this, TQT_SLOT( scheduleRename( const TQString & ))); + connect( &mRenameTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( renameSearchFolder() )); + connect( mSearchFolderOpenBtn, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( openSearchFolder() )); + mSearchResultOpenBtn = new TQPushButton(i18n("Open &Message"), searchWidget); mSearchResultOpenBtn->setEnabled(false); hbl2->addWidget(mSearchResultOpenBtn); - connect( mSearchResultOpenBtn, SIGNAL( clicked() ), - this, SLOT( slotShowSelectedMsg() )); + connect( mSearchResultOpenBtn, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( slotShowSelectedMsg() )); mStatusBar = new KStatusBar(searchWidget); mStatusBar->insertFixedItem(i18n("AMiddleLengthText..."), 0, true); mStatusBar->changeItem(i18n("Ready."), 0); mStatusBar->setItemAlignment(0, AlignLeft | AlignVCenter); - mStatusBar->insertItem(QString::null, 1, 1, true); + mStatusBar->insertItem(TQString::null, 1, 1, true); mStatusBar->setItemAlignment(1, AlignLeft | AlignVCenter); vbl->addWidget(mStatusBar); @@ -285,20 +285,20 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, resize(mainWidth, mainHeight); setMainWidget(searchWidget); - setButtonBoxOrientation(QWidget::Vertical); + setButtonBoxOrientation(TQWidget::Vertical); mBtnSearch = actionButton(KDialogBase::User1); mBtnStop = actionButton(KDialogBase::User2); mBtnStop->setEnabled(false); - connect(this, SIGNAL(user1Clicked()), SLOT(slotSearch())); - connect(this, SIGNAL(user2Clicked()), SLOT(slotStop())); - connect(this, SIGNAL(finished()), this, SLOT(deleteLater())); + connect(this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(slotSearch())); + connect(this, TQT_SIGNAL(user2Clicked()), TQT_SLOT(slotStop())); + connect(this, TQT_SIGNAL(finished()), this, TQT_SLOT(deleteLater())); // give focus to the value field of the first search rule object = mPatternEdit->child( "regExpLineEdit" ); if ( object && object->isWidgetType() ) { - static_cast<QWidget*>(object)->setFocus(); + static_cast<TQWidget*>(object)->setFocus(); //kdDebug(5006) << "SearchWindow: focus has been given to widget " // << object->name() << endl; } @@ -309,26 +309,26 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, KActionCollection *ac = actionCollection(); ac->setWidget( this ); mReplyAction = new KAction( i18n("&Reply..."), "mail_reply", 0, this, - SLOT(slotReplyToMsg()), ac, "search_reply" ); + TQT_SLOT(slotReplyToMsg()), ac, "search_reply" ); mReplyAllAction = new KAction( i18n("Reply to &All..."), "mail_replyall", - 0, this, SLOT(slotReplyAllToMsg()), + 0, this, TQT_SLOT(slotReplyAllToMsg()), ac, "search_reply_all" ); mReplyListAction = new KAction( i18n("Reply to Mailing-&List..."), "mail_replylist", 0, this, - SLOT(slotReplyListToMsg()), ac, + TQT_SLOT(slotReplyListToMsg()), ac, "search_reply_list" ); mForwardActionMenu = new KActionMenu( i18n("Message->","&Forward"), "mail_forward", ac, "search_message_forward" ); - connect( mForwardActionMenu, SIGNAL(activated()), this, - SLOT(slotForwardInlineMsg()) ); + connect( mForwardActionMenu, TQT_SIGNAL(activated()), this, + TQT_SLOT(slotForwardInlineMsg()) ); mForwardAttachedAction = new KAction( i18n("Message->Forward->","As &Attachment..."), "mail_forward", 0, this, - SLOT(slotForwardAttachedMsg()), ac, + TQT_SLOT(slotForwardAttachedMsg()), ac, "search_message_forward_as_attachment" ); mForwardInlineAction = new KAction( i18n("&Inline..."), "mail_forward", 0, this, - SLOT(slotForwardInlineMsg()), ac, + TQT_SLOT(slotForwardInlineMsg()), ac, "search_message_forward_inline" ); if ( GlobalSettings::self()->forwardingInlineByDefault() ) { mForwardActionMenu->insert( mForwardInlineAction ); @@ -340,38 +340,38 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name, mForwardDigestAction = new KAction( i18n("Message->Forward->","As Di&gest..."), "mail_forward", 0, this, - SLOT(slotForwardDigestMsg()), ac, + TQT_SLOT(slotForwardDigestMsg()), ac, "search_message_forward_as_digest" ); mForwardActionMenu->insert( mForwardDigestAction ); mRedirectAction = new KAction( i18n("Message->Forward->","&Redirect..."), "mail_forward", 0, this, - SLOT(slotRedirectMsg()), ac, + TQT_SLOT(slotRedirectMsg()), ac, "search_message_forward_redirect" ); mForwardActionMenu->insert( mRedirectAction ); - mSaveAsAction = KStdAction::saveAs( this, SLOT(slotSaveMsg()), ac, "search_file_save_as" ); + mSaveAsAction = KStdAction::saveAs( this, TQT_SLOT(slotSaveMsg()), ac, "search_file_save_as" ); mSaveAtchAction = new KAction( i18n("Save Attachments..."), "attach", 0, - this, SLOT(slotSaveAttachments()), ac, "search_save_attachments" ); + this, TQT_SLOT(slotSaveAttachments()), ac, "search_save_attachments" ); - mPrintAction = KStdAction::print( this, SLOT(slotPrintMsg()), ac, "search_print" ); + mPrintAction = KStdAction::print( this, TQT_SLOT(slotPrintMsg()), ac, "search_print" ); mClearAction = new KAction( i18n("Clear Selection"), 0, 0, this, - SLOT(slotClearSelection()), ac, "search_clear_selection" ); + TQT_SLOT(slotClearSelection()), ac, "search_clear_selection" ); - mCopyAction = KStdAction::copy( this, SLOT(slotCopyMsgs()), ac, "search_copy_messages" ); - mCutAction = KStdAction::cut( this, SLOT(slotCutMsgs()), ac, "search_cut_messages" ); + mCopyAction = KStdAction::copy( this, TQT_SLOT(slotCopyMsgs()), ac, "search_copy_messages" ); + mCutAction = KStdAction::cut( this, TQT_SLOT(slotCutMsgs()), ac, "search_cut_messages" ); - connect(mTimer, SIGNAL(timeout()), this, SLOT(updStatus())); - connect(kmkernel->searchFolderMgr(), SIGNAL(folderInvalidated(KMFolder*)), - this, SLOT(folderInvalidated(KMFolder*))); + connect(mTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updStatus())); + connect(kmkernel->searchFolderMgr(), TQT_SIGNAL(folderInvalidated(KMFolder*)), + this, TQT_SLOT(folderInvalidated(KMFolder*))); - connect(mCbxFolders, SIGNAL(folderChanged(KMFolder*)), - this, SLOT(slotFolderActivated())); + connect(mCbxFolders, TQT_SIGNAL(folderChanged(KMFolder*)), + this, TQT_SLOT(slotFolderActivated())); } //----------------------------------------------------------------------------- SearchWindow::~SearchWindow() { - QValueListIterator<QGuardedPtr<KMFolder> > fit; + TQValueListIterator<TQGuardedPtr<KMFolder> > fit; for ( fit = mFolders.begin(); fit != mFolders.end(); ++fit ) { if (!(*fit)) continue; @@ -401,10 +401,10 @@ void SearchWindow::setEnabledSearchButton(bool) //----------------------------------------------------------------------------- void SearchWindow::updStatus(void) { - QString genMsg, detailMsg, procMsg; + TQString genMsg, detailMsg, procMsg; int numMatches = 0, numProcessed = 0; KMSearch const *search = (mFolder) ? (mFolder->search()) : 0; - QString folderName; + TQString folderName; if (search) { numMatches = search->foundCount(); numProcessed = search->searchCount(); @@ -436,7 +436,7 @@ void SearchWindow::updStatus(void) //----------------------------------------------------------------------------- -void SearchWindow::keyPressEvent(QKeyEvent *evt) +void SearchWindow::keyPressEvent(TQKeyEvent *evt) { KMSearch const *search = (mFolder) ? mFolder->search() : 0; bool searching = (search) ? search->running() : false; @@ -488,14 +488,14 @@ void SearchWindow::slotSearch() KMFolderMgr *mgr = kmkernel->searchFolderMgr(); if (mSearchFolderEdt->text().isEmpty()) mSearchFolderEdt->setText(i18n("Last Search")); - QString baseName = mSearchFolderEdt->text(); - QString fullName = baseName; + TQString baseName = mSearchFolderEdt->text(); + TQString fullName = baseName; int count = 0; KMFolder *folder; while ((folder = mgr->find(fullName))) { if (folder->storage()->inherits("KMFolderSearch")) break; - fullName = QString("%1 %2").arg(baseName).arg(++count); + fullName = TQString("%1 %2").arg(baseName).arg(++count); } if (!folder) @@ -505,18 +505,18 @@ void SearchWindow::slotSearch() mFolder = dynamic_cast<KMFolderSearch*>( folder->storage() ); } mFolder->stopSearch(); - disconnect(mFolder, SIGNAL(msgAdded(int)), - this, SLOT(slotAddMsg(int))); - disconnect(mFolder, SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), - this, SLOT(slotRemoveMsg(KMFolder*, Q_UINT32))); - connect(mFolder, SIGNAL(msgAdded(int)), - this, SLOT(slotAddMsg(int))); - connect(mFolder, SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), - this, SLOT(slotRemoveMsg(KMFolder*, Q_UINT32))); + disconnect(mFolder, TQT_SIGNAL(msgAdded(int)), + this, TQT_SLOT(slotAddMsg(int))); + disconnect(mFolder, TQT_SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), + this, TQT_SLOT(slotRemoveMsg(KMFolder*, Q_UINT32))); + connect(mFolder, TQT_SIGNAL(msgAdded(int)), + this, TQT_SLOT(slotAddMsg(int))); + connect(mFolder, TQT_SIGNAL(msgRemoved(KMFolder*, Q_UINT32)), + this, TQT_SLOT(slotRemoveMsg(KMFolder*, Q_UINT32))); mSearchFolderEdt->setEnabled(false); KMSearch *search = new KMSearch(); - connect(search, SIGNAL(finished(bool)), - this, SLOT(searchDone())); + connect(search, TQT_SIGNAL(finished(bool)), + this, TQT_SLOT(searchDone())); if (mChkbxAllFolders->isChecked()) { search->setRecursive(true); } else { @@ -541,7 +541,7 @@ void SearchWindow::searchDone() mTimer->stop(); updStatus(); - QTimer::singleShot(0, this, SLOT(enableGUI())); + TQTimer::singleShot(0, this, TQT_SLOT(enableGUI())); if(mLastFocus) mLastFocus->setFocus(); if (mCloseRequested) @@ -559,7 +559,7 @@ void SearchWindow::slotAddMsg(int idx) return; bool unget = !mFolder->isMessage(idx); KMMessage *msg = mFolder->getMsg(idx); - QString from, fName; + TQString from, fName; KMFolder *pFolder = msg->parent(); if (!mFolders.contains(pFolder)) { mFolders.append(pFolder); @@ -577,7 +577,7 @@ void SearchWindow::slotAddMsg(int idx) (void)new KListViewItem(mLbxMatches, mLbxMatches->lastItem(), msg->subject(), from, msg->dateIsoStr(), fName, - QString::number(mFolder->serNum(idx))); + TQString::number(mFolder->serNum(idx))); if (unget) mFolder->unGetMsg(idx); } @@ -586,9 +586,9 @@ void SearchWindow::slotRemoveMsg(KMFolder *, Q_UINT32 serNum) { if (!mFolder) return; - QListViewItemIterator it(mLbxMatches); + TQListViewItemIterator it(mLbxMatches); while (it.current()) { - QListViewItem *item = *it; + TQListViewItem *item = *it; if (serNum == (*it)->text(MSGID_COLUMN).toUInt()) { delete item; return; @@ -614,21 +614,21 @@ void SearchWindow::slotClose() //----------------------------------------------------------------------------- -void SearchWindow::closeEvent(QCloseEvent *e) +void SearchWindow::closeEvent(TQCloseEvent *e) { if (mFolder && mFolder->search() && mFolder->search()->running()) { mCloseRequested = true; //Cancel search in progress by setting the search folder search to //the null search mFolder->setSearch(new KMSearch()); - QTimer::singleShot(0, this, SLOT(slotClose())); + TQTimer::singleShot(0, this, TQT_SLOT(slotClose())); } else { KDialogBase::closeEvent(e); } } //----------------------------------------------------------------------------- -void SearchWindow::scheduleRename( const QString &s) +void SearchWindow::scheduleRename( const TQString &s) { if (!s.isEmpty() && s != i18n("Last Search")) { mRenameTimer.start(250, true); @@ -644,7 +644,7 @@ void SearchWindow::renameSearchFolder() { if (mFolder && (mFolder->folder()->name() != mSearchFolderEdt->text())) { int i = 1; - QString name = mSearchFolderEdt->text(); + TQString name = mSearchFolderEdt->text(); while (i < 100) { if (!kmkernel->searchFolderMgr()->find( name )) { mFolder->rename( name ); @@ -672,15 +672,15 @@ void SearchWindow::folderInvalidated(KMFolder *folder) if (folder->storage() == mFolder) { mLbxMatches->clear(); if (mFolder->search()) - connect(mFolder->search(), SIGNAL(finished(bool)), - this, SLOT(searchDone())); + connect(mFolder->search(), TQT_SIGNAL(finished(bool)), + this, TQT_SLOT(searchDone())); mTimer->start(200); enableGUI(); } } //----------------------------------------------------------------------------- -bool SearchWindow::slotShowMsg(QListViewItem *item) +bool SearchWindow::slotShowMsg(TQListViewItem *item) { if(!item) return false; @@ -709,7 +709,7 @@ void SearchWindow::slotShowSelectedMsg() } //----------------------------------------------------------------------------- -void SearchWindow::slotCurrentChanged(QListViewItem *item) +void SearchWindow::slotCurrentChanged(TQListViewItem *item) { mSearchResultOpenBtn->setEnabled(item!=0); } @@ -736,7 +736,7 @@ KMMessageList SearchWindow::selectedMessages() KMMessageList msgList; KMFolder* folder = 0; int msgIndex = -1; - for (QListViewItemIterator it(mLbxMatches); it.current(); it++) + for (TQListViewItemIterator it(mLbxMatches); it.current(); it++) if (it.current()->isSelected()) { KMMsgDict::instance()->getLocation((*it)->text(MSGID_COLUMN).toUInt(), &folder, &msgIndex); @@ -749,7 +749,7 @@ KMMessageList SearchWindow::selectedMessages() //----------------------------------------------------------------------------- KMMessage* SearchWindow::message() { - QListViewItem *item = mLbxMatches->currentItem(); + TQListViewItem *item = mLbxMatches->currentItem(); KMFolder* folder = 0; int msgIndex = -1; if (!item) @@ -802,7 +802,7 @@ void SearchWindow::updateContextMenuActions() } //----------------------------------------------------------------------------- -void SearchWindow::slotContextMenuRequested( QListViewItem *lvi, const QPoint &, int ) +void SearchWindow::slotContextMenuRequested( TQListViewItem *lvi, const TQPoint &, int ) { if (!lvi) return; @@ -811,14 +811,14 @@ void SearchWindow::slotContextMenuRequested( QListViewItem *lvi, const QPoint &, // FIXME is this ever unGetMsg()'d? if (!message()) return; - QPopupMenu *menu = new QPopupMenu(this); + TQPopupMenu *menu = new TQPopupMenu(this); updateContextMenuActions(); mMenuToFolder.clear(); - QPopupMenu *msgMoveMenu = new QPopupMenu(menu); + TQPopupMenu *msgMoveMenu = new TQPopupMenu(menu); mKMMainWidget->folderTree()->folderToPopupMenu( KMFolderTree::MoveMessage, this, &mMenuToFolder, msgMoveMenu ); - QPopupMenu *msgCopyMenu = new QPopupMenu(menu); + TQPopupMenu *msgCopyMenu = new TQPopupMenu(menu); mKMMainWidget->folderTree()->folderToPopupMenu( KMFolderTree::CopyMessage, this, &mMenuToFolder, msgCopyMenu ); @@ -838,7 +838,7 @@ void SearchWindow::slotContextMenuRequested( QListViewItem *lvi, const QPoint &, mPrintAction->plug(menu); menu->insertSeparator(); mClearAction->plug(menu); - menu->exec (QCursor::pos(), 0); + menu->exec (TQCursor::pos(), 0); delete menu; } @@ -925,13 +925,13 @@ void SearchWindow::slotPrintMsg() void SearchWindow::slotCopyMsgs() { - QValueList<Q_UINT32> list = MessageCopyHelper::serNumListFromMsgList( selectedMessages() ); + TQValueList<Q_UINT32> list = MessageCopyHelper::serNumListFromMsgList( selectedMessages() ); mKMMainWidget->headers()->setCopiedMessages( list, false ); } void SearchWindow::slotCutMsgs() { - QValueList<Q_UINT32> list = MessageCopyHelper::serNumListFromMsgList( selectedMessages() ); + TQValueList<Q_UINT32> list = MessageCopyHelper::serNumListFromMsgList( selectedMessages() ); mKMMainWidget->headers()->setCopiedMessages( list, true ); } |