Use QSettings parameter in constructor

This commit is contained in:
Gerhard Hoffmann 2023-11-13 13:47:22 +01:00
parent e6d7e7a536
commit e52813b78f

View File

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