kmail

#include <kmfolder.h>

Inheritance diagram for KMFolder:
KMAcctFolder

Public Types

enum  CompactOptions { CompactLater , CompactNow , CompactSilentlyNow }
 
enum  ExpireAction { ExpireDelete , ExpireMove }
 

Public Slots

int updateIndex ()
 
void reallyAddMsg (KMMessage *aMsg)
 
void reallyAddCopyOfMsg (KMMessage *aMsg)
 

Signals

void changed ()
 
void closed ()
 
void cleared ()
 
void expunged (KMFolder *)
 
void iconsChanged ()
 
void nameChanged ()
 
void shortcutChanged (KMFolder *)
 
void msgRemoved (KMFolder *, TQ_UINT32 sernum)
 
void msgRemoved (int idx, TQString msgIdMD5)
 
void msgRemoved (KMFolder *)
 
void msgAdded (int idx)
 
void msgAdded (KMFolder *, TQ_UINT32 sernum)
 
void msgChanged (KMFolder *, TQ_UINT32 sernum, int delta)
 
void msgHeaderChanged (KMFolder *, int)
 
void statusMsg (const TQString &)
 
void numUnreadMsgsChanged (KMFolder *)
 
void removed (KMFolder *, bool)
 
void viewConfigChanged ()
 
void folderSizeChanged (KMFolder *)
 
void noContentChanged ()
 
void syncStateChanged ()
 

Public Member Functions

 KMFolder (KMFolderDir *parent, const TQString &name, KMFolderType aFolderType, bool withIndex=true, bool exportedSernums=true)
 
bool isMainInbox ()
 
bool isOutbox ()
 
bool isSent ()
 
bool isTrash ()
 
bool isDrafts ()
 
bool isTemplates ()
 
void setAcctList (AccountList *list)
 
AccountList * acctList ()
 
bool hasAccounts () const
 
void readConfig (TDEConfig *config)
 
void writeConfig (TDEConfig *config) const
 
FolderStoragestorage ()
 
const FolderStoragestorage () const
 
KMFolderType folderType () const
 
TQString fileName () const
 
TQString location () const
 
TQString indexLocation () const
 
TQString subdirLocation () const
 
KMFolderDirchild () const
 
KMFolderDircreateChildFolder ()
 
void setChild (KMFolderDir *aChild)
 
bool noContent () const
 
void setNoContent (bool aNoContent)
 
bool noChildren () const
 
void setNoChildren (bool aNoChildren)
 
KMMessagegetMsg (int idx)
 
KMMsgInfo * unGetMsg (int idx)
 
bool isMessage (int idx)
 
DwString getDwString (int idx)
 
void ignoreJobsForMessage (KMMessage *)
 
FolderJob * createJob (KMMessage *msg, FolderJob::JobType jt=FolderJob::tGetMessage, KMFolder *folder=0, TQString partSpecifier=TQString(), const AttachmentStrategy *as=0) const
 
FolderJob * createJob (TQPtrList< KMMessage > &msgList, const TQString &sets, FolderJob::JobType jt=FolderJob::tGetMessage, KMFolder *folder=0) const
 
const KMMsgBase * getMsgBase (int idx) const
 
KMMsgBase * getMsgBase (int idx)
 
const KMMsgBase * operator[] (int idx) const
 
KMMsgBase * operator[] (int idx)
 
KMMessagetake (int idx)
 
void take (TQPtrList< KMMessage > msgList)
 
int addMsg (KMMessage *msg, int *index_return=0)
 
int addMsgKeepUID (KMMessage *msg, int *index_return=0)
 
int addMsg (TQPtrList< KMMessage > &, TQValueList< int > &index_return)
 
void emitMsgAddedSignals (int idx)
 
void removeMsg (int i, bool imapQuiet=false)
 
void removeMsg (TQPtrList< KMMessage > msgList, bool imapQuiet=false)
 
int expungeOldMsg (int days)
 
int moveMsg (KMMessage *msg, int *index_return=0)
 
int moveMsg (TQPtrList< KMMessage >, int *index_return=0)
 
