KMail::SortCacheItem Class Reference

#include <headeritem.h>

Public Member Functions

 SortCacheItem (int i, TQString k, int o=-1)
 
SortCacheItemparent () const
 
bool isImperfectlyThreaded () const
 
void setImperfectlyThreaded (bool val)
 
bool hasChildren () const
 
const TQPtrList< SortCacheItem > * sortedChildren () const
 
SortCacheItem ** unsortedChildren (int &count) const
 
void addSortedChild (SortCacheItem *i)
 
void addUnsortedChild (SortCacheItem *i)
 
void clearChildren ()
 
HeaderItemitem () const
 
void setItem (HeaderItem *i)
 
const TQString & key () const
 
void setKey (const TQString &key)
 
int id () const
 
void setId (int id)
 
int offset () const
 
void setOffset (int x)
 
void updateSortFile (FILE *sortStream, KMFolder *folder, bool waiting_for_parent=false, bool update_discovered_count=false)
 
void setSubjectThreadingList (TQPtrList< SortCacheItem > *list)
 
TQPtrList< SortCacheItem > * subjectThreadingList () const
 

Detailed Description

Represents an item in the set of mails to be displayed but only as far as sorting, threading and reading/writing of the current sort order to a disk cache is concerned.

Each such item is paired with a KMail::HeaderItem, which holds the graphical representation of each item (mail). This is what the threading trees are built of.

Definition at line 54 of file headeritem.h.

Member Function Documentation

◆ addSortedChild()

void KMail::SortCacheItem::addSortedChild ( SortCacheItem i)
inline

Add an item to this itme's list of already sorted children.

Definition at line 92 of file headeritem.h.

◆ addUnsortedChild()

void KMail::SortCacheItem::addUnsortedChild ( SortCacheItem i)
inline

Add an item to this itme's list of unsorted children.

Definition at line 97 of file headeritem.h.

◆ clearChildren()

void KMail::SortCacheItem::clearChildren ( )
inline

Clear the sorted and unsorted children datastructures.

Definition at line 108 of file headeritem.h.

◆ hasChildren()

bool KMail::SortCacheItem::hasChildren ( ) const
inline

Returns whether the item has other items below it.

Definition at line 81 of file headeritem.h.

◆ isImperfectlyThreaded()

bool KMail::SortCacheItem::isImperfectlyThreaded ( ) const
inline

Returs whether the item is so far imperfectly threaded.

If an item is imperfectly threaded (by References or subject, not by In-Reply-To) it will be reevalutated when a new mail comes in. It could be the perfect parent.

Definition at line 74 of file headeritem.h.

◆ item()

HeaderItem* KMail::SortCacheItem::item ( ) const
inline

The corresponding KMail::HeaderItem.

Definition at line 116 of file headeritem.h.

◆ key()

const TQString& KMail::SortCacheItem::key ( ) const
inline

sort key as used by the listview

Definition at line 121 of file headeritem.h.

◆ offset()

int KMail::SortCacheItem::offset ( ) const
inline

offset in the cache file stream

Definition at line 129 of file headeritem.h.

◆ parent()

SortCacheItem* KMail::SortCacheItem::parent ( ) const
inline

The parent node of the item in the threading hierarchy.

0 if the item is at top level, which is the default. Can only be set by parents.

Definition at line 68 of file headeritem.h.

◆ setImperfectlyThreaded()

void KMail::SortCacheItem::setImperfectlyThreaded ( bool  val)
inline

Set whether the item is currently imperfectly threaded (by References or Subject, not by In-Reply-To).

Definition at line 78 of file headeritem.h.

◆ setItem()

void KMail::SortCacheItem::setItem ( HeaderItem i)
inline

Set the corresponding KMail::HeaderItem.

Definition at line 118 of file headeritem.h.

◆ setKey()

void KMail::SortCacheItem::setKey ( const TQString &  key)
inline

Set the sort key used by the list view.

Definition at line 123 of file headeritem.h.

◆ setSubjectThreadingList()

void KMail::SortCacheItem::setSubjectThreadingList ( TQPtrList< SortCacheItem > *  list)
inline

Set the list of mails with a certain subject that this item is on.

Used to remove the item from that list on deletion.

Definition at line 138 of file headeritem.h.

◆ sortedChildren()

const TQPtrList<SortCacheItem>* KMail::SortCacheItem::sortedChildren ( ) const
inline

The sorted children are an array of sortcache items we know are below the current one and are already properly sorted (as read from the cache )

Definition at line 85 of file headeritem.h.

◆ subjectThreadingList()

TQPtrList<SortCacheItem>* KMail::SortCacheItem::subjectThreadingList ( ) const
inline

The list of mails with a certain subject that this item is on.

Definition at line 140 of file headeritem.h.

◆ unsortedChildren()

SortCacheItem** KMail::SortCacheItem::unsortedChildren ( int &  count) const
inline

The unsorted children are an array of sortcache items we know are below the current one, but are yet to be threaded and sorted properly.

Definition at line 89 of file headeritem.h.


The documentation for this class was generated from the following files: