Add functions to select all items (the typical Ctrl + a action).

This commit is contained in:
Markus Roth
2012-03-12 13:42:17 -07:00
parent 8a05a9ee94
commit fae19e20b9
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -429,6 +429,10 @@ class LabelTool(QObject):
def selectPreviousAnnotation(self):
if self._mainwindow is not None:
return self._mainwindow.scene.selectNextItem(reverse=True)
def selectAllAnnotations(self):
if self._mainwindow is not None:
return self._mainwindow.scene.selectAllItems()
def deleteSelectedAnnotations(self):
if self._mainwindow is not None:
+4
View File
@@ -260,6 +260,10 @@ class AnnotationScene(QGraphicsScene):
item.setSelected(True)
break
def selectAllItems(self):
for item in self.items():
item.setSelected(True)
def keyPressEvent(self, event):
LOG.debug("keyPressEvent %s" % event)