diff --git a/DCPlugin.pro b/DCPlugin.pro index b968520..817abf8 100644 --- a/DCPlugin.pro +++ b/DCPlugin.pro @@ -4,7 +4,7 @@ CONFIG += plugin #CONFIG -= app_bundle #QT += widgets QT -= gui -QT += widgets serialport +QT += serialport INCLUDEPATH += $${PWD}/plugins INCLUDEPATH += $${PWD}/include diff --git a/include/com.h b/include/com.h index 69a8ea4..44b0021 100644 --- a/include/com.h +++ b/include/com.h @@ -3,7 +3,7 @@ #ifndef SER_H #define SER_H #include -#include +#include #include #include #include @@ -15,7 +15,7 @@ // display all inputs and outputs in output window: //#define PRINTALLDEBUGS 1 -class T_com : public QMainWindow //, public QPlainTextEdit +class T_com : public QObject //, public QPlainTextEdit { Q_OBJECT @@ -45,7 +45,7 @@ private slots: public: - T_com(QWidget *parent = nullptr); + T_com(QObject *parent = nullptr); ~T_com(); QTimer *serRecTime; diff --git a/include/datIf.h b/include/datIf.h index 465691f..f1f2c07 100644 --- a/include/datIf.h +++ b/include/datIf.h @@ -12,7 +12,7 @@ #include "dcBL.h" -#include +#include #include #include #include @@ -278,7 +278,7 @@ -class T_datif : public QMainWindow +class T_datif : public QObject { Q_OBJECT @@ -315,7 +315,7 @@ private slots: void StoredRecData(); public: - T_datif(QWidget *parent = nullptr); + T_datif(QObject *parent = nullptr); T_prot *getProt() { return myDCIF; } T_prot const *getProt() const { return myDCIF; } diff --git a/include/prot.h b/include/prot.h index 93304c0..33a9845 100644 --- a/include/prot.h +++ b/include/prot.h @@ -3,7 +3,7 @@ #define SERIAL_FRAME_H #include -#include +#include #include #include #include "tslib.h" @@ -43,7 +43,7 @@ #define STARTSIGN_RECEIVE_LONG 0x5D -class T_prot : public QMainWindow +class T_prot : public QObject { Q_OBJECT diff --git a/src/com.cpp b/src/com.cpp index 8c28383..6ba7d3e 100644 --- a/src/com.cpp +++ b/src/com.cpp @@ -49,7 +49,7 @@ bool T_com::readFromSerial(QByteArray &data, uint16_t &sendLength) // ------------------------------------------------------------------------------------------------------------- -T_com::T_com(QWidget *parent) : QMainWindow(parent) +T_com::T_com(QObject *parent) : QObject(parent) { // port settings come from tabCom->Sdata->serial diff --git a/src/datIf.cpp b/src/datIf.cpp index 9075f82..a1490c8 100644 --- a/src/datIf.cpp +++ b/src/datIf.cpp @@ -19,7 +19,7 @@ static uint8_t cycl_running; //static bool datif_DCdataValid; -T_datif::T_datif(QWidget *parent) : QMainWindow(parent) +T_datif::T_datif(QObject *parent) : QObject(parent) { myDCIF = new T_prot();