From b006b2d4f8b42b5261696b7682f5e2038da88866 Mon Sep 17 00:00:00 2001 From: Mika Fischer Date: Thu, 16 Jun 2011 20:14:14 +0200 Subject: [PATCH] Add accessor functions for scene and treeview to labeltool --- sloth/core/labeltool.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sloth/core/labeltool.py b/sloth/core/labeltool.py index 07dca03..fdec7cf 100755 --- a/sloth/core/labeltool.py +++ b/sloth/core/labeltool.py @@ -333,6 +333,12 @@ class LabelTool(QObject): ### ### Scene functions ###___________________________________________________________________________________________ + def scene(self): + if self._mainwindow is None: + return None + else: + return self._mainwindow.scene + def selectNextAnnotation(self): if self._mainwindow is not None: return self._mainwindow.scene.selectNextItem() @@ -344,3 +350,13 @@ class LabelTool(QObject): def exitInsertMode(self): if self._mainwindow is not None: return self._mainwindow.buttonarea.exitInsertMode() + + ### + ### TreeView functions + ###___________________________________________________________________________________________ + def treeview(self): + if self._mainwindow is None: + return None + else: + return self._mainwindow.treeview +