first re-commit.

This commit is contained in:
2025-08-05 22:37:51 +02:00
commit 5295a82aa3
109 changed files with 9928 additions and 0 deletions

66
libMiniCash/mcreceiver.h Normal file
View File

@@ -0,0 +1,66 @@
/***************************************************************************
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 MCRECEIVER_H
#define MCRECEIVER_H
#include <QTcpServer>
#include <QWidget>
#include <libMiniCash.h>
/**
* @brief Ein angespasster QTcpServer
*/
class LIBMINICASH_EXPORT MCReceiver : public QTcpServer
{
Q_OBJECT
public:
explicit MCReceiver() = default;
virtual ~MCReceiver();
void setupConnection( int port );
public slots:
void onCreateConnection();
void onDiscardConnection();
signals:
void connectionChanged( miniCash::CState newState );
void newTransaction( QString data );
protected slots:
void onNewConnection();
void onReadReady();
void onSocketDisconnected();
protected:
void appendToSocketList(QTcpSocket* socket);
int _port = -1;
QSet<QTcpSocket*> _connections;
};
#endif // MCRECEIVER_H