GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
documentation_bookmarks Class Reference

#include "documentation-bookmarks.h"

Inheritance diagram for documentation_bookmarks:
Collaboration diagram for documentation_bookmarks:

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_browserm_browser
 
QTreeWidgetItem * m_ctx_menu_item
 
documentationm_doc
 
QComboBox * m_filter
 
QCheckBox * m_filter_checkbox
 
bool m_filter_shown
 
QWidgetm_filter_widget
 
base_qobjectm_octave_qobj
 
QTreeWidget * m_tree
 
QFile m_xbel_file
 

Detailed Description

Definition at line 42 of file documentation-bookmarks.h.

Member Enumeration Documentation

◆ item_role

Enumerator
url_role 
tag_role 

Definition at line 74 of file documentation-bookmarks.h.

◆ item_tag

Enumerator
bookmark_tag 
folder_tag 

Definition at line 79 of file documentation-bookmarks.h.

Constructor & Destructor Documentation

◆ documentation_bookmarks()

◆ ~documentation_bookmarks()

documentation_bookmarks::~documentation_bookmarks ( void  )
default

Member Function Documentation

◆ add_bookmark() [1/2]

void documentation_bookmarks::add_bookmark ( const QString &  title,
const QString &  url,
QTreeWidgetItem *  item = nullptr 
)
private

Definition at line 183 of file documentation-bookmarks.cc.

References bookmark_tag, icon_bookmark, m_tree, tag_role, and url_role.

◆ add_bookmark [2/2]

void documentation_bookmarks::add_bookmark ( void  )
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().

◆ add_folder [1/2]

void documentation_bookmarks::add_folder ( bool  )
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().

◆ add_folder() [2/2]

QTreeWidgetItem * documentation_bookmarks::add_folder ( const QString &  folder,
QTreeWidgetItem *  item = nullptr,
bool  expanded = true 
)
private

Definition at line 229 of file documentation-bookmarks.cc.

References folder_tag, icon_folder, m_tree, and tag_role.

◆ ctx_menu

void documentation_bookmarks::ctx_menu ( const QPoint &  xpos)
privateslot

◆ edit

void documentation_bookmarks::edit ( bool  )
privateslot

Definition at line 357 of file documentation-bookmarks.cc.

References m_tree.

Referenced by ctx_menu().

◆ filter_activate

void documentation_bookmarks::filter_activate ( bool  state)
privateslot

Definition at line 275 of file documentation-bookmarks.cc.

References filter_bookmarks(), m_filter, and state.

Referenced by documentation_bookmarks().

◆ filter_bookmarks

void documentation_bookmarks::filter_bookmarks ( const QString &  pattern)
privateslot

Definition at line 250 of file documentation-bookmarks.cc.

References m_tree.

Referenced by documentation_bookmarks(), and filter_activate().

◆ handle_double_click

void documentation_bookmarks::handle_double_click ( QTreeWidgetItem *  item,
int  col = 0 
)
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().

◆ open

void documentation_bookmarks::open ( bool  )
privateslot

Definition at line 349 of file documentation-bookmarks.cc.

References handle_double_click(), and m_tree.

Referenced by ctx_menu().

◆ read_bookmarks()

QString documentation_bookmarks::read_bookmarks ( void  )
private

◆ read_next_item()

void documentation_bookmarks::read_next_item ( QXmlStreamReader *  xml_writer,
item_tag  tag,
QTreeWidgetItem *  item = nullptr 
)
private

◆ remove

void documentation_bookmarks::remove ( bool  )
privateslot

Definition at line 365 of file documentation-bookmarks.cc.

References m_tree.

Referenced by ctx_menu().

◆ save_settings

◆ show_filter

void documentation_bookmarks::show_filter ( bool  )
privateslot

Definition at line 377 of file documentation-bookmarks.cc.

References m_filter_shown, and m_filter_widget.

Referenced by ctx_menu().

◆ update_filter_history

void documentation_bookmarks::update_filter_history ( void  )
privateslot

Definition at line 286 of file documentation-bookmarks.cc.

References m_filter.

Referenced by documentation_bookmarks().

◆ write_bookmarks()

void documentation_bookmarks::write_bookmarks ( void  )
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().

◆ write_tree_item()

void documentation_bookmarks::write_tree_item ( QXmlStreamWriter *  xml_writer,
const QTreeWidgetItem *  item 
)
private

Member Data Documentation

◆ icon_bookmark

QIcon documentation_bookmarks::icon_bookmark
private

Definition at line 113 of file documentation-bookmarks.h.

Referenced by add_bookmark().

◆ icon_folder

QIcon documentation_bookmarks::icon_folder
private

Definition at line 112 of file documentation-bookmarks.h.

Referenced by add_folder().

◆ m_browser

documentation_browser* documentation_bookmarks::m_browser
private

Definition at line 104 of file documentation-bookmarks.h.

Referenced by add_bookmark(), and handle_double_click().

◆ m_ctx_menu_item

QTreeWidgetItem* documentation_bookmarks::m_ctx_menu_item
private

Definition at line 110 of file documentation-bookmarks.h.

Referenced by add_folder(), and ctx_menu().

◆ m_doc

documentation* documentation_bookmarks::m_doc
private

Definition at line 103 of file documentation-bookmarks.h.

Referenced by add_bookmark().

◆ m_filter

QComboBox* documentation_bookmarks::m_filter
private

◆ m_filter_checkbox

QCheckBox* documentation_bookmarks::m_filter_checkbox
private

Definition at line 116 of file documentation-bookmarks.h.

Referenced by save_settings().

◆ m_filter_shown

bool documentation_bookmarks::m_filter_shown
private

Definition at line 117 of file documentation-bookmarks.h.

Referenced by ctx_menu(), save_settings(), and show_filter().

◆ m_filter_widget

QWidget* documentation_bookmarks::m_filter_widget
private

Definition at line 115 of file documentation-bookmarks.h.

Referenced by show_filter().

◆ m_octave_qobj

base_qobject& documentation_bookmarks::m_octave_qobj
private

Definition at line 105 of file documentation-bookmarks.h.

Referenced by ctx_menu().

◆ m_tree

QTreeWidget* documentation_bookmarks::m_tree
private

◆ m_xbel_file

QFile documentation_bookmarks::m_xbel_file
private

Definition at line 119 of file documentation-bookmarks.h.

Referenced by read_bookmarks(), and write_bookmarks().


The documentation for this class was generated from the following files: