Remove dependency to QWidget / QMainWindow
This not GUI library!
This commit is contained in:
parent
88cc71e05f
commit
75b597586f
@ -4,7 +4,7 @@ CONFIG += plugin
|
|||||||
#CONFIG -= app_bundle
|
#CONFIG -= app_bundle
|
||||||
#QT += widgets
|
#QT += widgets
|
||||||
QT -= gui
|
QT -= gui
|
||||||
QT += widgets serialport
|
QT += serialport
|
||||||
|
|
||||||
INCLUDEPATH += $${PWD}/plugins
|
INCLUDEPATH += $${PWD}/plugins
|
||||||
INCLUDEPATH += $${PWD}/include
|
INCLUDEPATH += $${PWD}/include
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#ifndef SER_H
|
#ifndef SER_H
|
||||||
#define SER_H
|
#define SER_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <QMainWindow>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QSerialPort>
|
#include <QSerialPort>
|
||||||
@ -15,7 +15,7 @@
|
|||||||
// display all inputs and outputs in output window:
|
// display all inputs and outputs in output window:
|
||||||
//#define PRINTALLDEBUGS 1
|
//#define PRINTALLDEBUGS 1
|
||||||
|
|
||||||
class T_com : public QMainWindow //, public QPlainTextEdit
|
class T_com : public QObject //, public QPlainTextEdit
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ private slots:
|
|||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
T_com(QWidget *parent = nullptr);
|
T_com(QObject *parent = nullptr);
|
||||||
~T_com();
|
~T_com();
|
||||||
|
|
||||||
QTimer *serRecTime;
|
QTimer *serRecTime;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "dcBL.h"
|
#include "dcBL.h"
|
||||||
|
|
||||||
|
|
||||||
#include <QMainWindow>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
@ -278,7 +278,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
class T_datif : public QMainWindow
|
class T_datif : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -315,7 +315,7 @@ private slots:
|
|||||||
void StoredRecData();
|
void StoredRecData();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
T_datif(QWidget *parent = nullptr);
|
T_datif(QObject *parent = nullptr);
|
||||||
|
|
||||||
T_prot *getProt() { return myDCIF; }
|
T_prot *getProt() { return myDCIF; }
|
||||||
T_prot const *getProt() const { return myDCIF; }
|
T_prot const *getProt() const { return myDCIF; }
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#define SERIAL_FRAME_H
|
#define SERIAL_FRAME_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <QMainWindow>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include "tslib.h"
|
#include "tslib.h"
|
||||||
@ -43,7 +43,7 @@
|
|||||||
#define STARTSIGN_RECEIVE_LONG 0x5D
|
#define STARTSIGN_RECEIVE_LONG 0x5D
|
||||||
|
|
||||||
|
|
||||||
class T_prot : public QMainWindow
|
class T_prot : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -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
|
// port settings come from tabCom->Sdata->serial
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ static uint8_t cycl_running;
|
|||||||
|
|
||||||
//static bool datif_DCdataValid;
|
//static bool datif_DCdataValid;
|
||||||
|
|
||||||
T_datif::T_datif(QWidget *parent) : QMainWindow(parent)
|
T_datif::T_datif(QObject *parent) : QObject(parent)
|
||||||
{
|
{
|
||||||
|
|
||||||
myDCIF = new T_prot();
|
myDCIF = new T_prot();
|
||||||
|
Loading…
Reference in New Issue
Block a user