Mercurial > jwe > qt-gui-with-push-parser
view qt-interpreter.cpp @ 14:1e5a1e15fa56
clean up header files, more small readline changes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 23 May 2019 18:41:04 -0400 |
parents | 04867eba6428 |
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 ()); } }