add filtering for node status, add custom filtering class
[sface.git] / sface / screens / sfascreen.py
index 489cbfe..1563468 100644 (file)
@@ -4,11 +4,17 @@ from PyQt4.QtCore import *
 from PyQt4.QtGui import *
 
 class SfaScreen(QWidget):
+    instances = []
+
     def __init__(self, parent):
+        SfaScreen.instances.append(self)
         QWidget.__init__(self, parent)
         self.mainwin = parent
         self.name = self.title = self.widget = None
 
+    def __del__(self):
+        SfaScreen.instances.remove(self)
+
     def init(self, widget, name, title):
         if self.widget:
             sys.stderr.write("Screen is already initialized\n")
@@ -30,3 +36,21 @@ class SfaScreen(QWidget):
 
     def setStatus(self, msg, timeout):
         self.mainwin.setStatus(msg, timeout)
+
+    def signalAll(self, action):
+        for i in SfaScreen.instances:
+            method = getattr(i, action, None)
+            if method:
+                method()
+
+    def rspecUpdated(self):
+        pass
+
+    def configurationChanged(self):
+        pass
+
+    def canClose(self):
+        return True
+
+    def mainWindowClose(self):
+        pass