-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotebook_app.hpp
More file actions
49 lines (37 loc) · 823 Bytes
/
notebook_app.hpp
File metadata and controls
49 lines (37 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef NOTEBOOK_APP_HPP
#define NOTEBOOK_APP_HPP
#include <QWidget>
#include <QPushButton>
#include <QTimer>
#include <fstream>
#include "input_widget.hpp"
#include "output_widget.hpp"
#include "threaded_interpreter.hpp"
class NotebookApp: public QWidget {
Q_OBJECT
public:
NotebookApp(QWidget* parent = nullptr);
void initButtons();
private:
InputWidget* input;
OutputWidget* output;
QHBoxLayout* kernelControlButtons;
QPushButton* startBtn;
QPushButton* stopBtn;
QPushButton* resetBtn;
QPushButton* interruptBtn;
InputQueue iq;
OutputQueue oq;
QTimer* outputTimer;
ThreadedInterpreter interp;
private slots:
void process(const QString& str);
void checkOutput();
void startKernel();
void stopKernel();
void resetKernel();
void interruptKernel();
signals:
void outputProcessed();
};
#endif