kmail

KMHeaders Class Reference

#include <kmheaders.h>

Inheritance diagram for KMHeaders:

KListView List of all members.

Detailed Description

The widget that shows the contents of folders.

Definition at line 48 of file kmheaders.h.


Public Slots

void selectMessage (QListViewItem *)
void highlightMessage (QListViewItem *)
void slotRMB ()
void msgHeaderChanged (KMFolder *folder, int msgId)
void msgChanged ()
void folderCleared ()
void folderClosed ()
void msgAdded (int)
void msgRemoved (int, QString)
void nextMessage ()
void selectNextMessage ()
void prevMessage ()
void selectPrevMessage ()
bool nextUnreadMessage (bool acceptCurrent=false)
bool prevUnreadMessage ()
void incCurrentMessage ()
void decCurrentMessage ()
void selectCurrentMessage ()
void slotNoDrag ()
void resetCurrentTime ()
void reset ()
void slotExpandOrCollapseThread (bool expand)
void slotExpandOrCollapseAllThreads (bool expand)
virtual void ensureCurrentItemVisible ()
virtual void setSelected (QListViewItem *item, bool selected)
void setSelectedByIndex (QValueList< int > items, bool selected)
void slotToggleColumn (int id, int mode=-1)
void setFolderInfoStatus ()

Signals

void selected (KMMessage *)
void activated (KMMessage *)
void maybeDeleting ()
void messageListUpdated ()
void msgAddedToListView (QListViewItem *)

Public Member Functions

 KMHeaders (KMMainWidget *owner, QWidget *parent=0, const char *name=0)
virtual ~KMHeaders ()
virtual void setFolder (KMFolder *, bool forceJumpToUnread=false)
KMFolderfolder (void)
void refreshNestedState (void)
virtual void setCurrentMsg (int msgId)
QPtrList< QListViewItem > currentThread () const
virtual void setThreadStatus (KMMsgStatus status, bool toggle=false)
virtual void setMsgRead (int msgId)
virtual void setMsgStatus (KMMsgStatus status, bool toggle=false)
virtual void deleteMsg ()
virtual void applyFiltersOnMsg ()
virtual void undo ()
virtual bool canUndo () const
virtual HeaderItemprepareMove (int *contentX, int *contentY)
virtual void finalizeMove (HeaderItem *item, int contentX, int contentY)
virtual void moveMsgToFolder (KMFolder *destination, bool askForConfirmation=true)
virtual void copyMsgToFolder (KMFolder *destination, KMMessage *aMsg=0)
virtual void clearSelectableAndAboutToBeDeleted (Q_UINT32 serNum)
virtual KMMessageList * selectedMsgs (bool toBeDeleted=false)
QValueList< int > selectedItems ()
QValueList< Q_UINT32 > selectedSernums ()
QValueList< Q_UINT32 > selectedVisibleSernums ()
int indexOfGetMsg (void) const
KMMainWidgetowner (void) const
const KPaintInfo * paintInfo (void) const
virtual void readConfig (void)
virtual void readColorConfig (void)
void restoreColumnLayout (KConfig *config, const QString &group)
virtual KMMessagecurrentMsg ()
virtual HeaderItemcurrentHeaderItem ()
virtual int currentItemIndex ()
virtual void setCurrentItemByIndex (int msgIdx)
void setCurrentItemBySerialNum (unsigned long serialNum)
virtual int topItemIndex ()
virtual void setTopItemByIndex (int aMsgIdx)
virtual void setNestedOverride (bool override)
virtual void setSubjectThreading (bool subjThreading)
virtual void setOpen (QListViewItem *, bool)
NestingPolicy getNestingPolicy () const
bool isThreaded () const
virtual int findUnread (bool findNext, int startAt=-1, bool onlyNew=false, bool acceptCurrent=false)
void highlightMessage (QListViewItem *, bool markitread)
void highlightCurrentThread ()
bool eventFilter (QObject *o, QEvent *e)
const KMMsgBasegetMsgBaseForItem (const QListViewItem *item) const
QFont newFont () const
QFont unreadFont () const
QFont importantFont () const
QFont todoFont () const
QFont dateFont () const
void setCopiedMessages (const QValueList< Q_UINT32 > &msgs, bool move)
bool isMessageCut (Q_UINT32 serNum) const
virtual void writeConfig (void)

Static Public Member Functions

static QString fancyDate (time_t otime)

Public Attributes

bool noRepaint

Protected Slots

virtual void moveSelectedToFolder (int menuId)
virtual void copySelectedToFolder (int menuId)
virtual int slotFilterMsg (KMMessage *)
void dirtySortOrder (int)
void rightButtonPressed (QListViewItem *, const QPoint &, int)

Protected Member Functions

virtual bool event (QEvent *e)
virtual void paintEmptyArea (QPainter *p, const QRect &rect)
void makeHeaderVisible ()
void findUnreadAux (HeaderItem *&, bool &, bool, bool)
virtual int firstSelectedMsg () const
virtual void readFolderConfig (void)
virtual void writeFolderConfig (void)
virtual void contentsMousePressEvent (QMouseEvent *)
virtual void contentsMouseReleaseEvent (QMouseEvent *e)
virtual void keyPressEvent (QKeyEvent *e)
virtual void setSorting (int column, bool ascending=true)
void contentsMouseMoveEvent (QMouseEvent *e)
void styleChange (QStyle &oldStyle)
void setStyleDependantFrameWidth ()

Static Protected Attributes

static QPixmap * pixNew
static QPixmap * pixUns
static QPixmap * pixDel
static QPixmap * pixRead
static QPixmap * pixRep
static QPixmap * pixSent
static QPixmap * pixQueued
static QPixmap * pixFwd
static QPixmap * pixFlag
static QPixmap * pixWatched
static QPixmap * pixIgnored
static QPixmap * pixSpam
static QPixmap * pixHam
static QPixmap * pixFullySigned
static QPixmap * pixPartiallySigned
static QPixmap * pixUndefinedSigned
static QPixmap * pixFullyEncrypted
static QPixmap * pixPartiallyEncrypted
static QPixmap * pixUndefinedEncrypted
static QPixmap * pixFiller
static QPixmap * pixEncryptionProblematic
static QPixmap * pixSignatureProblematic
static QPixmap * pixAttachment
static QPixmap * pixReadFwd
static QPixmap * pixReadReplied
static QPixmap * pixReadFwdReplied
static QPixmap * pixTodo

Friends

class ::KMail::HeaderItem

Member Function Documentation

void KMHeaders::setFolder ( KMFolder ,
bool  forceJumpToUnread = false 
) [virtual]

A new folder has been selected update the list of headers shown To override the global settings for jumping to the first unread msg use forceJumpToUnread.

Definition at line 661 of file kmheaders.cpp.

KMFolder* KMHeaders::folder ( void   )  [inline]

Return the folder whose message headers are being displayed.

Definition at line 65 of file kmheaders.h.

void KMHeaders::refreshNestedState ( void   ) 

read the config file and update nested state if necessary

Definition at line 573 of file kmheaders.cpp.

void KMHeaders::setCurrentMsg ( int  msgId  )  [virtual]

Set current message.

If id<0 then the first message is shown, if id>count() the last message is shown.

Definition at line 1666 of file kmheaders.cpp.

QPtrList< QListViewItem > KMHeaders::currentThread (  )  const

Get a list of all items in the current thread.

Definition at line 1208 of file kmheaders.cpp.

void KMHeaders::setThreadStatus ( KMMsgStatus  status,
bool  toggle = false 
) [virtual]

Set all messages in the current thread to status status or toggle it, if specified.

Definition at line 1230 of file kmheaders.cpp.

void KMHeaders::setMsgStatus ( KMMsgStatus  status,
bool  toggle = false 
) [virtual]

The following methods processes all selected messages.

Definition at line 1196 of file kmheaders.cpp.

void KMHeaders::moveMsgToFolder ( KMFolder destination,
bool  askForConfirmation = true 
) [virtual]

If destination is 0 then the messages are deleted, otherwise they are moved to this folder.

The second parameter is usefull when the user has already confirmed the move/deletion.

Definition at line 1560 of file kmheaders.cpp.

void KMHeaders::copyMsgToFolder ( KMFolder destination,
KMMessage aMsg = 0 
) [virtual]

Messages are duplicated and added to given folder.

If aMsg is set this one will be written to the destination folder.

Definition at line 1648 of file kmheaders.cpp.

void KMHeaders::clearSelectableAndAboutToBeDeleted ( Q_UINT32  serNum  )  [virtual]

Resets toBeDeleted and selectable status of all selected items.

Definition at line 1712 of file kmheaders.cpp.

KMMessageList * KMHeaders::selectedMsgs ( bool  toBeDeleted = false  )  [virtual]

Returns list of selected messages.

Mark the corresponding header items to be deleted, if specified.

Definition at line 1729 of file kmheaders.cpp.

QValueList< int > KMHeaders::selectedItems (  ) 

Returns the index values of currently selected items.

Definition at line 1750 of file kmheaders.cpp.

QValueList< Q_UINT32 > KMHeaders::selectedSernums (  ) 

Returns the sernums of all selected items.

Definition at line 3547 of file kmheaders.cpp.

QValueList< Q_UINT32 > KMHeaders::selectedVisibleSernums (  ) 

Returns the sernums of all visible (ie.

items with expanded parent, not hidden by eg. the quick search) selected items.

Definition at line 3562 of file kmheaders.cpp.

int KMHeaders::indexOfGetMsg ( void   )  const [inline]

Returns index of message returned by last getMsg() call.

Definition at line 122 of file kmheaders.h.

KMMainWidget* KMHeaders::owner ( void   )  const [inline]

Returns pointer to owning main window.

Definition at line 125 of file kmheaders.h.

const KPaintInfo* KMHeaders::paintInfo ( void   )  const [inline]

PaintInfo pointer.

Definition at line 128 of file kmheaders.h.

void KMHeaders::readConfig ( void   )  [virtual]

Read config options.

Definition at line 456 of file kmheaders.cpp.

void KMHeaders::readColorConfig ( void   )  [virtual]

Read color options and set palette.

Definition at line 414 of file kmheaders.cpp.

void KMHeaders::restoreColumnLayout ( KConfig *  config,
const QString &  group 
)

Same as KListView::restoreLayout(), only that this does _not_ restore the sort order.

This is useful since restoreLayout() doesn't restore the sort order correctly, as KListView doesn't know about our extended sort order like date of arrival.

Note that if you want to restore the sort order correctly, call readConfig().

Definition at line 543 of file kmheaders.cpp.

KMMessage * KMHeaders::currentMsg (  )  [virtual]

Return the current message.

Definition at line 2491 of file kmheaders.cpp.

HeaderItem * KMHeaders::currentHeaderItem (  )  [virtual]

Return the current list view item.

Definition at line 2501 of file kmheaders.cpp.

int KMHeaders::currentItemIndex (  )  [virtual]

Return the index of the message corresponding to the current item.

Definition at line 2507 of file kmheaders.cpp.

void KMHeaders::setCurrentItemByIndex ( int  msgIdx  )  [virtual]

Set the current item to the one corresponding to the given msg id.

Definition at line 2517 of file kmheaders.cpp.

void KMHeaders::setCurrentItemBySerialNum ( unsigned long  serialNum  ) 

Set the current item to the one corresponding to the given serial number (slow!).

Definition at line 3459 of file kmheaders.cpp.

int KMHeaders::topItemIndex (  )  [virtual]

Return the message id of the top most visible item.

Definition at line 2534 of file kmheaders.cpp.

void KMHeaders::setTopItemByIndex ( int  aMsgIdx  )  [virtual]

Make the item corresponding to the message with the given id the top most visible item.

Definition at line 2544 of file kmheaders.cpp.

void KMHeaders::setOpen ( QListViewItem *  ,
bool   
) [virtual]

Double force items to always be open.

Definition at line 2576 of file kmheaders.cpp.

bool KMHeaders::isThreaded (  )  const [inline]

Returns true if the current header list is threaded.

Definition at line 167 of file kmheaders.h.

int KMHeaders::findUnread ( bool  findNext,
int  startAt = -1,
bool  onlyNew = false,
bool  acceptCurrent = false 
) [virtual]

Find next/prev unread message.

Starts at currentItem() if startAt is unset.

Definition at line 1934 of file kmheaders.cpp.

static QString KMHeaders::fancyDate ( time_t  otime  )  [static]

return a string relativ to the current time

const KMMsgBase * KMHeaders::getMsgBaseForItem ( const QListViewItem *  item  )  const

gets the message represented by the item as a KMMsgBase.

Definition at line 2583 of file kmheaders.cpp.

void KMHeaders::setCopiedMessages ( const QValueList< Q_UINT32 > &  msgs,
bool  move 
)

Sets the list of copied/cutted messages.

Parameters:
msgs A list of serial numbers.
move if true, the messages were cutted

Definition at line 3535 of file kmheaders.cpp.

bool KMHeaders::isMessageCut ( Q_UINT32  serNum  )  const

Returns true if the message with the given serial number has been cut.

Parameters:
serNum A message serial number.

Definition at line 3542 of file kmheaders.cpp.

void KMHeaders::writeConfig ( void   )  [virtual]

Write global config options.

Definition at line 643 of file kmheaders.cpp.

void KMHeaders::selected ( KMMessage  )  [signal]

emitted when the list view item corresponding to this message has been selected

void KMHeaders::activated ( KMMessage  )  [signal]

emitted when the list view item corresponding to this message has been double clicked

void KMHeaders::maybeDeleting (  )  [signal]

emitted when we might be about to delete messages

void KMHeaders::messageListUpdated (  )  [signal]

emitted when the list of messages has been completely rebuilt

void KMHeaders::msgAddedToListView ( QListViewItem *   )  [signal]

emitted after a new item has been fully built and added to the list view.

We can't use KListView::itemAdded, as that is emitted from the ctor of the item, at which point the building of the item is not yet far enough along to update the quick search, which is what is connected to this signal.

void KMHeaders::selectMessage ( QListViewItem *   )  [slot]

For when a list view item has been double clicked.

Definition at line 2140 of file kmheaders.cpp.

void KMHeaders::highlightMessage ( QListViewItem *   )  [slot]

For when a list view item has been selected.

Definition at line 2392 of file kmheaders.cpp.

void KMHeaders::slotRMB (  )  [slot]

For when righ mouse button is pressed.

Definition at line 2398 of file kmheaders.cpp.

void KMHeaders::msgHeaderChanged ( KMFolder folder,
int  msgId 
) [slot]

Refresh list view item corresponding to the messae with the given id.

Definition at line 1184 of file kmheaders.cpp.

void KMHeaders::msgChanged (  )  [slot]

For when the list of messages in a folder has changed.

Definition at line 799 of file kmheaders.cpp.

void KMHeaders::folderCleared (  )  [slot]

For when the folder has been cleared.

Definition at line 2665 of file kmheaders.cpp.

void KMHeaders::folderClosed (  )  [slot]

For when the folder has been cleared.

Definition at line 2675 of file kmheaders.cpp.

void KMHeaders::msgAdded ( int   )  [slot]

For when the message with the given message id has been added to a folder.

Definition at line 869 of file kmheaders.cpp.

void KMHeaders::msgRemoved ( int  ,
QString   
) [slot]

For when the message with the given id has been removed for a folder.

Definition at line 1055 of file kmheaders.cpp.

void KMHeaders::nextMessage (  )  [slot]

Make the next header visible scrolling if necessary.

Definition at line 1778 of file kmheaders.cpp.

void KMHeaders::selectNextMessage (  )  [slot]

Same as nextMessage() but don't clear the current selection.

Definition at line 1790 of file kmheaders.cpp.

void KMHeaders::prevMessage (  )  [slot]

Make the previous header visible scrolling if necessary.

Definition at line 1815 of file kmheaders.cpp.

void KMHeaders::selectPrevMessage (  )  [slot]

Same as prevMessage() but don't clear the current selection.

Definition at line 1827 of file kmheaders.cpp.

bool KMHeaders::nextUnreadMessage ( bool  acceptCurrent = false  )  [slot]

Make the nextUnread message header visible scrolling if necessary, returning true if an unread message is found.

Definition at line 2014 of file kmheaders.cpp.

bool KMHeaders::prevUnreadMessage (  )  [slot]

Make the previous message header visible scrolling if necessary, returning true if an unread message is found.

Definition at line 2040 of file kmheaders.cpp.

void KMHeaders::incCurrentMessage (  )  [slot]

Focus the next message, but don't select it.

Definition at line 1853 of file kmheaders.cpp.

void KMHeaders::decCurrentMessage (  )  [slot]

Focus the previous message, but don't select it.

Definition at line 1871 of file kmheaders.cpp.

void KMHeaders::selectCurrentMessage (  )  [slot]

Select the message which currently has focus, if it's not already selected.

Definition at line 1888 of file kmheaders.cpp.

void KMHeaders::slotNoDrag (  )  [slot]

Don't show a drag cursor.

Definition at line 2060 of file kmheaders.cpp.

void KMHeaders::resetCurrentTime (  )  [slot]

timer function to set the current time regularly

Definition at line 2131 of file kmheaders.cpp.

void KMHeaders::reset (  )  [slot]

Refresh the list of message headers shown.

Definition at line 554 of file kmheaders.cpp.

void KMHeaders::slotExpandOrCollapseThread ( bool  expand  )  [slot]

Expands (expand == true) or collapses (expand == false) the current thread.

Definition at line 1301 of file kmheaders.cpp.

void KMHeaders::slotExpandOrCollapseAllThreads ( bool  expand  )  [slot]

Expands (expand == true) or collapses (expand == false) all threads.

Definition at line 1318 of file kmheaders.cpp.

void KMHeaders::setSelected ( QListViewItem *  item,
bool  selected 
) [virtual, slot]

Select an item and if it is the parent of a closed thread, also recursively select its children.

Definition at line 1681 of file kmheaders.cpp.

void KMHeaders::setSelectedByIndex ( QValueList< int >  items,
bool  selected 
) [slot]

Select several items by message index and if they are the parent of a closed thread, also recursively select their children.

Definition at line 1701 of file kmheaders.cpp.

void KMHeaders::slotToggleColumn ( int  id,
int  mode = -1 
) [slot]

switch a column with the given id (see KPaintInfo enum) 1 for activate, 0 for deactivate, -1 for toggle

Definition at line 256 of file kmheaders.cpp.

void KMHeaders::setFolderInfoStatus (  )  [slot]

Provide information about number of messages in a folder.

Definition at line 1365 of file kmheaders.cpp.

bool KMHeaders::event ( QEvent *  e  )  [protected, virtual]

Look for color changes.

Reimplemented from KListView.

Definition at line 402 of file kmheaders.cpp.

void KMHeaders::paintEmptyArea ( QPainter *  p,
const QRect &  rect 
) [protected, virtual]

Overridden to support backing pixmap.

Definition at line 391 of file kmheaders.cpp.

void KMHeaders::makeHeaderVisible (  )  [protected]

Ensure the current item is visible.

Definition at line 2072 of file kmheaders.cpp.

void KMHeaders::findUnreadAux ( HeaderItem *&  ,
bool &  ,
bool  ,
bool   
) [protected]

Auxillary method to findUnread.

Definition at line 1895 of file kmheaders.cpp.

int KMHeaders::firstSelectedMsg (  )  const [protected, virtual]

Returns message index of first selected message of the messages where the message with the given id is in.

This for finding the correct message that shall be the current message after move/delete of multiple messages.

Definition at line 1765 of file kmheaders.cpp.

void KMHeaders::readFolderConfig ( void   )  [protected, virtual]

Read per-folder config options and apply them.

Definition at line 592 of file kmheaders.cpp.

void KMHeaders::writeFolderConfig ( void   )  [protected, virtual]

Write per-folder config options.

Definition at line 622 of file kmheaders.cpp.

void KMHeaders::contentsMousePressEvent ( QMouseEvent *   )  [protected, virtual]

Handle shift and control selection.

Reimplemented from KListView.

Definition at line 2250 of file kmheaders.cpp.

void KMHeaders::setSorting ( int  column,
bool  ascending = true 
) [protected, virtual]

Called when a header is clicked.

Reimplemented from KListView.

Definition at line 2590 of file kmheaders.cpp.

void KMHeaders::contentsMouseMoveEvent ( QMouseEvent *  e  )  [protected, virtual]

To initiate a drag operation.

Reimplemented from KListView.

Definition at line 2349 of file kmheaders.cpp.

void KMHeaders::styleChange ( QStyle &  oldStyle  )  [protected]

reimplemented in order to update the frame width in case of a changed GUI style

Definition at line 1358 of file kmheaders.cpp.

void KMHeaders::setStyleDependantFrameWidth (  )  [protected]

Set the width of the frame to a reasonable value for the current GUI style.

Definition at line 1343 of file kmheaders.cpp.

void KMHeaders::moveSelectedToFolder ( int  menuId  )  [protected, virtual, slot]

Move messages corresponding to the selected items to the folder corresponding to the given menuId.

Definition at line 1505 of file kmheaders.cpp.

void KMHeaders::copySelectedToFolder ( int  menuId  )  [protected, virtual, slot]

Same thing but copy.

Definition at line 1640 of file kmheaders.cpp.

int KMHeaders::slotFilterMsg ( KMMessage  )  [protected, virtual, slot]

Apply the filter Rules to a single message.

Definition at line 1279 of file kmheaders.cpp.

void KMHeaders::dirtySortOrder ( int   )  [protected, slot]

dirties the sort order

Definition at line 2839 of file kmheaders.cpp.

void KMHeaders::rightButtonPressed ( QListViewItem *  ,
const QPoint &  ,
int   
) [protected, slot]

show context menu

Definition at line 2237 of file kmheaders.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys