The Bookmarks class maintains the user's bookmarks, and the menu structure for them. More...
Publicly inherits QObject.
Bookmarks | ( ); | |
Browser* | active | ( ); |
void | activeBrowser | ( Browser* browser ); |
QPopupMenu* | menu | ( ); |
void | read | ( ); |
~Bookmarks | ( ); |
void | addBookmark | ( ); |
void | content10 | ( QString text ); |
void | content11 | ( QString text ); |
void | dtdSelected | ( QString dtdName ); |
void | endTag10 | ( ); |
void | endTag11 | ( ); |
void | save | ( ); |
void | startTag10 | ( ); |
void | startTag11 | ( ); |
void | updateBookmarksUrl | ( ); |
void | bookmarksChanged | ( ); |
Browser* | _active; |
Link* | _link; |
SgmlParser* | _parser; |
QStack<Link> | _stack; |
QString | _text; |
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.
Initialize the global Bookmarks object. Open the bookmarks file that is given in the user preferences, and begin parsing it.
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.
Return a pointer to the Bookmarks menu structure that we created. NOTE: the Bookmarks object retains ownership of the menu!
Free the menu structure that we created (TBD).
Process a content signal from our SgmlParser. The only content that we look for is the menu item text for a bookmark entry.
Process an end tag signal from our SgmlParser.
Process a start tag signal from our SgmlParser. We only recognize the allowed elements in the bookmarks DTD (BOOKMARKS, LINK, LASTMOD).