Mercurial > jwe > qt-gui-with-push-parser
view qt-interpreter.cpp @ 15:79783f3e2017
use rl_display_prompt instead of rl_prompt
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 24 May 2019 09:22:29 -0400 |
parents | 1e5a1e15fa56 |
children |
line wrap: on
line source
#include <string> #include <QString> #include "interpreter.h" #include "qt-interpreter.h" namespace calc { qt_interpreter::qt_interpreter (void) : m_interpreter () { m_interpreter.set_error_handler ([this] (const char *msg) { emit this->error_signal (msg); }); m_interpreter.set_result_handler ([this] (double value) { emit this->result_ready (value); }); } void qt_interpreter::execute (void) { } void qt_interpreter::accept_input_line (const QString& line) { m_interpreter.parse_and_execute (line.toStdString ()); } }