summaryrefslogtreecommitdiff
path: root/src/bookmarks.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks.h')
-rw-r--r--src/bookmarks.h86
1 files changed, 79 insertions, 7 deletions
diff --git a/src/bookmarks.h b/src/bookmarks.h
index aa18834c..825c0d3a 100644
--- a/src/bookmarks.h
+++ b/src/bookmarks.h
@@ -31,40 +31,112 @@
class MainWindow;
-/*
+/**
+ * Inherited from KBookmarkOwner, this class allows to manage
+ * bookmarks as actions
*
+ * @author Andrea Diamantini <adjam7@gmail.com>
+ * @since 4.x
*/
class OwnBookMarks : public QObject , public KBookmarkOwner
{
Q_OBJECT
+
public:
- OwnBookMarks(KMainWindow *);
- virtual void openBookmark (const KBookmark & , Qt::MouseButtons , Qt::KeyboardModifiers );
+ /**
+ * The class ctor.
+ *
+ * @param parent the pointer to the browser mainwindow. We need it
+ * to link bookmarks actions with the right window
+ * where load url in
+ */
+ OwnBookMarks(KMainWindow *parent);
+
+ /**
+ * This function is called when a bookmark is selected and belongs to
+ * the ancestor class.
+ * This method actually emits signal to load bookmark's url without
+ * considering mousebuttons or keyboard modifiers.
+ *
+ * @param b the bookmark to open
+ * @param mb the mouse buttons clicked to select the bookmark
+ * @param km the keyboard modifiers pushed when the bookmark was selected
+ */
+ virtual void openBookmark (const KBookmark &b , Qt::MouseButtons mb, Qt::KeyboardModifiers km);
- // KBookmarkOwner interface:
+
+ /**
+ * this method, from KBookmarkOwner interface, allows to add the current page
+ * to the bookmark list, returning the URL page as QString.
+ *
+ * @return the current page's URL
+ */
virtual QString currentUrl() const;
+
+ /**
+ * this method, from KBookmarkOwner interface, allows to add the current page
+ * to the bookmark list, returning the title's page as QString.
+ *
+ * @return the current page's title
+ */
virtual QString currentTitle() const;
signals:
+ /**
+ * This signal is emitted when an url has to be loaded
+ *
+ * @param url the URL to load
+ *
+ */
void openUrl(const KUrl &);
private:
+ // the MainWindow pointer
MainWindow *m_parent;
};
+
// ------------------------------------------------------------------------------
-/*
+
+/**
+ * This class represent the interface to rekonq bookmarks system.
+ * All rekonq needs (Bookmarks Menu, Bookmarks Toolbar) is provided
+ * from this class.
+ * So it implements code to have each one
+ *
+ * @author Andrea Diamantini <adjam7@gmail.com>
+ * @since 4.x
*
*/
class BookmarksProvider : public QObject
{
Q_OBJECT
+
public:
- BookmarksProvider(KMainWindow*);
+ /**
+ * Class constructor. Connect BookmarksProvider with bookmarks source
+ * (actually konqueror's bookmarks)
+ *
+ * @param parent The MainWindow to provide bookmarks objects
+ *
+ */
+ BookmarksProvider(KMainWindow* parent);
+
+ /**
+ * Customize bookmarks toolbar
+ *
+ * @param toolbar the toolbar to customize
+ */
+ void provideBmToolbar(KToolBar* toolbar);
- void provideBmToolbar(KToolBar*);
+ /**
+ * Generate the Bookmarks Menu
+ *
+ * @return the Bookmarks Menu
+ *
+ */
KMenu *bookmarksMenu();
private: