dust3d/application/sources/component_preview_grid_widg...

31 lines
921 B
C
Raw Normal View History

#ifndef DUST3D_APPLICATION_COMPONENT_PREVIEW_GRID_WIDGET_H_
#define DUST3D_APPLICATION_COMPONENT_PREVIEW_GRID_WIDGET_H_
2022-10-03 00:06:25 +00:00
#include <memory>
2022-10-04 11:45:21 +00:00
#include <dust3d/base/uuid.h>
#include <QAbstractListModel>
#include "preview_grid_view.h"
2022-10-07 21:39:38 +00:00
#include "component_list_model.h"
class Document;
class SkeletonComponent;
class ComponentPreviewGridWidget: public PreviewGridView
{
2022-10-07 21:39:38 +00:00
Q_OBJECT
signals:
void unselectAllOnCanvas();
void selectPartOnCanvas(const dust3d::Uuid &partId);
public:
2022-10-04 11:45:21 +00:00
ComponentPreviewGridWidget(Document *document, QWidget *parent=nullptr);
ComponentListModel *componentListModel();
std::vector<const SkeletonComponent *> getSelectedComponents() const;
2022-10-04 11:45:21 +00:00
std::vector<dust3d::Uuid> getSelectedComponentIds() const;
std::vector<dust3d::Uuid> getSelectedPartIds() const;
private:
std::unique_ptr<ComponentListModel> m_componentListModel;
2022-10-04 11:45:21 +00:00
Document *m_document = nullptr;
};
#endif