summaryrefslogtreecommitdiffstats
path: root/kmail/kmheaders.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmheaders.cpp')
-rw-r--r--kmail/kmheaders.cpp124
1 files changed, 62 insertions, 62 deletions
diff --git a/kmail/kmheaders.cpp b/kmail/kmheaders.cpp
index bcfc06f3b..06fc89360 100644
--- a/kmail/kmheaders.cpp
+++ b/kmail/kmheaders.cpp
@@ -22,7 +22,7 @@ using KMail::ActionScheduler;
#include "messagecopyhelper.h"
using KMail::MessageCopyHelper;
#include "broadcaststatus.h"
-using KPIM::BroadcastStatus;
+using KPIM::BroadcasStatus;
#include "progressmanager.h"
using KPIM::ProgressManager;
using KPIM::ProgressItem;
@@ -409,7 +409,7 @@ void KMHeaders::paintEmptyArea( TQPainter * p, const TQRect & rect )
rect.left() + contentsX(),
rect.top() + contentsY() );
else
- p->fillRect( rect, colorGroup().base() );
+ p->fillRect( rect, tqcolorGroup().base() );
}
bool KMHeaders::event(TQEvent *e)
@@ -719,7 +719,7 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread )
disconnect(mFolder, TQT_SIGNAL(closed()),
this, TQT_SLOT(folderClosed()));
disconnect( mFolder, TQT_SIGNAL( statusMsg( const TQString& ) ),
- BroadcastStatus::instance(), TQT_SLOT( setStatusMsg( const TQString& ) ) );
+ BroadcasStatus::instance(), TQT_SLOT( seStatusMsg( const TQString& ) ) );
disconnect(mFolder, TQT_SIGNAL(viewConfigChanged()), this, TQT_SLOT(reset()));
writeSortOrder();
mFolder->close("kmheaders");
@@ -752,7 +752,7 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread )
connect(mFolder, TQT_SIGNAL(closed()),
this, TQT_SLOT(folderClosed()));
connect(mFolder, TQT_SIGNAL(statusMsg(const TQString&)),
- BroadcastStatus::instance(), TQT_SLOT( setStatusMsg( const TQString& ) ) );
+ BroadcasStatus::instance(), TQT_SLOT( seStatusMsg( const TQString& ) ) );
connect(mFolder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)),
this, TQT_SLOT(setFolderInfoStatus()));
connect(mFolder, TQT_SIGNAL(viewConfigChanged()), this, TQT_SLOT(reset()));
@@ -831,7 +831,7 @@ void KMHeaders::msgChanged()
const bool scrollbarAtBottom = verticalScrollBar() &&
verticalScrollBar()->value() == verticalScrollBar()->maxValue();
const HeaderItem * const oldFirstVisibleItem = dynamic_cast<HeaderItem*>( itemAt( TQPoint( 0, 0 ) ) );
- const int oldOffsetOfFirstVisibleItem = itemRect( oldFirstVisibleItem ).y();
+ const int oldOffsetOfFirstVisibleItem = tqitemRect( oldFirstVisibleItem ).y();
const uint oldSerNumOfFirstVisibleItem = oldFirstVisibleItem ? oldFirstVisibleItem->msgSerNum() : 0;
TQString msgIdMD5;
@@ -935,9 +935,9 @@ void KMHeaders::msgAdded(int id)
}
if (parent && mFolder->getMsgBase(parent->id())->isWatched())
- mFolder->getMsgBase(id)->setStatus( KMMsgStatusWatched );
+ mFolder->getMsgBase(id)->seStatus( KMMsgStatusWatched );
else if (parent && mFolder->getMsgBase(parent->id())->isIgnored())
- mFolder->getMsgBase(id)->setStatus( KMMsgStatusIgnored );
+ mFolder->getMsgBase(id)->seStatus( KMMsgStatusIgnored );
if (parent)
hi = new HeaderItem( parent->item(), id );
else
@@ -952,7 +952,7 @@ void KMHeaders::msgAdded(int id)
mItems[id] = hi;
if ( !msgId.isEmpty() )
- mSortCacheItems.replace(msgId, sci);
+ mSortCacheItems.tqreplace(msgId, sci);
/* Add to the list of potential parents for subject threading. But only if
* we are top level. */
if (mSubjThreading && parent) {
@@ -1163,11 +1163,11 @@ void KMHeaders::msgRemoved(int id, TQString msgId )
}
if ((!parent || sci->isImperfectlyThreaded())
- && !mImperfectlyThreadedList.containsRef(item))
+ && !mImperfectlyThreadedList.tqcontainsRef(item))
mImperfectlyThreadedList.append(item);
if (parent && !sci->isImperfectlyThreaded()
- && mImperfectlyThreadedList.containsRef(item))
+ && mImperfectlyThreadedList.tqcontainsRef(item))
mImperfectlyThreadedList.removeRef(item);
}
}
@@ -1214,7 +1214,7 @@ void KMHeaders::msgHeaderChanged(KMFolder*, int msgId)
HeaderItem *item = mItems[msgId];
if (item) {
item->irefresh();
- item->repaint();
+ item->tqrepaint();
}
}
@@ -1227,7 +1227,7 @@ void KMHeaders::setMsgStatus (KMMsgStatus status, bool toggle)
if (serNums.empty())
return;
- KMCommand *command = new KMSetStatusCommand( status, serNums, toggle );
+ KMCommand *command = new KMSeStatusCommand( status, serNums, toggle );
command->start();
}
@@ -1268,7 +1268,7 @@ void KMHeaders::setThreadStatus(KMMsgStatus status, bool toggle)
TQListViewItem *top = item;
while ( top->parent() )
top = top->parent();
- if (!topOfThreads.contains(top)) {
+ if (!topOfThreads.tqcontains(top)) {
topOfThreads.append(top);
}
}
@@ -1298,7 +1298,7 @@ void KMHeaders::setThreadStatus(KMMsgStatus status, bool toggle)
if (serNums.empty())
return;
- KMCommand *command = new KMSetStatusCommand( status, serNums, toggle );
+ KMCommand *command = new KMSeStatusCommand( status, serNums, toggle );
command->start();
}
@@ -1372,9 +1372,9 @@ void KMHeaders::setStyleDependantFrameWidth()
// set the width of the frame to a reasonable value for the current GUI style
int frameWidth;
if( style().isA("KeramikStyle") )
- frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
+ frameWidth = style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
else
- frameWidth = style().pixelMetric( TQStyle::PM_DefaultFrameWidth );
+ frameWidth = style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth );
if ( frameWidth < 0 )
frameWidth = 0;
if ( frameWidth != lineWidth() )
@@ -1403,7 +1403,7 @@ void KMHeaders::setFolderInfoStatus ()
: i18n( "0 messages" ); // no need for "0 unread" to be added here
if ( mFolder->isReadOnly() )
str = i18n("%1 = n messages, m unread.", "%1 Folder is read-only.").arg( str );
- BroadcastStatus::instance()->setStatusMsg(str);
+ BroadcasStatus::instance()->seStatusMsg(str);
}
//-----------------------------------------------------------------------------
@@ -1452,7 +1452,7 @@ void KMHeaders::applyFiltersOnMsg()
progressItem->updateProgress();
TQString statusMsg = i18n("Filtering message %1 of %2");
statusMsg = statusMsg.arg( msgCount ).arg( msgCountToFilter );
- KPIM::BroadcastStatus::instance()->setStatusMsg( statusMsg );
+ KPIM::BroadcasStatus::instance()->seStatusMsg( statusMsg );
KApplication::kApplication()->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 50 );
}
@@ -1501,7 +1501,7 @@ void KMHeaders::setMsgRead (int msgId)
serNums.append( msgBase->getMsgSerNum() );
}
- KMCommand *command = new KMSetStatusCommand( KMMsgStatusRead, serNums );
+ KMCommand *command = new KMSeStatusCommand( KMMsgStatusRead, serNums );
command->start();
}
@@ -1523,7 +1523,7 @@ void KMHeaders::deleteMsg ()
this, TQT_SLOT( slotMoveCompleted( KMCommand * ) ) );
command->start();
- BroadcastStatus::instance()->setStatusMsg("");
+ BroadcasStatus::instance()->seStatusMsg("");
// triggerUpdate();
}
@@ -1620,11 +1620,11 @@ void KMHeaders::slotMoveCompleted( KMCommand *command )
if ( command->result() == KMCommand::OK ) {
// make sure the current item is shown
makeHeaderVisible();
- BroadcastStatus::instance()->setStatusMsg(
+ BroadcasStatus::instance()->seStatusMsg(
deleted ? i18n("Messages deleted successfully.") : i18n("Messages moved successfully") );
} else {
/* The move failed or the user canceled it; reset the state of all
- * messages involved and repaint.
+ * messages involved and tqrepaint.
*
* Note: This potentially resets too many items if there is more than one
* move going on. Oh well, I suppose no animals will be harmed.
@@ -1643,10 +1643,10 @@ void KMHeaders::slotMoveCompleted( KMCommand *command )
}
triggerUpdate();
if ( command->result() == KMCommand::Failed )
- BroadcastStatus::instance()->setStatusMsg(
+ BroadcasStatus::instance()->seStatusMsg(
deleted ? i18n("Deleting messages failed.") : i18n("Moving messages failed.") );
else
- BroadcastStatus::instance()->setStatusMsg(
+ BroadcasStatus::instance()->seStatusMsg(
deleted ? i18n("Deleting messages canceled.") : i18n("Moving messages canceled.") );
}
mOwner->updateMessageActions();
@@ -1736,7 +1736,7 @@ void KMHeaders::setSelectedByIndex( TQValueList<int> items, bool selected )
}
}
-void KMHeaders::clearSelectableAndAboutToBeDeleted( Q_UINT32 serNum )
+void KMHeaders::clearSelectableAndAboutToBeDeleted( TQ_UINT32 serNum )
{
// fugly, but I see no way around it
for (TQListViewItemIterator it(this); it.current(); it++) {
@@ -1828,7 +1828,7 @@ void KMHeaders::selectNextMessage()
temp->firstChild();
temp = temp->parent();
}
- lvi->repaint();
+ lvi->tqrepaint();
/* test to see if we need to unselect messages on back track */
(below->isSelected() ? setSelected(lvi, false) : setSelected(below, true));
setCurrentItem(below);
@@ -1866,7 +1866,7 @@ void KMHeaders::selectPrevMessage()
temp->firstChild();
temp = temp->parent();
}
- lvi->repaint();
+ lvi->tqrepaint();
/* test to see if we need to unselect messages on back track */
(above->isSelected() ? setSelected(lvi, false) : setSelected(above, true));
setCurrentItem(above);
@@ -2135,10 +2135,10 @@ void KMHeaders::highlightMessage(TQListViewItem* lvi, bool markitread)
return;
}
- BroadcastStatus::instance()->setStatusMsg("");
+ BroadcasStatus::instance()->seStatusMsg("");
if (markitread && idx >= 0) setMsgRead(idx);
mItems[idx]->irefresh();
- mItems[idx]->repaint();
+ mItems[idx]->tqrepaint();
emit selected( msg );
setFolderInfoStatus();
}
@@ -2151,7 +2151,7 @@ void KMHeaders::highlightCurrentThread()
for ( it.toFirst() ; it.current() ; ++it ) {
TQListViewItem *lvi = *it;
lvi->setSelected( true );
- lvi->repaint();
+ lvi->tqrepaint();
}
}
@@ -2192,7 +2192,7 @@ void KMHeaders::updateMessageList( bool set_selection, bool forceJumpToUnread )
noRepaint = false;
KListView::setSorting( mSortCol, !mSortDescending );
if (!mFolder) {
- repaint();
+ tqrepaint();
return;
}
readSortOrder( set_selection, forceJumpToUnread );
@@ -2326,10 +2326,10 @@ void KMHeaders::contentsMousePressEvent(TQMouseEvent* e)
/* Explicitely set selection state. This is necessary because we want to
* also select all children of closed threads when the parent is selected. */
- // unless ctrl mask, set selected if it isn't already
+ // unless ctrl tqmask, set selected if it isn't already
if ( !( e->state() & ControlButton ) && !wasSelected )
setSelected( lvi, true );
- // if ctrl mask, toggle selection
+ // if ctrl tqmask, toggle selection
if ( e->state() & ControlButton )
setSelected( lvi, !wasSelected );
@@ -2424,7 +2424,7 @@ void KMHeaders::highlightMessage(TQListViewItem* i)
//-----------------------------------------------------------------------------
void KMHeaders::slotRMB()
{
- if (!topLevelWidget()) return; // safe bet
+ if (!tqtopLevelWidget()) return; // safe bet
mOwner->updateMessageActions();
// check if the user clicked into a status column and only show the respective menues
@@ -2673,14 +2673,14 @@ static void internalWriteItem(FILE *sortStream, KMFolder *folder, int msgid,
fwrite(&msgSerNum, sizeof(msgSerNum), 1, sortStream);
fwrite(&parentSerNum, sizeof(parentSerNum), 1, sortStream);
- Q_INT32 len = key.length() * sizeof(TQChar);
+ TQ_INT32 len = key.length() * sizeof(TQChar);
fwrite(&len, sizeof(len), 1, sortStream);
if (len)
- fwrite(key.unicode(), QMIN(len, KMAIL_MAX_KEY_LEN), 1, sortStream);
+ fwrite(key.tqunicode(), QMIN(len, KMAIL_MAX_KEY_LEN), 1, sortStream);
if (update_discover) {
//update the discovered change count
- Q_INT32 discovered_count = 0;
+ TQ_INT32 discovered_count = 0;
fseek(sortStream, KMAIL_MAGIC_HEADER_OFFSET + 20, SEEK_SET);
fread(&discovered_count, sizeof(discovered_count), 1, sortStream);
discovered_count++;
@@ -2734,13 +2734,13 @@ bool KMHeaders::writeSortOrder()
mSortInfo.column = mSortCol;
fprintf(sortStream, KMAIL_SORT_HEADER, KMAIL_SORT_VERSION);
//magic header information
- Q_INT32 byteOrder = 0x12345678;
- Q_INT32 column = mSortCol;
- Q_INT32 ascending= !mSortDescending;
- Q_INT32 threaded = isThreaded();
- Q_INT32 appended=0;
- Q_INT32 discovered_count = 0;
- Q_INT32 sorted_count=0;
+ TQ_INT32 byteOrder = 0x12345678;
+ TQ_INT32 column = mSortCol;
+ TQ_INT32 ascending= !mSortDescending;
+ TQ_INT32 threaded = isThreaded();
+ TQ_INT32 appended=0;
+ TQ_INT32 discovered_count = 0;
+ TQ_INT32 sorted_count=0;
fwrite(&byteOrder, sizeof(byteOrder), 1, sortStream);
fwrite(&column, sizeof(column), 1, sortStream);
fwrite(&ascending, sizeof(ascending), 1, sortStream);
@@ -2845,7 +2845,7 @@ void KMHeaders::appendItemToSortFile(HeaderItem *khi)
khi->key(mSortCol, !mSortDescending), false);
//update the appended flag FIXME obsolete?
- Q_INT32 appended = 1;
+ TQ_INT32 appended = 1;
fseek(sortStream, KMAIL_MAGIC_HEADER_OFFSET + 16, SEEK_SET);
fwrite(&appended, sizeof(appended), 1, sortStream);
fseek(sortStream, KMAIL_MAGIC_HEADER_OFFSET + 16, SEEK_SET);
@@ -2950,7 +2950,7 @@ void KMHeaders::buildThreadingTree( TQMemArray<SortCacheItem *> sortCache )
KMMsgBase *mi = mFolder->getMsgBase(x);
TQString md5 = mi->msgIdMD5();
if(!md5.isEmpty())
- mSortCacheItems.replace(md5, sortCache[x]);
+ mSortCacheItems.tqreplace(md5, sortCache[x]);
}
}
@@ -3014,7 +3014,7 @@ SortCacheItem* KMHeaders::findParent(SortCacheItem *item)
// if you keep your outgoing messages in an OUTBOX, for
// example, try the list of references, because the second
// to last will likely be in this folder. replyToAuxIdMD5
- // contains the second to last one.
+ // tqcontains the second to last one.
TQString ref = msg->replyToAuxIdMD5();
if (!ref.isEmpty())
parent = mSortCacheItems[ref];
@@ -3065,8 +3065,8 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
if (!mFolder->isOpened()) mFolder->open("kmheaders");
//all cases
- Q_INT32 column, ascending, threaded, discovered_count, sorted_count, appended;
- Q_INT32 deleted_count = 0;
+ TQ_INT32 column, ascending, threaded, discovered_count, sorted_count, appended;
+ TQ_INT32 deleted_count = 0;
bool unread_exists = false;
bool jumpToUnread = (GlobalSettings::self()->actionEnterFolder() ==
GlobalSettings::EnumActionEnterFolder::SelectFirstUnreadNew) ||
@@ -3096,7 +3096,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
if (fscanf(sortStream, KMAIL_SORT_HEADER, &version) != 1)
version = -1;
if(version == KMAIL_SORT_VERSION) {
- Q_INT32 byteOrder = 0;
+ TQ_INT32 byteOrder = 0;
fread(&byteOrder, sizeof(byteOrder), 1, sortStream);
if (byteOrder == 0x12345678)
{
@@ -3321,8 +3321,8 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
qsort(unsorted, unsorted_count, sizeof(SortCacheItem *), //sort
compare_SortCacheItem);
- /* The sorted list now contains all sorted children of this item, while
- * the (aptly named) unsorted array contains all as of yet unsorted
+ /* The sorted list now tqcontains all sorted children of this item, while
+ * the (aptly named) unsorted array tqcontains all as of yet unsorted
* ones. It has just been qsorted, so it is in itself sorted. These two
* sorted lists are now merged into one. */
for(TQPtrListIterator<SortCacheItem> it(*sorted);
@@ -3355,9 +3355,9 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
// If the parent is watched or ignored, propagate that to it's
// children
if (mFolder->getMsgBase(i->id())->isWatched())
- mFolder->getMsgBase(new_kci->id())->setStatus(KMMsgStatusWatched);
+ mFolder->getMsgBase(new_kci->id())->seStatus(KMMsgStatusWatched);
if (mFolder->getMsgBase(i->id())->isIgnored())
- mFolder->getMsgBase(new_kci->id())->setStatus(KMMsgStatusIgnored);
+ mFolder->getMsgBase(new_kci->id())->seStatus(KMMsgStatusIgnored);
khi = new HeaderItem(i->item(), new_kci->id(), new_kci->key());
} else {
khi = new HeaderItem(this, new_kci->id(), new_kci->key());
@@ -3515,7 +3515,7 @@ void KMHeaders::setCurrentItemBySerialNum( unsigned long serialNum )
{
// Linear search == slow. Don't overuse this method.
// It's currently only used for finding the current item again
- // after expiry deleted mails (so the index got invalidated).
+ // after expiry deleted mails (so the index got tqinvalidated).
for (int i = 0; i < (int)mItems.size() - 1; ++i) {
KMMsgBase *mMsgBase = mFolder->getMsgBase( i );
if ( mMsgBase->getMsgSerNum() == serialNum ) {
@@ -3587,21 +3587,21 @@ void KMHeaders::updateActions()
paste->setEnabled( true );
}
-void KMHeaders::setCopiedMessages(const TQValueList< Q_UINT32 > & msgs, bool move)
+void KMHeaders::setCopiedMessages(const TQValueList< TQ_UINT32 > & msgs, bool move)
{
mCopiedMessages = msgs;
mMoveMessages = move;
updateActions();
}
-bool KMHeaders::isMessageCut(Q_UINT32 serNum) const
+bool KMHeaders::isMessageCut(TQ_UINT32 serNum) const
{
- return mMoveMessages && mCopiedMessages.contains( serNum );
+ return mMoveMessages && mCopiedMessages.tqcontains( serNum );
}
-TQValueList< Q_UINT32 > KMHeaders::selectedSernums()
+TQValueList< TQ_UINT32 > KMHeaders::selectedSernums()
{
- TQValueList<Q_UINT32> list;
+ TQValueList<TQ_UINT32> list;
for ( TQListViewItemIterator it(this); it.current(); it++ ) {
if ( it.current()->isSelected() && it.current()->isVisible() ) {
HeaderItem* item = static_cast<HeaderItem*>( it.current() );
@@ -3614,9 +3614,9 @@ TQValueList< Q_UINT32 > KMHeaders::selectedSernums()
return list;
}
-TQValueList< Q_UINT32 > KMHeaders::selectedVisibleSernums()
+TQValueList< TQ_UINT32 > KMHeaders::selectedVisibleSernums()
{
- TQValueList<Q_UINT32> list;
+ TQValueList<TQ_UINT32> list;
TQListViewItemIterator it(this, TQListViewItemIterator::Selected|TQListViewItemIterator::Visible);
while( it.current() ) {
if ( it.current()->isSelected() && it.current()->isVisible() ) {