#ifndef GRAPHICSITEMGROUP_H
#define GRAPHICSITEMGROUP_H

#include "graphicsBaseItem.h"

class GraphicsItemGroup : public QObject, public AbstractShapeType<QGraphicsItemGroup>
{
    Q_OBJECT

public:
    GraphicsItemGroup(QGraphicsItem *parent = 0);
    virtual ~GraphicsItemGroup();

    void resize(int,double, double, const QPointF&);
    void updateCoordinate();

    void createOperationCopy();
    void removeOperationCopy();
    void moveOperationCopy(const QPointF&);
    void rotateOperationCopy(const double&);

    void addItems(const QList<QGraphicsItem*>&);
    //QList<QGraphicsItem*> getItems() {return m_listItem;}

protected:
    virtual QPainterPath shape();
    virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*);
    virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent*);
    virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange, const QVariant&);
    virtual void syncRotationDataFromParent(const double&);

private:
    QRectF        m_lastBoudingRect; //记录上一时刻的boundingRect
    QPainterPath  m_painterPath;
    //QList<QGraphicsItem*> m_listItem;
};

#endif
