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

Documentation browser derived from Textbrowser. More...

#include "documentation.h"

Inheritance diagram for documentation_browser:
Collaboration diagram for documentation_browser:

Public Slots

void handle_index_clicked (const QUrl &url, const QString &keyword=QString())
 
void notice_settings (const gui_settings *settings)
 
void save_settings (gui_settings *settings)
 
void zoom_in (void)
 Zooming in and out while taking care of the zoom level. More...
 
void zoom_out (void)
 Zooming in and out while taking care of the zoom level. More...
 
void zoom_original (void)
 Zooming in and out while taking care of the zoom level. More...
 

Public Member Functions

 documentation_browser (QHelpEngine *help_engine, QWidget *parent=nullptr)
 
 ~documentation_browser (void)=default
 
virtual QVariant loadResource (int type, const QUrl &url)
 

Protected Member Functions

void wheelEvent (QWheelEvent *we)
 

Private Types

enum  { min_zoom_level = -5 , max_zoom_level = 10 }
 Minimal and maximal zoom level avoiding calling zoom_in and zoom_out without actually zooming but with changing the stored zoom level. More...
 

Private Attributes

QHelpEngine * m_help_engine
 
int m_zoom_level
 Store the current zoom level. More...
 

Detailed Description

Documentation browser derived from Textbrowser.

Definition at line 50 of file documentation.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

Minimal and maximal zoom level avoiding calling zoom_in and zoom_out without actually zooming but with changing the stored zoom level.

Enumerator
min_zoom_level 
max_zoom_level 

Definition at line 89 of file documentation.h.

Constructor & Destructor Documentation

◆ documentation_browser()

documentation_browser::documentation_browser ( QHelpEngine *  help_engine,
QWidget parent = nullptr 
)

Definition at line 991 of file documentation.cc.

References dir_sep_str(), Utils::fromStdString(), and handle_index_clicked().

◆ ~documentation_browser()

documentation_browser::~documentation_browser ( void  )
default

Member Function Documentation

◆ handle_index_clicked

void documentation_browser::handle_index_clicked ( const QUrl &  url,
const QString &  keyword = QString () 
)
slot

◆ loadResource()

QVariant documentation_browser::loadResource ( int  type,
const QUrl &  url 
)
virtual

Definition at line 1052 of file documentation.cc.

References m_help_engine.

◆ notice_settings

void documentation_browser::notice_settings ( const gui_settings settings)
slot

Definition at line 1042 of file documentation.cc.

References dc_browser_zoom_level(), m_zoom_level, and max_zoom_level.

Referenced by documentation::notice_settings().

◆ save_settings

void documentation_browser::save_settings ( gui_settings settings)
slot

Definition at line 1060 of file documentation.cc.

References dc_browser_zoom_level(), gui_pref::key, and m_zoom_level.

Referenced by documentation::save_settings().

◆ wheelEvent()

void documentation_browser::wheelEvent ( QWheelEvent *  we)
protected

Definition at line 1091 of file documentation.cc.

References we, zoom_in(), and zoom_out().

◆ zoom_in

void documentation_browser::zoom_in ( void  )
slot

Zooming in and out while taking care of the zoom level.

Definition at line 1067 of file documentation.cc.

References m_zoom_level, and max_zoom_level.

Referenced by wheelEvent().

◆ zoom_original

void documentation_browser::zoom_original ( void  )
slot

Zooming in and out while taking care of the zoom level.

Definition at line 1085 of file documentation.cc.

References m_zoom_level.

◆ zoom_out

void documentation_browser::zoom_out ( void  )
slot

Zooming in and out while taking care of the zoom level.

Definition at line 1076 of file documentation.cc.

References m_zoom_level, and min_zoom_level.

Referenced by wheelEvent().

Member Data Documentation

◆ m_help_engine

QHelpEngine* documentation_browser::m_help_engine
private

Definition at line 81 of file documentation.h.

Referenced by loadResource().

◆ m_zoom_level

int documentation_browser::m_zoom_level
private

Store the current zoom level.

Definition at line 84 of file documentation.h.

Referenced by notice_settings(), save_settings(), zoom_in(), zoom_original(), and zoom_out().


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