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/kmfoldertree.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/kmfoldertree.cpp')
-rw-r--r-- | kmail/kmfoldertree.cpp | 412 |
1 files changed, 206 insertions, 206 deletions
diff --git a/kmail/kmfoldertree.cpp b/kmail/kmfoldertree.cpp index 6e67399c6..e99e7058b 100644 --- a/kmail/kmfoldertree.cpp +++ b/kmail/kmfoldertree.cpp @@ -38,10 +38,10 @@ using namespace KPIM; #include <kpopupmenu.h> #include <kdebug.h> -#include <qpainter.h> -#include <qcursor.h> -#include <qregexp.h> -#include <qpopupmenu.h> +#include <tqpainter.h> +#include <tqcursor.h> +#include <tqregexp.h> +#include <tqpopupmenu.h> #include <unistd.h> #include <assert.h> @@ -51,9 +51,9 @@ using namespace KPIM; //============================================================================= -KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const QString & name, +KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const TQString & name, KFolderTreeItem::Protocol protocol ) - : QObject( parent, name.latin1() ), + : TQObject( parent, name.latin1() ), KFolderTreeItem( parent, name, protocol, Root ), mFolder( 0 ), mNeedsRepaint( true ) { @@ -62,9 +62,9 @@ KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const QString & name, } //----------------------------------------------------------------------------- -KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const QString & name, +KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const TQString & name, KMFolder* folder ) - : QObject( parent, name.latin1() ), + : TQObject( parent, name.latin1() ), KFolderTreeItem( parent, name ), mFolder( folder ), mNeedsRepaint( true ) { @@ -73,9 +73,9 @@ KMFolderTreeItem::KMFolderTreeItem( KFolderTree *parent, const QString & name, } //----------------------------------------------------------------------------- -KMFolderTreeItem::KMFolderTreeItem( KFolderTreeItem *parent, const QString & name, +KMFolderTreeItem::KMFolderTreeItem( KFolderTreeItem *parent, const TQString & name, KMFolder* folder ) - : QObject( 0, name.latin1() ), + : TQObject( 0, name.latin1() ), KFolderTreeItem( parent, name ), mFolder( folder ), mNeedsRepaint( true ) { @@ -103,9 +103,9 @@ static KFolderTreeItem::Protocol protocolFor( KMFolderType t ) { } } -QPixmap KMFolderTreeItem::normalIcon(int size) const +TQPixmap KMFolderTreeItem::normalIcon(int size) const { - QString icon; + TQString icon; if ( (!mFolder && type() == Root) || useTopLevelIcon() ) { switch ( protocol() ) { case KFolderTreeItem::Imap: @@ -144,7 +144,7 @@ QPixmap KMFolderTreeItem::normalIcon(int size) const icon = mFolder->normalIconPath(); } KIconLoader * il = KGlobal::instance()->iconLoader(); - QPixmap pm = il->loadIcon( icon, KIcon::Small, size, + TQPixmap pm = il->loadIcon( icon, KIcon::Small, size, KIcon::DefaultState, 0, true ); if ( mFolder && pm.isNull() ) { pm = il->loadIcon( mFolder->normalIconPath(), KIcon::Small, size, @@ -154,9 +154,9 @@ QPixmap KMFolderTreeItem::normalIcon(int size) const return pm; } -QPixmap KMFolderTreeItem::unreadIcon(int size) const +TQPixmap KMFolderTreeItem::unreadIcon(int size) const { - QPixmap pm; + TQPixmap pm; if ( !mFolder || useTopLevelIcon() || mFolder->isSystemFolder() || kmkernel->folderIsTrash( mFolder ) || @@ -265,7 +265,7 @@ void KMFolderTreeItem::slotNameChanged() //----------------------------------------------------------------------------- -bool KMFolderTreeItem::acceptDrag(QDropEvent* e) const +bool KMFolderTreeItem::acceptDrag(TQDropEvent* e) const { // Do not allow drags from the favorite folder view, as they don't really // make sense and do not work. @@ -353,7 +353,7 @@ void KMFolderTreeItem::updateCount() //============================================================================= -KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, QWidget *parent, +KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, TQWidget *parent, const char *name ) : KMail::FolderTreeBase( mainWidget, parent, name ) , mUpdateTimer( 0, "mUpdateTimer" ) @@ -366,7 +366,7 @@ KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, QWidget *parent, mReloading = false; mCutFolder = false; - mUpdateCountTimer= new QTimer( this, "mUpdateCountTimer" ); + mUpdateCountTimer= new TQTimer( this, "mUpdateCountTimer" ); setDragEnabled( true ); addAcceptableDropMimetype( "application/x-qlistviewitem", false ); @@ -385,12 +385,12 @@ KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, QWidget *parent, mPopup = new KPopupMenu(this); mPopup->insertTitle(i18n("View Columns")); mPopup->setCheckable(true); - mUnreadPop = mPopup->insertItem(i18n("Unread Column"), this, SLOT(slotToggleUnreadColumn())); - mTotalPop = mPopup->insertItem(i18n("Total Column"), this, SLOT(slotToggleTotalColumn())); - mSizePop = mPopup->insertItem(i18n("Size Column"), this, SLOT(slotToggleSizeColumn())); + mUnreadPop = mPopup->insertItem(i18n("Unread Column"), this, TQT_SLOT(slotToggleUnreadColumn())); + mTotalPop = mPopup->insertItem(i18n("Total Column"), this, TQT_SLOT(slotToggleTotalColumn())); + mSizePop = mPopup->insertItem(i18n("Size Column"), this, TQT_SLOT(slotToggleSizeColumn())); - connect( this, SIGNAL( triggerRefresh() ), - this, SLOT( refresh() ) ); + connect( this, TQT_SIGNAL( triggerRefresh() ), + this, TQT_SLOT( refresh() ) ); new FolderViewToolTip( this ); } @@ -399,61 +399,61 @@ KMFolderTree::KMFolderTree( KMMainWidget *mainWidget, QWidget *parent, // connects all needed signals to their slots void KMFolderTree::connectSignals() { - connect( mUpdateCountTimer, SIGNAL(timeout()), - this, SLOT(slotUpdateCountTimeout()) ); + connect( mUpdateCountTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(slotUpdateCountTimeout()) ); - connect(&mUpdateTimer, SIGNAL(timeout()), - this, SLOT(delayedUpdate())); + connect(&mUpdateTimer, TQT_SIGNAL(timeout()), + this, TQT_SLOT(delayedUpdate())); - connect(kmkernel->folderMgr(), SIGNAL(changed()), - this, SLOT(doFolderListChanged())); + connect(kmkernel->folderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(doFolderListChanged())); - connect(kmkernel->folderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->folderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(slotFolderRemoved(KMFolder*))); - connect(kmkernel->folderMgr(), SIGNAL(folderMoveOrCopyOperationFinished()), - this, SLOT(slotFolderMoveOrCopyOperationFinished())); + connect(kmkernel->folderMgr(), TQT_SIGNAL(folderMoveOrCopyOperationFinished()), + this, TQT_SLOT(slotFolderMoveOrCopyOperationFinished())); - connect(kmkernel->imapFolderMgr(), SIGNAL(changed()), - this, SLOT(doFolderListChanged())); + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(doFolderListChanged())); - connect(kmkernel->imapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->imapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(slotFolderRemoved(KMFolder*))); - connect(kmkernel->dimapFolderMgr(), SIGNAL(changed()), - this, SLOT(doFolderListChanged())); + connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(doFolderListChanged())); - connect(kmkernel->dimapFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->dimapFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(slotFolderRemoved(KMFolder*))); - connect(kmkernel->searchFolderMgr(), SIGNAL(changed()), - this, SLOT(doFolderListChanged())); + connect(kmkernel->searchFolderMgr(), TQT_SIGNAL(changed()), + this, TQT_SLOT(doFolderListChanged())); - connect(kmkernel->acctMgr(), SIGNAL(accountRemoved(KMAccount*)), - this, SLOT(slotAccountRemoved(KMAccount*))); + connect(kmkernel->acctMgr(), TQT_SIGNAL(accountRemoved(KMAccount*)), + this, TQT_SLOT(slotAccountRemoved(KMAccount*))); - connect(kmkernel->acctMgr(), SIGNAL(accountAdded(KMAccount*)), - this, SLOT(slotUnhideLocalInbox())); + connect(kmkernel->acctMgr(), TQT_SIGNAL(accountAdded(KMAccount*)), + this, TQT_SLOT(slotUnhideLocalInbox())); - connect(kmkernel->searchFolderMgr(), SIGNAL(folderRemoved(KMFolder*)), - this, SLOT(slotFolderRemoved(KMFolder*))); + connect(kmkernel->searchFolderMgr(), TQT_SIGNAL(folderRemoved(KMFolder*)), + this, TQT_SLOT(slotFolderRemoved(KMFolder*))); - connect( &autoopen_timer, SIGNAL( timeout() ), - this, SLOT( openFolder() ) ); + connect( &autoopen_timer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( openFolder() ) ); - connect( this, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint &, int ) ), - this, SLOT( slotContextMenuRequested( QListViewItem*, const QPoint & ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint &, int ) ), + this, TQT_SLOT( slotContextMenuRequested( TQListViewItem*, const TQPoint & ) ) ); - connect( this, SIGNAL( expanded( QListViewItem* ) ), - this, SLOT( slotFolderExpanded( QListViewItem* ) ) ); + connect( this, TQT_SIGNAL( expanded( TQListViewItem* ) ), + this, TQT_SLOT( slotFolderExpanded( TQListViewItem* ) ) ); - connect( this, SIGNAL( collapsed( QListViewItem* ) ), - this, SLOT( slotFolderCollapsed( QListViewItem* ) ) ); + connect( this, TQT_SIGNAL( collapsed( TQListViewItem* ) ), + this, TQT_SLOT( slotFolderCollapsed( TQListViewItem* ) ) ); - connect( this, SIGNAL( itemRenamed( QListViewItem*, int, const QString &)), - this, SLOT( slotRenameFolder( QListViewItem*, int, const QString &))); + connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString &)), + this, TQT_SLOT( slotRenameFolder( TQListViewItem*, int, const TQString &))); - connect( this, SIGNAL(folderSelected(KMFolder*)), SLOT(updateCopyActions()) ); + connect( this, TQT_SIGNAL(folderSelected(KMFolder*)), TQT_SLOT(updateCopyActions()) ); } //----------------------------------------------------------------------------- @@ -467,7 +467,7 @@ void KMFolderTree::readConfig (void) { KConfigGroupSaver saver(conf, "Fonts"); if (!conf->readBoolEntry("defaultFonts",true)) { - QFont folderFont( KGlobalSettings::generalFont() ); + TQFont folderFont( KGlobalSettings::generalFont() ); setFont(conf->readFontEntry("folder-font", &folderFont)); } else @@ -483,7 +483,7 @@ void KMFolderTree::readConfig (void) void KMFolderTree::writeConfig() { // save the current state of the folders - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current()); if (fti) writeIsListViewItemOpen(fti); @@ -542,7 +542,7 @@ void KMFolderTree::reload(bool openFolders) KMFolder* selected = 0; KMFolder* oldCurrentFolder = ( oldCurrent ? static_cast<KMFolderTreeItem*>(oldCurrent)->folder(): 0 ); - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { KMFolderTreeItem * fti = static_cast<KMFolderTreeItem*>(it.current()); writeIsListViewItemOpen( fti ); if ( fti->isSelected() ) @@ -576,52 +576,52 @@ void KMFolderTree::reload(bool openFolders) if (openFolders) { // we open all folders to update the count - mUpdateIterator = QListViewItemIterator (this); - QTimer::singleShot( 0, this, SLOT(slotUpdateOneCount()) ); + mUpdateIterator = TQListViewItemIterator (this); + TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateOneCount()) ); } - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { KMFolderTreeItem * fti = static_cast<KMFolderTreeItem*>(it.current()); if ( !fti || !fti->folder() ) continue; - disconnect(fti->folder(),SIGNAL(iconsChanged()), - fti,SLOT(slotIconsChanged())); - connect(fti->folder(),SIGNAL(iconsChanged()), - fti,SLOT(slotIconsChanged())); + disconnect(fti->folder(),TQT_SIGNAL(iconsChanged()), + fti,TQT_SLOT(slotIconsChanged())); + connect(fti->folder(),TQT_SIGNAL(iconsChanged()), + fti,TQT_SLOT(slotIconsChanged())); - disconnect(fti->folder(),SIGNAL(nameChanged()), - fti,SLOT(slotNameChanged())); - connect(fti->folder(),SIGNAL(nameChanged()), - fti,SLOT(slotNameChanged())); + disconnect(fti->folder(),TQT_SIGNAL(nameChanged()), + fti,TQT_SLOT(slotNameChanged())); + connect(fti->folder(),TQT_SIGNAL(nameChanged()), + fti,TQT_SLOT(slotNameChanged())); // we want to be noticed of changes to update the unread/total columns - disconnect(fti->folder(), SIGNAL(msgAdded(KMFolder*,Q_UINT32)), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); - connect(fti->folder(), SIGNAL(msgAdded(KMFolder*,Q_UINT32)), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); + disconnect(fti->folder(), TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); + connect(fti->folder(), TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); //} - disconnect(fti->folder(), SIGNAL(numUnreadMsgsChanged(KMFolder*)), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); - connect(fti->folder(), SIGNAL(numUnreadMsgsChanged(KMFolder*)), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); - disconnect(fti->folder(), SIGNAL(msgRemoved(KMFolder*)), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); - connect(fti->folder(), SIGNAL(msgRemoved(KMFolder*)), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); + disconnect(fti->folder(), TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); + connect(fti->folder(), TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); + disconnect(fti->folder(), TQT_SIGNAL(msgRemoved(KMFolder*)), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); + connect(fti->folder(), TQT_SIGNAL(msgRemoved(KMFolder*)), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); - disconnect(fti->folder(), SIGNAL(folderSizeChanged( KMFolder* )), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); - connect(fti->folder(), SIGNAL(folderSizeChanged( KMFolder* )), - this,SLOT(slotUpdateCountsDelayed(KMFolder*))); + disconnect(fti->folder(), TQT_SIGNAL(folderSizeChanged( KMFolder* )), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); + connect(fti->folder(), TQT_SIGNAL(folderSizeChanged( KMFolder* )), + this,TQT_SLOT(slotUpdateCountsDelayed(KMFolder*))); - disconnect(fti->folder(), SIGNAL(shortcutChanged(KMFolder*)), - mMainWidget, SLOT( slotShortcutChanged(KMFolder*))); - connect(fti->folder(), SIGNAL(shortcutChanged(KMFolder*)), - mMainWidget, SLOT( slotShortcutChanged(KMFolder*))); + disconnect(fti->folder(), TQT_SIGNAL(shortcutChanged(KMFolder*)), + mMainWidget, TQT_SLOT( slotShortcutChanged(KMFolder*))); + connect(fti->folder(), TQT_SIGNAL(shortcutChanged(KMFolder*)), + mMainWidget, TQT_SLOT( slotShortcutChanged(KMFolder*))); if (!openFolders) @@ -634,7 +634,7 @@ void KMFolderTree::reload(bool openFolders) } ensureVisible(0, top + visibleHeight(), 0, 0); // if current and selected folder did not change set it again - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { if ( last && static_cast<KMFolderTreeItem*>( it.current() )->folder() == last ) @@ -665,7 +665,7 @@ void KMFolderTree::slotUpdateOneCount() ++mUpdateIterator; if ( !fti->folder() ) { // next one please - QTimer::singleShot( 0, this, SLOT(slotUpdateOneCount()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateOneCount()) ); return; } @@ -676,7 +676,7 @@ void KMFolderTree::slotUpdateOneCount() // restore previous state if (!open) fti->folder()->close("updatecount"); - QTimer::singleShot( 0, this, SLOT(slotUpdateOneCount()) ); + TQTimer::singleShot( 0, this, TQT_SLOT(slotUpdateOneCount()) ); } //----------------------------------------------------------------------------- @@ -706,7 +706,7 @@ void KMFolderTree::addDirectory( KMFolderDir *fdir, KMFolderTreeItem* parent ) } else { // hide local inbox if unused if ( kmkernel->inboxFolder() == folder && hideLocalInbox() ) { - connect( kmkernel->inboxFolder(), SIGNAL(msgAdded(KMFolder*,Q_UINT32)), SLOT(slotUnhideLocalInbox()) ); + connect( kmkernel->inboxFolder(), TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)), TQT_SLOT(slotUnhideLocalInbox()) ); continue; } @@ -736,10 +736,10 @@ void KMFolderTree::addDirectory( KMFolderDir *fdir, KMFolderTreeItem* parent ) continue; } - connect (fti, SIGNAL(iconChanged(KMFolderTreeItem*)), - this, SIGNAL(iconChanged(KMFolderTreeItem*))); - connect (fti, SIGNAL(nameChanged(KMFolderTreeItem*)), - this, SIGNAL(nameChanged(KMFolderTreeItem*))); + connect (fti, TQT_SIGNAL(iconChanged(KMFolderTreeItem*)), + this, TQT_SIGNAL(iconChanged(KMFolderTreeItem*))); + connect (fti, TQT_SIGNAL(nameChanged(KMFolderTreeItem*)), + this, TQT_SIGNAL(nameChanged(KMFolderTreeItem*))); } // restore last open-state fti->setOpen( readIsListViewItemOpen(fti) ); @@ -761,7 +761,7 @@ void KMFolderTree::delayedUpdate() if ( upd ) { setUpdatesEnabled(false); - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) { + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current()); if (!fti || !fti->folder()) continue; @@ -797,7 +797,7 @@ void KMFolderTree::slotFolderMoveOrCopyOperationFinished() //----------------------------------------------------------------------------- void KMFolderTree::slotFolderRemoved(KMFolder *aFolder) { - QListViewItem *item = indexOfFolder(aFolder); + TQListViewItem *item = indexOfFolder(aFolder); if (!item) return; KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*> ( item ); if ( oldCurrent == fti ) @@ -807,7 +807,7 @@ void KMFolderTree::slotFolderRemoved(KMFolder *aFolder) if (!fti || !fti->folder()) return; if (fti == currentItem()) { - QListViewItem *qlvi = fti->itemAbove(); + TQListViewItem *qlvi = fti->itemAbove(); if (!qlvi) qlvi = fti->itemBelow(); doFolderSelected( qlvi ); } @@ -825,7 +825,7 @@ void KMFolderTree::slotFolderRemoved(KMFolder *aFolder) // Methods for navigating folders with the keyboard void KMFolderTree::prepareItem( KMFolderTreeItem* fti ) { - for ( QListViewItem * parent = fti->parent() ; parent ; parent = parent->parent() ) + for ( TQListViewItem * parent = fti->parent() ; parent ; parent = parent->parent() ) parent->setOpen( true ); ensureItemVisible( fti ); } @@ -839,7 +839,7 @@ void KMFolderTree::nextUnreadFolder() //----------------------------------------------------------------------------- void KMFolderTree::nextUnreadFolder(bool confirm) { - QListViewItemIterator it( currentItem() ? currentItem() : firstChild() ); + TQListViewItemIterator it( currentItem() ? currentItem() : firstChild() ); if ( currentItem() ) ++it; // don't find current item for ( ; it.current() ; ++it ) { @@ -905,7 +905,7 @@ bool KMFolderTree::checkUnreadFolder (KMFolderTreeItem* fti, bool confirm) //----------------------------------------------------------------------------- void KMFolderTree::prevUnreadFolder() { - QListViewItemIterator it( currentItem() ? currentItem() : lastItem() ); + TQListViewItemIterator it( currentItem() ? currentItem() : lastItem() ); if ( currentItem() ) --it; // don't find current item for ( ; it.current() ; --it ) { @@ -917,7 +917,7 @@ void KMFolderTree::prevUnreadFolder() //----------------------------------------------------------------------------- void KMFolderTree::incCurrentFolder() { - QListViewItemIterator it( currentItem() ); + TQListViewItemIterator it( currentItem() ); ++it; KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current()); if (fti) { @@ -930,7 +930,7 @@ void KMFolderTree::incCurrentFolder() //----------------------------------------------------------------------------- void KMFolderTree::decCurrentFolder() { - QListViewItemIterator it( currentItem() ); + TQListViewItemIterator it( currentItem() ); --it; KMFolderTreeItem* fti = static_cast<KMFolderTreeItem*>(it.current()); if (fti) { @@ -960,10 +960,10 @@ KMFolder *KMFolderTree::currentFolder() const return 0; } -QValueList<QGuardedPtr<KMFolder> > KMFolderTree::selectedFolders() +TQValueList<TQGuardedPtr<KMFolder> > KMFolderTree::selectedFolders() { - QValueList<QGuardedPtr<KMFolder> > rv; - for ( QListViewItemIterator it( this ); it.current(); ++it ) { + TQValueList<TQGuardedPtr<KMFolder> > rv; + for ( TQListViewItemIterator it( this ); it.current(); ++it ) { if ( it.current()->isSelected() ) { KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>( it.current() ); rv.append( fti->folder() ); @@ -976,7 +976,7 @@ QValueList<QGuardedPtr<KMFolder> > KMFolderTree::selectedFolders() // When not dragging and dropping a change in the selected item // indicates the user has changed the active folder emit a signal // so that the header list and reader window can be udpated. -void KMFolderTree::doFolderSelected( QListViewItem* qlvi, bool keepSelection ) +void KMFolderTree::doFolderSelected( TQListViewItem* qlvi, bool keepSelection ) { if (!qlvi) return; if ( mLastItem && mLastItem == qlvi && (keepSelection || selectedFolders().count() == 1) ) @@ -1011,7 +1011,7 @@ void KMFolderTree::doFolderSelected( QListViewItem* qlvi, bool keepSelection ) } //----------------------------------------------------------------------------- -void KMFolderTree::resizeEvent(QResizeEvent* e) +void KMFolderTree::resizeEvent(TQResizeEvent* e) { KConfig* conf = KMKernel::config(); @@ -1023,8 +1023,8 @@ void KMFolderTree::resizeEvent(QResizeEvent* e) //----------------------------------------------------------------------------- // show context menu -void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, - const QPoint &p ) +void KMFolderTree::slotContextMenuRequested( TQListViewItem *lvi, + const TQPoint &p ) { if (!lvi) return; @@ -1056,13 +1056,13 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, if ((!fti->folder() || (fti->folder()->noContent() && !fti->parent()))) { - QString createChild = i18n("&New Subfolder..."); + TQString createChild = i18n("&New Subfolder..."); if (!fti->folder()) createChild = i18n("&New Folder..."); if (fti->folder() || (fti->text(0) != i18n("Searches")) && !multiFolder) folderMenu->insertItem(SmallIconSet("folder_new"), createChild, this, - SLOT(addChildFolder())); + TQT_SLOT(addChildFolder())); if (!fti->folder()) { mMainWidget->action("compact_all_folders")->plug(folderMenu); @@ -1070,7 +1070,7 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, } else if (fti->folder()->folderType() == KMFolderTypeImap) { folderMenu->insertItem(SmallIconSet("mail_get"), i18n("Check &Mail"), this, - SLOT(slotCheckMail())); + TQT_SLOT(slotCheckMail())); } } else { // regular folders @@ -1078,17 +1078,17 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, if ( !fti->folder()->noChildren() && !multiFolder ) { folderMenu->insertItem(SmallIconSet("folder_new"), i18n("&New Subfolder..."), this, - SLOT(addChildFolder())); + TQT_SLOT(addChildFolder())); } // copy folder - QPopupMenu *copyMenu = new QPopupMenu( folderMenu ); + TQPopupMenu *copyMenu = new TQPopupMenu( folderMenu ); folderToPopupMenu( CopyFolder, this, &mMenuToFolder, copyMenu ); folderMenu->insertItem( i18n("&Copy Folder To"), copyMenu ); if ( fti->folder()->isMoveable() ) { - QPopupMenu *moveMenu = new QPopupMenu( folderMenu ); + TQPopupMenu *moveMenu = new TQPopupMenu( folderMenu ); folderToPopupMenu( MoveFolder, this, &mMenuToFolder, moveMenu ); folderMenu->insertItem( i18n("&Move Folder To"), moveMenu ); } @@ -1105,7 +1105,7 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, if ( GlobalSettings::self()->enableFavoriteFolderView() ) { folderMenu->insertItem( SmallIconSet("bookmark_add"), i18n("Add to Favorite Folders"), - this, SLOT(slotAddToFavorites()) ); + this, TQT_SLOT(slotAddToFavorites()) ); } folderMenu->insertSeparator(); @@ -1124,24 +1124,24 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, { folderMenu->insertItem(SmallIconSet("bookmark_folder"), i18n("Subscription..."), mMainWidget, - SLOT(slotSubscriptionDialog())); + TQT_SLOT(slotSubscriptionDialog())); folderMenu->insertItem(SmallIcon("bookmark_folder"), i18n("Local Subscription..."), mMainWidget, - SLOT(slotLocalSubscriptionDialog())); + TQT_SLOT(slotLocalSubscriptionDialog())); if (!fti->folder()->noContent()) { mMainWidget->action("refresh_folder")->plug(folderMenu); if ( fti->folder()->folderType() == KMFolderTypeImap && !multiFolder ) { folderMenu->insertItem(SmallIconSet("reload"), i18n("Refresh Folder List"), this, - SLOT(slotResetFolderList())); + TQT_SLOT(slotResetFolderList())); } } if ( fti->folder()->folderType() == KMFolderTypeCachedImap && !multiFolder ) { KMFolderCachedImap * folder = static_cast<KMFolderCachedImap*>( fti->folder()->storage() ); folderMenu->insertItem( SmallIconSet("wizard"), i18n("&Troubleshoot IMAP Cache..."), - folder, SLOT(slotTroubleshoot()) ); + folder, TQT_SLOT(slotTroubleshoot()) ); } folderMenu->insertSeparator(); } @@ -1155,11 +1155,11 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, folderMenu->insertItem(SmallIconSet("configure_shortcuts"), i18n("&Assign Shortcut..."), fti, - SLOT(assignShortcut())); + TQT_SLOT(assignShortcut())); if ( !fti->folder()->noContent() ) { folderMenu->insertItem( i18n("Expire..."), fti, - SLOT( slotShowExpiryProperties() ) ); + TQT_SLOT( slotShowExpiryProperties() ) ); } mMainWidget->action("modify")->plug(folderMenu); } @@ -1174,16 +1174,16 @@ void KMFolderTree::slotContextMenuRequested( QListViewItem *lvi, } //----------------------------------------------------------------------------- -void KMFolderTree::contentsMousePressEvent(QMouseEvent * e) +void KMFolderTree::contentsMousePressEvent(TQMouseEvent * e) { // KFolderTree messes around with the selection mode KListView::contentsMousePressEvent( e ); } // If middle button and folder holds mailing-list, create a message to that list -void KMFolderTree::contentsMouseReleaseEvent(QMouseEvent* me) +void KMFolderTree::contentsMouseReleaseEvent(TQMouseEvent* me) { - QListViewItem *lvi = currentItem(); // Needed for when branches are clicked on + TQListViewItem *lvi = currentItem(); // Needed for when branches are clicked on ButtonState btn = me->button(); doFolderSelected(lvi, true); @@ -1228,7 +1228,7 @@ static bool folderHasCreateRights( const KMFolder *folder ) //----------------------------------------------------------------------------- // Create a subfolder. // Requires creating the appropriate subdirectory and show a dialog -void KMFolderTree::addChildFolder( KMFolder *folder, QWidget * parent ) +void KMFolderTree::addChildFolder( KMFolder *folder, TQWidget * parent ) { KMFolder *aFolder = folder; if ( !aFolder ) { @@ -1242,7 +1242,7 @@ void KMFolderTree::addChildFolder( KMFolder *folder, QWidget * parent ) return; if ( !folderHasCreateRights( aFolder ) ) { // FIXME: change this message to "Cannot create folder under ..." or similar - const QString message = i18n( "<qt>Cannot create folder <b>%1</b> because of insufficient " + const TQString message = i18n( "<qt>Cannot create folder <b>%1</b> because of insufficient " "permissions on the server. If you think you should be able to create " "subfolders here, ask your administrator to grant you rights to do so." "</qt> " ).arg(aFolder->label()); @@ -1265,7 +1265,7 @@ void KMFolderTree::addChildFolder( KMFolder *folder, QWidget * parent ) new KMFolderDialog(0, dir, this, i18n("Create Subfolder") ); if (d->exec()) { // fti may be deleted here - QListViewItem *qlvi = indexOfFolder( aFolder ); + TQListViewItem *qlvi = indexOfFolder( aFolder ); if (qlvi) { qlvi->setOpen(true); blockSignals( true ); @@ -1288,7 +1288,7 @@ bool KMFolderTree::readIsListViewItemOpen(KMFolderTreeItem *fti) { KConfig* config = KMKernel::config(); KMFolder *folder = fti->folder(); - QString name; + TQString name; if (folder) { name = "Folder-" + folder->idString(); @@ -1314,7 +1314,7 @@ void KMFolderTree::writeIsListViewItemOpen(KMFolderTreeItem *fti) { KConfig* config = KMKernel::config(); KMFolder *folder = fti->folder(); - QString name; + TQString name; if (folder && !folder->idString().isEmpty()) { name = "Folder-" + folder->idString(); @@ -1340,19 +1340,19 @@ void KMFolderTree::cleanupConfigFile() if ( childCount() == 0 ) return; // just in case reload wasn't called before KConfig* config = KMKernel::config(); - QStringList existingFolders; - QListViewItemIterator fldIt(this); - QMap<QString,bool> folderMap; + TQStringList existingFolders; + TQListViewItemIterator fldIt(this); + TQMap<TQString,bool> folderMap; KMFolderTreeItem *fti; - for (QListViewItemIterator fldIt(this); fldIt.current(); fldIt++) + for (TQListViewItemIterator fldIt(this); fldIt.current(); fldIt++) { fti = static_cast<KMFolderTreeItem*>(fldIt.current()); if (fti && fti->folder()) folderMap.insert(fti->folder()->idString(), true); } - QStringList groupList = config->groupList(); - QString name; - for (QStringList::Iterator grpIt = groupList.begin(); + TQStringList groupList = config->groupList(); + TQString name; + for (TQStringList::Iterator grpIt = groupList.begin(); grpIt != groupList.end(); grpIt++) { if ((*grpIt).left(7) != "Folder-") continue; @@ -1391,19 +1391,19 @@ void KMFolderTree::openFolder() static const int autoopenTime = 750; //----------------------------------------------------------------------------- -void KMFolderTree::contentsDragEnterEvent( QDragEnterEvent *e ) +void KMFolderTree::contentsDragEnterEvent( TQDragEnterEvent *e ) { oldCurrent = 0; oldSelected = 0; oldCurrent = currentItem(); - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) if ( it.current()->isSelected() ) oldSelected = it.current(); setFocus(); - QListViewItem *i = itemAt( contentsToViewport(e->pos()) ); + TQListViewItem *i = itemAt( contentsToViewport(e->pos()) ); if ( i ) { dropItem = i; autoopen_timer.start( autoopenTime ); @@ -1415,10 +1415,10 @@ void KMFolderTree::contentsDragEnterEvent( QDragEnterEvent *e ) } //----------------------------------------------------------------------------- -void KMFolderTree::contentsDragMoveEvent( QDragMoveEvent *e ) +void KMFolderTree::contentsDragMoveEvent( TQDragMoveEvent *e ) { - QPoint vp = contentsToViewport(e->pos()); - QListViewItem *i = itemAt( vp ); + TQPoint vp = contentsToViewport(e->pos()); + TQListViewItem *i = itemAt( vp ); if ( i ) { bool dragAccepted = acceptDrag( e ); if ( dragAccepted ) { @@ -1435,12 +1435,12 @@ void KMFolderTree::contentsDragMoveEvent( QDragMoveEvent *e ) e->accept( itemRect(i) ); switch ( e->action() ) { - case QDropEvent::Copy: + case TQDropEvent::Copy: break; - case QDropEvent::Move: + case TQDropEvent::Move: e->acceptAction(); break; - case QDropEvent::Link: + case TQDropEvent::Link: e->acceptAction(); break; default: @@ -1457,7 +1457,7 @@ void KMFolderTree::contentsDragMoveEvent( QDragMoveEvent *e ) } //----------------------------------------------------------------------------- -void KMFolderTree::contentsDragLeaveEvent( QDragLeaveEvent * ) +void KMFolderTree::contentsDragLeaveEvent( TQDragLeaveEvent * ) { if (!oldCurrent) return; @@ -1470,14 +1470,14 @@ void KMFolderTree::contentsDragLeaveEvent( QDragLeaveEvent * ) } //----------------------------------------------------------------------------- -void KMFolderTree::contentsDropEvent( QDropEvent *e ) +void KMFolderTree::contentsDropEvent( TQDropEvent *e ) { autoopen_timer.stop(); - QListViewItem *item = itemAt( contentsToViewport(e->pos()) ); + TQListViewItem *item = itemAt( contentsToViewport(e->pos()) ); KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item); // Check that each pointer is not null - for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = mCopySourceFolders.constBegin(); + for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = mCopySourceFolders.constBegin(); it != mCopySourceFolders.constEnd(); ++it ) { if ( ! (*it) ) { fti = 0; @@ -1495,7 +1495,7 @@ void KMFolderTree::contentsDropEvent( QDropEvent *e ) if ( e->provides("application/x-qlistviewitem") ) { int action = dndMode( true /* always ask */ ); if ( (action == DRAG_COPY || action == DRAG_MOVE) && !mCopySourceFolders.isEmpty() ) { - for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = mCopySourceFolders.constBegin(); + for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = mCopySourceFolders.constBegin(); it != mCopySourceFolders.constEnd(); ++it ) { if ( ! (*it)->isMoveable() ) action = DRAG_COPY; @@ -1536,7 +1536,7 @@ void KMFolderTree::contentsDropEvent( QDropEvent *e ) } //----------------------------------------------------------------------------- -void KMFolderTree::slotFolderExpanded( QListViewItem * item ) +void KMFolderTree::slotFolderExpanded( TQListViewItem * item ) { KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item); if ( !fti || !fti->folder() || !fti->folder()->storage() ) return; @@ -1553,7 +1553,7 @@ void KMFolderTree::slotFolderExpanded( QListViewItem * item ) if ( folder->getSubfolderState() == KMFolderImap::imapNoInformation ) { // check if all parents are expanded - QListViewItem *parent = item->parent(); + TQListViewItem *parent = item->parent(); while ( parent ) { if ( !parent->isOpen() ) @@ -1571,7 +1571,7 @@ void KMFolderTree::slotFolderExpanded( QListViewItem * item ) //----------------------------------------------------------------------------- -void KMFolderTree::slotFolderCollapsed( QListViewItem * item ) +void KMFolderTree::slotFolderCollapsed( TQListViewItem * item ) { slotResetFolderList( item, false ); KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item); @@ -1581,8 +1581,8 @@ void KMFolderTree::slotFolderCollapsed( QListViewItem * item ) } //----------------------------------------------------------------------------- -void KMFolderTree::slotRenameFolder(QListViewItem *item, int col, - const QString &text) +void KMFolderTree::slotRenameFolder(TQListViewItem *item, int col, + const TQString &text) { KMFolderTreeItem *fti = static_cast<KMFolderTreeItem*>(item); @@ -1590,7 +1590,7 @@ void KMFolderTree::slotRenameFolder(QListViewItem *item, int col, if ((!fti) || (fti && fti->folder() && col != 0 && !currentFolder()->child())) return; - QString fldName, oldFldName; + TQString fldName, oldFldName; oldFldName = fti->name(0); @@ -1600,7 +1600,7 @@ void KMFolderTree::slotRenameFolder(QListViewItem *item, int col, fldName = oldFldName; fldName.replace("/", ""); - fldName.replace(QRegExp("^\\."), ""); + fldName.replace(TQRegExp("^\\."), ""); if (fldName.isEmpty()) fldName = i18n("unnamed"); @@ -1627,7 +1627,7 @@ void KMFolderTree::slotUpdateCountTimeout() { // kdDebug(5006) << "KMFolderTree::slotUpdateCountTimeout()" << endl; - QMap<QString,KMFolder*>::iterator it; + TQMap<TQString,KMFolder*>::iterator it; for ( it= mFolderToUpdateCount.begin(); it!=mFolderToUpdateCount.end(); ++it ) @@ -1715,13 +1715,13 @@ void KMFolderTree::slotToggleSizeColumn() //----------------------------------------------------------------------------- -bool KMFolderTree::eventFilter( QObject *o, QEvent *e ) +bool KMFolderTree::eventFilter( TQObject *o, TQEvent *e ) { - if ( e->type() == QEvent::MouseButtonPress && - static_cast<QMouseEvent*>(e)->button() == RightButton && - o->isA("QHeader") ) + if ( e->type() == TQEvent::MouseButtonPress && + static_cast<TQMouseEvent*>(e)->button() == RightButton && + o->isA("TQHeader") ) { - mPopup->popup( static_cast<QMouseEvent*>(e)->globalPos() ); + mPopup->popup( static_cast<TQMouseEvent*>(e)->globalPos() ); return true; } return KFolderTree::eventFilter(o, e); @@ -1752,8 +1752,8 @@ void KMFolderTree::slotNewMessageToMailingList() } //----------------------------------------------------------------------------- -void KMFolderTree::createFolderList( QStringList *str, - QValueList<QGuardedPtr<KMFolder> > *folders, +void KMFolderTree::createFolderList( TQStringList *str, + TQValueList<TQGuardedPtr<KMFolder> > *folders, bool localFolders, bool imapFolders, bool dimapFolders, @@ -1761,7 +1761,7 @@ void KMFolderTree::createFolderList( QStringList *str, bool includeNoContent, bool includeNoChildren ) { - for ( QListViewItemIterator it( this ) ; it.current() ; ++it ) + for ( TQListViewItemIterator it( this ) ; it.current() ; ++it ) { KMFolderTreeItem * fti = static_cast<KMFolderTreeItem*>(it.current()); if (!fti || !fti->folder()) continue; @@ -1774,7 +1774,7 @@ void KMFolderTree::createFolderList( QStringList *str, if (!searchFolders && folder->folderType() == KMFolderTypeSearch) continue; if (!includeNoContent && folder->noContent()) continue; if (!includeNoChildren && folder->noChildren()) continue; - QString prefix; + TQString prefix; prefix.fill( ' ', 2 * fti->depth() ); str->append(prefix + fti->text(0)); folders->append(fti->folder()); @@ -1782,7 +1782,7 @@ void KMFolderTree::createFolderList( QStringList *str, } //----------------------------------------------------------------------------- -void KMFolderTree::slotResetFolderList( QListViewItem* item, bool startList ) +void KMFolderTree::slotResetFolderList( TQListViewItem* item, bool startList ) { if ( !item ) item = currentItem(); @@ -1802,7 +1802,7 @@ void KMFolderTree::slotResetFolderList( QListViewItem* item, bool startList ) void KMFolderTree::showFolder( KMFolder* folder ) { if ( !folder ) return; - QListViewItem* item = indexOfFolder( folder ); + TQListViewItem* item = indexOfFolder( folder ); if ( item ) { doFolderSelected( item ); @@ -1811,12 +1811,12 @@ void KMFolderTree::showFolder( KMFolder* folder ) } //----------------------------------------------------------------------------- -void KMFolderTree::folderToPopupMenu( MenuAction action, QObject *receiver, - KMMenuToFolder *aMenuToFolder, QPopupMenu *menu, QListViewItem *item ) +void KMFolderTree::folderToPopupMenu( MenuAction action, TQObject *receiver, + KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu, TQListViewItem *item ) { while ( menu->count() ) { - QPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); + TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); if ( popup ) delete popup; else @@ -1825,15 +1825,15 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, QObject *receiver, // connect the signals if ( action == MoveMessage || action == MoveFolder ) { - disconnect( menu, SIGNAL(activated(int)), receiver, - SLOT(moveSelectedToFolder(int)) ); - connect( menu, SIGNAL(activated(int)), receiver, - SLOT(moveSelectedToFolder(int)) ); + disconnect( menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(moveSelectedToFolder(int)) ); + connect( menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(moveSelectedToFolder(int)) ); } else { - disconnect( menu, SIGNAL(activated(int)), receiver, - SLOT(copySelectedToFolder(int)) ); - connect( menu, SIGNAL(activated(int)), receiver, - SLOT(copySelectedToFolder(int)) ); + disconnect( menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(copySelectedToFolder(int)) ); + connect( menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(copySelectedToFolder(int)) ); } if ( !item ) { item = firstChild(); @@ -1861,12 +1861,12 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, QObject *receiver, item = item->nextSibling(); continue; } - QString label = fti->text( 0 ); + TQString label = fti->text( 0 ); label.replace( "&","&&" ); if ( fti->firstChild() ) { // new level - QPopupMenu* popup = new QPopupMenu( menu, "subMenu" ); + TQPopupMenu* popup = new TQPopupMenu( menu, "subMenu" ); folderToPopupMenu( action, receiver, aMenuToFolder, popup, fti->firstChild() ); bool subMenu = false; if ( ( action == MoveMessage || action == CopyMessage ) && @@ -1876,7 +1876,7 @@ void KMFolderTree::folderToPopupMenu( MenuAction action, QObject *receiver, && ( !fti->folder() || ( fti->folder() && !fti->folder()->noChildren() ) ) ) subMenu = true; - QString sourceFolderName; + TQString sourceFolderName; KMFolderTreeItem* srcItem = dynamic_cast<KMFolderTreeItem*>( currentItem() ); if ( srcItem ) sourceFolderName = srcItem->text( 0 ); @@ -1928,7 +1928,7 @@ void KMFolderTree::copySelectedToFolder( int menuId ) } //----------------------------------------------------------------------------- -void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, KMFolder* destination, bool move ) +void KMFolderTree::moveOrCopyFolder( TQValueList<TQGuardedPtr<KMFolder> > sources, KMFolder* destination, bool move ) { kdDebug(5006) << k_funcinfo << "source: " << sources << " destination: " << destination << " move: " << move << endl; @@ -1939,14 +1939,14 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, if ( destination ) parent = destination->createChildFolder(); - QStringList sourceFolderNames; + TQStringList sourceFolderNames; // check if move/copy is possible at all - for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); it != sources.constEnd(); ++it ) { + for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); it != sources.constEnd(); ++it ) { KMFolder* source = *it; // check if folder with same name already exits - QString sourceFolderName; + TQString sourceFolderName; if ( source ) sourceFolderName = source->label(); @@ -1969,7 +1969,7 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, f = f->parent()->owner(); } - QString message = + TQString message = i18n( "<qt>Cannot move or copy folder <b>%1</b> into a subfolder below itself.</qt>" ). arg( sourceFolderName ); KMFolderDir* folderDir = parent; @@ -2002,11 +2002,11 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, } // check if the source folders are independent of each other - for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); move && it != sources.constEnd(); ++it ) { + for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); move && it != sources.constEnd(); ++it ) { KMFolderDir *parentDir = (*it)->child(); if ( !parentDir ) continue; - for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it2 = sources.constBegin(); it2 != sources.constEnd(); ++it2 ) { + for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it2 = sources.constBegin(); it2 != sources.constEnd(); ++it2 ) { if ( *it == *it2 ) continue; KMFolderDir *childDir = (*it2)->parent(); @@ -2028,7 +2028,7 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, } // do the actual move/copy - for ( QValueList<QGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); it != sources.constEnd(); ++it ) { + for ( TQValueList<TQGuardedPtr<KMFolder> >::ConstIterator it = sources.constBegin(); it != sources.constEnd(); ++it ) { KMFolder* source = *it; if ( move ) { kdDebug(5006) << "move folder " << (source ? source->label(): "Unknown") << " to " @@ -2040,15 +2040,15 @@ void KMFolderTree::moveOrCopyFolder( QValueList<QGuardedPtr<KMFolder> > sources, } } -QDragObject * KMFolderTree::dragObject() +TQDragObject * KMFolderTree::dragObject() { KMFolderTreeItem *item = static_cast<KMFolderTreeItem*> - (itemAt(viewport()->mapFromGlobal(QCursor::pos()))); + (itemAt(viewport()->mapFromGlobal(TQCursor::pos()))); if ( !item || !item->parent() || !item->folder() ) // top-level items or something invalid return 0; mCopySourceFolders = selectedFolders(); - QDragObject *drag = KFolderTree::dragObject(); + TQDragObject *drag = KFolderTree::dragObject(); if ( drag ) drag->setPixmap( SmallIcon("folder") ); return drag; @@ -2110,7 +2110,7 @@ void KMFolderTree::slotAddToFavorites() { KMail::FavoriteFolderView *favView = mMainWidget->favoriteFolderView(); assert( favView ); - for ( QListViewItemIterator it( this ); it.current(); ++it ) { + for ( TQListViewItemIterator it( this ); it.current(); ++it ) { if ( it.current()->isSelected() ) favView->addFolder( static_cast<KMFolderTreeItem*>( it.current() ) ); } @@ -2118,8 +2118,8 @@ void KMFolderTree::slotAddToFavorites() void KMFolderTree::slotUnhideLocalInbox() { - disconnect( kmkernel->inboxFolder(), SIGNAL(msgAdded(KMFolder*,Q_UINT32)), - this, SLOT(slotUnhideLocalInbox()) ); + disconnect( kmkernel->inboxFolder(), TQT_SIGNAL(msgAdded(KMFolder*,Q_UINT32)), + this, TQT_SLOT(slotUnhideLocalInbox()) ); reload(); } |