Search for usage in LXR

PimCommon::RecentAddresses Class Reference

#include <recentaddresses.h>

Public Member Functions

void add (const QString &entry)
QStringList addresses () const
void clear ()
void load (KConfig *)
int maxCount () const
void save (KConfig *)
void setMaxCount (int count)

Static Public Member Functions

static bool exists ()
static RecentAddressesself (KConfig *config=nullptr)

Detailed Description

Handles a list of "recent email-addresses".

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

Carsten Pfeiffer pfeif.nosp@m.fer@.nosp@m.kde.o.nosp@m.rg

Definition at line 24 of file recentaddresses.h.

Member Function Documentation

◆ add()

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 <[email protected]>, Bar Baz <[email protected]>".

Definition at line 81 of file recentaddresses.cpp.

◆ addresses()

QStringList RecentAddresses::addresses ( ) const
the list of recent addresses. Note: an entry doesn't have to be one email address, it can be multiple, like "Foo <[email protected]>, Bar Baz <[email protected]>".

Definition at line 139 of file recentaddresses.cpp.

◆ clear()

void RecentAddresses::clear ( )

Removes all entries from the history.

Definition at line 134 of file recentaddresses.cpp.

◆ load()

void RecentAddresses::load ( KConfig config)

Loads the list of recently used addresses from the configfile.

Automatically done on startup.

Definition at line 51 of file recentaddresses.cpp.

◆ maxCount()

int RecentAddresses::maxCount ( ) const
the current maximum number of entries.

Definition at line 122 of file recentaddresses.cpp.

◆ save()

void RecentAddresses::save ( KConfig config)

Saves the list of recently used addresses to the configfile.

Make sure to call KSharedConfig::openConfig()->sync() afterwards, to really save.

Definition at line 75 of file recentaddresses.cpp.

◆ self()

RecentAddresses * RecentAddresses::self ( KConfig config = nullptr)
the only possible instance of this class.

Definition at line 26 of file recentaddresses.cpp.

◆ setMaxCount()

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 114 of file recentaddresses.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Dec 11 2023 03:53:18 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.