74class LIBKONQ_EXPORT KonqHistoryManager :
public KParts::HistoryProvider,
75 public KonqHistoryComm
80 static KonqHistoryManager *kself() {
81 return static_cast<KonqHistoryManager*
>( KParts::HistoryProvider::self() );
84 KonqHistoryManager( TQObject *parent,
const char *name );
85 ~KonqHistoryManager();
131 TQ_UINT32
maxAge()
const {
return m_maxAgeDays; }
150 void addPending(
const KURL& url,
const TQString& typedURL = TQString::null,
151 const TQString& title = TQString::null );
156 void confirmPending(
const KURL& url,
157 const TQString& typedURL = TQString::null,
158 const TQString& title = TQString::null );
164 void removePending(
const KURL& url );
175 const KonqHistoryList&
entries()
const {
return m_history; }
184 virtual void insert(
const TQString& );
185 virtual void remove(
const TQString& ) {}
186 virtual void clear() {}
238 return (entry && m_maxAgeDays > 0 && entry->lastVisited <
239 TQDateTime(TQDate::currentDate().addDays( -m_maxAgeDays )));
245 void emitAddToHistory(
const KonqHistoryEntry& entry );
256 virtual void notifyHistoryEntry( KonqHistoryEntry e, TQCString saveId );
262 virtual void notifyMaxCount( TQ_UINT32 count, TQCString saveId );
268 virtual void notifyMaxAge( TQ_UINT32 days, TQCString saveId );
273 virtual void notifyClear( TQCString saveId );
279 virtual void notifyRemove( KURL url, TQCString saveId );
285 virtual void notifyRemove( KURL::List urls, TQCString saveId );
290 virtual TQStringList allURLs()
const;
303 void addToHistory(
bool pending,
const KURL& url,
304 const TQString& typedURL = TQString::null,
305 const TQString& title = TQString::null );
313 virtual bool filterOut(
const KURL& url );
315 void addToUpdateList(
const TQString& url ) {
316 m_updateURLs.append( url );
317 m_updateTimer->start( 500,
true );
332 void slotEmitUpdated();
338 bool isSenderOfBroadcast();
347 KonqHistoryEntry * findEntry(
const KURL& url );
354 KonqHistoryEntry * createFallbackEntry(
const TQString& )
const;
356 void addToCompletion(
const TQString& url,
const TQString& typedURL,
int numberOfTimesVisited = 1 );
357 void removeFromCompletion(
const TQString& url,
const TQString& typedURL );
360 KonqHistoryList m_history;
368 TQMap<TQString,KonqHistoryEntry*> m_pending;
370 TQ_UINT32 m_maxCount;
371 TQ_UINT32 m_maxAgeDays;
373 TDECompletion *m_pCompletion;
379 TQTimer *m_updateTimer;
381 static const TQ_UINT32 s_historyVersion;
TQ_UINT32 maxCount() const
void entryAdded(const KonqHistoryEntry *entry)
Emitted after a new entry was added.
void adjustSize()
Resizes the history list to contain less or equal than m_maxCount entries.
bool isExpired(KonqHistoryEntry *entry)
const KonqHistoryList & entries() const
TDECompletion * completionObject() const
void loadingFinished()
Emitted after the entire history was loaded from disk.
TQStringList m_updateURLs
The list of urls that is going to be emitted in slotEmitUpdated.
void entryRemoved(const KonqHistoryEntry *entry)
Emitted after an entry was removed from the history Note, that this entry will be deleted immediately...
void emitSetMaxAge(TQ_UINT32 days)
Sets a new maximum age of history entries and removes all entries that are older than days.
void emitRemoveFromHistory(const KURL &url)
Removes the history entry for url, if existant.
void emitSetMaxCount(TQ_UINT32 count)
Sets a new maximum size of history and truncates the current history if necessary.