/**
     *\file creatingSelector.h
     *
     *\brief 用来实现图元创建的selector
     *
     *\author dsc
     */

#ifndef CREATINGSELECTOR_H
#define CREATINGSELECTOR_H

#include "baseSelector.h"
#include "global.h"

class GraphicsBaseItem;
class CreatingSelector : public BaseSelector
{
    Q_OBJECT

public:
    explicit CreatingSelector(QObject *parent = 0);
    virtual ~CreatingSelector();

public:
    void mousePressEvent(QGraphicsSceneMouseEvent*, DesignerScene*);
    void mouseMoveEvent(QGraphicsSceneMouseEvent*, DesignerScene*);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent*, DesignerScene*);

    void setCreatingItem(GraphicsItemType& type) { m_creatingType=type; }

private:
    GraphicsItemType     m_creatingType;
    GraphicsBaseItem*    m_pCreatingItem;
};

#endif
