summaryrefslogtreecommitdiffstats
path: root/kmail/searchwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/searchwindow.cpp')
-rw-r--r--kmail/searchwindow.cpp144
1 files changed, 72 insertions, 72 deletions
diff --git a/kmail/searchwindow.cpp b/kmail/searchwindow.cpp
index 68d64a82..97f1e4b6 100644
--- a/kmail/searchwindow.cpp
+++ b/kmail/searchwindow.cpp
@@ -188,18 +188,18 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
if ( list )
object = list->first();
delete list;
- if (!searchFolder && object && ::tqqt_cast<TQComboBox*>(object))
- static_cast<TQComboBox*>(TQT_TQWIDGET(object))->setCurrentText(i18n("Subject"));
+ if (!searchFolder && object && ::tqt_cast<TQComboBox*>(object))
+ static_cast<TQComboBox*>(object)->setCurrentText(i18n("Subject"));
vbl->addWidget( mPatternEdit );
// enable/disable widgets depending on radio buttons:
- 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)),
- TQT_TQOBJECT(this), TQT_SLOT(setEnabledSearchButton(bool)) );
+ connect( mChkbxSpecificFolders, TQ_SIGNAL(toggled(bool)),
+ mCbxFolders, TQ_SLOT(setEnabled(bool)) );
+ connect( mChkbxSpecificFolders, TQ_SIGNAL(toggled(bool)),
+ mChkSubFolders, TQ_SLOT(setEnabled(bool)) );
+ connect( mChkbxAllFolders, TQ_SIGNAL(toggled(bool)),
+ this, TQ_SLOT(setEnabledSearchButton(bool)) );
mLbxMatches = new MatchListView(searchWidget, this, "Find Messages");
@@ -236,14 +236,14 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
mLbxMatches->setDragEnabled( true );
- connect( mLbxMatches, TQT_SIGNAL(clicked(TQListViewItem *)),
- TQT_TQOBJECT(this), TQT_SLOT(slotShowMsg(TQListViewItem *)) );
- connect( mLbxMatches, TQT_SIGNAL(doubleClicked(TQListViewItem *)),
- TQT_TQOBJECT(this), TQT_SLOT(slotViewMsg(TQListViewItem *)) );
- connect( mLbxMatches, TQT_SIGNAL(currentChanged(TQListViewItem *)),
- TQT_TQOBJECT(this), TQT_SLOT(slotCurrentChanged(TQListViewItem *)) );
- connect( mLbxMatches, TQT_SIGNAL(contextMenuRequested(TQListViewItem *,const TQPoint &,int)),
- TQT_TQOBJECT(this), TQT_SLOT(slotContextMenuRequested(TQListViewItem *,const TQPoint &,int)) );
+ connect( mLbxMatches, TQ_SIGNAL(clicked(TQListViewItem *)),
+ this, TQ_SLOT(slotShowMsg(TQListViewItem *)) );
+ connect( mLbxMatches, TQ_SIGNAL(doubleClicked(TQListViewItem *)),
+ this, TQ_SLOT(slotViewMsg(TQListViewItem *)) );
+ connect( mLbxMatches, TQ_SIGNAL(currentChanged(TQListViewItem *)),
+ this, TQ_SLOT(slotCurrentChanged(TQListViewItem *)) );
+ connect( mLbxMatches, TQ_SIGNAL(contextMenuRequested(TQListViewItem *,const TQPoint &,int)),
+ this, TQ_SLOT(slotContextMenuRequested(TQListViewItem *,const TQPoint &,int)) );
vbl->addWidget( mLbxMatches );
TQHBoxLayout *hbl2 = new TQHBoxLayout( vbl, spacingHint(), "kmfs_hbl2" );
@@ -260,17 +260,17 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
mSearchFolderOpenBtn = new TQPushButton(i18n("Op&en Search Folder"), searchWidget);
mSearchFolderOpenBtn->setEnabled(false);
hbl2->addWidget(mSearchFolderOpenBtn);
- connect( mSearchFolderEdt, TQT_SIGNAL( textChanged( const TQString &)),
- TQT_TQOBJECT(this), TQT_SLOT( scheduleRename( const TQString & )));
- connect( &mRenameTimer, TQT_SIGNAL( timeout() ),
- TQT_TQOBJECT(this), TQT_SLOT( renameSearchFolder() ));
- connect( mSearchFolderOpenBtn, TQT_SIGNAL( clicked() ),
- TQT_TQOBJECT(this), TQT_SLOT( openSearchFolder() ));
+ connect( mSearchFolderEdt, TQ_SIGNAL( textChanged( const TQString &)),
+ this, TQ_SLOT( scheduleRename( const TQString & )));
+ connect( &mRenameTimer, TQ_SIGNAL( timeout() ),
+ this, TQ_SLOT( renameSearchFolder() ));
+ connect( mSearchFolderOpenBtn, TQ_SIGNAL( clicked() ),
+ this, TQ_SLOT( openSearchFolder() ));
mSearchResultOpenBtn = new TQPushButton(i18n("Open &Message"), searchWidget);
mSearchResultOpenBtn->setEnabled(false);
hbl2->addWidget(mSearchResultOpenBtn);
- connect( mSearchResultOpenBtn, TQT_SIGNAL( clicked() ),
- TQT_TQOBJECT(this), TQT_SLOT( slotViewSelectedMsg() ));
+ connect( mSearchResultOpenBtn, TQ_SIGNAL( clicked() ),
+ this, TQ_SLOT( slotViewSelectedMsg() ));
mStatusBar = new KStatusBar(searchWidget);
mStatusBar->insertFixedItem(i18n("AMiddleLengthText..."), 0, true);
mStatusBar->changeItem(i18n("Ready."), 0);
@@ -286,20 +286,20 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
resize(mainWidth, mainHeight);
setMainWidget(searchWidget);
- setButtonBoxOrientation(Qt::Vertical);
+ setButtonBoxOrientation(TQt::Vertical);
mBtnSearch = actionButton(KDialogBase::User1);
mBtnStop = actionButton(KDialogBase::User2);
mBtnStop->setEnabled(false);
- connect(this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(slotSearch()));
- connect(this, TQT_SIGNAL(user2Clicked()), TQT_SLOT(slotStop()));
- connect(this, TQT_SIGNAL(finished()), TQT_TQOBJECT(this), TQT_SLOT(deleteLater()));
+ connect(this, TQ_SIGNAL(user1Clicked()), TQ_SLOT(slotSearch()));
+ connect(this, TQ_SIGNAL(user2Clicked()), TQ_SLOT(slotStop()));
+ connect(this, TQ_SIGNAL(finished()), this, TQ_SLOT(deleteLater()));
// give focus to the value field of the first search rule
object = mPatternEdit->child( "regExpLineEdit" );
if ( object && object->isWidgetType() ) {
- TQT_TQWIDGET(object)->setFocus();
+ static_cast<TQWidget*>(object)->setFocus();
//kdDebug(5006) << "SearchWindow: focus has been given to widget "
// << object->name() << endl;
}
@@ -309,27 +309,27 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
//set up actions
TDEActionCollection *ac = actionCollection();
ac->setWidget( this );
- mReplyAction = new TDEAction( i18n("&Reply..."), "mail-reply-sender", 0, TQT_TQOBJECT(this),
- TQT_SLOT(slotReplyToMsg()), ac, "search_reply" );
+ mReplyAction = new TDEAction( i18n("&Reply..."), "mail-reply-sender", 0, this,
+ TQ_SLOT(slotReplyToMsg()), ac, "search_reply" );
mReplyAllAction = new TDEAction( i18n("Reply to &All..."), "mail-reply-all",
- 0, TQT_TQOBJECT(this), TQT_SLOT(slotReplyAllToMsg()),
+ 0, this, TQ_SLOT(slotReplyAllToMsg()),
ac, "search_reply_all" );
mReplyListAction = new TDEAction( i18n("Reply to Mailing-&List..."),
- "mail_replylist", 0, TQT_TQOBJECT(this),
- TQT_SLOT(slotReplyListToMsg()), ac,
+ "mail_replylist", 0, this,
+ TQ_SLOT(slotReplyListToMsg()), ac,
"search_reply_list" );
mForwardActionMenu = new TDEActionMenu( i18n("Message->","&Forward"),
"mail-forward", ac,
"search_message_forward" );
- connect( mForwardActionMenu, TQT_SIGNAL(activated()), this,
- TQT_SLOT(slotForwardInlineMsg()) );
+ connect( mForwardActionMenu, TQ_SIGNAL(activated()), this,
+ TQ_SLOT(slotForwardInlineMsg()) );
mForwardAttachedAction = new TDEAction( i18n("Message->Forward->","As &Attachment..."),
- "mail-forward", 0, TQT_TQOBJECT(this),
- TQT_SLOT(slotForwardAttachedMsg()), ac,
+ "mail-forward", 0, this,
+ TQ_SLOT(slotForwardAttachedMsg()), ac,
"search_message_forward_as_attachment" );
mForwardInlineAction = new TDEAction( i18n("&Inline..."),
- "mail-forward", 0, TQT_TQOBJECT(this),
- TQT_SLOT(slotForwardInlineMsg()), ac,
+ "mail-forward", 0, this,
+ TQ_SLOT(slotForwardInlineMsg()), ac,
"search_message_forward_inline" );
if ( GlobalSettings::self()->forwardingInlineByDefault() ) {
mForwardActionMenu->insert( mForwardInlineAction );
@@ -340,32 +340,32 @@ SearchWindow::SearchWindow(KMMainWidget* w, const char* name,
}
mForwardDigestAction = new TDEAction( i18n("Message->Forward->","As Di&gest..."),
- "mail-forward", 0, TQT_TQOBJECT(this),
- TQT_SLOT(slotForwardDigestMsg()), ac,
+ "mail-forward", 0, this,
+ TQ_SLOT(slotForwardDigestMsg()), ac,
"search_message_forward_as_digest" );
mForwardActionMenu->insert( mForwardDigestAction );
mRedirectAction = new TDEAction( i18n("Message->Forward->","&Redirect..."),
- "mail-forward", 0, TQT_TQOBJECT(this),
- TQT_SLOT(slotRedirectMsg()), ac,
+ "mail-forward", 0, this,
+ TQ_SLOT(slotRedirectMsg()), ac,
"search_message_forward_redirect" );
mForwardActionMenu->insert( mRedirectAction );
- mSaveAsAction = KStdAction::saveAs( TQT_TQOBJECT(this), TQT_SLOT(slotSaveMsg()), ac, "search_file_save_as" );
+ mSaveAsAction = KStdAction::saveAs( this, TQ_SLOT(slotSaveMsg()), ac, "search_file_save_as" );
mSaveAtchAction = new TDEAction( i18n("Save Attachments..."), "attach", 0,
- TQT_TQOBJECT(this), TQT_SLOT(slotSaveAttachments()), ac, "search_save_attachments" );
+ this, TQ_SLOT(slotSaveAttachments()), ac, "search_save_attachments" );
- mPrintAction = KStdAction::print( TQT_TQOBJECT(this), TQT_SLOT(slotPrintMsg()), ac, "search_print" );
- mClearAction = new TDEAction( i18n("Clear Selection"), 0, 0, TQT_TQOBJECT(this),
- TQT_SLOT(slotClearSelection()), ac, "search_clear_selection" );
+ mPrintAction = KStdAction::print( this, TQ_SLOT(slotPrintMsg()), ac, "search_print" );
+ mClearAction = new TDEAction( i18n("Clear Selection"), 0, 0, this,
+ TQ_SLOT(slotClearSelection()), ac, "search_clear_selection" );
- mCopyAction = KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(slotCopyMsgs()), ac, "search_copy_messages" );
- mCutAction = KStdAction::cut( TQT_TQOBJECT(this), TQT_SLOT(slotCutMsgs()), ac, "search_cut_messages" );
+ mCopyAction = KStdAction::copy( this, TQ_SLOT(slotCopyMsgs()), ac, "search_copy_messages" );
+ mCutAction = KStdAction::cut( this, TQ_SLOT(slotCutMsgs()), ac, "search_cut_messages" );
- connect(mTimer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(updStatus()));
- connect(kmkernel->searchFolderMgr(), TQT_SIGNAL(folderInvalidated(KMFolder*)),
- TQT_TQOBJECT(this), TQT_SLOT(folderInvalidated(KMFolder*)));
+ connect(mTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(updStatus()));
+ connect(kmkernel->searchFolderMgr(), TQ_SIGNAL(folderInvalidated(KMFolder*)),
+ this, TQ_SLOT(folderInvalidated(KMFolder*)));
- connect(mCbxFolders, TQT_SIGNAL(folderChanged(KMFolder*)),
- TQT_TQOBJECT(this), TQT_SLOT(slotFolderActivated()));
+ connect(mCbxFolders, TQ_SIGNAL(folderChanged(KMFolder*)),
+ this, TQ_SLOT(slotFolderActivated()));
}
@@ -507,18 +507,18 @@ void SearchWindow::slotSearch()
mFolder = dynamic_cast<KMFolderSearch*>( folder->storage() );
}
mFolder->stopSearch();
- disconnect(mFolder, TQT_SIGNAL(msgAdded(int)),
- TQT_TQOBJECT(this), TQT_SLOT(slotAddMsg(int)));
- disconnect(mFolder, TQT_SIGNAL(msgRemoved(KMFolder*, TQ_UINT32)),
- TQT_TQOBJECT(this), TQT_SLOT(slotRemoveMsg(KMFolder*, TQ_UINT32)));
- connect(mFolder, TQT_SIGNAL(msgAdded(int)),
- TQT_TQOBJECT(this), TQT_SLOT(slotAddMsg(int)));
- connect(mFolder, TQT_SIGNAL(msgRemoved(KMFolder*, TQ_UINT32)),
- TQT_TQOBJECT(this), TQT_SLOT(slotRemoveMsg(KMFolder*, TQ_UINT32)));
+ disconnect(mFolder, TQ_SIGNAL(msgAdded(int)),
+ this, TQ_SLOT(slotAddMsg(int)));
+ disconnect(mFolder, TQ_SIGNAL(msgRemoved(KMFolder*, TQ_UINT32)),
+ this, TQ_SLOT(slotRemoveMsg(KMFolder*, TQ_UINT32)));
+ connect(mFolder, TQ_SIGNAL(msgAdded(int)),
+ this, TQ_SLOT(slotAddMsg(int)));
+ connect(mFolder, TQ_SIGNAL(msgRemoved(KMFolder*, TQ_UINT32)),
+ this, TQ_SLOT(slotRemoveMsg(KMFolder*, TQ_UINT32)));
mSearchFolderEdt->setEnabled(false);
KMSearch *search = new KMSearch();
- connect(search, TQT_SIGNAL(finished(bool)),
- TQT_TQOBJECT(this), TQT_SLOT(searchDone()));
+ connect(search, TQ_SIGNAL(finished(bool)),
+ this, TQ_SLOT(searchDone()));
if (mChkbxAllFolders->isChecked()) {
search->setRecursive(true);
} else {
@@ -543,7 +543,7 @@ void SearchWindow::searchDone()
mTimer->stop();
updStatus();
- TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(enableGUI()));
+ TQTimer::singleShot(0, this, TQ_SLOT(enableGUI()));
if(mLastFocus)
mLastFocus->setFocus();
if (mCloseRequested)
@@ -623,7 +623,7 @@ void SearchWindow::closeEvent(TQCloseEvent *e)
//Cancel search in progress by setting the search folder search to
//the null search
mFolder->setSearch(new KMSearch());
- TQTimer::singleShot(0, TQT_TQOBJECT(this), TQT_SLOT(slotClose()));
+ TQTimer::singleShot(0, this, TQ_SLOT(slotClose()));
} else {
KDialogBase::closeEvent(e);
}
@@ -676,8 +676,8 @@ void SearchWindow::folderInvalidated(KMFolder *folder)
if (folder->storage() == mFolder) {
mLbxMatches->clear();
if (mFolder->search())
- connect(mFolder->search(), TQT_SIGNAL(finished(bool)),
- TQT_TQOBJECT(this), TQT_SLOT(searchDone()));
+ connect(mFolder->search(), TQ_SIGNAL(finished(bool)),
+ this, TQ_SLOT(searchDone()));
mTimer->start(200);
enableGUI();
}
@@ -840,10 +840,10 @@ void SearchWindow::slotContextMenuRequested( TQListViewItem *lvi, const TQPoint
mMenuToFolder.clear();
TQPopupMenu *msgMoveMenu = new TQPopupMenu(menu);
mKMMainWidget->folderTree()->folderToPopupMenu( KMFolderTree::MoveMessage,
- TQT_TQOBJECT(this), &mMenuToFolder, msgMoveMenu );
+ this, &mMenuToFolder, msgMoveMenu );
TQPopupMenu *msgCopyMenu = new TQPopupMenu(menu);
mKMMainWidget->folderTree()->folderToPopupMenu( KMFolderTree::CopyMessage,
- TQT_TQOBJECT(this), &mMenuToFolder, msgCopyMenu );
+ this, &mMenuToFolder, msgCopyMenu );
// show most used actions
mReplyAction->plug(menu);