git-svn-id: svn://db.shs.com.ru/libs@148 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -66,12 +66,13 @@ void BlockItemPin::hoverEnterEvent(QGraphicsSceneHoverEvent * e) {
|
|||||||
if ((state() != Disconnected) && !m_pin_mc) return;
|
if ((state() != Disconnected) && !m_pin_mc) return;
|
||||||
saveState();
|
saveState();
|
||||||
setState(BlockItemPin::Hover);
|
setState(BlockItemPin::Hover);
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BlockItemPin::hoverLeaveEvent(QGraphicsSceneHoverEvent * e) {
|
void BlockItemPin::hoverLeaveEvent(QGraphicsSceneHoverEvent * e) {
|
||||||
//if (state() == Hover)
|
|
||||||
restoreState();
|
restoreState();
|
||||||
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
#define BLOCKITEM_DEFAULT_PIN_MARGIN 20
|
#define BLOCKITEM_DEFAULT_PIN_MARGIN 20
|
||||||
@@ -351,6 +352,7 @@ BlockItem * BlockItem::copy() const {
|
|||||||
np->setBusType(p->busType());
|
np->setBusType(p->busType());
|
||||||
np->setAlignment(p->alignment());
|
np->setAlignment(p->alignment());
|
||||||
np->setText(p->text());
|
np->setText(p->text());
|
||||||
|
np->setToolTip(p->toolTip());
|
||||||
np->properties() = p->properties();
|
np->properties() = p->properties();
|
||||||
ret->addPin(np);
|
ret->addPin(np);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ protected:
|
|||||||
|
|
||||||
inline QDataStream & operator <<(QDataStream & s, const BlockItemPin * p) {
|
inline QDataStream & operator <<(QDataStream & s, const BlockItemPin * p) {
|
||||||
ChunkStream cs;
|
ChunkStream cs;
|
||||||
cs << cs.chunk(1, int(p->alignment())) << cs.chunk(2, p->busType()) << cs.chunk(3, p->text());
|
cs << cs.chunk(1, int(p->alignment())) << cs.chunk(2, p->busType()) << cs.chunk(3, p->text()) << cs.chunk(4, p->toolTip());
|
||||||
s << cs.data(); return s;}
|
s << cs.data(); return s;}
|
||||||
inline QDataStream & operator >>(QDataStream & s, BlockItemPin *& p) {
|
inline QDataStream & operator >>(QDataStream & s, BlockItemPin *& p) {
|
||||||
ChunkStream cs(s);
|
ChunkStream cs(s);
|
||||||
@@ -186,6 +186,7 @@ inline QDataStream & operator >>(QDataStream & s, BlockItemPin *& p) {
|
|||||||
case 1: p->setAlignment((Qt::Alignment)cs.getData<int>()); break;
|
case 1: p->setAlignment((Qt::Alignment)cs.getData<int>()); break;
|
||||||
case 2: p->setBusType(cs.getData<int>()); break;
|
case 2: p->setBusType(cs.getData<int>()); break;
|
||||||
case 3: p->setText(cs.getData<QString>()); break;
|
case 3: p->setText(cs.getData<QString>()); break;
|
||||||
|
case 4: p->setToolTip(cs.getData<QString>()); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
|
|||||||
Reference in New Issue
Block a user