#ifndef GRAPHICSBUSSECTIONITEM_H
#define GRAPHICSBUSSECTIONITEM_H

#include "graphicsItem/graphicsBaseItem.h"

class GraphicsBusSectionItem : public GraphicsBaseItem
{
public:
    explicit GraphicsBusSectionItem(const QRect &rect, QGraphicsItem *parent = nullptr);
    virtual ~GraphicsBusSectionItem();

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

protected:
    virtual QPainterPath shape() override;
    virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) override;

private:
    virtual void updateHandles() override;

    QRectF m_lastBoudingRect;
    double m_dRatioX;
    double m_dRatioY;
};

#endif // GRAPHICSBUSSECTIONITEM_H
