-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconsole.h
More file actions
41 lines (32 loc) · 941 Bytes
/
console.h
File metadata and controls
41 lines (32 loc) · 941 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
/****************************************************************************
**
**
****************************************************************************/
#ifndef CONSOLE_H
#define CONSOLE_H
#include "laser_message.h"
#include <QPlainTextEdit>
class Console : public QPlainTextEdit
{
Q_OBJECT
signals:
void getData(const QByteArray &data);
public:
explicit Console(QWidget *parent = 0);
void putData(const QByteArray &data);
void putData(const QString &str);
void putData(const laser_message &msg);
void setLocalEchoEnabled(bool set);
std::string cmd;
protected:
virtual void keyPressEvent(QKeyEvent *e);
virtual void mousePressEvent(QMouseEvent *e);
virtual void mouseDoubleClickEvent(QMouseEvent *e);
virtual void contextMenuEvent(QContextMenuEvent *e);
private:
bool localEchoEnabled;
QScrollBar *bar;
public slots:
void print_error(int);
};
#endif // CONSOLE_H