Mercurial > jwe > qt-gui-with-push-parser
view qt-interpreter.h @ 12:894be158b32d
define parser as a class and eliminate some global variables
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 23 May 2019 17:57:20 -0400 |
parents | 04867eba6428 |
children |
line wrap: on
line source
#if ! defined (calc_qt_interpreter_h) #define calc_qt_interpreter_h 1 #include <QObject> #include <QString> #include "interpreter.h" namespace calc { class qt_interpreter : public QObject { Q_OBJECT public: qt_interpreter (void); ~qt_interpreter (void) = default; qt_interpreter (const qt_interpreter&) = delete; qt_interpreter& operator = (const qt_interpreter&) = delete; interpreter& get_interpreter (void) { return m_interpreter; } signals: void result_ready (double); void error_signal (const QString&); public slots: void execute (void); void accept_input_line (const QString& line); private: interpreter m_interpreter; }; } #endif