Mercurial > octave
annotate libgui/src/m-editor/octave-qscintilla.cc @ 17627:811019b9ef57
Add help and documentation on actual keyword to the editor menu
* octave-qscintilla.cc(context_help_doc): new function for editor menu action;
(get_global_textcursor_pos): new function for calculationg the cursor pos;
(contextMenuEvent): uses get_global_textcursor_pos now, added context menu
entry for documentation;
(contextmenu_help,contextmenu_doc): slots for context menu;
(contextmenu_help_doc): new common function used from context_help_doc and the
context menu slots
* octave-qscintilla.h: new functions context_help_doc, contextmenu_doc,
contextmenu_help_doc, get_global_textcursor_pos
* file-editor-tab.cc(context_help): new slot for editor menu action
* file-editor-tab.h: new slot context_help
* file-editor.cc(request_context_help,request_context_doc): new slots for
help menu entries;
(construct): new help menu with keyword help and documentation;
(add_file_editor_tab): connect new signal fetab_context_help to the new
slot context_help in file_editor_tab;
(set_shortcuts): enable/disable new shortcuts when editor focus changes
(check_actions): enable/disable new actions depending on existing tabs
* file-editor.h: new signal fetab_context_help, new slots request_context_help
and request_contest_doc, new help and doc actions
author | Torsten <ttl@justmail.de> |
---|---|
date | Fri, 11 Oct 2013 13:05:06 +0200 |
parents | e2de3c8882be |
children | 99ffa521ecec |
rev | line source |
---|---|
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
1 /* |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
2 |
16768 | 3 Copyright (C) 2013 Torsten |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
4 |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
5 This file is part of Octave. |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
6 |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
7 Octave is free software; you can redistribute it and/or modify it |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
8 under the terms of the GNU General Public License as published by the |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
9 Free Software Foundation; either version 3 of the License, or (at your |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
10 option) any later version. |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
11 |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
15 for more details. |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
16 |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
17 You should have received a copy of the GNU General Public License |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
18 along with Octave; see the file COPYING. If not, see |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
19 <http://www.gnu.org/licenses/>. |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
20 |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
21 */ |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
22 |
16768 | 23 // Author: Torsten <ttl@justmail.de> |
24 | |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
25 #ifdef HAVE_CONFIG_H |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
26 #include <config.h> |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
27 #endif |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
28 |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
29 #ifdef HAVE_QSCINTILLA |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
30 |
16735
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
31 #include <Qsci/qscilexer.h> |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
32 |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
33 #include "octave-qscintilla.h" |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
34 #include "file-editor-tab.h" |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
35 |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
36 octave_qscintilla::octave_qscintilla (QWidget *p) |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
37 : QsciScintilla (p) |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
38 { } |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
39 |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
40 octave_qscintilla::~octave_qscintilla () |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
41 { } |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
42 |
17627
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
43 void |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
44 octave_qscintilla::get_global_textcursor_pos (QPoint *global_pos, QPoint *local_pos) |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
45 { |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
46 long position = SendScintilla (QsciScintillaBase::SCI_GETCURRENTPOS); |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
47 long point_x = SendScintilla |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
48 (QsciScintillaBase::SCI_POINTXFROMPOSITION,0,position); |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
49 long point_y = SendScintilla |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
50 (QsciScintillaBase::SCI_POINTYFROMPOSITION,0,position); |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
51 *local_pos = QPoint (point_x,point_y); // local cursor position |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
52 *global_pos = mapToGlobal (*local_pos); // global position of cursor |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
53 } |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
54 |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
55 // call documentation or help on the current word |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
56 void |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
57 octave_qscintilla::context_help_doc (bool documentation) |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
58 { |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
59 QPoint global_pos, local_pos; |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
60 get_global_textcursor_pos (&global_pos, &local_pos); |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
61 _word_at_cursor = wordAtPoint (local_pos); |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
62 QString lexer_name = lexer ()->lexer (); |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
63 if ((lexer_name == "octave" || lexer_name == "matlab") |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
64 && !_word_at_cursor.isEmpty ()) |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
65 contextmenu_help_doc (documentation); |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
66 } |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
67 |
16733
2723d1144f11
added test for qscintilla version 2.6.0
Torsten <ttl@justmail.de>
parents:
16731
diff
changeset
|
68 #ifdef HAVE_QSCI_VERSION_2_6_0 |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
69 // context menu requested |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
70 void |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
71 octave_qscintilla::contextMenuEvent (QContextMenuEvent *e) |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
72 { |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
73 QMenu *context_menu = createStandardContextMenu ( ); // standard menu |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
74 |
16735
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
75 // the menu's position |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
76 QPoint global_pos, local_pos; |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
77 |
16735
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
78 if (e->reason () == QContextMenuEvent::Mouse) |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
79 { // context menu by mouse |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
80 global_pos = e->globalPos (); // global mouse position |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
81 local_pos = e->pos (); // local mouse position |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
82 } |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
83 else |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
84 { // context menu by keyboard or other: get point of text cursor |
17627
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
85 get_global_textcursor_pos (&global_pos, &local_pos); |
16735
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
86 QRect editor_rect = geometry (); // editor rect mapped to global |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
87 editor_rect.moveTopLeft |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
88 (parentWidget ()->mapToGlobal (editor_rect.topLeft ())); |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
89 if (!editor_rect.contains (global_pos)) // is cursor outside editor? |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
90 global_pos = editor_rect.topLeft (); // yes, take top left corner |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
91 } |
16735
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
92 |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
93 // additional custom entries of the context menu |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
94 context_menu->addSeparator (); // separator before custom entries |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
95 |
16735
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
96 // help menu: get the position of the mouse or the text cursor |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
97 // (only for octave files) |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
98 QString lexer_name = lexer ()->lexer (); |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
99 if (lexer_name == "octave" || lexer_name == "matlab") |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
100 { |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
101 _word_at_cursor = wordAtPoint (local_pos); |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
102 if (!_word_at_cursor.isEmpty ()) |
17627
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
103 context_menu->addAction (tr ("Help on") + " " + _word_at_cursor, |
16735
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
104 this, SLOT (contextmenu_help (bool))); |
17627
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
105 context_menu->addAction (tr ("Documentation on") + " " + _word_at_cursor, |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
106 this, SLOT (contextmenu_doc (bool))); |
16735
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
107 } |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
108 |
cee305c91e91
show help menu in editors context menu only for octave files
Torsten <ttl@justmail.de>
parents:
16733
diff
changeset
|
109 // finaly show the menu |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
110 context_menu->exec (global_pos); |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
111 } |
16733
2723d1144f11
added test for qscintilla version 2.6.0
Torsten <ttl@justmail.de>
parents:
16731
diff
changeset
|
112 #endif |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
113 |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
114 |
17627
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
115 // handle the menu entry for calling help or doc |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
116 void |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
117 octave_qscintilla::contextmenu_doc (bool) |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
118 { |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
119 contextmenu_help_doc (true); |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
120 } |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
121 void |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
122 octave_qscintilla::contextmenu_help (bool) |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
123 { |
17627
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
124 contextmenu_help_doc (false); |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
125 } |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
126 |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
127 // common function with flag for documentation |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
128 void |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
129 octave_qscintilla::contextmenu_help_doc (bool documentation) |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
130 { |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
131 QString command; |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
132 if (documentation) |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
133 command = "doc "; |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
134 else |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
135 command = "help "; |
811019b9ef57
Add help and documentation on actual keyword to the editor menu
Torsten <ttl@justmail.de>
parents:
16768
diff
changeset
|
136 emit execute_command_in_terminal_signal (command + _word_at_cursor); |
16731
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
137 } |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
138 |
01d523d5f796
add help for word at mouse or text cursor to the editors context menu
Torsten <ttl@justmail.de>
parents:
diff
changeset
|
139 #endif |