PimCommon::RecentAddresses Class
class PimCommon::RecentAddressesThe RecentAddresses class handles a list of recent email addresses Author: Carsten Pfeiffer <pfeiffer@kde.org>. More...
| Header: | #include <PimCommonAkonadi/RecentAddresses> |
| CMake: | find_package(KPim6PimCommonAkonadi REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::PimCommonAkonadi) |
Public Functions
| ~RecentAddresses() | |
| 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 Members
Detailed Description
Member Function Documentation
[noexcept] RecentAddresses::~RecentAddresses()
Destructs the RecentAddresses.
void RecentAddresses::add(const QString &entry)
Adds an entry to the list of recent addresses. @param entry The address entry to add
QStringList RecentAddresses::addresses() const
Returns the list of recent addresses. @return A list of email addresses or address groups
void RecentAddresses::clear()
Clears all recent addresses.
[static] bool RecentAddresses::exists()
Checks if the RecentAddresses singleton has been created. @return true if an instance exists, false otherwise
void RecentAddresses::load(KConfig *)
Loads recent addresses from the configuration file. @param config The KConfig object to load from
int RecentAddresses::maxCount() const
Returns the current maximum number of entries. @return The maximum count
See also setMaxCount().
void RecentAddresses::save(KConfig *)
Saves recent addresses to the configuration file. @param config The KConfig object to save to
[static] PimCommon::RecentAddresses *RecentAddresses::self(KConfig *config = nullptr)
Returns the singleton instance of RecentAddresses. @param config The KConfig to load from @return The singleton instance
void RecentAddresses::setMaxCount(int count)
Sets the maximum number of entries the list can hold. @param count The maximum number of entries (default is 40)
See also maxCount().