History

The History class keeps track of visited URLs for a single Browser.

Publicly inherits QObject.

Public Methods

History( QPopupMenu* menu );
const Url*back( );
const Url*current( );
const Url*forward( );
const Url*go( int index );
const Url*home( );
const Url*open( const Url& url );
voidsetTitle( QString title );
~History( );

Private Methods

voidupdateMenu( );

Signals

voidcanGoBack( bool b );
voidcanGoForward( bool b );

Private Data Members

QPopupMenu*_menu;
QList<QString>_titles;
QList<Url>_urls;

Public Methods Documentation

History ( QPopupMenu* menu );

Create a new URL history. The given popup menu is managed by the History object.

const Url* back ( );

Return the previous history item.

const Url* current ( );

Return the URL of the current history item, if any.

const Url* forward ( );

Return the next history item.

const Url* go ( int index );

Return the URL of the history item at the given index, if any.

const Url* home ( );

Truncate the history at the current position, then append the home URL as a new history item.

const Url* open ( const Url& url );

Truncate the history at the current position, then append the given URL as a new history item.

void setTitle ( QString title );

This function changes the title of the current history item.

~History ( );

Destroy history.

Private Methods Documentation

void updateMenu ( );

Make the history menu reflect the current browser history.

Signals Documentation

void canGoBack ( bool b );

This signal tells a browser whether to enable or disable the backward button and menu entry.

void canGoForward ( bool b );

This signal tells a browser whether to enable or disable the forward button and menu entry.


Return to Index.
Automatically generated on Aug 11 23:32