int find (const KMMsgBase *msg) const
 
int find (const KMMessage *msg) const
 
int count (bool cache=false) const
 
int countUnread ()
 
int countUnreadRecursive ()
 
void msgStatusChanged (const KMMsgStatus oldStatus, const KMMsgStatus newStatus, int idx)
 
int open (const char *owner)
 
int canAccess ()
 
void close (const char *owner, bool force=false)
 
void sync ()
 
bool isOpened () const
 
void markNewAsUnread ()
 
void markUnreadAsRead ()
 
void remove ()
 
int expunge ()
 
void compact (CompactOptions options)
 
int rename (const TQString &newName, KMFolderDir *aParent=0)
 
bool dirty () const
 
void setDirty (bool f)
 
bool needsCompacting () const
 
void setNeedsCompacting (bool f)
 
void quiet (bool beQuiet)
 
bool isReadOnly () const
 
bool isWritable () const
 
bool mailCheckInProgress () const
 
bool canDeleteMessages () const
 
bool isSystemFolder () const
 
void setSystemFolder (bool itIs)
 
virtual TQString label () const
 
void setLabel (const TQString &l)
 
virtual TQString systemLabel () const
 
void setSystemLabel (const TQString &l)
 
virtual TQString prettyURL () const
 
void setMailingListEnabled (bool enabled)
 
bool isMailingListEnabled () const
 
void setMailingList (const MailingList &mlist)
 
MailingList mailingList () const
 
TQString mailingListPostAddress () const
 
void setIdentity (uint identity)
 
uint identity () const
 
TQString whoField () const
 
void setWhoField (const TQString &aWhoField)
 
TQString userWhoField (void)
 
void setUserWhoField (const TQString &whoField, bool writeConfig=true)
 
void correctUnreadMsgsCount ()
 
TQString idString () const
 
void setAutoExpire (bool enabled)
 
bool isAutoExpire () const
 
void setUnreadExpireAge (int age)
 
void setUnreadExpireUnits (ExpireUnits units)
 
void setReadExpireAge (int age)
 
void setReadExpireUnits (ExpireUnits units)
 
int getUnreadExpireAge () const
 
int getReadExpireAge () const
 
ExpireUnits getUnreadExpireUnits () const
 
ExpireUnits getReadExpireUnits () const
 
ExpireAction expireAction () const
 
void setExpireAction (ExpireAction a)
 
TQString expireToFolderId () const
 
void setExpireToFolderId (const TQString &id)
 
void expireOldMessages (bool immediate)
 
int writeIndex (bool createEmptyIndex=false)
 
void setStatus (int idx, KMMsgStatus status, bool toggle=false)
 
void setStatus (TQValueList< int > &ids, KMMsgStatus status, bool toggle=false)
 
bool useCustomIcons () const
 
void setUseCustomIcons (bool useCustomIcons)
 
TQString normalIconPath () const
 
TQString unreadIconPath () const
 
void setIconPaths (const TQString &normalPath, const TQString &unreadPath)
 
void removeJobs ()
 
void daysToExpire (int &unreadDays, int &readDays)
 
KMFoldertrashFolder () const
 
bool putRepliesInSameFolder () const
 
void setPutRepliesInSameFolder (bool b)
 
bool ignoreNewMail () const
 
void setIgnoreNewMail (bool b)
 
const TDEShortcut & shortcut () const
 
void setShortcut (const TDEShortcut &)
 
bool isMoveable () const
 
bool moveInProgress () const
 
void setMoveInProgress (bool b)
 
bool isValidName (const TQString &folderName, TQString &message)
 

Friends

class ::KMFolderJob
 

Detailed Description

Mail folder.

(description will be here).

Accounts

The accounts (of KMail) that are fed into the folder are represented as the children of the folder. They are only stored here during runtime to have a reference for which accounts point to a specific folder.

Definition at line 68 of file kmfolder.h.

Constructor & Destructor Documentation

◆ KMFolder()

KMFolder::KMFolder ( KMFolderDir parent,
const TQString &  name,
KMFolderType  aFolderType,
bool  withIndex = true,
bool  exportedSernums = true 
)

Constructs a new Folder object.

Parameters
parentThe directory in the folder storage hierarchy under which the folder's storage will be found or created.
nameIf name of the folder. In case there is no parent directory, because the folder is free-standing (/var/spool/mail/foo), this is used for the full path to the folder's storage location.
aFolderTypeThe type of folder to create.
withIndexWether this folder has an index. No-index folders are those used by KMail internally, the Outbox, and those of local spool accounts, for example.
exportedSernumswhether this folder exports its serial numbers to the global MsgDict for lookup.
Returns
A new folder instance.

Definition at line 48 of file kmfolder.cpp.

Member Function Documentation

◆ addMsg() [1/2]

int KMFolder::addMsg ( KMMessage msg,
int *  index_return = 0 
)

Add the given message to the folder.

Usually the message is added at the end of the folder. Returns zero on success and an errno error code on failure. The index of the new message is stored in index_return if given. Please note that the message is added as is to the folder and the folder takes ownership of the message (deleting it in the destructor).

Definition at line 390 of file kmfolder.cpp.

◆ addMsg() [2/2]

int KMFolder::addMsg ( TQPtrList< KMMessage > &  list,
TQValueList< int > &  index_return 
)

Adds the given messages to the folder.

Behaviour is identical to addMsg(msg)

Definition at line 400 of file kmfolder.cpp.

◆ addMsgKeepUID()

int KMFolder::addMsgKeepUID ( KMMessage msg,
int *  index_return = 0 
)

(Note(bo): This needs to be fixed better at a later point.) This is overridden by dIMAP because addMsg strips the X-UID header from the mail.

Definition at line 395 of file kmfolder.cpp.

◆ canAccess()

int KMFolder::canAccess ( )

Check folder for permissions Returns zero if readable and writable.

Definition at line 484 of file kmfolder.cpp.

◆ canDeleteMessages()

bool KMFolder::canDeleteMessages ( ) const

Can messages in this folder be deleted?

Definition at line 576 of file kmfolder.cpp.

◆ changed

void KMFolder::changed ( )
signal

Emitted when the status, name, or associated accounts of this folder changed.

◆ child()

KMFolderDir* KMFolder::child ( ) const
inline

Returns the folder directory associated with this node or 0 if no such directory exists.

Definition at line 157 of file kmfolder.h.

◆ cleared

void KMFolder::cleared ( )
signal

Emitted when the contents of a folder have been cleared (new search in a search folder, for example)

◆ close()

void KMFolder::close ( const char *  owner,
bool  force = false 
)

Close folder.

If force is true the files are closed even if others still use it (e.g. other mail reader windows).

Definition at line 489 of file kmfolder.cpp.

◆ closed

void KMFolder::closed ( )
signal

Emitted when the folder is closed for real - ticket holders should discard any messages.

◆ compact()

void KMFolder::compact ( CompactOptions  options)

Compact this folder.

Options: CompactLater: schedule it as a background task CompactNow: do it now, and inform the user of the result (manual compaction) CompactSilentlyNow: do it now, and keep silent about it (e.g. for outbox)

Definition at line 811 of file kmfolder.cpp.

◆ correctUnreadMsgsCount()

void KMFolder::correctUnreadMsgsCount ( )

A cludge to help make sure the count of unread messges is kept in sync.

Definition at line 700 of file kmfolder.cpp.

◆ count()

int KMFolder::count ( bool  cache = false) const

Number of messages in this folder.

Definition at line 445 of file kmfolder.cpp.

◆ countUnread()

int KMFolder::countUnread ( )

Number of new or unread messages in this folder.

Definition at line 450 of file kmfolder.cpp.

◆ countUnreadRecursive()

int KMFolder::countUnreadRecursive ( )

Number of new or unread messages in this folder and all folders contained by this folder.

Definition at line 455 of file kmfolder.cpp.

◆ createChildFolder()

KMFolderDir * KMFolder::createChildFolder ( )

Create a child folder directory and associates it with this folder.

Definition at line 264 of file kmfolder.cpp.

◆ createJob()

