28 lines
624 B
C++
28 lines
624 B
C++
#ifndef ELECBAYITEM_H
|
|
#define ELECBAYITEM_H
|
|
|
|
#include "graphicsBaseItem.h"
|
|
#include "baseProperty.h"
|
|
|
|
class ElectricBayItem :public GraphicsNonStandardItem
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
ElectricBayItem(const QRectF &rect, QGraphicsItem *parent = 0); //genNewPort生成新接线点
|
|
virtual ~ElectricBayItem();
|
|
|
|
void setText(const QString& s);
|
|
protected:
|
|
virtual QPainterPath shape();
|
|
virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*);
|
|
private:
|
|
void updateTextShape();
|
|
protected:
|
|
QRectF _recLabel;
|
|
QString m_text;
|
|
QFont m_font;
|
|
QRectF m_showRect;
|
|
};
|
|
|
|
#endif
|