annotate libgui/src/documentation.h @ 27611:0495b64288f7

use new gui_settings class instead of using QSettings directly * gui-settings.h, gui-settings.cc: New files. Define gui_settings class derived from QSettings. * libgui/src/module.mk: Update. Change all uses of QSettings to use gui_settings instead.
author John W. Eaton <jwe@octave.org>
date Fri, 01 Nov 2019 02:17:13 -0400
parents f6b729077ebd
children 45bb5bbaf291
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
1 /*
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
2
26376
00f796120a6d maint: Update copyright dates in all source files.
John W. Eaton <jwe@octave.org>
parents: 26245
diff changeset
3 Copyright (C) 2018-2019 Torsten <mttl@maibox.org>
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
4
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
5 This file is part of Octave.
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
6
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
7 Octave is free software: you can redistribute it and/or modify it
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
8 under the terms of the GNU General Public License as published by
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
9 the Free Software Foundation, either version 3 of the License, or
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
10 (at your option) any later version.
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
11
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
13 WITHOUT ANY WARRANTY; without even the implied warranty of
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
15 GNU General Public License for more details.
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
16
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
18 along with Octave; see the file COPYING. If not, see
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
19 <https://www.gnu.org/licenses/>.
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
20
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
21 */
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
22
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
23 #if ! defined (octave_documentation_h)
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
24 #define octave_documentation_h 1
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
25
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
26 #include <QComboBox>
26128
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
27 #include <QMenu>
25371
41bbdf17f51a make shortcuts for searching within the documentation configurable
Torsten <mttl@mailbox.org>
parents: 25155
diff changeset
28 #include <QShortcut>
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
29 #include <QSplitter>
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
30 #include <QTextBrowser>
26017
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
31 #include <QToolBar>
26128
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
32 #include <QToolButton>
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
33 #include <QWidget>
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
34 #include <QtHelp/QHelpEngine>
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
35
27611
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents: 27590
diff changeset
36 #include "gui-settings.h"
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents: 27590
diff changeset
37
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
38 namespace octave
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
39 {
25976
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
40 //! Documentation browser derived from Textbrowser
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
41
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
42 class documentation_browser : public QTextBrowser
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
43 {
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
44 Q_OBJECT
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
45
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
46 public:
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
47
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
48 documentation_browser (QHelpEngine *help_engine, QWidget *parent = nullptr);
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
49 ~documentation_browser (void);
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
50
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
51 virtual QVariant loadResource (int type, const QUrl &url);
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
52
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
53 public slots:
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
54
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
55 void handle_index_clicked (const QUrl& url,
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
56 const QString& keyword = QString ());
27611
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents: 27590
diff changeset
57 void notice_settings (const gui_settings *settings);
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
58
25976
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
59 //! Zooming in and out while taking care of the zoom level
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
60 //!@{
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
61 void zoom_in (void);
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
62 void zoom_out (void);
26017
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
63 void zoom_original (void);
25976
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
64 //!@}
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
65
25985
49ffd0e0242d enable resetting doc browser zoom level even when zooming with mouse wheel
Torsten <mttl@mailbox.org>
parents: 25976
diff changeset
66 protected:
49ffd0e0242d enable resetting doc browser zoom level even when zooming with mouse wheel
Torsten <mttl@mailbox.org>
parents: 25976
diff changeset
67
49ffd0e0242d enable resetting doc browser zoom level even when zooming with mouse wheel
Torsten <mttl@mailbox.org>
parents: 25976
diff changeset
68 void wheelEvent (QWheelEvent *we);
49ffd0e0242d enable resetting doc browser zoom level even when zooming with mouse wheel
Torsten <mttl@mailbox.org>
parents: 25976
diff changeset
69
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
70 private:
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
71
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
72 QHelpEngine *m_help_engine;
25976
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
73
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
74 //! Store the current zoom level
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
75 int m_zoom_level;
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
76
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
77 //! Minimal and maximal zoom level avoiding calling
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
78 //! zoom_in and zoom_out without actually zooming but
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
79 //! with changing the stored zoom level
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
80 enum
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
81 {
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
82 min_zoom_level = -5,
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
83 max_zoom_level = 10
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
84 };
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
85 };
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
86
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
87
25976
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
88 //! The documentaiton main class derived from QSplitter
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
89
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
90 class documentation : public QSplitter
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
91 {
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
92 Q_OBJECT
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
93
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
94 public:
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
95
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
96 documentation (QWidget *parent = nullptr);
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
97 ~documentation (void);
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
98
27590
f6b729077ebd use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents: 27092
diff changeset
99 signals:
f6b729077ebd use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents: 27092
diff changeset
100
f6b729077ebd use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents: 27092
diff changeset
101 void show_single_result (const QUrl&);
f6b729077ebd use consistent order for signal/slot/other decls in libgui/src files
John W. Eaton <jwe@octave.org>
parents: 27092
diff changeset
102
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
103 public slots:
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
104
27611
0495b64288f7 use new gui_settings class instead of using QSettings directly
John W. Eaton <jwe@octave.org>
parents: 27590
diff changeset
105 void notice_settings (const gui_settings *settings);
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
106
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
107 void copyClipboard (void);
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
108 void pasteClipboard (void);
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
109 void selectAll (void);
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
110
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
111 void load_ref (const QString & name);
25060
1cd3aeda7598 Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 25042
diff changeset
112 void registerDoc (const QString & name);
1cd3aeda7598 Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 25042
diff changeset
113 void unregisterDoc (const QString & name);
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
114
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
115 private slots:
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
116
26017
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
117 void activate_find (void);
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
118 void global_search (void);
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
119 void global_search_started (void);
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
120 void global_search_finished (int hits);
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
121 void filter_update (const QString& expression);
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
122 void filter_update_history (void);
27092
d1fe5bd5e005 wrap while searching in doc browser
Torsten Lilge <ttl-octave@mailbox.org>
parents: 26497
diff changeset
123 void find (bool backward = false);
25121
9578133ca03e Add a Ctrl+F unhide/hide in-page find footer to the Documentation window (bug #53006)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25060
diff changeset
124 void find_backward (void);
25155
17387d4edd1d Add standard key bindings and actions to in-page Documentation find (bug #53006)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25121
diff changeset
125 void find_forward_from_anchor (const QString& text);
17387d4edd1d Add standard key bindings and actions to in-page Documentation find (bug #53006)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25121
diff changeset
126 void record_anchor_position (void);
17387d4edd1d Add standard key bindings and actions to in-page Documentation find (bug #53006)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25121
diff changeset
127 void handle_cursor_position_change (void);
26245
af99ea9c325f Doc browser: go to search text when clicking a search result (bug #55228)
Torsten <mttl@mailbox.org>
parents: 26128
diff changeset
128 void handle_search_result_clicked (const QUrl& url);
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
129
26128
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
130 void update_history_menus (void);
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
131 void open_hist_url (QAction *a);
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
132
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
133 private:
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
134
26017
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
135 void construct_tool_bar (void);
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
136 QAction *add_action (const QIcon& icon, const QString& text,
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
137 const char *member, QWidget *receiver = nullptr,
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
138 QToolBar *tool_bar = nullptr);
26128
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
139 void update_history (int new_count, QAction **actions);
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
140
26245
af99ea9c325f Doc browser: go to search text when clicking a search result (bug #55228)
Torsten <mttl@mailbox.org>
parents: 26128
diff changeset
141 //! Select all occurrences of a string in the doc browser
af99ea9c325f Doc browser: go to search text when clicking a search result (bug #55228)
Torsten <mttl@mailbox.org>
parents: 26128
diff changeset
142 void select_all_occurrences (const QString& text);
26017
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
143
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
144 QHelpEngine *m_help_engine;
25541
517c73173011 doc.m: allow full text search in GUI mode (bug #54053).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 25371
diff changeset
145 QString m_internal_search;
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
146 documentation_browser *m_doc_browser;
25121
9578133ca03e Add a Ctrl+F unhide/hide in-page find footer to the Documentation window (bug #53006)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25060
diff changeset
147 QLineEdit *m_find_line_edit;
25155
17387d4edd1d Add standard key bindings and actions to in-page Documentation find (bug #53006)
Daniel J Sebald <daniel.sebald@ieee.org>
parents: 25121
diff changeset
148 int m_search_anchor_position;
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
149 QComboBox *m_filter;
25060
1cd3aeda7598 Allow registering compressed help at run time (bug #53006).
Pantxo Diribarne <pantxo.diribarne@gmail.com>
parents: 25042
diff changeset
150 QString m_collection;
25976
a7cc5b7a3d22 provide shortcuts for zooming into the doc browser (bug #54877)
Torsten <mttl@mailbox.org>
parents: 25609
diff changeset
151
26017
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
152 QWidget *m_doc_widget;
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
153 QToolBar *m_tool_bar;
26245
af99ea9c325f Doc browser: go to search text when clicking a search result (bug #55228)
Torsten <mttl@mailbox.org>
parents: 26128
diff changeset
154 QString m_query_string;
26017
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
155
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
156 QAction *m_action_go_home;
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
157 QAction *m_action_go_prev;
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
158 QAction *m_action_go_next;
26128
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
159 QMenu *m_prev_pages_menu;
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
160 QMenu *m_next_pages_menu;
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
161 int m_prev_pages_count;
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
162 int m_next_pages_count;
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
163
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
164 enum { max_history_entries = 10 };
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
165 QAction *m_prev_pages_actions[max_history_entries];
20b87596b99a add mru-lists to the doc browser back/forward buttons (bug #54938)
Torsten <mttl@mailbox.org>
parents: 26017
diff changeset
166 QAction *m_next_pages_actions[max_history_entries];
26017
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
167
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
168 QAction *m_action_find;
25371
41bbdf17f51a make shortcuts for searching within the documentation configurable
Torsten <mttl@mailbox.org>
parents: 25155
diff changeset
169 QShortcut *m_findnext_shortcut;
41bbdf17f51a make shortcuts for searching within the documentation configurable
Torsten <mttl@mailbox.org>
parents: 25155
diff changeset
170 QShortcut *m_findprev_shortcut;
26017
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
171
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
172 QAction *m_action_zoom_in;
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
173 QAction *m_action_zoom_out;
390d59717711 adding a toolbar with common browse tools to the doc browser (bug 54938)
Torsten <mttl@mailbox.org>
parents: 25985
diff changeset
174 QAction *m_action_zoom_original;
25042
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
175 };
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
176 }
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
177
ba5af45bbfc4 documentation widget based on qt help engine (bug #53006)
Torsten <mttl@mailbox.org>
parents:
diff changeset
178 #endif