API Documentation
Loading...
Searching...
No Matches
TerminalDialog.h
Go to the documentation of this file.
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/String.h>
4#include <NDEVR/LogStream.h>
5#include <QPlainTextEdit>
6namespace NDEVR
7{
8 class String;
9 class Connection;
10 class HARDWARE_WIDGETS_API TerminalDialog : public QPlainTextEdit, public LogStream
11 {
12 Q_OBJECT
13 public:
14 explicit TerminalDialog(QWidget* parent = nullptr);
15 void putData(const String& data);
16 void setAutoPullData(bool set);
17 void setAutoPushData(bool set);
18 void setConnection(Connection* connection, bool add_all);
19 virtual void setProgress(fltp04) override { };
20 virtual void addMessage(const LogMessage& message) override;
21 void setCommandTermination(const String& termination);
22 void setAutoEcho(bool auto_echo);
23 signals:
24 void getData(const QByteArray& data);
25 protected:
26 void keyPressEvent(QKeyEvent* e) override;
27 void mousePressEvent(QMouseEvent* e) override;
28 void mouseDoubleClickEvent(QMouseEvent* e) override;
29 void contextMenuEvent(QContextMenuEvent* e) override;
30 protected slots:
31 void pullDataSlot();
32 private:
33 String m_data_to_push;
34 String m_command_termination = "\n";
35 QPointer<Connection> m_connection;
36 bool m_auto_pull_data = false;
37 bool m_auto_push_data = false;
38 bool m_ignore_next_tx = false;
39 bool m_auto_echo = false;
40 };
41}
#define HARDWARE_WIDGETS_API
Definition DLLInfo.h:74
Definition Connection.h:171
Definition LogMessage.h:40
Definition LogStream.h:42
Definition String.h:40
Definition TerminalDialog.h:11
virtual void setProgress(fltp04) override
Definition TerminalDialog.h:19
void getData(const QByteArray &data)
Definition ACIColor.h:37
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157