forked from GerhardHoffmann/DCLibraries
Start repository
This commit is contained in:
107
CArunGUI/win01_com.h
Executable file
107
CArunGUI/win01_com.h
Executable file
@@ -0,0 +1,107 @@
|
||||
#ifndef WINCOMPORT_H
|
||||
#define WINCOMPORT_H
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
#include <QGridLayout>
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
#include <QTabWidget>
|
||||
#include <QScrollBar>
|
||||
#include <QPlainTextEdit>
|
||||
#include <QComboBox>
|
||||
#include <QLabel>
|
||||
#include <QScrollArea>
|
||||
#include <QSerialPortInfo>
|
||||
#include <QWidget>
|
||||
#include <QListWidget>
|
||||
#include <QGroupBox>
|
||||
#include <QPushButton>
|
||||
#include <QRadioButton>
|
||||
//#include "tslib.h"
|
||||
//#include "stepList.h" // define all working chain steps here
|
||||
//#include "datei.h"
|
||||
#include "plugin.h"
|
||||
//#include "globVars.h"
|
||||
|
||||
class Console : public QPlainTextEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Console(QWidget *parent = nullptr);
|
||||
|
||||
void putData(const QByteArray &data);
|
||||
void putText(QString text);
|
||||
};
|
||||
|
||||
class T_winComPort : public QWidget // former TabComport
|
||||
{
|
||||
Q_OBJECT
|
||||
Console *myDiagWindow; // Ausgabefenster
|
||||
QComboBox *CB_portSel;
|
||||
//QComboBox *CB_baudSel;
|
||||
QPushButton *connectButton;
|
||||
QPushButton *AutSendButton;
|
||||
QPushButton *TestButton;
|
||||
QPushButton *refreshButton;
|
||||
|
||||
QLabel *LabelComState; // Statusanzeige
|
||||
QLabel *LabelPort;
|
||||
QLabel *LabelHandshakes;
|
||||
QLabel *LabelRecieveFrame;
|
||||
QLabel *LabelResults;
|
||||
QLabel *LabelDataState;
|
||||
QLabel *LabelDatif;
|
||||
|
||||
QGridLayout *myTabComLayout;
|
||||
void subPortInfo();
|
||||
hwinf *HWaccess;
|
||||
void updateGui(void);
|
||||
uint16_t myNextStep;
|
||||
uint8_t myStep;
|
||||
QTimer *myTO;
|
||||
|
||||
private slots:
|
||||
void callOpenSerial();
|
||||
void callCloseSerial();
|
||||
void callAutoSend();
|
||||
//void tabComTime100ms();
|
||||
void callConnectToggle();
|
||||
void getDcTestRS232();
|
||||
void callRefresh(void);
|
||||
|
||||
public:
|
||||
explicit T_winComPort(hwinf *HWaccess = nullptr, QWidget *parent = nullptr);
|
||||
bool work_ini(uint16_t *nextScreen, uint8_t *useNavi);
|
||||
// useNavi=0: no change
|
||||
// bit0,1: enable/disable button "next"
|
||||
// bit2,3: enable/disable button "home"
|
||||
// bit4,5: enable/disable button "back"
|
||||
bool working (uint16_t *nextScreen, uint8_t *useNavi);
|
||||
~T_winComPort();
|
||||
|
||||
void writeRSdiagBytes(const QByteArray &bytarray);
|
||||
void writeRSdiagText(QString text);
|
||||
void writeComState(const QString text);
|
||||
void writeDataState(const QString text);
|
||||
void setButtons4autoStart();
|
||||
|
||||
signals:
|
||||
void connectButtonPressed();
|
||||
void closeButtonPressed();
|
||||
void autoSendButtonIsOn();
|
||||
void autoSendButtonIsOff();
|
||||
|
||||
private slots:
|
||||
void newBaud(void); // just for test
|
||||
|
||||
public slots:
|
||||
void Nav_back(void);
|
||||
void Nav_home(void);
|
||||
void Nav_next(void);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user