示例#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()
	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()