Bookmarks

The Bookmarks class maintains the user's bookmarks, and the menu structure for them. More...

Publicly inherits QObject.

Public Methods

Bookmarks( );
Browser*active( );
voidactiveBrowser( Browser* browser );
QPopupMenu*menu( );
voidread( );
~Bookmarks( );

Public Slots

voidaddBookmark( );
voidcontent10( QString text );
voidcontent11( QString text );
voiddtdSelected( QString dtdName );
voidendTag10( );
voidendTag11( );
voidsave( );
voidstartTag10( );
voidstartTag11( );
voidupdateBookmarksUrl( );

Signals

voidbookmarksChanged( );

Private Data Members

Browser*_active;
Link*_link;
SgmlParser*_parser;
QStack<Link>_stack;
QString_text;

Detailed Documentation

The Bookmarks class maintains the user's bookmarks, and the menu structure for them.

There is exactly one instance of the Bookmarks object, whcih is shared among all of the open browser windows. The bookmarks object creates and maintains a QPopupMenu containing all of the bookmarks. This menu is used by all of the browser windows.

Whenever a browser becomes "active" (i.e. gets focus) it must register with this object, so that it can be notified when the user selects a bookmark url.

Public Methods Documentation

Bookmarks ( );

Initialize the global Bookmarks object. Open the bookmarks file that is given in the user preferences, and begin parsing it.

void activeBrowser ( Browser* browser );

This function registers a Browser window for future bookmark menu selection events. When a menu item is selected, it will be opened in this browser window.

QPopupMenu* menu ( );

Return a pointer to the Bookmarks menu structure that we created. NOTE: the Bookmarks object retains ownership of the menu!

~Bookmarks ( );

Free the menu structure that we created (TBD).

Public Slots Documentation

void content10 ( QString text );

Process a content signal from our SgmlParser. The only content that we look for is the menu item text for a bookmark entry.

void endTag10 ( );

Process an end tag signal from our SgmlParser.

void startTag10 ( );

Process a start tag signal from our SgmlParser. We only recognize the allowed elements in the bookmarks DTD (BOOKMARKS, LINK, LASTMOD).


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