Mercurial > octave-nkf
annotate libgui/src/qtinfo/webinfo.h @ 17744:d63878346099
maint: Update copyright notices for release.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 23 Oct 2013 22:09:27 -0400 |
parents | 359c5ca795cd |
children | 86c6ae5f969e |
rev | line source |
---|---|
16768 | 1 /* |
2 | |
3 Copyright (C) 2009 P. L. Lucas | |
17744
d63878346099
maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents:
17029
diff
changeset
|
4 Copyright (C) 2012-2013 Jacob Dawid |
16768 | 5 |
6 This file is part of Octave. | |
7 | |
8 Octave is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
10 Free Software Foundation; either version 3 of the License, or (at your | |
11 option) any later version. | |
12 | |
13 Octave is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
19 along with Octave; see the file COPYING. If not, see | |
20 <http://www.gnu.org/licenses/>. | |
21 | |
22 */ | |
23 | |
24 // Author: P. L. Lucas | |
25 // Author: 2012 Jacob Dawid <jacob.dawid@gmail.com> | |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
26 |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
27 #include <QTextBrowser> |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
28 #include "parser.h" |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
29 #include <QStackedWidget> |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
30 #include <QTabBar> |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
31 #include <QPushButton> |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
32 #include <QLineEdit> |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
33 #include <QCheckBox> |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
34 #include <QToolButton> |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
35 |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
36 class webinfo : public QWidget |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
37 { |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
38 Q_OBJECT |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
39 public: |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
40 webinfo (QWidget *parent = 0); |
15300
fd27e10b9b05
pass QString by const reference instead of value
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
41 void set_info_path (const QString& info_path); |
fd27e10b9b05
pass QString by const reference instead of value
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
42 void load_node (const QString& node_name); |
17029
359c5ca795cd
Display doc info pages using documentation browser when in GUI mode (Bug #39451)
John Donoghue <john.donoghue@ieee.org>
parents:
16881
diff
changeset
|
43 |
359c5ca795cd
Display doc info pages using documentation browser when in GUI mode (Bug #39451)
John Donoghue <john.donoghue@ieee.org>
parents:
16881
diff
changeset
|
44 void load_ref (const QString &ref_name); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
45 |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
46 public slots: |
15300
fd27e10b9b05
pass QString by const reference instead of value
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
47 void link_clicked (const QUrl& link); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
48 void current_tab_changed (int index); |
16529
faccc20d5f39
allow doc browser tabs to be moved and individually closed
John W. Eaton <jwe@octave.org>
parents:
15300
diff
changeset
|
49 void close_tab (int index); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
50 void search (); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
51 void zoom_in (); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
52 void zoom_out (); |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
53 |
16881
944ade6e7f66
Make main window copy and paste global for current focused window
John Donoghue <john.donoghue@ieee.org>
parents:
16768
diff
changeset
|
54 void copyClipboard (); |
944ade6e7f66
Make main window copy and paste global for current focused window
John Donoghue <john.donoghue@ieee.org>
parents:
16768
diff
changeset
|
55 void pasteClipboard (); |
944ade6e7f66
Make main window copy and paste global for current focused window
John Donoghue <john.donoghue@ieee.org>
parents:
16768
diff
changeset
|
56 |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
57 private: |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
58 QTextBrowser *_text_browser; |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
59 QTabBar *_tab_bar; |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
60 QStackedWidget *_stacked_widget; |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
61 QLineEdit *_search_line_edit; |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
62 QCheckBox *_search_check_box; |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
63 QToolButton *_zoom_in_button; |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
64 QToolButton *_zoom_out_button; |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
65 |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
66 parser _parser; |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
67 QFont _font_web; |
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
68 |
15300
fd27e10b9b05
pass QString by const reference instead of value
John W. Eaton <jwe@octave.org>
parents:
15196
diff
changeset
|
69 QTextBrowser *addNewTab (const QString& name); |
15055
48ae6a7c69c1
Integrated texinfo browser from QtOctave.
Jacob Dawid <jacob.dawid@gmail.com>
parents:
diff
changeset
|
70 }; |