libkdepim

KRecentAddress::RecentAddresses Class Reference

#include <recentaddresses.h>

List of all members.


Detailed Description

Handles a list of "recent email-addresses".

Simply set a max-count and call add() to add entries.

Author:
Carsten Pfeiffer <pfeiffer@kde.org>

Definition at line 61 of file recentaddresses.h.


Public Member Functions

 ~RecentAddresses ()
QStringList addresses () const
const KABC::Addressee::List & kabcAddresses () const
void add (const QString &entry)
void setMaxCount (int count)
uint maxCount () const
void load (KConfig *)
void save (KConfig *)
void clear ()

Static Public Member Functions

static RecentAddressesself (KConfig *config=0L)
static bool exists ()

Member Function Documentation

RecentAddresses * RecentAddresses::self ( KConfig *  config = 0L  )  [static]

Returns:
the only possible instance of this class.

Definition at line 49 of file recentaddresses.cpp.

QStringList RecentAddresses::addresses (  )  const

Returns:
the list of recent addresses.

Note: an entry doesn't have to be one email address, it can be multiple, like "Foo <foo@bar.org>, Bar Baz <bar@baz.org>".

Definition at line 139 of file recentaddresses.cpp.

void RecentAddresses::add ( const QString &  entry  ) 

Adds an entry to the list.

Note: an entry doesn't have to be one email address, it can be multiple, like "Foo <foo@bar.org>, Bar Baz <bar@baz.org>".

Definition at line 99 of file recentaddresses.cpp.

void RecentAddresses::setMaxCount ( int  count  ) 

Sets the maximum number, the list can hold.

The list adjusts to this size if necessary. Default maximum is 40.

Definition at line 121 of file recentaddresses.cpp.

uint KRecentAddress::RecentAddresses::maxCount (  )  const [inline]

Returns:
the current maximum number of entries.

Definition at line 99 of file recentaddresses.h.

void RecentAddresses::load ( KConfig *   ) 

Loads the list of recently used addresses from the configfile.

Automatically done on startup.

Definition at line 70 of file recentaddresses.cpp.

void RecentAddresses::save ( KConfig *   ) 

Saves the list of recently used addresses to the configfile.

Make sure to call KGlobal::config()->sync() afterwards, to really save.

Definition at line 93 of file recentaddresses.cpp.

void RecentAddresses::clear (  ) 

Removes all entries from the history.

Definition at line 133 of file recentaddresses.cpp.


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