summaryrefslogtreecommitdiffstats
path: root/kmail/kmheaders.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:21 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:21 -0600
commit3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch)
tree89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /kmail/kmheaders.cpp
parent1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff)
downloadtdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz
tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip
Rename a number of old tq methods that are no longer tq specific
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 987f9aa06..5515c8489 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 <tqtextcodec.h>
+#include <textcodec.h>
#include <tqstyle.h>
#include <tqlistview.h>
@@ -329,7 +329,7 @@ void KMHeaders::slotToggleColumn(int id, int mode)
}
case KPaintInfo::COL_STATUS:
{
- show = &mPaintInfo.showtqStatus;
+ show = &mPaintInfo.showStatus;
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, tqcolorGroup().base() );
+ p->fillRect( rect, colorGroup().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->tqpalette().active().text());
+ TQColor c1=TQColor(kapp->palette().active().text());
TQColor c2=TQColor("red");
TQColor c3=TQColor("blue");
- TQColor c4=TQColor(kapp->tqpalette().active().base());
+ TQColor c4=TQColor(kapp->palette().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.showtqStatus);
+ config->writeEntry("showStatusColumn" , mPaintInfo.showStatus);
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(setFolderInfotqStatus()));
+ this, TQT_SLOT(setFolderInfoStatus()));
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(setFolderInfotqStatus()));
+ this, TQT_SLOT(setFolderInfoStatus()));
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();
- setFolderInfotqStatus();
+ setFolderInfoStatus();
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 = tqitemRect( oldFirstVisibleItem ).y();
+ const int oldOffsetOfFirstVisibleItem = itemRect( 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)->setqStatus( KMMsgStatusWatched );
+ mFolder->getMsgBase(id)->seStatus( KMMsgStatusWatched );
else if (parent && mFolder->getMsgBase(parent->id())->isIgnored())
- mFolder->getMsgBase(id)->setqStatus( KMMsgStatusIgnored );
+ mFolder->getMsgBase(id)->seStatus( 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 tqchildren of item.
+ // Reparent children 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->tqrepaint();
+ item->repaint();
}
}
//-----------------------------------------------------------------------------
-void KMHeaders::setMsgtqStatus (KMMsgtqStatus status, bool toggle)
+void KMHeaders::setMsgStatus (KMMsgStatus status, bool toggle)
{
// kdDebug() << k_funcinfo << endl;
SerNumList serNums = selectedVisibleSernums();
@@ -1254,7 +1254,7 @@ TQPtrList<TQListViewItem> KMHeaders::currentThread() const
return list;
}
-void KMHeaders::setThreadtqStatus(KMMsgtqStatus status, bool toggle)
+void KMHeaders::setThreadStatus(KMMsgStatus 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().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
+ frameWidth = tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth ) - 1;
else
- frameWidth = tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth );
+ frameWidth = tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth );
if ( frameWidth < 0 )
frameWidth = 0;
if ( frameWidth != lineWidth() )
@@ -1389,7 +1389,7 @@ void KMHeaders::styleChange( TQStyle& oldStyle )
}
//-----------------------------------------------------------------------------
-void KMHeaders::setFolderInfotqStatus ()
+void KMHeaders::setFolderInfoStatus ()
{
if ( !mFolder ) return;
TQString str;
@@ -1399,10 +1399,10 @@ void KMHeaders::setFolderInfotqStatus ()
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 ).tqarg( str )
+ str = count ? i18n( "1 message, %1.", "%n messages, %1.", count ).arg( 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.").tqarg( str );
+ str = i18n("%1 = n messages, m unread.", "%1 Folder is read-only.").arg( 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.tqarg( msgCount ).tqarg( msgCountToFilter );
+ statusMsg = statusMsg.arg( msgCount ).arg( 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 tqrepaint.
+ * messages involved and repaint.
*
* 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();
- setFolderInfotqStatus();
+ setFolderInfoStatus();
}
//-----------------------------------------------------------------------------
@@ -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
- // tqchildren .
+ // children .
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->tqrepaint();
+ lvi->repaint();
/* test to see if we need to unselect messages on back track */
(below->isSelected() ? setSelected(lvi, false) : setSelected(below, true));
setCurrentItem(below);
makeHeaderVisible();
- setFolderInfotqStatus();
+ setFolderInfoStatus();
}
}
}
@@ -1866,12 +1866,12 @@ void KMHeaders::selectPrevMessage()
temp->firstChild();
temp = temp->parent();
}
- lvi->tqrepaint();
+ lvi->repaint();
/* test to see if we need to unselect messages on back track */
(above->isSelected() ? setSelected(lvi, false) : setSelected(above, true));
setCurrentItem(above);
makeHeaderVisible();
- setFolderInfotqStatus();
+ setFolderInfoStatus();
}
}
}
@@ -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 tqchildren.
+ // root and recursively sort all of that ancestors children.
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]->tqrepaint();
+ mItems[idx]->repaint();
emit selected( msg );
- setFolderInfotqStatus();
+ setFolderInfoStatus();
}
void KMHeaders::highlightCurrentThread()
@@ -2151,7 +2151,7 @@ void KMHeaders::highlightCurrentThread()
for ( it.toFirst() ; it.current() ; ++it ) {
TQListViewItem *lvi = *it;
lvi->setSelected( true );
- lvi->tqrepaint();
+ lvi->repaint();
}
}
@@ -2192,7 +2192,7 @@ void KMHeaders::updateMessageList( bool set_selection, bool forceJumpToUnread )
noRepaint = false;
KListView::setSorting( mSortCol, !mSortDescending );
if (!mFolder) {
- tqrepaint();
+ repaint();
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 tqchildren, so opening the thread
+ // the thread. In that case, deselect all children, 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 tqchildren after closing if the parent is selected
+ // select the thread's children 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 tqchildren of closed threads when the parent is selected. */
+ * also select all children 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 ) {
- setMsgtqStatus( KMMsgStatusFlag, true );
+ setMsgStatus( KMMsgStatusFlag, true );
} else if ( section == mPaintInfo.importantCol && flagsToggleable ) {
- setMsgtqStatus( KMMsgStatusFlag, true );
+ setMsgStatus( KMMsgStatusFlag, true );
} else if ( section == mPaintInfo.todoCol && flagsToggleable ) {
- setMsgtqStatus( KMMsgStatusTodo, true );
+ setMsgStatus( KMMsgStatusTodo, true );
} else if ( section == mPaintInfo.watchedIgnoredCol && flagsToggleable ) {
if ( msg->isWatched() || msg->isIgnored() )
- setMsgtqStatus( KMMsgStatusIgnored, true );
+ setMsgStatus( KMMsgStatusIgnored, true );
else
- setMsgtqStatus( KMMsgStatusWatched, true );
+ setMsgStatus( KMMsgStatusWatched, true );
} else if ( section == mPaintInfo.statusCol ) {
if ( msg->isUnread() || msg->isNew() )
- setMsgtqStatus( KMMsgStatusRead );
+ setMsgStatus( KMMsgStatusRead );
else
- setMsgtqStatus( KMMsgStatusUnread );
+ setMsgStatus( KMMsgStatusUnread );
}
}
}
@@ -2424,7 +2424,7 @@ void KMHeaders::highlightMessage(TQListViewItem* i)
//-----------------------------------------------------------------------------
void KMHeaders::slotRMB()
{
- if (!tqtopLevelWidget()) return; // safe bet
+ if (!topLevelWidget()) 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.tqunicode(), TQMIN(len, KMAIL_MAX_KEY_LEN), 1, sortStream);
+ fwrite(key.unicode(), 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 tqdevice?)" << endl;
+ kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl;
kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl;
- kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on tqdevice?)").tqarg( sortFile ));
+ kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on device?)").arg( 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 tqdevice?)" << endl;
+ kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl;
kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl;
- kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on tqdevice?)").tqarg( sortFile ));
+ kmkernel->emergencyExit( i18n("Failure modifying %1\n(No space left on device?)").arg( 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 tqchildren of this item, while
+ /* The sorted list now contains all sorted children 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
- // tqchildren
+ // children
if (mFolder->getMsgBase(i->id())->isWatched())
- mFolder->getMsgBase(new_kci->id())->setqStatus(KMMsgStatusWatched);
+ mFolder->getMsgBase(new_kci->id())->seStatus(KMMsgStatusWatched);
if (mFolder->getMsgBase(i->id())->isIgnored())
- mFolder->getMsgBase(new_kci->id())->setqStatus(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());
@@ -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 tqdevice?)" << endl;
+ kdWarning(5006) << "Error: Failure modifying " << sortFile << " (No space left on device?)" << endl;
kdWarning(5006) << __FILE__ << ":" << __LINE__ << endl;
return true;