2022-10-03 00:06:25 +00:00
|
|
|
#ifndef DUST3D_APPLICATION_PART_MANAGE_WIDGET_H_
|
|
|
|
#define DUST3D_APPLICATION_PART_MANAGE_WIDGET_H_
|
|
|
|
|
|
|
|
#include <QWidget>
|
2022-10-18 09:35:04 +00:00
|
|
|
#include <dust3d/base/uuid.h>
|
2022-10-03 00:06:25 +00:00
|
|
|
|
|
|
|
class Document;
|
2022-10-04 09:50:39 +00:00
|
|
|
class ComponentPreviewGridWidget;
|
2022-10-08 01:05:53 +00:00
|
|
|
class ComponentPropertyWidget;
|
2022-10-04 09:50:39 +00:00
|
|
|
class QPushButton;
|
2022-10-03 00:06:25 +00:00
|
|
|
|
2022-10-18 09:35:04 +00:00
|
|
|
class PartManageWidget : public QWidget {
|
2022-10-03 00:06:25 +00:00
|
|
|
Q_OBJECT
|
2022-10-04 12:17:39 +00:00
|
|
|
signals:
|
|
|
|
void unselectAllOnCanvas();
|
2022-10-18 09:35:04 +00:00
|
|
|
void selectPartOnCanvas(const dust3d::Uuid& partId);
|
|
|
|
void groupComponents(const std::vector<dust3d::Uuid>& componentIds);
|
|
|
|
void ungroupComponent(const dust3d::Uuid& componentId);
|
2022-10-08 05:03:26 +00:00
|
|
|
void groupOperationAdded();
|
2022-10-06 11:16:47 +00:00
|
|
|
public slots:
|
2022-10-18 09:35:04 +00:00
|
|
|
void selectComponentByPartId(const dust3d::Uuid& partId);
|
2022-10-08 01:05:53 +00:00
|
|
|
void showSelectedComponentProperties();
|
2022-10-18 09:35:04 +00:00
|
|
|
void showContextMenu(const QPoint& pos);
|
|
|
|
|
2022-10-03 00:06:25 +00:00
|
|
|
public:
|
2022-10-18 09:35:04 +00:00
|
|
|
PartManageWidget(Document* document, QWidget* parent = nullptr);
|
|
|
|
|
2022-10-04 09:50:39 +00:00
|
|
|
private:
|
2022-10-18 09:35:04 +00:00
|
|
|
Document* m_document = nullptr;
|
|
|
|
ComponentPreviewGridWidget* m_componentPreviewGridWidget = nullptr;
|
|
|
|
QPushButton* m_levelUpButton = nullptr;
|
|
|
|
QPushButton* m_selectButton = nullptr;
|
|
|
|
QPushButton* m_lockButton = nullptr;
|
|
|
|
QPushButton* m_unlockButton = nullptr;
|
|
|
|
QPushButton* m_showButton = nullptr;
|
|
|
|
QPushButton* m_hideButton = nullptr;
|
|
|
|
QPushButton* m_unlinkButton = nullptr;
|
|
|
|
QPushButton* m_linkButton = nullptr;
|
|
|
|
QPushButton* m_propertyButton = nullptr;
|
2022-10-04 09:50:39 +00:00
|
|
|
void updateToolButtons();
|
|
|
|
void updateLevelUpButton();
|
2022-10-10 11:05:16 +00:00
|
|
|
bool hasSelectedGroupedComponent();
|
2022-10-03 00:06:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|