kmail

headeritem.cpp
1/*******************************************************************************
2**
3** Filename : headeritem.cpp
4** Created on : 28 November, 2004
5** Copyright : (c) 2004 Till Adam
6** Email : adam@kde.org
7**
8*******************************************************************************/
9
10/*******************************************************************************
11**
12** This program is free software; you can redistribute it and/or modify
13** it under the terms of the GNU General Public License as published by
14** the Free Software Foundation; either version 2 of the License, or
15** (at your option) any later version.
16**
17** In addition, as a special exception, the copyright holders give
18** permission to link the code of this program with any edition of
19** the TQt library by Trolltech AS, Norway (or with modified versions
20** of TQt that use the same license as TQt), and distribute linked
21** combinations including the two. You must obey the GNU General
22** Public License in all respects for all of the code used other than
23** TQt. If you modify this file, you may extend this exception to
24** your version of the file, but you are not obligated to do so. If
25** you do not wish to do so, delete this exception statement from
26** your version.
27**
28*******************************************************************************/
29#include <tdelocale.h>
30#include <tqapplication.h>
31#include <tqregexp.h>
32#include <tqbitmap.h>
33#include <tqpainter.h>
34
35#include <tdeio/netaccess.h>
36
37#include "headeritem.h"
38#include "kmheaders.h"
39
40#include "kmfolder.h"
41
42using namespace KMail;
43
44// Constuction a new list view item with the given colors and pixmap
45HeaderItem::HeaderItem( TQListView* parent, int msgId, const TQString& key )
46 : TDEListViewItem( parent ),
47 mMsgId( msgId ),
48 mKey( key ),
49 mAboutToBeDeleted( false ),
50 mSortCacheItem( 0 )
51{
52 irefresh();
53}
54
55// Constuction a new list view item with the given parent, colors, & pixmap
56HeaderItem::HeaderItem( TQListViewItem* parent, int msgId, const TQString& key )
57 : TDEListViewItem( parent ),
58 mMsgId( msgId ),
59 mKey( key ),
60 mAboutToBeDeleted( false ),
61 mSortCacheItem( 0 )
62{
63 irefresh();
64}
65
66HeaderItem::~HeaderItem ()
67{
68 delete mSortCacheItem;
69}
70
71// Update the msgId this item corresponds to.
72void HeaderItem::setMsgId( int aMsgId )
73{
74 mMsgId = aMsgId;
75}
76
77// Profiling note: About 30% of the time taken to initialize the
78// listview is spent in this function. About 60% is spent in operator
79// new and TQListViewItem::TQListViewItem.
80void HeaderItem::irefresh()
81{
82 KMHeaders *headers = static_cast<KMHeaders*>(listView());
83 NestingPolicy threadingPolicy = headers->getNestingPolicy();
84 if ((threadingPolicy == AlwaysOpen) ||
85 (threadingPolicy == DefaultOpen)) {
86 //Avoid opening items as TQListView is currently slow to do so.
87 setOpen(true);
88 return;
89
90 }
91 if (threadingPolicy == DefaultClosed)
92 return; //default to closed
93
94 // otherwise threadingPolicy == OpenUnread
95 if (parent() && parent()->isOpen()) {
96 setOpen(true);
97 return;
98 }
99
100 KMMsgBase *mMsgBase = headers->folder()->getMsgBase( mMsgId );
101 mSerNum = mMsgBase->getMsgSerNum();
102 if (mMsgBase->isNew() || mMsgBase->isUnread()
103 || mMsgBase->isImportant() || mMsgBase->isTodo() || mMsgBase->isWatched() ) {
104 setOpen(true);
105 HeaderItem * topOfThread = this;
106 while(topOfThread->parent())
107 topOfThread = (HeaderItem*)topOfThread->parent();
108 topOfThread->setOpenRecursive(true);
109 }
110}
111
112// Return the msgId of the message associated with this item
114{
115 return mMsgId;
116}
117
118TQString HeaderItem::to() const
119{
120 KMHeaders * const headers = static_cast<KMHeaders*>( listView() );
121 KMMsgBase * const msgBase = headers->folder()->getMsgBase( mMsgId );
122 if ( msgBase ) {
123 return msgBase->to();
124 } else {
125 return TQString();
126 }
127}
128
129TQString HeaderItem::from() const
130{
131 KMHeaders * const headers = static_cast<KMHeaders*>( listView() );
132 KMMsgBase * const msgBase = headers->folder()->getMsgBase( mMsgId );
133 if ( msgBase ) {
134 return msgBase->from();
135 } else {
136 return TQString();
137 }
138}
139
140// Return the serial number
141TQ_UINT32 HeaderItem::msgSerNum() const
142{
143 return mSerNum;
144}
145
146// Update this item to summarise a new folder and message
147
148//Opens all children in the thread
150{
151 if (open){
152 TQListViewItem * lvchild;
153 lvchild = firstChild();
154 while (lvchild){
155 ((HeaderItem*)lvchild)->setOpenRecursive( true );
156 lvchild = lvchild->nextSibling();
157 }
158 setOpen( true );
159 } else {
160 setOpen( false );
161 }
162}
163
164TQString HeaderItem::text( int col) const
165{
166 KMHeaders *headers = static_cast<KMHeaders*>(listView());
167 KMMsgBase *mMsgBase = headers->folder()->getMsgBase( mMsgId );
168 TQString tmp;
169
170 if ( !mMsgBase )
171 return TQString();
172
173 if ( col == headers->paintInfo()->senderCol ) {
174 if ( (headers->folder()->whoField().lower() == "to") && !headers->paintInfo()->showReceiver )
175 tmp = mMsgBase->toStrip();
176 else
177 tmp = mMsgBase->fromStrip();
178 if (tmp.isEmpty())
179 tmp = i18n("Unknown");
180 else
181 tmp = tmp.simplifyWhiteSpace();
182
183 } else if ( col == headers->paintInfo()->receiverCol ) {
184 tmp = mMsgBase->toStrip();
185 if (tmp.isEmpty())
186 tmp = i18n("Unknown");
187 else
188 tmp = tmp.simplifyWhiteSpace();
189
190 } else if(col == headers->paintInfo()->subCol) {
191 tmp = mMsgBase->subject();
192 if (tmp.isEmpty())
193 tmp = i18n("No Subject");
194 else
195 tmp.remove(TQRegExp("[\r\n]"));
196
197 } else if(col == headers->paintInfo()->dateCol) {
198 tmp = headers->mDate.dateString( mMsgBase->date() );
199 } else if(col == headers->paintInfo()->sizeCol
200 && headers->paintInfo()->showSize) {
201 if ( mMsgBase->parent()->folderType() == KMFolderTypeImap ) {
202 tmp = TDEIO::convertSize( mMsgBase->msgSizeServer() );
203 } else {
204 tmp = TDEIO::convertSize( mMsgBase->msgSize() );
205 }
206 }
207 return tmp;
208}
209
210void HeaderItem::setup()
211{
212 widthChanged();
213 const int ph = KMHeaders::pixNew->height();
214 TQListView *v = listView();
215 int h = TQMAX( v->fontMetrics().height(), ph ) + 2*v->itemMargin();
216 h = TQMAX( h, TQApplication::globalStrut().height());
217 if ( h % 2 > 0 )
218 h++;
219 setHeight( h );
220}
221
222typedef TQValueList<TQPixmap> PixmapList;
223
224TQPixmap HeaderItem::pixmapMerge( PixmapList pixmaps ) const
225{
226 int width = 0;
227 int height = 0;
228 for ( PixmapList::ConstIterator it = pixmaps.begin();
229 it != pixmaps.end(); ++it ) {
230 width += (*it).width();
231 height = TQMAX( height, (*it).height() );
232 }
233
234 TQPixmap res( width, height );
235 TQBitmap mask( width, height, true );
236
237 int x = 0;
238 for ( PixmapList::ConstIterator it = pixmaps.begin();
239 it != pixmaps.end(); ++it ) {
240 bitBlt( &res, x, (height - (*it).height()) / 2, &(*it) );
241 bitBlt( &mask, x, (height - (*it).height()) / 2, (*it).mask() );
242 x += (*it).width();
243 }
244
245 res.setMask( mask );
246 return res;
247}
248
249const TQPixmap *HeaderItem::cryptoIcon(KMMsgBase *msgBase) const
250{
251 switch ( msgBase->encryptionState() )
252 {
253 case KMMsgFullyEncrypted : return KMHeaders::pixFullyEncrypted;
254 case KMMsgPartiallyEncrypted : return KMHeaders::pixPartiallyEncrypted;
255 case KMMsgEncryptionStateUnknown: return KMHeaders::pixUndefinedEncrypted;
256 case KMMsgEncryptionProblematic : return KMHeaders::pixEncryptionProblematic;
257 default : return 0;
258 }
259}
260
261const TQPixmap *HeaderItem::signatureIcon(KMMsgBase *msgBase) const
262{
263 switch ( msgBase->signatureState() )
264 {
265 case KMMsgFullySigned : return KMHeaders::pixFullySigned;
266 case KMMsgPartiallySigned : return KMHeaders::pixPartiallySigned;
267 case KMMsgSignatureStateUnknown: return KMHeaders::pixUndefinedSigned;
268 case KMMsgSignatureProblematic : return KMHeaders::pixSignatureProblematic;
269 default : return 0;
270 }
271}
272
273const TQPixmap *HeaderItem::statusIcon(KMMsgBase *msgBase) const
274{
275 // forwarded, replied have precedence over the other states
276 if ( msgBase->isForwarded() && !msgBase->isReplied() ) return KMHeaders::pixReadFwd;
277 if ( !msgBase->isForwarded() && msgBase->isReplied() ) return KMHeaders::pixReadReplied;
278 if ( msgBase->isForwarded() && msgBase->isReplied() ) return KMHeaders::pixReadFwdReplied;
279
280 // a queued or sent mail is usually also read
281 if ( msgBase->isQueued() ) return KMHeaders::pixQueued;
282 if ( msgBase->isSent() ) return KMHeaders::pixSent;
283
284 if ( msgBase->isNew() ) return KMHeaders::pixNew;
285 if ( msgBase->isRead() || msgBase->isOld() ) return KMHeaders::pixRead;
286 if ( msgBase->isUnread() ) return KMHeaders::pixUns;
287 if ( msgBase->isDeleted() ) return KMHeaders::pixDel;
288
289 return 0;
290}
291
292const TQPixmap *HeaderItem::pixmap(int col) const
293{
294 KMHeaders *headers = static_cast<KMHeaders*>(listView());
295 KMMsgBase *msgBase = headers->folder()->getMsgBase( mMsgId );
296
297 if ( col == headers->paintInfo()->subCol ) {
298
299 PixmapList pixmaps;
300
301 if ( !headers->mPaintInfo.showSpamHam ) {
302 // Have the spam/ham and watched/ignored icons first, I guess.
303 if ( msgBase->isSpam() ) pixmaps << *KMHeaders::pixSpam;
304 if ( msgBase->isHam() ) pixmaps << *KMHeaders::pixHam;
305 }
306
307 if ( !headers->mPaintInfo.showWatchedIgnored ) {
308 if ( msgBase->isIgnored() ) pixmaps << *KMHeaders::pixIgnored;
309 if ( msgBase->isWatched() ) pixmaps << *KMHeaders::pixWatched;
310 }
311
312 if ( !headers->mPaintInfo.showStatus ) {
313 const TQPixmap *pix = statusIcon(msgBase);
314 if ( pix ) pixmaps << *pix;
315 }
316
317 // Only merge the attachment icon in if that is configured.
318 if ( headers->paintInfo()->showAttachmentIcon &&
319 !headers->paintInfo()->showAttachment &&
320 msgBase->attachmentState() == KMMsgHasAttachment )
321 pixmaps << *KMHeaders::pixAttachment;
322
323 // Only merge the invitation icon in if that is configured.
324 if ( headers->paintInfo()->showInvitationIcon &&
325 msgBase->invitationState() == KMMsgHasInvitation )
326 pixmaps << *KMHeaders::pixInvitation;
327
328 // Only merge the crypto icons in if that is configured.
329 if ( headers->paintInfo()->showCryptoIcons ) {
330 const TQPixmap *pix;
331
332 if ( !headers->paintInfo()->showCrypto )
333 if ( (pix = cryptoIcon(msgBase)) ) pixmaps << *pix;
334
335 if ( !headers->paintInfo()->showSigned )
336 if ( (pix = signatureIcon(msgBase)) ) pixmaps << *pix;
337 }
338
339 if ( !headers->mPaintInfo.showImportant )
340 if ( msgBase->isImportant() ) pixmaps << *KMHeaders::pixFlag;
341
342 if ( !headers->mPaintInfo.showTodo )
343 if ( msgBase->isTodo() ) pixmaps << *KMHeaders::pixTodo;
344
345 static TQPixmap mergedpix;
346 mergedpix = pixmapMerge( pixmaps );
347 return &mergedpix;
348 }
349 else if ( col == headers->paintInfo()->statusCol ) {
350 return statusIcon(msgBase);
351 }
352 else if ( col == headers->paintInfo()->attachmentCol ) {
353 if ( msgBase->attachmentState() == KMMsgHasAttachment )
354 return KMHeaders::pixAttachment;
355 }
356 else if ( col == headers->paintInfo()->invitationCol ) {
357 if ( msgBase->invitationState() == KMMsgHasInvitation )
358 return KMHeaders::pixInvitation;
359 }
360 else if ( col == headers->paintInfo()->importantCol ) {
361 if ( msgBase->isImportant() )
362 return KMHeaders::pixFlag;
363 }
364 else if ( col == headers->paintInfo()->todoCol ) {
365 if ( msgBase->isTodo() )
366 return KMHeaders::pixTodo;
367 }
368 else if ( col == headers->paintInfo()->spamHamCol ) {
369 if ( msgBase->isSpam() ) return KMHeaders::pixSpam;
370 if ( msgBase->isHam() ) return KMHeaders::pixHam;
371 }
372 else if ( col == headers->paintInfo()->watchedIgnoredCol ) {
373 if ( msgBase->isWatched() ) return KMHeaders::pixWatched;
374 if ( msgBase->isIgnored() ) return KMHeaders::pixIgnored;
375 }
376 else if ( col == headers->paintInfo()->signedCol ) {
377 return signatureIcon(msgBase);
378 }
379 else if ( col == headers->paintInfo()->cryptoCol ) {
380 return cryptoIcon(msgBase);
381 }
382 return 0;
383}
384
385void HeaderItem::paintCell( TQPainter * p, const TQColorGroup & cg,
386 int column, int width, int align )
387{
388 KMHeaders *headers = static_cast<KMHeaders*>(listView());
389 if (headers->noRepaint) return;
390 if (!headers->folder()) return;
391 KMMsgBase *mMsgBase = headers->folder()->getMsgBase( mMsgId );
392 if (!mMsgBase) return;
393
394 TQColorGroup _cg( cg );
395 TQColor c = _cg.text();
396 TQColor *color = const_cast<TQColor *>( &headers->paintInfo()->colFore );
397 TQFont font = p->font();
398 int weight = font.weight();
399
400 // for color and font family "important" overrides "new" overrides "unread"
401 // overrides "todo" for the weight we use the maximal weight
402 if ( mMsgBase->isTodo() ) {
403 color = const_cast<TQColor*>( &headers->paintInfo()->colTodo );
404 font = headers->todoFont();
405 weight = TQMAX( weight, font.weight() );
406 }
407 if ( mMsgBase->isUnread() ) {
408 color = const_cast<TQColor*>( &headers->paintInfo()->colUnread );
409 font = headers->unreadFont();
410 weight = TQMAX( weight, font.weight() );
411 }
412 if ( mMsgBase->isNew() ) {
413 color = const_cast<TQColor*>( &headers->paintInfo()->colNew );
414 font = headers->newFont();
415 weight = TQMAX( weight, font.weight() );
416 }
417
418 if ( mMsgBase->isImportant() ) {
419 color = const_cast<TQColor*>( &headers->paintInfo()->colFlag );
420 font = headers->importantFont();
421 weight = TQMAX( weight, font.weight() );
422 }
423 if ( column == headers->paintInfo()->dateCol ) {
424 font = headers->dateFont();
425 }
426
427 TQColor cdisabled = TDEGlobalSettings::inactiveTextColor();
428 if ( headers->isMessageCut( msgSerNum() ) ) {
429 font.setItalic( true );
430 color = &cdisabled;
431 }
432
433 // set color and font
434 _cg.setColor( TQColorGroup::Text, *color );
435 font.setWeight( weight );
436 p->setFont( font );
437
438 TDEListViewItem::paintCell( p, _cg, column, width, align );
439
440 if (aboutToBeDeleted()) {
441 // strike through
442 p->drawLine( 0, height()/2, width, height()/2);
443 }
444
445 // reset color
446 _cg.setColor( TQColorGroup::Text, c );
447}
448
449TQString HeaderItem::generate_key( KMHeaders *headers,
450 KMMsgBase *msg,
451 const KPaintInfo *paintInfo,
452 int sortOrder )
453{
454 // It appears, that TQListView in TQt-3.0 asks for the key
455 // in TQListView::clear(), which is called from
456 // readSortOrder()
457 if (!msg) return TQString();
458
459 int column = sortOrder & ((1 << 5) - 1);
460 TQString ret = TQChar( (char)sortOrder );
461 TQString sortArrival = TQString( "%1" ).arg( msg->getMsgSerNum(), 0, 36 );
462 while (sortArrival.length() < 7) sortArrival = '0' + sortArrival;
463
464 if (column == paintInfo->dateCol) {
465 if (paintInfo->orderOfArrival)
466 return ret + sortArrival;
467 else {
468 TQString d = TQString::number(msg->date());
469 while (d.length() <= 10) d = '0' + d;
470 return ret + d + sortArrival;
471 }
472 } else if (column == paintInfo->senderCol) {
473 TQString tmp;
474 if ( (headers->folder()->whoField().lower() == "to") && !headers->paintInfo()->showReceiver )
475 tmp = msg->toStrip();
476 else
477 tmp = msg->fromStrip();
478 return ret + tmp.lower() + ' ' + sortArrival;
479 } else if (column == paintInfo->receiverCol) {
480 TQString tmp = msg->toStrip();
481 return ret + tmp.lower() + ' ' + sortArrival;
482 } else if (column == paintInfo->subCol) {
483 TQString tmp;
484 tmp = ret;
485 if (paintInfo->status) {
486 tmp += msg->statusToSortRank() + ' ';
487 }
488 tmp += KMMessage::stripOffPrefixes( msg->subject().lower() ) + ' ' + sortArrival;
489 return tmp;
490 }
491 else if (column == paintInfo->sizeCol) {
492 TQString len;
493 if ( msg->parent()->folderType() == KMFolderTypeImap )
494 {
495 len = TQString::number( msg->msgSizeServer() );
496 } else {
497 len = TQString::number( msg->msgSize() );
498 }
499 while (len.length() < 9) len = '0' + len;
500 return ret + len + sortArrival;
501 }
502 else if (column == paintInfo->statusCol) {
503 TQString s;
504 if ( msg->isNew() ) s = "1";
505 else if ( msg->isUnread() ) s = "2";
506 else if (!msg->isForwarded() && msg->isReplied() ) s = "3";
507 else if ( msg->isForwarded() && msg->isReplied() ) s = "4";
508 else if ( msg->isForwarded() && !msg->isReplied() ) s = "5";
509 else if ( msg->isRead() || msg->isOld() ) s = "6";
510 else if ( msg->isQueued() ) s = "7";
511 else if ( msg->isSent() ) s = "8";
512 else if ( msg->isDeleted() ) s = "9";
513 return ret + s + sortArrival;
514 }
515 else if (column == paintInfo->attachmentCol) {
516 TQString s(msg->attachmentState() == KMMsgHasAttachment ? "1" : "0");
517 return ret + s + sortArrival;
518 }
519 else if (column == paintInfo->invitationCol) {
520 TQString s(msg->invitationState() == KMMsgHasInvitation ? "1" : "0");
521 return ret + s + sortArrival;
522 }
523 else if (column == paintInfo->importantCol) {
524 TQString s(msg->isImportant() ? "1" : "0");
525 return ret + s + sortArrival;
526 }
527 else if ( column == paintInfo->todoCol ) {
528 TQString s( msg->isTodo() ? "1": "0" );
529 return ret + s + sortArrival;
530 }
531 else if (column == paintInfo->spamHamCol) {
532 TQString s((msg->isSpam() || msg->isHam()) ? "1" : "0");
533 return ret + s + sortArrival;
534 }
535 else if (column == paintInfo->watchedIgnoredCol) {
536 TQString s((msg->isWatched() || msg->isIgnored()) ? "1" : "0");
537 return ret + s + sortArrival;
538 }
539 else if (column == paintInfo->signedCol) {
540 TQString s;
541 switch ( msg->signatureState() )
542 {
543 case KMMsgFullySigned : s = "1"; break;
544 case KMMsgPartiallySigned : s = "2"; break;
545 case KMMsgSignatureStateUnknown: s = "3"; break;
546 case KMMsgSignatureProblematic : s = "4"; break;
547 default : s = "5"; break;
548 }
549 return ret + s + sortArrival;
550 }
551 else if (column == paintInfo->cryptoCol) {
552 TQString s;
553 switch ( msg->encryptionState() )
554 {
555 case KMMsgFullyEncrypted : s = "1"; break;
556 case KMMsgPartiallyEncrypted : s = "2"; break;
557 case KMMsgEncryptionStateUnknown: s = "3"; break;
558 case KMMsgEncryptionProblematic : s = "4"; break;
559 default : s = "5"; break;
560 }
561 return ret + s + sortArrival;
562 }
563 return ret + "missing key"; //you forgot something!!
564}
565
566TQString HeaderItem::key( int column, bool /*ascending*/ ) const
567{
568 KMHeaders *headers = static_cast<KMHeaders*>(listView());
569 int sortOrder = column;
570 if (headers->mPaintInfo.orderOfArrival)
571 sortOrder |= (1 << 6);
572 if (headers->mPaintInfo.status)
573 sortOrder |= (1 << 5);
574 //This code should stay pretty much like this, if you are adding new
575 //columns put them in generate_key
576 if(mKey.isEmpty() || mKey[0] != (char)sortOrder) {
577 KMHeaders *headers = static_cast<KMHeaders*>(listView());
578 KMMsgBase *msgBase = headers->folder()->getMsgBase( mMsgId );
579 return ((HeaderItem *)this)->mKey =
580 generate_key( headers, msgBase, headers->paintInfo(), sortOrder );
581 }
582 return mKey;
583}
584
585void HeaderItem::setTempKey( TQString key ) {
586 mKey = key;
587}
588
589int HeaderItem::compare( TQListViewItem *i, int col, bool ascending ) const
590{
591 int res = 0;
592 KMHeaders *headers = static_cast<KMHeaders*>(listView());
593 if ( ( col == headers->paintInfo()->statusCol ) ||
594 ( col == headers->paintInfo()->sizeCol ) ||
595 ( col == headers->paintInfo()->attachmentCol ) ||
596 ( col == headers->paintInfo()->invitationCol ) ||
597 ( col == headers->paintInfo()->importantCol ) ||
598 ( col == headers->paintInfo()->todoCol ) ||
599 ( col == headers->paintInfo()->spamHamCol ) ||
600 ( col == headers->paintInfo()->signedCol ) ||
601 ( col == headers->paintInfo()->cryptoCol ) ||
602 ( col == headers->paintInfo()->watchedIgnoredCol ) ) {
603 res = key( col, ascending ).compare( i->key( col, ascending ) );
604 } else if ( col == headers->paintInfo()->dateCol ) {
605 res = key( col, ascending ).compare( i->key( col, ascending ) );
606 if (i->parent() && !ascending)
607 res = -res;
608 } else if ( col == headers->paintInfo()->subCol ||
609 col == headers->paintInfo()->senderCol ||
610 col == headers->paintInfo()->receiverCol ) {
611 res = key( col, ascending ).localeAwareCompare( i->key( col, ascending ) );
612 }
613 return res;
614}
615
616TQListViewItem* HeaderItem::firstChildNonConst() /* Non const! */
617{
618 enforceSortOrder(); // Try not to rely on TQListView implementation details
619 return firstChild();
620}
621
TQString whoField() const
Get / set the name of the field that is used for the Sender/Receiver column in the headers (From/To)
Definition: kmfolder.h:396
const KMMsgBase * getMsgBase(int idx) const
Provides access to the basic message fields that are also stored in the index.
Definition: kmfolder.cpp:360
The widget that shows the contents of folders.
Definition: kmheaders.h:47
const KPaintInfo * paintInfo(void) const
PaintInfo pointer.
Definition: kmheaders.h:127
KMFolder * folder(void)
Return the folder whose message headers are being displayed.
Definition: kmheaders.h:64
bool isMessageCut(TQ_UINT32 serNum) const
Returns true if the message with the given serial number has been cut.
Definition: kmheaders.cpp:3596
Visual representation of a member of the set of displayables (mails in the current folder).
Definition: headeritem.h:164
TQString text(int col) const
Returns the text of the list view item.
Definition: headeritem.cpp:164
int msgId() const
Return the msgId of the message associated with this item.
Definition: headeritem.cpp:113
bool aboutToBeDeleted() const
Returns whether the item is about to be removed from the list view as a result of some user action.
Definition: headeritem.h:222
void setOpenRecursive(bool open)
Expands all children of the list view item.
Definition: headeritem.cpp:149
void setMsgId(int aMsgId)
Set the message id of this item, which is the offset/index in the folder currently displayed by the K...
Definition: headeritem.cpp:72
folderdiaquotatab.h
Definition: aboutdata.cpp:40