#ifndef CAMERADISPLAY_H
#define CAMERADISPLAY_H

#include <QWidget>

class QVBoxLayout;
class QHBoxLayout;
class QLabel;
class QPushButton;
class QToolButton;

class CameraDisplay : public QWidget
{
    Q_OBJECT
public:
    enum CameraState {NG, OK, UNKNOW};

    explicit CameraDisplay(QWidget* parent = nullptr);


    void setIndex(const QString& index);
    void setTitle(const QString& title);
    void setState(CameraState state);

    void setContent(const QString& content);

signals:
    void clickIndex(const QString& index, const QString& title, const QString& state);

protected:
    void paintEvent(QPaintEvent* e);

private:
    QVBoxLayout* mMainVLayout;

    QWidget* mTopWidget;
    QHBoxLayout* mTopHLayout;
//    QLabel* mIndexLabel;
    QToolButton* mIndexButton;
    QLabel* mTitleLabel;
    QLabel* mStateLabel;

    QLabel* mContentLabel;
};

#endif // CAMERADISPLAY_H
