comparison libgui/src/m-editor/file-editor-tab.cc @ 17635:7945344506ae

Add possibility to run selected text of the editor in the terminal * octave-qscintilla.cc(contextMenuEvent): new context menu for running selection (context_run): function for run selection action in editor file menu; (contextmenu_run): new slot for context menu run selection; * octave-qscintilla.h: new functions context_run, contextmenu_run * file-editor-tab.cc(context_run): new slot for run menu action * file-editor-tab.h: new slot context_run * file-editor.cc(request_context_run): new slot for run menu entry; (construct): new entry in run menu for running the selection in editor (add_file_editor_tab): connect new signal fetab_context_run to the new slot context_run in file_editor_tab; (set_shortcuts): enable/disable new shortcut when editor focus changes (check_actions): enable/disable new action depending on existing tabs * file-editor.h: new signal fetab_context_run, new slot request_context_edit, new run action
author Torsten <ttl@justmail.de>
date Fri, 11 Oct 2013 22:46:32 +0200
parents 99ffa521ecec
children 230ffaf80ac9
comparison
equal deleted inserted replaced
17634:bdbf91c0a1a4 17635:7945344506ae
482 QFileInfo info (_file_name); 482 QFileInfo info (_file_name);
483 emit run_file_signal (info); 483 emit run_file_signal (info);
484 } 484 }
485 485
486 void 486 void
487 file_editor_tab::context_run (const QWidget *ID)
488 {
489 if (ID != this)
490 return;
491
492 _edit_area->context_run ();
493 }
494
495 void
487 file_editor_tab::toggle_bookmark (const QWidget *ID) 496 file_editor_tab::toggle_bookmark (const QWidget *ID)
488 { 497 {
489 if (ID != this) 498 if (ID != this)
490 return; 499 return;
491 500