2022-10-08 01:05:53 +00:00
|
|
|
#ifndef DUST3D_APPLICATION_COMPONENT_PROPERTY_WIDGET_H_
|
|
|
|
#define DUST3D_APPLICATION_COMPONENT_PROPERTY_WIDGET_H_
|
|
|
|
|
2022-11-07 09:41:43 +00:00
|
|
|
#include "document.h"
|
2022-10-08 01:05:53 +00:00
|
|
|
#include <QWidget>
|
2022-10-18 09:35:04 +00:00
|
|
|
#include <dust3d/base/uuid.h>
|
2022-10-08 01:05:53 +00:00
|
|
|
|
2022-10-18 09:35:04 +00:00
|
|
|
class ComponentPropertyWidget : public QWidget {
|
2022-10-08 01:05:53 +00:00
|
|
|
Q_OBJECT
|
2022-10-08 03:46:57 +00:00
|
|
|
signals:
|
|
|
|
void beginColorPicking();
|
|
|
|
void endColorPicking();
|
2022-10-18 09:35:04 +00:00
|
|
|
void setPartColorState(const dust3d::Uuid& partId, bool hasColor, const QColor& color);
|
|
|
|
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 setPartSubdivState(const dust3d::Uuid& partId, bool subdived);
|
|
|
|
void setPartChamferState(const dust3d::Uuid& partId, bool chamfered);
|
|
|
|
void setPartRoundState(const dust3d::Uuid& partId, bool rounded);
|
|
|
|
void setPartCutRotation(const dust3d::Uuid& partId, float cutRotation);
|
2022-10-22 05:27:58 +00:00
|
|
|
void setPartColorImage(const dust3d::Uuid& partId, const dust3d::Uuid& imageId);
|
2022-10-08 03:46:57 +00:00
|
|
|
void groupOperationAdded();
|
2022-10-18 09:35:04 +00:00
|
|
|
|
2022-10-08 01:05:53 +00:00
|
|
|
public:
|
2022-10-18 09:35:04 +00:00
|
|
|
ComponentPropertyWidget(Document* document,
|
|
|
|
const std::vector<dust3d::Uuid>& componentIds,
|
|
|
|
QWidget* parent = nullptr);
|
2022-10-08 01:05:53 +00:00
|
|
|
public slots:
|
2022-10-08 03:46:57 +00:00
|
|
|
void showColorDialog();
|
2022-10-18 09:35:04 +00:00
|
|
|
|
2022-10-08 01:05:53 +00:00
|
|
|
private:
|
2022-10-18 09:35:04 +00:00
|
|
|
Document* m_document = nullptr;
|
2022-10-08 01:05:53 +00:00
|
|
|
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;
|
2022-11-07 09:41:43 +00:00
|
|
|
const Document::Part* m_part = nullptr;
|
2022-10-08 03:46:57 +00:00
|
|
|
QColor m_color;
|
|
|
|
QColor lastColor();
|
|
|
|
void preparePartIds();
|
2022-10-22 05:27:58 +00:00
|
|
|
QImage* pickImage();
|
2022-10-08 01:05:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|