GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
documentation-dock-widget.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 2011-2023 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if defined (HAVE_CONFIG_H)
27 # include "config.h"
28 #endif
29 
31 
32 #include "help.h"
33 
35 
37  base_qobject& oct_qobj)
38 : octave_dock_widget ("DocumentationDockWidget", p, oct_qobj),
39  m_docs (new documentation (this, oct_qobj))
40 {
41  set_title (tr ("Documentation"));
42  setStatusTip (tr ("See the documentation for help."));
43 
44  setWidget (m_docs);
45 
46  if (! p)
47  make_window ();
48 }
49 
51 {
53 }
54 
56 {
59 }
60 
62 {
64 }
65 
67 {
69 }
70 
72 {
73  m_docs->selectAll ();
74 }
75 
76 void documentation_dock_widget::showDoc (const QString& name)
77 {
78  // show the doc pane without focus for carrying on typing in the console
79  if (! isVisible ())
80  setVisible (true);
81 
82  raise ();
83 
84  m_docs->load_ref (name);
85 }
86 
87 void documentation_dock_widget::registerDoc (const QString& name)
88 {
89  m_docs->registerDoc (name);
90 }
91 
92 void documentation_dock_widget::unregisterDoc (const QString& name)
93 {
94  m_docs->unregisterDoc (name);
95 }
96 
OCTAVE_END_NAMESPACE(octave)
Base class for Octave interfaces that use Qt.
void showDoc(const QString &name)
void notice_settings(const gui_settings *settings)
void unregisterDoc(const QString &name)
void registerDoc(const QString &name)
The documentation main class derived from QSplitter.
Definition: documentation.h:99
void pasteClipboard(void)
void notice_settings(const gui_settings *settings)
void copyClipboard(void)
void save_settings(void)
void load_ref(const QString &name=QString())
void unregisterDoc(const QString &name)
void registerDoc(const QString &name)
void selectAll(void)
virtual void save_settings(void)
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn