kviewshell
Bookmark Class Reference
Bookmark. More...
#include <bookmark.h>
Public Member Functions | |
Bookmark (const QString &text, const PageNumber &page, const Length &distance_from_top) | |
Bookmark (const QString &text, const Anchor &pos) | |
Bookmark () | |
bool | isValid () const |
Public Attributes | |
QString | bookmarkText |
Anchor | position |
QPtrList< Bookmark > | subordinateBookmarks |
Detailed Description
Bookmark.This class represents a bookmark. It contains the bookmark text, an anchor that represents the target of the bookmark, and a list of subordinate bookmarks.
- Warning:
- The list of subordinate bookmarks owns its entries, i.e. autoDelete() is set to true. Thus, extra care must be taken when copying bookmarks. Otherwise, a segfault could result.
Definition at line 42 of file bookmark.h.
Constructor & Destructor Documentation
Bookmark::Bookmark | ( | ) | [inline] |
Default constructor.
Constructs an invalid bookmark with an empty bookMarkText and an invalid position
Definition at line 49 of file bookmark.h.
Constructs a bookmark with given a text and anchor.
- Parameters:
-
text name of the bookmark, as it appears in the GUI pos an Anchor that specifies the position of the bookmark
Definition at line 57 of file bookmark.h.
Bookmark::Bookmark | ( | const QString & | text, | |
const PageNumber & | page, | |||
const Length & | distance_from_top | |||
) | [inline] |
Convenience funtion, behaves as Bookmark(const QString &text, const Anchor &pos).
- Parameters:
-
text name of the bookmark, as it appears in the GUI page number of the where the bookmark lives. Recall the convention that '0' is an invalid page, the first page is '1' distance_from_top position on the page, distance from top of the page
Definition at line 73 of file bookmark.h.
Member Function Documentation
bool Bookmark::isValid | ( | ) | const [inline] |
Definition at line 103 of file bookmark.h.
Member Data Documentation
Label of the bookmark as it will appear in the GUI to the user, such as "Section 1", "Theorem 12", etc.
Definition at line 82 of file bookmark.h.
List of subordinate bookmarks.
Bookmarks generally come in trees, and some bookmarks can have subordinate bookmarks. For instance, the bookmark that respresents a chapter heading would have headings of subsections as subordinate bookmarks. These are contained in this list.
- Warning:
- This list owns its entries, e.g. autoDelete() is set to true. Thus, extra care must be taken when copying this list. Otherwise, a segfault could result.
Definition at line 98 of file bookmark.h.
The documentation for this class was generated from the following file: