dust3d/application/sources/component_property_widget.h

40 lines
1.2 KiB
C
Raw Normal View History

#ifndef DUST3D_APPLICATION_COMPONENT_PROPERTY_WIDGET_H_
#define DUST3D_APPLICATION_COMPONENT_PROPERTY_WIDGET_H_
#include <dust3d/base/uuid.h>
#include <QWidget>
class Document;
2022-10-14 11:11:41 +00:00
class SkeletonPart;
class ComponentPropertyWidget: public QWidget
{
Q_OBJECT
2022-10-08 03:46:57 +00:00
signals:
void beginColorPicking();
void endColorPicking();
void setPartColorState(const dust3d::Uuid &partId, bool hasColor, const QColor &color);
2022-10-14 11:11:41 +00:00
void setPartDeformThickness(const dust3d::Uuid &partId, float thickness);
void setPartDeformWidth(const dust3d::Uuid &partId, float width);
void setPartDeformUnified(const dust3d::Uuid &partId, bool unified);
void setPartCutRotation(const dust3d::Uuid &partId, float cutRotation);
2022-10-08 03:46:57 +00:00
void groupOperationAdded();
public:
2022-10-08 03:46:57 +00:00
ComponentPropertyWidget(Document *document,
const std::vector<dust3d::Uuid> &componentIds,
QWidget *parent=nullptr);
public slots:
2022-10-08 03:46:57 +00:00
void showColorDialog();
private:
Document *m_document = nullptr;
std::vector<dust3d::Uuid> m_componentIds;
2022-10-08 03:46:57 +00:00
std::vector<dust3d::Uuid> m_partIds;
2022-10-14 11:11:41 +00:00
dust3d::Uuid m_partId;
const SkeletonPart *m_part = nullptr;
2022-10-08 03:46:57 +00:00
QColor m_color;
QColor lastColor();
void preparePartIds();
};
#endif