GNU Octave  4.4.1
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
documentation.h
Go to the documentation of this file.
1 /*
2 
3 Copyright (C) 2018 Torsten <mttl@maibox.org>
4 
5 This file is part of Octave.
6 
7 Octave is free software: you can redistribute it and/or modify it
8 under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Octave is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with Octave; see the file COPYING. If not, see
19 <https://www.gnu.org/licenses/>.
20 
21 */
22 
23 #if ! defined (octave_documentation_h)
24 #define octave_documentation_h 1
25 
26 #include <QComboBox>
27 #include <QWidget>
28 #include <QSettings>
29 #include <QSplitter>
30 #include <QTextBrowser>
31 #include <QtHelp/QHelpEngine>
32 
33 namespace octave
34 {
35  // The documentation browser
37  {
38  Q_OBJECT
39 
40  public:
41 
42  documentation_browser (QHelpEngine *help_engine, QWidget *parent = nullptr);
44 
45  virtual QVariant loadResource (int type, const QUrl &url);
46 
47  public slots:
48 
49  void handle_index_clicked (const QUrl& url,
50  const QString& keyword = QString ());
51  void notice_settings (const QSettings *settings);
52 
53  private:
54 
55  QHelpEngine *m_help_engine;
56 
57  };
58 
59 
60  // The documentaiton main class (splitter)
61  class documentation : public QSplitter
62  {
63  Q_OBJECT
64 
65  public:
66 
67  documentation (QWidget *parent = nullptr);
68  ~documentation (void);
69 
70  public slots:
71 
72  void notice_settings (const QSettings *settings);
73 
74  void copyClipboard (void);
75  void pasteClipboard (void);
76  void selectAll (void);
77 
78  void load_ref (const QString & name);
79  void registerDoc (const QString & name);
80  void unregisterDoc (const QString & name);
81 
82  private slots:
83 
84  void global_search (void);
85  void global_search_started (void);
86  void global_search_finished (int hits);
87  void filter_update (const QString& expression);
88  void filter_update_history (void);
89  void find_forward (void);
90  void find_backward (void);
91  void find_forward_from_anchor (const QString& text);
92  void record_anchor_position (void);
94 
95  private:
96 
97  QHelpEngine *m_help_engine;
101  QComboBox *m_filter;
102  QString m_collection;
103 
104  };
105 
106 }
107 
108 #endif
QHelpEngine * m_help_engine
Definition: documentation.h:97
void filter_update_history(void)
void find_forward_from_anchor(const QString &text)
void handle_index_clicked(const QUrl &url, const QString &keyword=QString())
void notice_settings(const QSettings *settings)
void registerDoc(const QString &name)
void filter_update(const QString &expression)
nd deftypefn *std::string name
Definition: sysdep.cc:647
void unregisterDoc(const QString &name)
virtual QVariant loadResource(int type, const QUrl &url)
void record_anchor_position(void)
void handle_cursor_position_change(void)
void load_ref(const QString &name)
void notice_settings(const QSettings *settings)
idx type
Definition: ov.cc:3114
documentation_browser * m_doc_browser
Definition: documentation.h:98
std::string url
Definition: urlwrite.cc:118
documentation(QWidget *parent=nullptr)
documentation_browser(QHelpEngine *help_engine, QWidget *parent=nullptr)
QLineEdit * m_find_line_edit
Definition: documentation.h:99
void global_search_started(void)
void global_search_finished(int hits)