2021-11-18 14:58:01 +00:00
|
|
|
#ifndef DUST3D_APPLICATION_GRAPHICS_CONTAINER_WIDGET_H_
|
|
|
|
#define DUST3D_APPLICATION_GRAPHICS_CONTAINER_WIDGET_H_
|
|
|
|
|
|
|
|
#include "model_widget.h"
|
|
|
|
#include "skeleton_graphics_widget.h"
|
2022-10-18 09:35:04 +00:00
|
|
|
#include <QMouseEvent>
|
|
|
|
#include <QResizeEvent>
|
|
|
|
#include <QWheelEvent>
|
|
|
|
#include <QWidget>
|
2021-11-18 14:58:01 +00:00
|
|
|
|
2022-10-18 09:35:04 +00:00
|
|
|
class GraphicsContainerWidget : public QWidget {
|
2021-11-18 14:58:01 +00:00
|
|
|
Q_OBJECT
|
|
|
|
signals:
|
|
|
|
void containerSizeChanged(QSize size);
|
2022-10-18 09:35:04 +00:00
|
|
|
|
2021-11-18 14:58:01 +00:00
|
|
|
public:
|
|
|
|
GraphicsContainerWidget();
|
2022-10-18 09:35:04 +00:00
|
|
|
void setGraphicsWidget(SkeletonGraphicsWidget* graphicsWidget);
|
|
|
|
void setModelWidget(ModelWidget* modelWidget);
|
|
|
|
|
2021-11-18 14:58:01 +00:00
|
|
|
protected:
|
2022-10-18 09:35:04 +00:00
|
|
|
void resizeEvent(QResizeEvent* event) override;
|
|
|
|
void mousePressEvent(QMouseEvent* event) override;
|
|
|
|
void mouseMoveEvent(QMouseEvent* event) override;
|
|
|
|
void mouseReleaseEvent(QMouseEvent* event) override;
|
|
|
|
void wheelEvent(QWheelEvent* event) override;
|
|
|
|
|
2021-11-18 14:58:01 +00:00
|
|
|
private:
|
2022-10-18 09:35:04 +00:00
|
|
|
ModelWidget* m_modelWidget = nullptr;
|
|
|
|
SkeletonGraphicsWidget* m_graphicsWidget = nullptr;
|
2021-11-18 14:58:01 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|