Files
miniCashAll/libMiniCash/mcnetworkwidget.h

75 lines
1.5 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 MCCNETWORKWIDGET_H
#define MCCNETWORKWIDGET_H
#include <QLabel>
#include <QAction>
#include <QSettings>
#include <QIcon>
#include <libMiniCash.h>
namespace Ui
{
class MCNetworkWidget;
}
class LIBMINICASH_EXPORT MCNetworkWidget : public QLabel
{
Q_OBJECT
public:
explicit MCNetworkWidget( QWidget* parent = nullptr );
virtual ~MCNetworkWidget();
miniCash::CState connectionState();
void setConnectionState( miniCash::CState state );
signals:
void showNetworkDialog();
protected:
struct MCNetworkState
{
MCNetworkState()
{
}
MCNetworkState( const QString alabel, QIcon aicon )
: label{ alabel }, icon{ aicon }
{
}
QString label;
QIcon icon;
};
Ui::MCNetworkWidget* _ui{};
miniCash::CState _senderState = miniCash::Disabled;
MCNetworkState _networkStates[miniCash::CStateSize];
};
#endif /// MCCNETWORKWIDGET_H