#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;
class GraphicsItemGroup;

class DrawingPanel : public QWidget
{
    Q_OBJECT

public:
    DrawingPanel(QWidget *parent = nullptr);
    ~DrawingPanel();

    QGraphicsScene* getQGraphicsScene();
    DesignerScene* getDesignerScene();

    void setScene(DesignerScene* scene);

    void grahpicsViewZoomIn();
    void grahpicsViewZoomOut();
    void grahpicsViewZoomFit();

    GraphicsItemGroup* createItemGroup();
    void destroyItemGroup();

public slots:
    void onSignal_addGraphicsItem(GraphicsItemType&);

private:
    Ui::drawingPanel *ui;
    DesignerView*     m_pGraphicsView;
    DesignerScene*    m_pGraphicsScene;

};

#endif
