Mercurial > octave
comparison libgui/src/main-window.cc @ 31067:5261a81765b0
merge input and output of exp. terminal widget into one widget
* command-widget.cc (command_widget): remove obsolete elements, use
new class console as terminal, update initializations;
(init_command_prompt): display the first prompt, this function is
called when the interpreter is ready (via main_window);
(update_prompt): prompt is a QString now;
(insert_interpreter_output): use m_console instead of m_output_display;
(accept_input_line): moved to console;
(process_input_line): string of input line is passed as argument,
a new prompt is provided when interpreter is ready
(notice_settings): update for m_console, remove color and configuration
of obsolete line edit
(console::console): initializations, create and set QTextDocument;
(console::new_command_line): Prepare a new command line with prompt;
(console::accept_command_line): get input string and pass it to
m_command_widget for processing;
(console::append_block): append a text block to the document;
(console::keyPressEvent): re-implement key event for filtering
return, on which accept_input_line is called
* command-widget.h: new class console, update some function arguments
* main-window.cc (handle_octave_ready) call init_command_prompt of
terminal_dock_widget
* terminal-dock-widget.cc (init_command_prompt): new function calling
related function of the command widget
* terminal-dock-widget.h: new function init_command_prompt
author | Torsten Lilge <ttl-octave@mailbox.org> |
---|---|
date | Sat, 04 Jun 2022 21:52:20 +0200 |
parents | a0c8c28c38cb |
children | 0b402f523f09 |
comparison
equal
deleted
inserted
replaced
31066:74d97efb7573 | 31067:5261a81765b0 |
---|---|
1804 | 1804 |
1805 evmgr.update_prompt (command_editor::decode_prompt_string (prompt)); | 1805 evmgr.update_prompt (command_editor::decode_prompt_string (prompt)); |
1806 }); | 1806 }); |
1807 } | 1807 } |
1808 | 1808 |
1809 m_command_window->init_command_prompt (); | |
1809 focus_command_window (); // make sure that the command window has focus | 1810 focus_command_window (); // make sure that the command window has focus |
1810 } | 1811 } |
1811 | 1812 |
1812 void main_window::handle_set_path_dialog_request (void) | 1813 void main_window::handle_set_path_dialog_request (void) |
1813 { | 1814 { |