2018-09-21 07:10:18 +00:00
|
|
|
#ifndef POSE_WIDGET_H
|
|
|
|
#define POSE_WIDGET_H
|
|
|
|
#include <QFrame>
|
|
|
|
#include <QLabel>
|
2018-10-02 04:59:30 +00:00
|
|
|
#include <QIcon>
|
2018-09-21 07:10:18 +00:00
|
|
|
#include "skeletondocument.h"
|
|
|
|
#include "modelwidget.h"
|
|
|
|
|
|
|
|
class PoseWidget : public QFrame
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
signals:
|
|
|
|
void modifyPose(QUuid poseId);
|
2018-10-02 04:59:30 +00:00
|
|
|
void cornerButtonClicked(QUuid poseId);
|
2018-09-21 07:10:18 +00:00
|
|
|
public:
|
|
|
|
PoseWidget(const SkeletonDocument *document, QUuid poseId);
|
|
|
|
static int preferredHeight();
|
|
|
|
ModelWidget *previewWidget();
|
|
|
|
protected:
|
|
|
|
void mouseDoubleClickEvent(QMouseEvent *event) override;
|
2018-10-02 04:59:30 +00:00
|
|
|
void resizeEvent(QResizeEvent *event) override;
|
2018-09-21 07:10:18 +00:00
|
|
|
public slots:
|
|
|
|
void reload();
|
|
|
|
void updatePreview();
|
|
|
|
void updateName();
|
|
|
|
void updateCheckedState(bool checked);
|
2018-10-02 04:59:30 +00:00
|
|
|
void setCornerButtonVisible(bool visible);
|
2018-09-21 07:10:18 +00:00
|
|
|
private:
|
|
|
|
QUuid m_poseId;
|
|
|
|
const SkeletonDocument *m_document = nullptr;
|
|
|
|
ModelWidget *m_previewWidget = nullptr;
|
|
|
|
QLabel *m_nameLabel = nullptr;
|
2018-10-02 04:59:30 +00:00
|
|
|
QPushButton *m_cornerButton = nullptr;
|
2018-09-21 07:10:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|