Use QSettings parameter in constructor
This commit is contained in:
parent
e6d7e7a536
commit
e52813b78f
@ -4,13 +4,13 @@
|
|||||||
#include "com_interface.h"
|
#include "com_interface.h"
|
||||||
#include "VMC/ReceiveBuffer.h"
|
#include "VMC/ReceiveBuffer.h"
|
||||||
#include "SendBuffer.h"
|
#include "SendBuffer.h"
|
||||||
#include "support/VendingData.h"
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QStateMachine>
|
#include <QStateMachine>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
#include <QSettings>
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
|
|
||||||
@ -142,11 +142,11 @@
|
|||||||
#define ACK 0x06
|
#define ACK 0x06
|
||||||
#define NACK 0x15
|
#define NACK 0x15
|
||||||
|
|
||||||
class AppControl;
|
|
||||||
class ReceiveBuffer;
|
class ReceiveBuffer;
|
||||||
class SendBuffer;
|
class SendBuffer;
|
||||||
class HMI;
|
|
||||||
class ATBHMIconfig;
|
using FormatedStringList = QList<QByteArray>;
|
||||||
|
|
||||||
|
|
||||||
class VMC : public QObject
|
class VMC : public QObject
|
||||||
{
|
{
|
||||||
@ -154,12 +154,11 @@ class VMC : public QObject
|
|||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AppControl *main;
|
QObject *m_appControl;
|
||||||
COM_interface *com_interface;
|
COM_interface *com_interface;
|
||||||
ReceiveBuffer *receiveBuffer;
|
ReceiveBuffer *receiveBuffer;
|
||||||
SendBuffer *sendBuffer;
|
SendBuffer *sendBuffer;
|
||||||
|
QSettings const *m_settings;
|
||||||
ATBHMIconfig *config;
|
|
||||||
|
|
||||||
// internal: write a ByteArray to com-port:
|
// internal: write a ByteArray to com-port:
|
||||||
int SendMessage(QByteArray ba, bool enqueue = false);
|
int SendMessage(QByteArray ba, bool enqueue = false);
|
||||||
@ -193,8 +192,8 @@ private slots:
|
|||||||
void skipDiscount();
|
void skipDiscount();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit VMC(QObject *parent = nullptr);
|
explicit VMC(QObject *eventReceiver, QSettings const *settings,
|
||||||
VMC(AppControl *main, ATBHMIconfig *config, QObject *parent = nullptr);
|
QObject *parent = nullptr);
|
||||||
~VMC();
|
~VMC();
|
||||||
|
|
||||||
int SendMessage(QString msg);
|
int SendMessage(QString msg);
|
||||||
|
Loading…
Reference in New Issue
Block a user