-
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) · 922 Bytes
/
console.h
File metadata and controls
41 lines (32 loc) · 922 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
/****************************************************************************
**
** Copyright (C) 2018 Ivan Fesyuk
** Contact: https://eneus.github.io/
** https://github.com/eneus/
**
**
** $QT_BEGIN_LICENSE:BSD$
** MIT License Usage
**
****************************************************************************/
#ifndef CONSOLE_H
#define CONSOLE_H
#include <QPlainTextEdit>
class Console : public QPlainTextEdit
{
Q_OBJECT
signals:
void getData(const QByteArray &data);
public:
explicit Console(QWidget *parent = nullptr);
void putData(const QByteArray &data);
void setLocalEchoEnabled(bool set);
protected:
void keyPressEvent(QKeyEvent *e) override;
void mousePressEvent(QMouseEvent *e) override;
void mouseDoubleClickEvent(QMouseEvent *e) override;
void contextMenuEvent(QContextMenuEvent *e) override;
private:
bool m_localEchoEnabled = false;
};
#endif // CONSOLE_H