From fd8e518e266ef5d786b8b8c24c34a5c9dc7a5f37 Mon Sep 17 00:00:00 2001 From: Martin Baeuml Date: Wed, 8 Dec 2010 16:56:46 +0100 Subject: [PATCH] add dirtyChanged signal --- annotationmodel.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/annotationmodel.py b/annotationmodel.py index 5c361ac..9cbf260 100644 --- a/annotationmodel.py +++ b/annotationmodel.py @@ -176,6 +176,9 @@ class KeyValueModelItem(ModelItem): return QVariant() class AnnotationModel(QAbstractItemModel): + # signals + dirtyChanged = pyqtSignal(bool, name='dirtyChanged') + def __init__(self, annotations, parent=None): QAbstractItemModel.__init__(self, parent) self.annotations_ = annotations @@ -189,7 +192,7 @@ class AnnotationModel(QAbstractItemModel): previous = self.dirty_ self.dirty_ = dirty if previous != dirty: - self.emit(SIGNAL("dirtyChanged()")) + self.dirtyChanged.emit(dirty) dirty = property(dirty, setDirty)