FolderJob * KMFolder::createJob ( KMMessage msg,
FolderJob::JobType  jt = FolderJob::tGetMessage,
KMFolder folder = 0,
TQString  partSpecifier = TQString(),
const AttachmentStrategy *  as = 0 
) const

These methods create respective FolderJob (You should derive FolderJob for each derived KMFolder).

Definition at line 346 of file kmfolder.cpp.

◆ dirty()

bool KMFolder::dirty ( ) const

Returns true if the table of contents is dirty.

This happens when a message is deleted from the folder. The toc will then be re-created when the folder is closed.

Definition at line 536 of file kmfolder.cpp.

◆ emitMsgAddedSignals()

void KMFolder::emitMsgAddedSignals ( int  idx)

Called by derived classes implementation of addMsg.

Emits msgAdded signals

Definition at line 405 of file kmfolder.cpp.

◆ expireAction()

ExpireAction KMFolder::expireAction ( ) const
inline

What should expiry do? Delete or move to another folder?

Definition at line 473 of file kmfolder.h.

◆ expireOldMessages()

void KMFolder::expireOldMessages ( bool  immediate)

Expire old messages in this folder.

If immediate is true, do it immediately; otherwise schedule it for later

Definition at line 801 of file kmfolder.cpp.

◆ expireToFolderId()

TQString KMFolder::expireToFolderId ( ) const
inline

If expiry should move to folder, return the ID of that folder.

Definition at line 479 of file kmfolder.h.

◆ expunge()

int KMFolder::expunge ( )

Delete entire folder.

Forces a close but opens the folder again afterwards. Returns errno(3) error code or zero on success. see KMFolder::expungeContents

Definition at line 526 of file kmfolder.cpp.

◆ expunged

void KMFolder::expunged ( KMFolder )
signal

Emitted after an expunge.

If not quiet, changed() will be emmitted first.

◆ expungeOldMsg()

int KMFolder::expungeOldMsg ( int  days)

Delete messages in the folder that are older than days.

Return the number of deleted messages.

Definition at line 420 of file kmfolder.cpp.

◆ fileName()

TQString KMFolder::fileName ( ) const

Returns the filename of the folder (reimplemented in KMFolderImap)

Definition at line 238 of file kmfolder.cpp.

◆ find()

int KMFolder::find ( const KMMsgBase *  msg) const

Returns the index of the given message or -1 if not found.

Definition at line 435 of file kmfolder.cpp.

◆ folderSizeChanged

void KMFolder::folderSizeChanged ( KMFolder )
signal

Emitted when the folder's size changes.

◆ folderType()

KMFolderType KMFolder::folderType ( ) const

Returns the type of this folder.

Definition at line 233 of file kmfolder.cpp.

◆ getDwString()

DwString KMFolder::getDwString ( int  idx)

Read a message and returns a DwString.

Definition at line 336 of file kmfolder.cpp.

◆ getMsg()

KMMessage * KMFolder::getMsg ( int  idx)

Read message at given index.

Indexing starts at zero

Definition at line 321 of file kmfolder.cpp.

◆ getMsgBase()

const KMMsgBase * KMFolder::getMsgBase ( int  idx) const

Provides access to the basic message fields that are also stored in the index.

Whenever you only need subject, from, date, status you should use this method instead of getMsg() because getMsg() will load the message if necessary and this method does not.

Definition at line 360 of file kmfolder.cpp.

◆ getReadExpireAge()

int KMFolder::getReadExpireAge ( ) const
inline

Get the age at which read messages are expired.

Units are determined by getReadExpireUnits().

Definition at line 455 of file kmfolder.h.

◆ getReadExpireUnits()

ExpireUnits KMFolder::getReadExpireUnits ( ) const
inline

Units getReadExpireAge() is returned in.

1 = days, 2 = weeks, 3 = months.

Definition at line 467 of file kmfolder.h.

◆ getUnreadExpireAge()

int KMFolder::getUnreadExpireAge ( ) const
inline

Get the age at which unread messages are expired.

Units are determined by getUnreadExpireUnits().

Definition at line 449 of file kmfolder.h.

