KonqHistoryManager Class Reference
This class maintains and manages a history of all URLs visited by one Konqueror instance. More...
#include <konq_historymgr.h>
Inheritance diagram for KonqHistoryManager:

Public Slots | |
bool | loadHistory () |
bool | saveHistory () |
void | emitClear () |
Signals | |
void | loadingFinished () |
void | entryAdded (const KonqHistoryEntry *entry) |
void | entryRemoved (const KonqHistoryEntry *entry) |
Public Methods | |
KonqHistoryManager (QObject *parent, const char *name) | |
~KonqHistoryManager () | |
void | emitSetMaxCount (Q_UINT32 count) |
void | emitSetMaxAge (Q_UINT32 days) |
void | emitRemoveFromHistory (const KURL &url) |
void | emitRemoveFromHistory (const KURL::List &urls) |
Q_UINT32 | maxCount () const |
Q_UINT32 | maxAge () const |
void | addPending (const KURL &url, const QString &typedURL=QString::null, const QString &title=QString::null) |
void | confirmPending (const KURL &url, const QString &typedURL=QString::null, const QString &title=QString::null) |
void | removePending (const KURL &url) |
KCompletion * | completionObject () const |
const KonqHistoryList & | entries () const |
virtual void | insert (const QString &) |
virtual void | remove (const QString &) |
virtual void | clear () |
Static Public Methods | |
KonqHistoryManager * | kself () |
Protected Methods | |
void | adjustSize () |
bool | isExpired (KonqHistoryEntry *entry) |
void | emitAddToHistory (const KonqHistoryEntry &entry) |
virtual void | notifyHistoryEntry (KonqHistoryEntry e, QCString saveId) |
virtual void | notifyMaxCount (Q_UINT32 count, QCString saveId) |
virtual void | notifyMaxAge (Q_UINT32 days, QCString saveId) |
virtual void | notifyClear (QCString saveId) |
virtual void | notifyRemove (KURL url, QCString saveId) |
virtual void | notifyRemove (KURL::List urls, QCString saveId) |
virtual QStringList | allURLs () const |
void | addToHistory (bool pending, const KURL &url, const QString &typedURL=QString::null, const QString &title=QString::null) |
virtual bool | filterOut (const KURL &url) |
void | addToUpdateList (const QString &url) |
Protected Attributes | |
QStringList | m_updateURLs |
Detailed Description
This class maintains and manages a history of all URLs visited by one Konqueror instance.Additionally it synchronizes the history with other Konqueror instances via DCOP to keep one global and persistant history.
It keeps the history in sync with one KCompletion object
Definition at line 72 of file konq_historymgr.h.
Member Function Documentation
|
Sets a new maximum size of history and truncates the current history if necessary. Notifies all other Konqueror instances via DCOP to do the same. The history is saved after receiving the DCOP call. Definition at line 415 of file konq_historymgr.cc. |
|
Sets a new maximum age of history entries and removes all entries that are older than Notifies all other Konqueror instances via DCOP to do the same. An age of 0 means no expiry based on the age. The history is saved after receiving the DCOP call. Definition at line 424 of file konq_historymgr.cc. |
|
Removes the history entry for Tells all other Konqueror instances via DCOP to do the same. The history is saved after receiving the DCOP call. Definition at line 388 of file konq_historymgr.cc. Referenced by removePending(). |
|
Removes the history entries for the given list of Tells all other Konqueror instances via DCOP to do the same. The history is saved after receiving the DCOP call. Definition at line 397 of file konq_historymgr.cc. |
|
Definition at line 124 of file konq_historymgr.h. |
|
Definition at line 129 of file konq_historymgr.h. |
|
Adds a pending entry to the history.
Pending means, that the entry is not verified yet, i.e. it is not sure
If an entry with
Definition at line 256 of file konq_historymgr.cc. References addToHistory(). |
|
Confirms and updates the entry for
Definition at line 262 of file konq_historymgr.cc. References addToHistory(). |
|
Removes a pending url from the history, e.g. when the url does not exist, or the user aborted loading. Definition at line 357 of file konq_historymgr.cc. References QMapIterator::data(), emitAddToHistory(), emitRemoveFromHistory(), QMap< QString, KonqHistoryEntry * >::end(), QMap< QString, KonqHistoryEntry * >::find(), and QMap< QString, KonqHistoryEntry * >::remove(). |
|
Definition at line 167 of file konq_historymgr.h. |
|
Definition at line 173 of file konq_historymgr.h. |
|
Reimplemented in such a way that all URLs that would be filtered out normally (see filterOut()) will still be added to the history. By default, file:/ urls will be filtered out, but if they come thru the HistoryProvider interface, they are added to the history. Definition at line 332 of file konq_historymgr.cc. References QDateTime::currentDateTime(), emitAddToHistory(), and filterOut(). |
|
Loads the history and fills the completion object.
Definition at line 81 of file konq_historymgr.cc. References adjustSize(), QPtrList< KonqHistoryEntry >::append(), QDataStream::atEnd(), QPtrList< KonqHistoryEntry >::clear(), QFile::close(), QPtrList< KonqHistoryEntry >::count(), QFile::exists(), loadingFinished(), QFile::name(), QFile::open(), and QPtrList< KonqHistoryEntry >::sort(). |
|
Saves the entire history.
Definition at line 200 of file konq_historymgr.cc. References QPtrListIterator::current(). Referenced by notifyClear(), notifyHistoryEntry(), notifyMaxAge(), notifyMaxCount(), and notifyRemove(). |
|
Clears the history and tells all other Konqueror instances via DCOP to do the same. The history is saved afterwards, if necessary. Definition at line 406 of file konq_historymgr.cc. |
|
Emitted after the entire history was loaded from disk.
Referenced by loadHistory(). |
|
Emitted after a new entry was added.
Referenced by notifyHistoryEntry(). |
|
Emitted after an entry was removed from the history Note, that this entry will be deleted immediately after you got that signal.
Referenced by adjustSize(), and notifyRemove(). |
|
Resizes the history list to contain less or equal than m_maxCount entries. The first (oldest) entries are removed. Definition at line 236 of file konq_historymgr.cc. References QPtrList< KonqHistoryEntry >::count(), entryRemoved(), QPtrList< KonqHistoryEntry >::getFirst(), isExpired(), and QPtrList< KonqHistoryEntry >::removeFirst(). Referenced by loadHistory(), notifyHistoryEntry(), notifyMaxAge(), and notifyMaxCount(). |
|
Definition at line 235 of file konq_historymgr.h. References QDate::currentDate(). Referenced by adjustSize(). |
|
Notifes all running instances about a new HistoryEntry via DCOP.
Definition at line 346 of file konq_historymgr.cc. Referenced by addToHistory(), insert(), and removePending(). |
|
Every konqueror instance broadcasts new history entries to the other konqueror instances. Those add the entry to their list, but don't save the list, because the sender saves the list.
Implements KonqHistoryComm. Definition at line 436 of file konq_historymgr.cc. References adjustSize(), QPtrList< KonqHistoryEntry >::append(), entryAdded(), and saveHistory(). |
|
Called when the configuration of the maximum count changed. Called via DCOP by some config-module Implements KonqHistoryComm. Definition at line 483 of file konq_historymgr.cc. References adjustSize(), and saveHistory(). |
|
Called when the configuration of the maximum age of history-entries changed. Called via DCOP by some config-module Implements KonqHistoryComm. Definition at line 499 of file konq_historymgr.cc. References adjustSize(), and saveHistory(). |
|
Clears the history completely. Called via DCOP by some config-module Implements KonqHistoryComm. Definition at line 515 of file konq_historymgr.cc. References QPtrList< KonqHistoryEntry >::clear(), and saveHistory(). |
|
Notifes about a url that has to be removed from the history. The instance where saveId == objId() has to save the history. Implements KonqHistoryComm. Definition at line 527 of file konq_historymgr.cc. References entryRemoved(), saveHistory(), and QPtrList< KonqHistoryEntry >::take(). |
|
Notifes about a list of urls that has to be removed from the history. The instance where saveId == objId() has to save the history. Implements KonqHistoryComm. Definition at line 551 of file konq_historymgr.cc. References entryRemoved(), saveHistory(), and QPtrList< KonqHistoryEntry >::take(). |
|
Implements KonqHistoryComm. Definition at line 668 of file konq_historymgr.cc. References QPtrListIterator::current(). |
|
Does the work for addPending() and confirmPending().
Adds an entry to the history. If an entry with Definition at line 270 of file konq_historymgr.cc. References QDateTime::currentDateTime(), QMapIterator::data(), emitAddToHistory(), QMap< QString, KonqHistoryEntry * >::end(), filterOut(), QMap< QString, KonqHistoryEntry * >::find(), QMap< QString, KonqHistoryEntry * >::insert(), and QMap< QString, KonqHistoryEntry * >::remove(). Referenced by addPending(), and confirmPending(). |
|
Definition at line 657 of file konq_historymgr.cc. Referenced by addToHistory(), and insert(). |
Member Data Documentation
|
The list of urls that is going to be emitted in slotEmitUpdated. Add urls to it whenever you modify the list of history entries and start m_updateTimer. Definition at line 322 of file konq_historymgr.h. |
The documentation for this class was generated from the following files: