#ifndef COMMONBUTTONGROUPWIDGET_H
#define COMMONBUTTONGROUPWIDGET_H

#include <QWidget>
#include <Core/tcpclient.h>

namespace Ui {
class CommonButtonGroupWidget;
}

class CommonButtonGroupWidget : public QWidget
{
    Q_OBJECT

public:
    explicit CommonButtonGroupWidget(QWidget *parent = nullptr);
    ~CommonButtonGroupWidget();
    void initialize();
    void loadCompleteState();
    void lastVerInstalledState();
    void disconnectState();
    void startUpdateState();
    void showProgressBar(bool flag);
    void needUpdateState(bool flag);
    void startButtonActive(bool flag);

signals:
    void sigSendPacket(PacketType packet);
    void sigUpdateCommonWidget();
    void sigStartUnityClient();

private slots:
    void on_updateButton_clicked();
    void on_startButton_clicked();

public:
    void updateProgressBar(float value);

private:
    Ui::CommonButtonGroupWidget *ui;
};

#endif // COMMONBUTTONGROUPWIDGET_H
