def mousePressEvent(self, e): #print '%s.mousePressEvent, at point: ' % self.__class__.__name__, e.pos(), e.scenePos() QGraphicsRectItem.mousePressEvent( self, e) # points would not show up w/o this line ps = e.scenePos() #print '%s.mousePressEvent itemAt:' % self.__class__.__name__, self.scene().itemAt(ps) item_sel = self.scene().itemAt(ps) if item_sel in self.lst_ctl_points: #print 'set mode EDIT' self.set_mode(EDIT) self.set_child_item_sel(item_sel) self.rect0 = self.rect().normalized() self.p0 = self.pos() self.p0_ptr = self.ptr.pos() self.p0_ptl = self.ptl.pos() self.p0_pbr = self.pbr.pos() self.p0_pbl = self.pbl.pos() if item_sel == self.ped: self.control_point_menu()
def mousePressEvent(self, event): """ We reimplement this function to store the position of the item when a user issues a mouse press. """ self._position = self.pos() if (event.modifiers() & Qt.ControlModifier): QApplication.setOverrideCursor(QCursor(Qt.SizeAllCursor)) else: event.ignore() return QGraphicsRectItem.mousePressEvent(self, event)
def mousePressEvent(self, event): """ We reimplement this function to store the position of the item when a user issues a mouse press. """ self._position = self.pos() if (event.modifiers() & Qt.ControlModifier): QApplication.setOverrideCursor(QCursor(Qt.SizeAllCursor)) else: event.ignore() return QGraphicsRectItem.mousePressEvent(self, event)
def mousePressEvent(self, e): #print 'mousePressEvent, at point: ', e.pos() #e.globalX(), e.globalY() QGraphicsRectItem.mousePressEvent(self, e) QtGui.QApplication.setOverrideCursor(QtGui.QCursor(self.grub_cursor))