2024-08-16 11:39:30 +08:00
|
|
|
#ifndef DRAWINGPANEL_H
|
|
|
|
|
#define DRAWINGPANEL_H
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
#include "global.h"
|
|
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
namespace Ui { class drawingPanel; }
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
|
|
class DesignerView;
|
|
|
|
|
class DesignerScene;
|
2024-09-02 17:56:02 +08:00
|
|
|
class GraphicsItemGroup;
|
2024-08-16 11:39:30 +08:00
|
|
|
|
|
|
|
|
class DrawingPanel : public QWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
DrawingPanel(QWidget *parent = nullptr);
|
|
|
|
|
~DrawingPanel();
|
|
|
|
|
|
|
|
|
|
QGraphicsScene* getQGraphicsScene();
|
|
|
|
|
DesignerScene* getDesignerScene();
|
|
|
|
|
|
2024-08-23 15:28:59 +08:00
|
|
|
void grahpicsViewZoomIn();
|
|
|
|
|
void grahpicsViewZoomOut();
|
|
|
|
|
void grahpicsViewZoomFit();
|
|
|
|
|
|
2024-09-02 17:56:02 +08:00
|
|
|
GraphicsItemGroup* createItemGroup();
|
|
|
|
|
void destroyItemGroup();
|
|
|
|
|
|
2024-08-16 11:39:30 +08:00
|
|
|
public slots:
|
|
|
|
|
void onSignal_addGraphicsItem(GraphicsItemType&);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Ui::drawingPanel *ui;
|
|
|
|
|
DesignerView* m_pGraphicsView;
|
|
|
|
|
DesignerScene* m_pGraphicsScene;
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|