-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconsole.h
48 lines (36 loc) · 853 Bytes
/
console.h
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
// ******************************************************
// * copyright (C) 2017 by Reinhardt Behm/rbehm@hushmail.com
// * All Rights reserved
// * created 1/25/2017 by behm
// ******************************************************
#ifndef CONSOLE
#define CONSOLE
class Console : public QPlainTextEdit
{
Q_OBJECT
public:
explicit Console(QWidget *parent = 0);
void closeIt() { m_close = true; }
signals:
void sendSerial(QByteArray bytes);
void beep();
public slots:
void clear();
void charRxd(char ch);
void sendDate();
private:
void sendPort(QString s);
bool isEnabled;
int maxcol;
int maxrow;
int wrapMode;
int tabsize;
bool m_close; // may close
protected:
void keyPressEvent(QKeyEvent *event);
void resizeEvent(QResizeEvent *e);
// QWidget interface
protected:
virtual void closeEvent(QCloseEvent *ev);
};
#endif