def __init__(self, parent=None): QtGui.QMainWindow.__init__(self, None) self.setAttribute(QtCore.Qt.WA_DeleteOnClose) self._enabled_sources = {} self.settings = QtCore.QSettings() self.setupUi(self) self.alertBlinkTimer = QtCore.QTimer() self.alertBlinkTimer.setInterval(500) self._setup_connections() self._parent = parent # If True this DataWindow was restored from saved settings self.restored = False self.alertBlinking = False self.set_sounds_and_volume()
def _init_timer(self): """Initialize reploting timer.""" self._replot_timer = QtCore.QTimer() self._replot_timer.setInterval(1000) # Replot every 1000 ms self._replot_timer.timeout.connect(self._replot) self._replot_timer.start()