first re-commit.
This commit is contained in:
89
miniCashConnect/mcconnectmainwindow.h
Normal file
89
miniCashConnect/mcconnectmainwindow.h
Normal file
@@ -0,0 +1,89 @@
|
||||
/***************************************************************************
|
||||
|
||||
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 MCCONNECTMAINWINDOW_H
|
||||
#define MCCONNECTMAINWINDOW_H
|
||||
|
||||
|
||||
#include <mcmainwindowbase.h>
|
||||
#include <mctransactionview.h>
|
||||
#include <mcreceiver.h>
|
||||
#include <mcsender.h>
|
||||
|
||||
#include <ui_mcconnectmainwindow.h>
|
||||
|
||||
|
||||
/**
|
||||
* @brief MainWindow der miniCashConnect-Anwendung.
|
||||
*
|
||||
* Erbt von MCMainWindowBase und stellt die Implementierung der Nutzeroberfläche
|
||||
* zur Verfügung.
|
||||
*/
|
||||
|
||||
class MCConnectMainWindow : public MCMainWindowBase, private Ui_MCConnectMainWindow
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
explicit MCConnectMainWindow( QWidget* parent = nullptr );
|
||||
virtual ~MCConnectMainWindow();
|
||||
|
||||
signals:
|
||||
|
||||
//void stopNetwork();
|
||||
void startNetwork();
|
||||
|
||||
public slots:
|
||||
|
||||
void onShowNetworkDialog();
|
||||
void onStateChanged( miniCash::CState state );
|
||||
void onConnectionError( QAbstractSocket::SocketError socketError );
|
||||
/// ref??
|
||||
void onTransactionReceived( const QString& transaction );
|
||||
|
||||
protected slots:
|
||||
|
||||
void onSetup() override; /// Programmeinstellungen vornehmen
|
||||
|
||||
void onInputTransactions(); /// Eingabemaske, hier als StackedWidget
|
||||
void onViewTransactions(); /// im Server(==Receiver) Modus: ankommende Transaktionen anzeigen
|
||||
void onEditTransactions() override; /// Alle Transaktionen durchsuchen und editieren
|
||||
void onStartBilling() override; /// Kassieren beenden, Abrechnungsmodus starten
|
||||
void onHelpAbout() override; /// Kurzinfo anzeigen
|
||||
|
||||
protected:
|
||||
|
||||
void showEvent( QShowEvent* event ) override;
|
||||
void setupNetwork();
|
||||
|
||||
int _sentTransCount = 0; /// Anzahl der Transaktionen (== Verkäufe) die übers Netz gesendet wurden
|
||||
|
||||
QString _host;
|
||||
int _port;
|
||||
|
||||
bool _isSender = false;
|
||||
bool _isReceiver = false;
|
||||
bool _showDlg = false;
|
||||
|
||||
MCSender _tcpSender;
|
||||
MCReceiver _tcpReceiver;
|
||||
|
||||
QThread _senderThread;
|
||||
QThread _receiverThread;
|
||||
|
||||
};
|
||||
|
||||
#endif /// MCLOCALMAINWINDOW_H
|
Reference in New Issue
Block a user