Files
miniCashAll/libMiniCash/mcsender.h

59 lines
1.1 KiB
C
Raw Normal View History

2025-08-05 22:37:51 +02:00
/***************************************************************************
miniCashConnect
Copyright © 2022 christoph holzheuer
c.holzheuer@sourceworx.org
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
***************************************************************************/
#ifndef MCSENDER_H
#define MCSENDER_H
#include <QTcpSocket>
#include <QObject>
#include <libMiniCash.h>
/**
* @brief Ein angepasstes QTcpSocket zur Datenübertragung
*/
class LIBMINICASH_EXPORT MCSender : public QTcpSocket
{
Q_OBJECT
public:
MCSender();
virtual ~MCSender();
void setupConnection( const QString& host, int port );
signals:
void connectionChanged( miniCash::CState newState );
public slots:
void onCreateConnection();
void onDiscardConnection();
void onSendTransaction( const QString& transaction );
protected:
int _port = -1;
QString _host;
};
#endif // MCSENDER_H