30 #include <QGraphicsSceneMouseEvent>
31 #include <QApplication>
46 using namespace YACS::ENGINE;
47 using namespace YACS::HMI;
67 const QStyleOptionGraphicsItem *option,
102 if (!nodeItem)
return 0;
108 return "yacs/subjectGate";
113 DEBTRACE(
"SceneCtrlPortItem::mousePressEvent " <<
_label.toStdString()
114 <<
" " << acceptedMouseButtons ());
120 setCursor(Qt::ClosedHandCursor);
137 if (QLineF(event->screenPos(),
139 < QApplication::startDragDistance())
144 QDrag *drag =
new QDrag(event->widget());
146 drag->setMimeData(mime);
150 QPixmap pixmap(34, 34);
151 pixmap.fill(Qt::white);
153 QPainter painter(&pixmap);
154 painter.translate(15, 15);
155 painter.setRenderHint(QPainter::Antialiasing);
156 paint(&painter, 0, 0);
159 pixmap.setMask(pixmap.createHeuristicMask());
161 drag->setPixmap(pixmap);
162 drag->setHotSpot(QPoint(15, 20));
165 setCursor(Qt::ArrowCursor);
175 setCursor(Qt::ArrowCursor);