예제 #1
0
    def mouseReleased(self, event):
        # Resize/move done
        self.real_widget.setMovable(self._movable)

        if self._resize:
            ResizableBase.mouseReleased(self, event)
        elif self._movable:
            mouseX = self.x + event.getX()
            mouseY = self.y + event.getY()

            dockArea = self._editor.getToolbarAreaAt(mouseX, mouseY)
            if dockArea is not None:
                self._editor.dockWidgetTo(self, dockArea, mouseX, mouseY)
예제 #2
0
파일: toolbar.py 프로젝트: m64/PEG
	def mouseReleased(self, event):
		# Resize/move done
		self.real_widget.setMovable(self._movable)
		
		if self._resize:
			ResizableBase.mouseReleased(self, event)
		elif self._movable:
			mouseX = self.x+event.getX()
			mouseY = self.y+event.getY()
		
			dockArea = self._editor.getToolbarAreaAt(mouseX, mouseY)
			if dockArea is not None:
				self._editor.dockWidgetTo(self, dockArea, mouseX, mouseY)
예제 #3
0
    def mouseReleased(self, event):
        didMove = False
        if (self.x, self.y) != self._panel_startPos:
            didMove = True

        # Resize/move done
        self.real_widget.setMovable(self._movable)

        if self._resize:
            ResizableBase.mouseReleased(self, event)
        elif self._movable and didMove:
            mouseX = self.x + event.getX()
            mouseY = self.y + event.getY()

            dockArea = self._editor.getDockAreaAt(mouseX, mouseY)
            if dockArea is not None:
                self._editor.dockWidgetTo(self, dockArea, mouseX, mouseY)
예제 #4
0
파일: panel.py 프로젝트: m64/PEG
	def mouseReleased(self, event):	
		didMove = False
		if (self.x, self.y) != self._panel_startPos:
			didMove = True
		
		# Resize/move done
		self.real_widget.setMovable(self._movable)
		
		if self._resize:
			ResizableBase.mouseReleased(self, event)
		elif self._movable and didMove:
			mouseX = self.x+event.getX()
			mouseY = self.y+event.getY()
			
			dockArea = self._editor.getDockAreaAt(mouseX, mouseY)
			if dockArea is not None:
				self._editor.dockWidgetTo(self, dockArea, mouseX, mouseY)
예제 #5
0
파일: dockarea.py 프로젝트: m64/PEG
	def mouseReleased(self, event):
		if self._resize:
			if self._rLeft or self._rRight:
				# Resize children
				for child in self.gui.findChildren(parent=self.gui):
					child.min_size = (self.width, child.min_size[1])
					child.max_size = (self.width, child.max_size[1])
					
			if self._rTop or self._rBottom:
				# Resize children
				for child in self.gui.findChildren(parent=self.gui):
					child.min_size = (child.min_size[0], self.height)
					child.max_size = (child.max_size[0], self.height)
					
			self.gui.max_size = (self.width, self.height)
			
			ResizableBase.mouseReleased(self, event)
			self.min_size = (0,0) # Override changes done in ResizableBase
				
예제 #6
0
	def mouseReleased(self, event):
		if self._resize:
			if self._rLeft or self._rRight:
				# Resize children
				for child in self.gui.findChildren(parent=self.gui):
					child.min_size = (self.width, child.min_size[1])
					child.max_size = (self.width, child.max_size[1])
					
			if self._rTop or self._rBottom:
				# Resize children
				for child in self.gui.findChildren(parent=self.gui):
					child.min_size = (child.min_size[0], self.height)
					child.max_size = (child.max_size[0], self.height)
					
			self.gui.max_size = (self.width, self.height)
			
			ResizableBase.mouseReleased(self, event)
			self.min_size = (0,0) # Override changes done in ResizableBase
		
		#FIXME: This is a little bit of a hack to fix Ticket #444
		self.adaptLayout()
예제 #7
0
	def mouseReleased(self, event):
		if self._resize:
			if self._rLeft or self._rRight:
				# Resize children
				for child in self.gui.findChildren(parent=self.gui):
					child.min_size = (self.width, child.min_size[1])
					child.max_size = (self.width, child.max_size[1])
					
			if self._rTop or self._rBottom:
				# Resize children
				for child in self.gui.findChildren(parent=self.gui):
					child.min_size = (child.min_size[0], self.height)
					child.max_size = (child.max_size[0], self.height)
					
			self.gui.max_size = (self.width, self.height)
			
			ResizableBase.mouseReleased(self, event)
			self.min_size = (0,0) # Override changes done in ResizableBase
		
		#FIXME: This is a little bit of a hack to fix Ticket #444
		self.adaptLayout()