52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
#include "graphicsItem/electricSvgItemRect.h"
|
|
#include "graphicsItem/itemPort.h"
|
|
#include "global.h"
|
|
|
|
#include <QSvgRenderer>
|
|
#include <QPainter>
|
|
#include <QStyleOption>
|
|
#include <QGraphicsScene>
|
|
#include <QGraphicsView>
|
|
|
|
ElectricSvgItemRect::ElectricSvgItemRect(const QRect &rect, bool genNewPort, QGraphicsItem *parent)
|
|
: ElectricSvgItem(rect,parent)
|
|
{
|
|
initial();
|
|
}
|
|
|
|
ElectricSvgItemRect::ElectricSvgItemRect(const ElectricSvgItemRect& obj)
|
|
: ElectricSvgItem(obj)
|
|
{
|
|
initial();
|
|
}
|
|
|
|
ElectricSvgItemRect::~ElectricSvgItemRect()
|
|
{
|
|
|
|
}
|
|
|
|
ElectricSvgItemRect* ElectricSvgItemRect::clone() const
|
|
{
|
|
return new ElectricSvgItemRect(*this);
|
|
}
|
|
|
|
void ElectricSvgItemRect::updateHandles()
|
|
{
|
|
ElectricSvgItem::updateHandles();
|
|
}
|
|
|
|
void ElectricSvgItemRect::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
|
|
{
|
|
ElectricSvgItem::paint(painter,option,widget);
|
|
}
|
|
|
|
void ElectricSvgItemRect::initial()
|
|
{
|
|
setHandleIfShow(H_textCaption,false);
|
|
setHandleIfShow(H_textCurrent,false);
|
|
setHandleIfShow(h_textVoltage,false);
|
|
setHandleVisible(false);
|
|
setFunctionHandleIfShow(false);
|
|
setFunctionHandleEnaable(false);
|
|
}
|