GNU Octave  4.4.1
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-2018 Jacob Dawid
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 (HAVE_CONFIG_H)
24 # include "config.h"
25 #endif
26 
28 
29 #include "help.h"
30 #include "interpreter-private.h"
31 
32 namespace octave
33 {
36  {
37  setObjectName ("DocumentationDockWidget");
38  setWindowIcon (QIcon (":/actions/icons/logo.png"));
39  set_title (tr ("Documentation"));
40  setStatusTip (tr ("See the documentation for help."));
41 
42  m_docs = new octave::documentation (this);
43  setWidget (m_docs);
44 
45  connect (p, SIGNAL (show_doc_signal (const QString&)),
46  this, SLOT (showDoc (const QString&)));
47 
48  connect (p, SIGNAL (register_doc_signal (const QString&)),
49  this, SLOT (registerDoc (const QString&)));
50 
51  connect (p, SIGNAL (unregister_doc_signal (const QString&)),
52  this, SLOT (unregisterDoc (const QString&)));
53  }
54 
56  {
57  if (m_docs)
58  delete m_docs;
59  }
60 
61  void documentation_dock_widget::notice_settings (const QSettings *settings)
62  {
63  m_docs->notice_settings (settings);
64  }
65 
67  {
69  }
70 
72  {
74  }
75 
77  {
78  m_docs->selectAll ();
79  }
80 
82  {
83  // show the doc pane without focus for carrying on typing in the console
84  if (! isVisible ())
85  setVisible (true);
86 
87  raise ();
88 
89  m_docs->load_ref (name);
90  }
91 
93  {
95  }
96 
98  {
100  }
101 }
void registerDoc(const QString &name)
nd deftypefn *std::string name
Definition: sysdep.cc:647
void unregisterDoc(const QString &name)
void load_ref(const QString &name)
void notice_settings(const QSettings *settings)
void set_title(const QString &)
documentation_dock_widget(QWidget *parent=nullptr)
p
Definition: lu.cc:138
void notice_settings(const QSettings *settings)