#ifndef MOVELABEL_H
#define MOVELABEL_H

#include <QLabel>
#include <QMouseEvent>
#include <QObject>
#include <QWidget>

#include <src/widgets/capture/buttonhandler.h>

class MoveLabel : public QLabel
{
    Q_OBJECT
public:
    MoveLabel(QWidget *parent = nullptr);
    ButtonHandler *m_buttonHandler;
    bool getFirstMove();
    void setFirstMove(bool firstMove);
protected:
    void mousePressEvent(QMouseEvent *e) override;
    void mouseMoveEvent(QMouseEvent *e) override;
    void mouseReleaseEvent(QMouseEvent *e) override;
    void paintEvent(QPaintEvent *event) override;
private:
    bool isFirstMove = false;
    QPoint m_dragStart, m_offsetPos;
    qreal m_offsetX, m_offsetY;
    QVector<CaptureButton *> vectorButtons;
    QColor m_backColor = QColor(255, 255, 255, 125);
};

#endif // MOVELABEL_H
