libkonq
#include <konq_historyprovider.h>
Inherits HistoryProvider.
Signals | |
void | entryAdded (const KonqHistoryEntry &entry) |
void | entryRemoved (const KonqHistoryEntry &entry) |
Public Member Functions | |
KonqHistoryProvider (QObject *parent=0) | |
virtual | ~KonqHistoryProvider () |
void | emitClear () |
void | emitRemoveFromHistory (const KUrl &url) |
void | emitRemoveListFromHistory (const KUrl::List &urls) |
void | emitSetMaxAge (int days) |
void | emitSetMaxCount (int count) |
const KonqHistoryList & | entries () const |
bool | loadHistory () |
int | maxAge () const |
int | maxCount () const |
Static Public Member Functions | |
static KonqHistoryProvider * | self () |
Protected Member Functions | |
KonqHistoryList::const_iterator | constFindEntry (const KUrl &url) const |
void | emitAddToHistory (const KonqHistoryEntry &entry) |
KonqHistoryList::iterator | findEntry (const KUrl &url) |
virtual void | finishAddingEntry (const KonqHistoryEntry &entry, bool isSender) |
virtual void | removeEntry (KonqHistoryList::iterator it) |
Detailed Description
This class maintains and manages a history of all URLs visited by Konqueror.
It synchronizes the history with other KonqHistoryProvider instances in other processes (konqueror, history list, krunner etc.) via D-Bus to keep one global and persistent history.
Definition at line 40 of file konq_historyprovider.h.
Constructor & Destructor Documentation
|
explicit |
Definition at line 137 of file konq_historyprovider.cpp.
|
virtual |
Definition at line 142 of file konq_historyprovider.cpp.
Member Function Documentation
|
protected |
Definition at line 426 of file konq_historyprovider.cpp.
|
protected |
Notifies all running instances about a new HistoryEntry via D-Bus.
Definition at line 204 of file konq_historyprovider.cpp.
void KonqHistoryProvider::emitClear | ( | ) |
Clears the history and tells all other Konqueror instances via D-Bus to do the same.
The history is saved afterwards, if necessary.
Definition at line 226 of file konq_historyprovider.cpp.
void KonqHistoryProvider::emitRemoveFromHistory | ( | const KUrl & | url | ) |
Removes the history entry for url
, if existent.
Tells all other Konqueror instances via D-Bus to do the same.
The history is saved after receiving the D-Bus call.
Definition at line 216 of file konq_historyprovider.cpp.
void KonqHistoryProvider::emitRemoveListFromHistory | ( | const KUrl::List & | urls | ) |
Removes the history entries for the given list of urls
.
Tells all other Konqueror instances via D-Bus to do the same.
The history is saved after receiving the D-Bus call.
Definition at line 221 of file konq_historyprovider.cpp.
void KonqHistoryProvider::emitSetMaxAge | ( | int | days | ) |
Sets a new maximum age of history entries and removes all entries that are older than days
.
Notifies all other Konqueror instances via D-Bus to do the same.
An age of 0 means no expiry based on the age.
The history is saved after receiving the D-Bus call.
Definition at line 236 of file konq_historyprovider.cpp.
void KonqHistoryProvider::emitSetMaxCount | ( | int | count | ) |
Sets a new maximum size of history and truncates the current history if necessary.
Notifies all other Konqueror instances via D-Bus to do the same.
The history is saved after receiving the D-Bus call.
Definition at line 231 of file konq_historyprovider.cpp.
const KonqHistoryList & KonqHistoryProvider::entries | ( | ) | const |
- Returns
- the list of all history entries, sorted by date (oldest entries first)
Definition at line 147 of file konq_historyprovider.cpp.
|
signal |
Emitted after a new entry was added.
|
signal |
Emitted after an entry was removed from the history Note, that this entry will be deleted immediately after you got that signal.
|
protected |
a little optimization for KonqHistoryList::findEntry(), checking the dict of KParts::HistoryProvider before traversing the list.
Can't be used everywhere, because it always returns end() for "pending" entries, as those are not added to the dict, currently.
Definition at line 418 of file konq_historyprovider.cpp.
|
protectedvirtual |
Definition at line 434 of file konq_historyprovider.cpp.
bool KonqHistoryProvider::loadHistory | ( | ) |
Load the whole history from disk.
Call this exactly once.
Definition at line 152 of file konq_historyprovider.cpp.
int KonqHistoryProvider::maxAge | ( | ) | const |
- Returns
- the current maximum age (in days) of history entries.
Definition at line 383 of file konq_historyprovider.cpp.
int KonqHistoryProvider::maxCount | ( | ) | const |
- Returns
- the current maximum number of history entries.
Definition at line 378 of file konq_historyprovider.cpp.
|
protectedvirtual |
Definition at line 367 of file konq_historyprovider.cpp.
|
inlinestatic |
Returns the KonqHistoryProvider instance.
This relies on a KonqHistoryProvider instance being created first! This is a bit like "qApp": you can access the instance anywhere, but you need to create it first.
Definition at line 51 of file konq_historyprovider.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:31:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.