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 /**--------------------------------------------------------------------------------------------------
11 \brief Provides the user access to sending or recieving data to a specified connection over a terminal
12 interface.
13 **/
14 class HARDWARE_WIDGETS_API TerminalDialog : public QPlainTextEdit, public LogStream
15 {
16 Q_OBJECT
17 public:
18 explicit TerminalDialog(QWidget* parent = nullptr);
19 void putData(const String& data);
20 void setAutoPullData(bool set);
21 void setAutoPushData(bool set);
22 void setConnection(Connection* connection, bool add_all);
23 virtual void setProgress(fltp04) override { };
24 virtual void addMessage(const LogMessage& message) override;
25 void setCommandTermination(const String& termination);
26 void setAutoEcho(bool auto_echo);
27 signals:
28 void getData(const QByteArray& data);
29 protected:
30 void keyPressEvent(QKeyEvent* e) override;
31 void mousePressEvent(QMouseEvent* e) override;
32 void mouseDoubleClickEvent(QMouseEvent* e) override;
33 void contextMenuEvent(QContextMenuEvent* e) override;
34 protected slots:
36 private:
37 String m_data_to_push;
38 String m_command_termination = "\n";
39 QPointer<Connection> m_connection;
40 bool m_auto_pull_data = false;
41 bool m_auto_push_data = false;
42 bool m_ignore_next_tx = false;
43 bool m_auto_echo = false;
44 };
45}
#define HARDWARE_WIDGETS_API
Definition DLLInfo.h:56
A standard interface for all types of connections that allow transmitting and recieving of data betwe...
Definition Connection.h:198
A class that allows for specific log information to be conveyed to a ProgressInfo object including in...
Definition LogMessage.h:44
A class that listens to a log object and processes the updates in a specified way....
Definition LogStream.h:46
The core String class for the NDEVR API.
Definition String.h:69
Provides the user access to sending or recieving data to a specified connection over a terminal inter...
Definition TerminalDialog.h:15
void setAutoEcho(bool auto_echo)
TerminalDialog(QWidget *parent=nullptr)
void setAutoPullData(bool set)
void setConnection(Connection *connection, bool add_all)
void mousePressEvent(QMouseEvent *e) override
void putData(const String &data)
virtual void addMessage(const LogMessage &message) override
void setCommandTermination(const String &termination)
void keyPressEvent(QKeyEvent *e) override
void contextMenuEvent(QContextMenuEvent *e) override
void mouseDoubleClickEvent(QMouseEvent *e) override
virtual void setProgress(fltp04) override
Definition TerminalDialog.h:23
void getData(const QByteArray &data)
void setAutoPushData(bool set)
Definition ACIColor.h:37
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127