2022-11-11 12:06:06 +00:00
|
|
|
#ifndef DUST3D_APPLICATION_BONE_MANAGE_WIDGET_H_
|
|
|
|
#define DUST3D_APPLICATION_BONE_MANAGE_WIDGET_H_
|
|
|
|
|
2022-11-16 10:58:13 +00:00
|
|
|
#include <QMenu>
|
2022-11-11 12:06:06 +00:00
|
|
|
#include <QWidget>
|
|
|
|
#include <dust3d/base/uuid.h>
|
2022-11-16 10:58:13 +00:00
|
|
|
#include <memory>
|
2022-11-11 12:06:06 +00:00
|
|
|
|
|
|
|
class Document;
|
|
|
|
class BonePreviewGridWidget;
|
|
|
|
class BonePropertyWidget;
|
|
|
|
class QPushButton;
|
|
|
|
|
|
|
|
class BoneManageWidget : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
signals:
|
|
|
|
void unselectAllOnCanvas();
|
2022-11-11 15:31:20 +00:00
|
|
|
void selectNodeOnCanvas(const dust3d::Uuid& nodeId);
|
2022-12-10 13:51:17 +00:00
|
|
|
void removeBone(const dust3d::Uuid& boneId);
|
2022-11-11 12:06:06 +00:00
|
|
|
void groupOperationAdded();
|
|
|
|
public slots:
|
|
|
|
void selectBoneByBoneId(const dust3d::Uuid& boneId);
|
|
|
|
void showSelectedBoneProperties();
|
|
|
|
void showContextMenu(const QPoint& pos);
|
|
|
|
|
2022-12-10 13:51:17 +00:00
|
|
|
private slots:
|
|
|
|
void removeSelectedBones();
|
|
|
|
|
2022-11-11 12:06:06 +00:00
|
|
|
public:
|
|
|
|
BoneManageWidget(Document* document, QWidget* parent = nullptr);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Document* m_document = nullptr;
|
|
|
|
BonePreviewGridWidget* m_bonePreviewGridWidget = nullptr;
|
2022-11-11 15:31:20 +00:00
|
|
|
QPushButton* m_addButton = nullptr;
|
2022-11-11 12:06:06 +00:00
|
|
|
QPushButton* m_selectButton = nullptr;
|
|
|
|
QPushButton* m_propertyButton = nullptr;
|
2022-11-16 10:58:13 +00:00
|
|
|
std::unique_ptr<QMenu> m_propertyMenu;
|
2022-11-11 12:06:06 +00:00
|
|
|
void updateToolButtons();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|