Ejemplo n.º 1
0
    def mousePressEvent(self, event):
        if event.button() == QtCore.Qt.LeftButton:
            self.mousePressEventLeft(event)
        elif event.button() == QtCore.Qt.RightButton:
            self.mousePressEventRight(event)

        QGLWidget.mousePressEvent(self, event)
Ejemplo n.º 2
0
	def mousePressEvent(self, event):
		QGLWidget.mousePressEvent(self, event)
		self.__updateMouse(event, pressed = True)
		self.repaint()

		if self._mouseLeftDown:  self._mouseStartDragPoint = self._mouseGLPosition
		if self._mouseRightDown: self._lastMouseGLPosition = self._mouseGLPosition

		self.onPress( event.button(), self._mousePosition, self._mouseGLPosition )
Ejemplo n.º 3
0
	def mousePressEvent(self, event):
		QGLWidget.mousePressEvent(self, event)
		self._mouseDown = True
		self._mouseX = event.x()
		self._mouseY = event.y()
		self.repaint()

		if event.button()==1:
			self._mouseLeftDown = True
			self._mouseStartDragPoint = (self._glX  - self._x, self._height-self._glY + self._y )
			
		if event.button()==2:
			self._mouseRightDown = True
			self._lastGlX = self._glX
			self._lastGlY = self._glY

		self.onPress(event.button(), (self._glX  - self._x, self._height-self._glY + self._y ) )
Ejemplo n.º 4
0
    def mousePressEvent(self, event):
        QGLWidget.mousePressEvent(self, event)
        self._mouseDown = True
        self._mouseX = event.x()
        self._mouseY = event.y()
        self.repaint()

        if event.button() == 1:
            self._mouseLeftDown = True
            self._mouseStartDragPoint = (self._glX - self._x,
                                         self._height - self._glY + self._y)

        if event.button() == 2:
            self._mouseRightDown = True
            self._lastGlX = self._glX
            self._lastGlY = self._glY

        self.onPress(event.button(),
                     (self._glX - self._x, self._height - self._glY + self._y))