◆ getUnreadExpireUnits()

ExpireUnits KMFolder::getUnreadExpireUnits ( ) const
inline

Units getUnreadExpireAge() is returned in.

1 = days, 2 = weeks, 3 = months.

Definition at line 461 of file kmfolder.h.

◆ hasAccounts()

bool KMFolder::hasAccounts ( ) const
inline

Returns TRUE if accounts are associated with this folder.

Definition at line 128 of file kmfolder.h.

◆ iconsChanged

void KMFolder::iconsChanged ( )
signal

Emitted when the icon paths are set.

◆ idString()

TQString KMFolder::idString ( ) const

Returns a string that can be used to identify this folder.

Definition at line 705 of file kmfolder.cpp.

◆ ignoreJobsForMessage()

void KMFolder::ignoreJobsForMessage ( KMMessage m)

Removes and deletes all jobs associated with the particular message.

Definition at line 341 of file kmfolder.cpp.

◆ ignoreNewMail()

bool KMFolder::ignoreNewMail ( ) const
inline

Returns true if the user doesn't want to get notified about new mail in this folder.

Definition at line 526 of file kmfolder.h.

◆ indexLocation()

TQString KMFolder::indexLocation ( ) const

Returns full path to index file.

Definition at line 248 of file kmfolder.cpp.

◆ isAutoExpire()

bool KMFolder::isAutoExpire ( ) const
inline

Does this folder automatically expire old messages?

Definition at line 417 of file kmfolder.h.

◆ isDrafts()

bool KMFolder::isDrafts ( )
inline

Returns true if this folder is the drafts box of the local account, or is configured to be the drafts box of any of the users identities.

Definition at line 115 of file kmfolder.h.

◆ isMainInbox()

bool KMFolder::isMainInbox ( )
inline

Returns true if this folder is the inbox on the local disk.

Definition at line 96 of file kmfolder.h.

◆ isMessage()

bool KMFolder::isMessage ( int  idx)

Checks if the message is already "gotten" with getMsg.

Definition at line 331 of file kmfolder.cpp.

◆ isMoveable()

bool KMFolder::isMoveable ( ) const

Returns true if this folder can be moved.

Definition at line 879 of file kmfolder.cpp.

◆ isOpened()

bool KMFolder::isOpened ( ) const

Test if folder is opened.

Definition at line 500 of file kmfolder.cpp.

◆ isOutbox()

bool KMFolder::isOutbox ( )
inline

Returns true only if this is the outbox for outgoing mail.

Definition at line 100 of file kmfolder.h.

◆ isReadOnly()

bool KMFolder::isReadOnly ( ) const

Is the folder read-only?

Definition at line 561 of file kmfolder.cpp.

◆ isSent()

bool KMFolder::isSent ( )
inline

Returns true if this folder is the sent-mail box of the local account, or is configured to be the sent mail box of any of the users identities.

Definition at line 105 of file kmfolder.h.

◆ isSystemFolder()

bool KMFolder::isSystemFolder ( ) const
inline

Returns true if the folder is a kmail system folder.

These are the folders 'inbox', 'outbox', 'sent', 'trash', 'drafts', 'templates'. The name of these folders is nationalized in the folder display and they cannot have accounts associated. Deletion is also forbidden. Etc.

Definition at line 369 of file kmfolder.h.

◆ isTemplates()

bool KMFolder::isTemplates ( )
inline

Returns true if this folder is the templates folder of the local account, or is configured to be the templates folder of any of the users identities.

Definition at line 120 of file kmfolder.h.

◆ isTrash()

bool KMFolder::isTrash ( )
inline

Returns true if this folder is configured as a trash folder, locally or for one of the accounts.

Definition at line 110 of file kmfolder.h.

◆ isValidName()

bool KMFolder::isValidName ( const TQString &  folderName,
TQString &  message 
)

Returns true if the name is valid for a child of this folder.

If the name contains invalid characters then false is returned and message will contain an explanation that can be presented to the user.

Definition at line 899 of file kmfolder.cpp.

◆ isWritable()

bool KMFolder::isWritable ( ) const

