Link

The Link class stores a single entry in the heirarchical list of bookmarks. More...

Publicly inherits QObject.

Public Methods

Link( Bookmarks* bookmarks );
voidappendLink( Link* link );
QList<Link>&links( );
QPopupMenu*menu( );
QStringname( );
voidsave( FILE* fptr, int indent );
voidsetName( QString name );
voidsetUrl( QString url );
~Link( );

Public Slots

voidselected( );

Private Data Members

Bookmarks*_bookmarks;
QList<Link>_links;
QString_name;
QString_url;

Detailed Documentation

The Link class stores a single entry in the heirarchical list of bookmarks.

Every link has a title associated with it. However each link may have either a URL or a list of sublinks, but not both. If the link has a list of sublinks then it represents a submenu in the bookmarks menu structure. Otherwise it represents a menu item that when selected will open the URL in the active browser window.

Public Methods Documentation

Link ( Bookmarks* bookmarks );

Create a new link associated with the given bookmarks object.

void appendLink ( Link* link );

Add a new sublink to this link.

QList<Link>& links ( );

Return the list of sublinks.

QPopupMenu* menu ( );

Return a newly constructed popup menu structure base on this link and all of its sublinks. The popup menu is owned by the caller.

QString name ( );

Return my title.

void save ( FILE* fptr, int indent );

Write out the information for this link and its sublinks to the given open file pointer.

void setName ( QString name );

Set the title for this link.

void setUrl ( QString url );

Set the URL for this link.

~Link ( );

Destroy the link.

Public Slots Documentation

void selected ( );

Process the menu selection call back for this link. Ask the bookmarks object to open the link in the active browser.


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