#include "documentation-bookmarks.h"
Public Slots | |
void | add_bookmark (void) |
void | add_folder (bool) |
void | save_settings (gui_settings *settings) |
Public Member Functions | |
documentation_bookmarks (documentation *doc, documentation_browser *browser, base_qobject &oct_qobj, QWidget *p=nullptr) | |
~documentation_bookmarks (void)=default | |
Private Types | |
enum | item_role { url_role = Qt::UserRole , tag_role = Qt::UserRole + 1 } |
enum | item_tag { bookmark_tag , folder_tag } |
Private Slots | |
void | ctx_menu (const QPoint &xpos) |
void | edit (bool) |
void | filter_activate (bool state) |
void | filter_bookmarks (const QString &pattern) |
void | handle_double_click (QTreeWidgetItem *item, int col=0) |
void | open (bool) |
void | remove (bool) |
void | show_filter (bool) |
void | update_filter_history (void) |
Private Member Functions | |
void | add_bookmark (const QString &title, const QString &url, QTreeWidgetItem *item=nullptr) |
QTreeWidgetItem * | add_folder (const QString &folder, QTreeWidgetItem *item=nullptr, bool expanded=true) |
QString | read_bookmarks (void) |
void | read_next_item (QXmlStreamReader *xml_writer, item_tag tag, QTreeWidgetItem *item=nullptr) |
void | write_bookmarks (void) |
void | write_tree_item (QXmlStreamWriter *xml_writer, const QTreeWidgetItem *item) |
Private Attributes | |
QIcon | icon_bookmark |
QIcon | icon_folder |
documentation_browser * | m_browser |
QTreeWidgetItem * | m_ctx_menu_item |
documentation * | m_doc |
QComboBox * | m_filter |
QCheckBox * | m_filter_checkbox |
bool | m_filter_shown |
QWidget * | m_filter_widget |
base_qobject & | m_octave_qobj |
QTreeWidget * | m_tree |
QFile | m_xbel_file |
Definition at line 42 of file documentation-bookmarks.h.
|
private |
Enumerator | |
---|---|
url_role | |
tag_role |
Definition at line 74 of file documentation-bookmarks.h.
|
private |
Enumerator | |
---|---|
bookmark_tag | |
folder_tag |
Definition at line 79 of file documentation-bookmarks.h.
documentation_bookmarks::documentation_bookmarks | ( | documentation * | doc, |
documentation_browser * | browser, | ||
base_qobject & | oct_qobj, | ||
QWidget * | p = nullptr |
||
) |
Definition at line 52 of file documentation-bookmarks.cc.
References ctx_menu(), dc_bookmark_file(), dc_bookmark_filter_active(), dc_bookmark_filter_mru(), dc_bookmark_filter_shown(), f, filter_activate(), filter_bookmarks(), resource_manager::get_settings(), handle_double_click(), update_filter_history(), and warning().
|
default |
|
private |
Definition at line 183 of file documentation-bookmarks.cc.
References bookmark_tag, icon_bookmark, m_tree, tag_role, and url_role.
|
slot |
Definition at line 158 of file documentation-bookmarks.cc.
References m_browser, m_doc, m_tree, documentation::title_and_anchor(), and url_role.
Referenced by read_next_item().
|
slot |
Definition at line 206 of file documentation-bookmarks.cc.
References folder_tag, m_ctx_menu_item, m_tree, and tag_role.
Referenced by ctx_menu(), and read_next_item().
|
private |
Definition at line 229 of file documentation-bookmarks.cc.
References folder_tag, icon_folder, m_tree, and tag_role.
|
privateslot |
Definition at line 317 of file documentation-bookmarks.cc.
References add_folder(), edit(), base_qobject::get_resource_manager(), resource_manager::icon(), m_ctx_menu_item, m_filter_shown, m_octave_qobj, m_tree, open(), remove(), and show_filter().
Referenced by documentation_bookmarks().
|
privateslot |
Definition at line 357 of file documentation-bookmarks.cc.
References m_tree.
Referenced by ctx_menu().
|
privateslot |
Definition at line 275 of file documentation-bookmarks.cc.
References filter_bookmarks(), m_filter, and state.
Referenced by documentation_bookmarks().
|
privateslot |
Definition at line 250 of file documentation-bookmarks.cc.
References m_tree.
Referenced by documentation_bookmarks(), and filter_activate().
|
privateslot |
Definition at line 298 of file documentation-bookmarks.cc.
References bookmark_tag, folder_tag, m_browser, tag_role, and url_role.
Referenced by documentation_bookmarks(), and open().
|
privateslot |
Definition at line 349 of file documentation-bookmarks.cc.
References handle_double_click(), and m_tree.
Referenced by ctx_menu().
|
private |
Definition at line 453 of file documentation-bookmarks.cc.
References bookmark_tag, dc_xbel_attr_version(), dc_xbel_name_bookmark(), dc_xbel_name_folder(), dc_xbel_name_format(), dc_xbel_value_version(), folder_tag, m_xbel_file, and read_next_item().
|
private |
Definition at line 502 of file documentation-bookmarks.cc.
References add_bookmark(), add_folder(), bookmark_tag, dc_xbel_attr_folded(), dc_xbel_attr_href(), dc_xbel_name_bookmark(), dc_xbel_name_folder(), dc_xbel_name_title(), dc_xbel_value_no(), and folder_tag.
Referenced by read_bookmarks().
|
privateslot |
Definition at line 365 of file documentation-bookmarks.cc.
References m_tree.
Referenced by ctx_menu().
|
slot |
Definition at line 383 of file documentation-bookmarks.cc.
References dc_bookmark_filter_active(), dc_bookmark_filter_mru(), dc_bookmark_filter_shown(), gui_pref::key, m_filter, m_filter_checkbox, m_filter_shown, and write_bookmarks().
Referenced by documentation::save_settings().
|
privateslot |
Definition at line 377 of file documentation-bookmarks.cc.
References m_filter_shown, and m_filter_widget.
Referenced by ctx_menu().
|
privateslot |
Definition at line 286 of file documentation-bookmarks.cc.
References m_filter.
Referenced by documentation_bookmarks().
|
private |
Writing to and reading bookmarks from an xbel-file as proposed in the qt example QXmlStream Bookmarks Example
Definition at line 400 of file documentation-bookmarks.cc.
References dc_xbel_attr_version(), dc_xbel_doctype(), dc_xbel_name_format(), dc_xbel_value_version(), m_tree, m_xbel_file, warning(), and write_tree_item().
Referenced by save_settings().
|
private |
Definition at line 429 of file documentation-bookmarks.cc.
References bookmark_tag, dc_xbel_attr_folded(), dc_xbel_attr_href(), dc_xbel_name_bookmark(), dc_xbel_name_folder(), dc_xbel_name_title(), dc_xbel_value_no(), dc_xbel_value_yes(), folder_tag, tag_role, and url_role.
Referenced by write_bookmarks().
|
private |
Definition at line 113 of file documentation-bookmarks.h.
Referenced by add_bookmark().
|
private |
Definition at line 112 of file documentation-bookmarks.h.
Referenced by add_folder().
|
private |
Definition at line 104 of file documentation-bookmarks.h.
Referenced by add_bookmark(), and handle_double_click().
|
private |
Definition at line 110 of file documentation-bookmarks.h.
Referenced by add_folder(), and ctx_menu().
|
private |
Definition at line 103 of file documentation-bookmarks.h.
Referenced by add_bookmark().
|
private |
Definition at line 107 of file documentation-bookmarks.h.
Referenced by filter_activate(), save_settings(), and update_filter_history().
|
private |
Definition at line 116 of file documentation-bookmarks.h.
Referenced by save_settings().
|
private |
Definition at line 117 of file documentation-bookmarks.h.
Referenced by ctx_menu(), save_settings(), and show_filter().
|
private |
Definition at line 115 of file documentation-bookmarks.h.
Referenced by show_filter().
|
private |
Definition at line 105 of file documentation-bookmarks.h.
Referenced by ctx_menu().
|
private |
Definition at line 108 of file documentation-bookmarks.h.
Referenced by add_bookmark(), add_folder(), ctx_menu(), edit(), filter_bookmarks(), open(), remove(), and write_bookmarks().
|
private |
Definition at line 119 of file documentation-bookmarks.h.
Referenced by read_bookmarks(), and write_bookmarks().