Graphics/UMLGraphicsView.py

changeset 1112
8a7d1b9d18db
parent 945
8cd4d08fa9f6
child 1155
4cbef040f07e
equal deleted inserted replaced
1109:9552b5e16a07 1112:8a7d1b9d18db
5 5
6 """ 6 """
7 Module implementing a subclass of E5GraphicsView for our diagrams. 7 Module implementing a subclass of E5GraphicsView for our diagrams.
8 """ 8 """
9 9
10 from PyQt4.QtCore import * 10 from PyQt4.QtCore import pyqtSignal, Qt, QSignalMapper, QFileInfo
11 from PyQt4.QtGui import * 11 from PyQt4.QtGui import QAction, QToolBar, QDialog, QPrinter, QPrintDialog
12 12
13 from E5Graphics.E5GraphicsView import E5GraphicsView 13 from E5Graphics.E5GraphicsView import E5GraphicsView
14 14
15 from E5Gui import E5MessageBox, E5FileDialog 15 from E5Gui import E5MessageBox, E5FileDialog
16 16
254 # step 1: deselect all items 254 # step 1: deselect all items
255 self.unselectItems() 255 self.unselectItems()
256 256
257 # step 2: select all given items 257 # step 2: select all given items
258 for itm in items: 258 for itm in items:
259 if isinstance(itm, UMLWidget): 259 if isinstance(itm, UMLItem):
260 itm.setSelected(True) 260 itm.setSelected(True)
261 261
262 def selectItem(self, item): 262 def selectItem(self, item):
263 """ 263 """
264 Public method to select an item. 264 Public method to select an item.
265 265
266 @param item item to be selected (QGraphicsItemItem) 266 @param item item to be selected (QGraphicsItemItem)
267 """ 267 """
268 if isinstance(item, UMLWidget): 268 if isinstance(item, UMLItem):
269 item.setSelected(not item.isSelected()) 269 item.setSelected(not item.isSelected())
270 270
271 def __deleteShape(self): 271 def __deleteShape(self):
272 """ 272 """
273 Private method to delete the selected shapes from the display. 273 Private method to delete the selected shapes from the display.

eric ide

mercurial