31 lines
746 B
C
31 lines
746 B
C
|
|
#ifndef ITEMEXTEND_H
|
||
|
|
#define ITEMEXTEND_H
|
||
|
|
|
||
|
|
/**********手动扩展结构标志***********/
|
||
|
|
|
||
|
|
#include "graphicsItem/handleRect.h"
|
||
|
|
|
||
|
|
class ElectricFunctionModelConnectLineItem;
|
||
|
|
|
||
|
|
class ItemExtend : public HandleRect
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
ItemExtend(QGraphicsItem *parent);
|
||
|
|
virtual ~ItemExtend();
|
||
|
|
public:
|
||
|
|
void setSourcePortId(const QString& id) {_sourcePortId = id;}
|
||
|
|
QString getSourcePortId() {return _sourcePortId;}
|
||
|
|
protected:
|
||
|
|
virtual void paint(QPainter*, const QStyleOptionGraphicsItem*, QWidget*) override;
|
||
|
|
private:
|
||
|
|
QString _uuid;
|
||
|
|
QString _sourcePortId; //被哪个port生成
|
||
|
|
int m_penWidth;
|
||
|
|
QColor m_normalColor;
|
||
|
|
QColor m_hoverColor;
|
||
|
|
QColor m_currentColor;
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|