summaryrefslogtreecommitdiffstats
path: root/kmail/kmheaders.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:50 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:50 -0600
commit9cc13dcbb01a96c9e60a07ca63c61d24b374f50d (patch)
treeab537a329b9613e11dce8195761f93ffe82aed24 /kmail/kmheaders.cpp
parent3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (diff)
downloadtdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.tar.gz
tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.
Diffstat (limited to 'kmail/kmheaders.cpp')
-rw-r--r--kmail/kmheaders.cpp110
1 files changed, 55 insertions, 55 deletions
diff --git a/kmail/kmheaders.cpp b/kmail/kmheaders.cpp
index 5515c8489..987f9aa06 100644
--- a/kmail/kmheaders.cpp
+++ b/kmail/kmheaders.cpp
@@ -49,7 +49,7 @@ using namespace KPIM;
#include <tqptrstack.h>
#include <tqptrqueue.h>
#include <tqpainter.h>
-#include <textcodec.h>
+#include <tqtextcodec.h>
#include <tqstyle.h>
#include <tqlistview.h>
@@ -329,7 +329,7 @@ void KMHeaders::slotToggleColumn(int id, int mode)
}
case KPaintInfo::COL_STATUS:
{
- show = &mPaintInfo.showStatus;
+ show = &mPaintInfo.showtqStatus;
col = &mPaintInfo.statusCol;
width = pixNew->width() + 8;
if ( *col == header()->mapToIndex( *col ) )
@@ -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)
@@ -429,10 +429,10 @@ void KMHeaders::readColorConfig (void)
KConfig* config = KMKernel::config();
// Custom/System colors
KConfigGroupSaver saver(config, "Reader");
- TQColor c1=TQColor(kapp->palette().active().text());
+ TQColor c1=TQColor(kapp->tqpalette().active().text());
TQColor c2=TQColor("red");
TQColor c3=TQColor("blue");
- TQColor c4=TQColor(kapp->palette().active().base());
+ TQColor c4=TQColor(kapp->tqpalette().active().base());
TQColor c5=TQColor(0,0x7F,0);
TQColor c6=TQColor(0,0x98,0);
TQColor c7=KGlobalSettings::alternateBackgroundColor();
@@ -669,7 +669,7 @@ void KMHeaders::writeConfig (void)
config->writeEntry("showTodoColumn" , mPaintInfo.showTodo);
config->writeEntry("showSpamHamColumn" , mPaintInfo.showSpamHam);
config->writeEntry("showWatchedIgnoredColumn", mPaintInfo.showWatchedIgnored);
- config->writeEntry("showStatusColumn" , mPaintInfo.showStatus);
+ config->writeEntry("showStatusColumn" , mPaintInfo.showtqStatus);
config->writeEntry("showSignedColumn" , mPaintInfo.showSigned);
config->writeEntry("showCryptoColumn" , mPaintInfo.showCrypto);
config->writeEntry("showReceiverColumn" , mPaintInfo.showReceiver);
@@ -700,7 +700,7 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread )
highlightMessage(0, false);
disconnect(mFolder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)),
- this, TQT_SLOT(setFolderInfoStatus()));
+ this, TQT_SLOT(setFolderInfotqStatus()));
mFolder->markNewAsUnread();
writeFolderConfig();
@@ -754,7 +754,7 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread )
connect(mFolder, TQT_SIGNAL(statusMsg(const TQString&)),
BroadcastStatus::instance(), TQT_SLOT( seStatusMsg( const TQString& ) ) );
connect(mFolder, TQT_SIGNAL(numUnreadMsgsChanged(KMFolder*)),
- this, TQT_SLOT(setFolderInfoStatus()));
+ this, TQT_SLOT(setFolderInfotqStatus()));
connect(mFolder, TQT_SIGNAL(viewConfigChanged()), this, TQT_SLOT(reset()));
// Not very nice, but if we go from nested to non-nested
@@ -789,7 +789,7 @@ void KMHeaders::setFolder( KMFolder *aFolder, bool forceJumpToUnread )
END_TIMER(updateMsg);
SHOW_TIMER(updateMsg);
makeHeaderVisible();
- setFolderInfoStatus();
+ setFolderInfotqStatus();
TQString colText = i18n( "Sender" );
if (mFolder && (mFolder->whoField().lower() == "to") && !mPaintInfo.showReceiver)
@@ -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)->seStatus( KMMsgStatusWatched );
+ mFolder->getMsgBase(id)->setqStatus( KMMsgStatusWatched );
else if (parent && mFolder->getMsgBase(parent->id())->isIgnored())
- mFolder->getMsgBase(id)->seStatus( KMMsgStatusIgnored );
+ mFolder->getMsgBase(id)->setqStatus( KMMsgStatusIgnored );
if (parent)
hi = new HeaderItem( parent->item(), id );
else
@@ -1115,7 +1115,7 @@ void KMHeaders::msgRemoved(int id, TQString msgId )
if ( mSubjThreading && removedItem->sortCacheItem()->subjectThreadingList() )
removedItem->sortCacheItem()->subjectThreadingList()->removeRef( removedItem->sortCacheItem() );
- // Reparent children of item.
+ // Reparent tqchildren of item.
TQListViewItem *myParent = removedItem;
TQListViewItem *myChild = myParent->firstChild();
TQListViewItem *threadRoot = myParent;
@@ -1214,13 +1214,13 @@ void KMHeaders::msgHeaderChanged(KMFolder*, int msgId)
HeaderItem *item = mItems[msgId];
if (item) {
item->irefresh();
- item->repaint();
+ item->tqrepaint();
}
}
//-----------------------------------------------------------------------------
-void KMHeaders::setMsgStatus (KMMsgStatus status, bool toggle)
+void KMHeaders::setMsgtqStatus (KMMsgtqStatus status, bool toggle)
{
// kdDebug() << k_funcinfo << endl;
SerNumList serNums = selectedVisibleSernums();
@@ -1254,7 +1254,7 @@ TQPtrList<TQListViewItem> KMHeaders::currentThread() const
return list;
}
-void KMHeaders::setThreadStatus(KMMsgStatus status, bool toggle)
+void KMHeaders::setThreadtqStatus(KMMsgtqStatus status, bool toggle)
{
TQPtrList<TQListViewItem> curThread;
@@ -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( tqstyle().isA("KeramikStyle") )
- frameWidth = tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
+ frameWidth = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
else
- frameWidth = tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth );
+ frameWidth = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth );
if ( frameWidth < 0 )
frameWidth = 0;
if ( frameWidth != lineWidth() )
@@ -1389,7 +1389,7 @@ void KMHeaders::styleChange( TQStyle& oldStyle )
}
//-----------------------------------------------------------------------------
-void KMHeaders::setFolderInfoStatus ()
+void KMHeaders::setFolderInfotqStatus ()
{
if ( !mFolder ) return;
TQString str;
@@ -1399,10 +1399,10 @@ void KMHeaders::setFolderInfoStatus ()
else
str = unread ? i18n( "1 unread", "%n unread", unread ) : i18n( "0 unread" );
const int count = mFolder->count();
- str = count ? i18n( "1 message, %1.", "%n messages, %1.", count ).arg( str )
+ str = count ? i18n( "1 message, %1.", "%n messages, %1.", count ).tqarg( str )
: 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 );
+ str = i18n("%1 = n messages, m unread.", "%1 Folder is read-only.").tqarg( str );
BroadcastStatus::instance()->seStatusMsg(str);
}
@@ -1451,7 +1451,7 @@ void KMHeaders::applyFiltersOnMsg()
if ( msgCountToFilter - msgCount < 10 || !( msgCount % 20 ) || msgCount <= 10 ) {
progressItem->updateProgress();
TQString statusMsg = i18n("Filtering message %1 of %2");
- statusMsg = statusMsg.arg( msgCount ).arg( msgCountToFilter );
+ statusMsg = statusMsg.tqarg( msgCount ).tqarg( msgCountToFilter );
KPIM::BroadcastStatus::instance()->seStatusMsg( statusMsg );
KApplication::kApplication()->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 50 );
}
@@ -1624,7 +1624,7 @@ void KMHeaders::slotMoveCompleted( KMCommand *command )
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.
@@ -1701,7 +1701,7 @@ void KMHeaders::setCurrentMsg(int cur)
setSelectionAnchor( currentItem() );
}
makeHeaderVisible();
- setFolderInfoStatus();
+ setFolderInfotqStatus();
}
//-----------------------------------------------------------------------------
@@ -1714,7 +1714,7 @@ void KMHeaders::setSelected( TQListViewItem *item, bool selected )
KListView::setSelected( item, selected );
// If the item is the parent of a closed thread recursively select
- // children .
+ // tqchildren .
if ( isThreaded() && !item->isOpen() && item->firstChild() ) {
TQListViewItem *nextRoot = item->itemBelow();
TQListViewItemIterator it( item->firstChild() );
@@ -1828,12 +1828,12 @@ 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);
makeHeaderVisible();
- setFolderInfoStatus();
+ setFolderInfotqStatus();
}
}
}
@@ -1866,12 +1866,12 @@ 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);
makeHeaderVisible();
- setFolderInfoStatus();
+ setFolderInfotqStatus();
}
}
}
@@ -1997,7 +1997,7 @@ int KMHeaders::findUnread(bool aDirNext, int aStartAt, bool onlyNew, bool accept
// first unread item.
//
// Find the ancestor of the unread item closest to the
- // root and recursively sort all of that ancestors children.
+ // root and recursively sort all of that ancestors tqchildren.
if (item) {
TQListViewItem *next = item;
while (next->parent())
@@ -2138,9 +2138,9 @@ void KMHeaders::highlightMessage(TQListViewItem* lvi, bool markitread)
BroadcastStatus::instance()->seStatusMsg("");
if (markitread && idx >= 0) setMsgRead(idx);
mItems[idx]->irefresh();
- mItems[idx]->repaint();
+ mItems[idx]->tqrepaint();
emit selected( msg );
- setFolderInfoStatus();
+ setFolderInfotqStatus();
}
void KMHeaders::highlightCurrentThread()
@@ -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 );
@@ -2290,7 +2290,7 @@ void KMHeaders::contentsMousePressEvent(TQMouseEvent* e)
if ( rootDecoClicked ) {
// Check if our item is the parent of a closed thread and if so, if the root
// decoration of the item was clicked (i.e. the +/- sign) which would expand
- // the thread. In that case, deselect all children, so opening the thread
+ // the thread. In that case, deselect all tqchildren, so opening the thread
// doesn't cause a flicker.
if ( !lvi->isOpen() && lvi->firstChild() ) {
TQListViewItem *nextRoot = lvi->itemBelow();
@@ -2315,7 +2315,7 @@ void KMHeaders::contentsMousePressEvent(TQMouseEvent* e)
}
if ( rootDecoClicked ) {
- // select the thread's children after closing if the parent is selected
+ // select the thread's tqchildren after closing if the parent is selected
if ( lvi && !lvi->isOpen() && lvi->isSelected() )
setSelected( lvi, true );
}
@@ -2324,7 +2324,7 @@ void KMHeaders::contentsMousePressEvent(TQMouseEvent* e)
if ( lvi != currentItem() )
highlightMessage( lvi );
/* Explicitely set selection state. This is necessary because we want to
- * also select all children of closed threads when the parent is selected. */
+ * also select all tqchildren of closed threads when the parent is selected. */
// unless ctrl mask, set selected if it isn't already
if ( !( e->state() & ControlButton ) && !wasSelected )
@@ -2344,21 +2344,21 @@ void KMHeaders::contentsMousePressEvent(TQMouseEvent* e)
HeaderItem *item = static_cast<HeaderItem*>( lvi );
KMMsgBase *msg = mFolder->getMsgBase(item->msgId());
if ( section == mPaintInfo.flagCol && flagsToggleable ) {
- setMsgStatus( KMMsgStatusFlag, true );
+ setMsgtqStatus( KMMsgStatusFlag, true );
} else if ( section == mPaintInfo.importantCol && flagsToggleable ) {
- setMsgStatus( KMMsgStatusFlag, true );
+ setMsgtqStatus( KMMsgStatusFlag, true );
} else if ( section == mPaintInfo.todoCol && flagsToggleable ) {
- setMsgStatus( KMMsgStatusTodo, true );
+ setMsgtqStatus( KMMsgStatusTodo, true );
} else if ( section == mPaintInfo.watchedIgnoredCol && flagsToggleable ) {
if ( msg->isWatched() || msg->isIgnored() )
- setMsgStatus( KMMsgStatusIgnored, true );
+ setMsgtqStatus( KMMsgStatusIgnored, true );
else
- setMsgStatus( KMMsgStatusWatched, true );
+ setMsgtqStatus( KMMsgStatusWatched, true );
} else if ( section == mPaintInfo.statusCol ) {
if ( msg->isUnread() || msg->isNew() )
- setMsgStatus( KMMsgStatusRead );
+ setMsgtqStatus( KMMsgStatusRead );
else
- setMsgStatus( KMMsgStatusUnread );
+ setMsgtqStatus( KMMsgStatusUnread );
}
}
}
@@ -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
@@ -2676,7 +2676,7 @@ static void internalWriteItem(FILE *sortStream, KMFolder *folder, int msgid,
TQ_INT32 len = key.length() * sizeof(TQChar);
fwrite(&len, sizeof(len), 1, sortStream);
if (len)
- fwrite(key.unicode(), TQMIN(len, KMAIL_MAX_KEY_LEN), 1, sortStream);
+ fwrite(key.tqunicode(), TQMIN(len, KMAIL_MAX_KEY_LEN), 1, sortStream);
if (update_discover) {
//update the discovered change count
@@ -2813,9 +2813,9 @@ bool KMHeaders::writeSortOrder()
if (sortStream && ferror(sortStream)) {
fclose(sortStream);
unlink(TQFile::encodeName(sortFile));
- kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl;
+ kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on tqdevice?)" << endl;
kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl;
- kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on device?)").arg( sortFile ));
+ kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on tqdevice?)").tqarg( sortFile ));
}
fclose(sortStream);
::rename(TQFile::encodeName(tempName), TQFile::encodeName(sortFile));
@@ -2853,9 +2853,9 @@ void KMHeaders::appendItemToSortFile(HeaderItem *khi)
if (sortStream && ferror(sortStream)) {
fclose(sortStream);
unlink(TQFile::encodeName(sortFile));
- kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl;
+ kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on tqdevice?)" << endl;
kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl;
- kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on device?)").arg( sortFile ));
+ kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on tqdevice?)").tqarg( sortFile ));
}
fclose(sortStream);
} else {
@@ -3321,7 +3321,7 @@ 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 sorted list now contains all sorted tqchildren of this item, while
* the (aptly named) unsorted array contains 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. */
@@ -3353,11 +3353,11 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
if(threaded && i->item()) {
// If the parent is watched or ignored, propagate that to it's
- // children
+ // tqchildren
if (mFolder->getMsgBase(i->id())->isWatched())
- mFolder->getMsgBase(new_kci->id())->seStatus(KMMsgStatusWatched);
+ mFolder->getMsgBase(new_kci->id())->setqStatus(KMMsgStatusWatched);
if (mFolder->getMsgBase(i->id())->isIgnored())
- mFolder->getMsgBase(new_kci->id())->seStatus(KMMsgStatusIgnored);
+ mFolder->getMsgBase(new_kci->id())->setqStatus(KMMsgStatusIgnored);
khi = new HeaderItem(i->item(), new_kci->id(), new_kci->key());
} else {
khi = new HeaderItem(this, new_kci->id(), new_kci->key());
@@ -3499,7 +3499,7 @@ bool KMHeaders::readSortOrder( bool set_selection, bool forceJumpToUnread )
if ( sortStream )
fclose(sortStream);
unlink(TQFile::encodeName(sortFile));
- kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl;
+ kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on tqdevice?)" << endl;
kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl;
return true;