Mercurial > octave
comparison libgui/src/command-widget.cc @ 31647:431f80aba37a
maint: Merge stable to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 06 Dec 2022 15:37:43 -0500 |
parents | ad014fc78bd6 c6d54dd31a7e |
children | deb553ac2c54 |
comparison
equal
deleted
inserted
replaced
31645:bd9da634f00d | 31647:431f80aba37a |
---|---|
47 #include "gui-settings.h" | 47 #include "gui-settings.h" |
48 #include "gui-utils.h" | 48 #include "gui-utils.h" |
49 #include "input.h" | 49 #include "input.h" |
50 #include "interpreter.h" | 50 #include "interpreter.h" |
51 | 51 |
52 namespace octave | 52 OCTAVE_BEGIN_NAMESPACE(octave) |
53 { | 53 |
54 command_widget::command_widget (base_qobject& oct_qobj, QWidget *p) | 54 command_widget::command_widget (base_qobject& oct_qobj, QWidget *p) |
55 : QWidget (p), m_incomplete_parse (false), | 55 : QWidget (p), m_incomplete_parse (false), |
56 m_prompt (QString ()), | 56 m_prompt (QString ()), |
57 m_console (new console (this, oct_qobj)) | 57 m_console (new console (this, oct_qobj)) |
58 { | 58 { |
166 QColor bgc = settings.color_value (cs_colors[1], mode); | 166 QColor bgc = settings.color_value (cs_colors[1], mode); |
167 | 167 |
168 m_console->setStyleSheet (QString ("color: %1; background-color:%2;") | 168 m_console->setStyleSheet (QString ("color: %1; background-color:%2;") |
169 .arg (fgc.name ()).arg (bgc.name ())); | 169 .arg (fgc.name ()).arg (bgc.name ())); |
170 } | 170 } |
171 | |
172 | 171 |
173 // The console itself using QScintilla. | 172 // The console itself using QScintilla. |
174 // This implementation is partly based on the basic concept of | 173 // This implementation is partly based on the basic concept of |
175 // "qpconsole" as proposed by user "DerManu" in the Qt-forum thread | 174 // "qpconsole" as proposed by user "DerManu" in the Qt-forum thread |
176 // https://forum.qt.io/topic/28765/command-terminal-using-qtextedit | 175 // https://forum.qt.io/topic/28765/command-terminal-using-qtextedit |
302 m_last_key_string = e->text (); | 301 m_last_key_string = e->text (); |
303 QsciScintilla::keyPressEvent(e); | 302 QsciScintilla::keyPressEvent(e); |
304 } | 303 } |
305 } | 304 } |
306 | 305 |
307 } | 306 OCTAVE_END_NAMESPACE(octave) |
308 | 307 |
309 #endif | 308 #endif |