#ifndef FORMPRICEDETAIL_H
#define FORMPRICEDETAIL_H

#include <QWidget>
#include <QLabel>

#include "DataTypeDef.h"

namespace Ui {
class FormPriceDetail;
}

class FormPriceDetail : public QWidget
{
    Q_OBJECT

public:
    explicit FormPriceDetail(QWidget *parent = nullptr);
    ~FormPriceDetail();

    void setPrice(const OFFLINE_PRICE &newPrice);

private:
    void refreshData();
    OFFLINE_PRICE getNewData();
    void setBackgroundImage();

    void centerWindow();

protected:
    void showEvent(QShowEvent* event) override;

signals:
    void priceDataChanged(const OFFLINE_PRICE& data);

private:
    Ui::FormPriceDetail *ui;
    QLabel* m_bg_image;

    OFFLINE_PRICE m_price;
};

#endif // FORMPRICEDETAIL_H