Can we write into and delete from this folder (on IMAP that's not necessarily !isReadOnly())

Definition at line 571 of file kmfolder.cpp.

◆ label()

TQString KMFolder::label ( void  ) const
virtual

Returns the label of the folder for visualization.

Definition at line 581 of file kmfolder.cpp.

◆ location()

TQString KMFolder::location ( void  ) const

Returns full path to folder file.

Definition at line 243 of file kmfolder.cpp.

◆ markNewAsUnread()

void KMFolder::markNewAsUnread ( )

Mark all new messages as unread.

Definition at line 505 of file kmfolder.cpp.

◆ markUnreadAsRead()

void KMFolder::markUnreadAsRead ( )

Mark all new and unread messages as read.

Definition at line 510 of file kmfolder.cpp.

◆ moveInProgress()

bool KMFolder::moveInProgress ( ) const
inline

Returns true if there is currently a move or copy operation going on with this folder as target.

Definition at line 538 of file kmfolder.h.

◆ moveMsg()

int KMFolder::moveMsg ( KMMessage msg,
int *  index_return = 0 
)

Detaches the given message from it's current folder and adds it to this folder.

Returns zero on success and an errno error code on failure. The index of the new message is stored in index_return if given.

Definition at line 425 of file kmfolder.cpp.

◆ msgAdded

void KMFolder::msgAdded ( int  idx)
signal

Emitted when a message is added from the folder.

◆ msgChanged

void KMFolder::msgChanged ( KMFolder ,
TQ_UINT32  sernum,
int  delta 
)
signal

Emitted, when the status of a message is changed.

◆ msgHeaderChanged

void KMFolder::msgHeaderChanged ( KMFolder ,
int   
)
signal

Emitted when a field of the header of a specific message changed.

◆ msgRemoved [1/2]

void KMFolder::msgRemoved ( int  idx,
TQString  msgIdMD5 
)
signal

Emitted after a message is removed from the folder.

◆ msgRemoved [2/2]

void KMFolder::msgRemoved ( KMFolder ,
TQ_UINT32  sernum 
)
signal

Emitted before a message is removed from the folder.

◆ msgStatusChanged()

void KMFolder::msgStatusChanged ( const KMMsgStatus  oldStatus,
const KMMsgStatus  newStatus,
int  idx 
)

Called by KMMsgBase::setStatus when status of a message has changed required to keep the number unread messages variable current.

Definition at line 473 of file kmfolder.cpp.

◆ nameChanged

void KMFolder::nameChanged ( )
signal

Emitted when the name of the folder changes.

◆ needsCompacting()

bool KMFolder::needsCompacting ( ) const

Returns true if the folder contains deleted messages.

Definition at line 546 of file kmfolder.cpp.

◆ noChildren()

bool KMFolder::noChildren ( ) const

Returns, if the folder can't have children.

Definition at line 311 of file kmfolder.cpp.

◆ noContent()

bool KMFolder::noContent ( ) const

Returns, if the folder can't contain mails, but only subfolder.

Definition at line 301 of file kmfolder.cpp.

◆ noContentChanged

void KMFolder::noContentChanged ( )
signal

Emitted when the no content state changed.

◆ numUnreadMsgsChanged

void KMFolder::numUnreadMsgsChanged ( KMFolder )
signal

Emitted when number of unread messages has changed.

◆ open()

int KMFolder::open ( const char *  owner)

Open folder for access.

Does nothing if the folder is already opened. To reopen a folder call close() first. Returns zero on success and an error code equal to the c-library fopen call otherwise (errno).

Definition at line 479 of file kmfolder.cpp.

◆ operator[]() [1/2]

KMMsgBase * KMFolder::operator[] ( int  idx)

Same as getMsgBase(int).

This time non-const.

Definition at line 375 of file kmfolder.cpp.

◆ operator[]() [2/2]

const KMMsgBase * KMFolder::operator[] ( int  idx) const

Same as getMsgBase(int).

Definition at line 370 of file kmfolder.cpp.

◆ prettyURL()

TQString KMFolder::prettyURL ( ) const
virtual

URL of the node for visualization purposes.

Definition at line 593 of file kmfolder.cpp.

◆ putRepliesInSameFolder()

bool KMFolder::putRepliesInSameFolder ( ) const
inline

Returns true if the replies to mails from this folder should be put in the same folder.

Definition at line 519 of file kmfolder.h.

◆ quiet()

void KMFolder::quiet ( bool  beQuiet)

If set to quiet the folder will not emit msgAdded(idx) signal.

This is necessary because adding the messages to the listview one by one as they come in ( as happens on msgAdded(idx) ) is very slow for large ( >10000 ) folders. For pop, where whole bodies are downloaded this is not an issue, but for imap, where we only download headers it becomes a bottleneck. We therefore set the folder quiet() and rebuild the listview completely once the complete folder has been checked.

Definition at line 556 of file kmfolder.cpp.

◆ readConfig()

void KMFolder::readConfig ( TDEConfig *  config)

This is used by the storage to read the folder specific configuration.

Definition at line 161 of file kmfolder.cpp.

◆ reallyAddCopyOfMsg

void KMFolder::reallyAddCopyOfMsg ( KMMessage aMsg)
slot

Add a copy of the message to the folder after it has been retrieved from an IMAP server.

Definition at line 866 of file kmfolder.cpp.

◆ reallyAddMsg

void KMFolder::reallyAddMsg ( KMMessage aMsg)
slot

Add the message to the folder after it has been retrieved from an IMAP server.

Definition at line 861 of file kmfolder.cpp.

◆ remove()

void KMFolder::remove ( )

Removes the folder physically from disk and empties the contents of the folder in memory.

Note that the folder is closed during this process, whether there are others using it or not. see KMFolder::removeContents

Definition at line 515 of file kmfolder.cpp.

◆ removed

void KMFolder::removed ( KMFolder ,
bool   
)
signal

Emitted when a folder was removed.

◆ removeMsg()

void KMFolder::removeMsg ( int  i,
bool  imapQuiet = false 
)

Remove (first occurrence of) given message from the folder.

Definition at line 410 of file kmfolder.cpp.

◆ rename()

int KMFolder::rename ( const TQString &  newName,
KMFolderDir aParent = 0 
)

Physically rename the folder.

Returns zero on success and an errno on failure.

Definition at line 531 of file kmfolder.cpp.

◆ setAutoExpire()

void KMFolder::setAutoExpire ( bool  enabled)

Set whether this folder automatically expires messages.

Definition at line 725 of file kmfolder.cpp.

◆ setChild()

void KMFolder::setChild ( KMFolderDir aChild)

Set the folder directory associated with this node.

Definition at line 295 of file kmfolder.cpp.

◆ setDirty()

void KMFolder::setDirty ( bool  f)

Change the dirty flag.

Definition at line 541 of file kmfolder.cpp.

◆ setMailingListEnabled()

void KMFolder::setMailingListEnabled ( bool  enabled)

Returns true if this folder is associated with a mailing-list.

Definition at line 620 of file kmfolder.cpp.

◆ setMoveInProgress()

void KMFolder::setMoveInProgress ( bool  b)
inline

Sets the move-in-progress flag.

Definition at line 541 of file kmfolder.h.

◆ setNoChildren()

void KMFolder::setNoChildren ( bool  aNoChildren)

Specify, that the folder can't have children.

Definition at line 316 of file kmfolder.cpp.

◆ setNoContent()

void KMFolder::setNoContent ( bool  aNoContent)

Specify, that the folder can't contain mails.

Definition at line 306 of file kmfolder.cpp.

◆ setReadExpireAge()

void KMFolder::setReadExpireAge ( int  age)

Set the maximum age for read messages in this folder.

Age should not be negative. Units are set using setReadExpireUnits().

Definition at line 748 of file kmfolder.cpp.

◆ setReadExpireUnits()

void KMFolder::setReadExpireUnits ( ExpireUnits  units)

Set units to use for expiry of read messages.

Values are 1 = days, 2 = weeks, 3 = months.

Definition at line 756 of file kmfolder.cpp.

◆ setStatus() [1/2]

void KMFolder::setStatus ( int  idx,
KMMsgStatus  status,
bool  toggle = false 
)

Set the status of the message at index idx to status.

Definition at line 831 of file kmfolder.cpp.

◆ setStatus() [2/2]

void KMFolder::setStatus ( TQValueList< int > &  ids,
KMMsgStatus  status,
bool  toggle = false 
)

Set the status of the message(s) in the TQValueList ids to status.

Definition at line 836 of file kmfolder.cpp.

◆ setUnreadExpireAge()

void KMFolder::setUnreadExpireAge ( int  age)

Set the maximum age for unread messages in this folder.

Age should not be negative. Units are set using setUnreadExpireUnits().

Definition at line 733 of file kmfolder.cpp.

◆ setUnreadExpireUnits()

void KMFolder::setUnreadExpireUnits ( ExpireUnits  units)

Set units to use for expiry of unread messages.

Values are 1 = days, 2 = weeks, 3 = months.

Definition at line 741 of file kmfolder.cpp.

◆ shortcutChanged

void KMFolder::shortcutChanged ( KMFolder )
signal

Emitted when the shortcut associated with this folder changes.

◆ statusMsg

void KMFolder::statusMsg ( const TQString &  )
signal

Emmited to display a message somewhere in a status line.

◆ storage()

const FolderStorage* KMFolder::storage ( ) const
inline

if the folder is const, the storage should be as well

Definition at line 138 of file kmfolder.h.

◆ subdirLocation()

TQString KMFolder::subdirLocation ( ) const

Returns full path to sub directory file.

Definition at line 253 of file kmfolder.cpp.

◆ sync()

void KMFolder::sync ( )

fsync buffers to disk

Definition at line 495 of file kmfolder.cpp.

◆ syncStateChanged

void KMFolder::syncStateChanged ( )
signal

Emiitted when the sync state, i.e.

mailCheckInProgress(), changes. Currently only supported for disconnected IMAP.

◆ systemLabel()

virtual TQString KMFolder::systemLabel ( ) const
inlinevirtual

Set the label that is used as a system default.

Definition at line 377 of file kmfolder.h.

◆ take()

KMMessage * KMFolder::take ( int  idx)

Detach message from this folder.

Usable to call addMsg() afterwards. Loads the message if it is not loaded up to now.

Definition at line 380 of file kmfolder.cpp.

◆ trashFolder()

KMFolder * KMFolder::trashFolder ( ) const

If this folder has a special trash folder set, return it.

Otherwise return 0.

Definition at line 821 of file kmfolder.cpp.

◆ unGetMsg()

KMMsgInfo * KMFolder::unGetMsg ( int  idx)

Replace KMMessage with KMMsgInfo and delete KMMessage

Definition at line 326 of file kmfolder.cpp.

◆ updateIndex

int KMFolder::updateIndex ( )
slot

Incrementally update the index if possible else call writeIndex.

Definition at line 856 of file kmfolder.cpp.

◆ useCustomIcons()

bool KMFolder::useCustomIcons ( ) const
inline

Icon related methods.

Definition at line 499 of file kmfolder.h.

◆ userWhoField()

TQString KMFolder::userWhoField ( void  )
inline

Get / set the user-settings for the WhoField (From/To/Empty)

Definition at line 400 of file kmfolder.h.

◆ viewConfigChanged

void KMFolder::viewConfigChanged ( )
signal

Emitted when the variables for the config of the view have changed.

◆ whoField()

TQString KMFolder::whoField ( ) const
inline

Get / set the name of the field that is used for the Sender/Receiver column in the headers (From/To)

Definition at line 396 of file kmfolder.h.

◆ writeConfig()

void KMFolder::writeConfig ( TDEConfig *  config) const

This is used by the storage to save the folder specific configuration.

Definition at line 200 of file kmfolder.cpp.

◆ writeIndex()

int KMFolder::writeIndex ( bool  createEmptyIndex = false)

Write index to index-file.

Returns 0 on success and errno error on failure.

Definition at line 826 of file kmfolder.cpp.


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