def __init__(self, defered, automatique, parent, periode, historique): super(GuiDecision, self).__init__(parent) # variables self._defered = defered self._automatique = automatique self._historique = GuiHistorique(self, historique) layout = QtGui.QVBoxLayout(self) wperiod = WPeriod(period=periode, ecran_historique=self._historique, parent=self) layout.addWidget(wperiod) wexplanation = WExplication(text=textes_PGG.get_text_explanation(), parent=self, size=(450, 80)) layout.addWidget(wexplanation) self._wdecision = WSpinbox(label=textes_PGG.get_text_label_decision(), minimum=pms.DECISION_MIN, maximum=pms.DECISION_MAX, interval=pms.DECISION_STEP, automatique=self._automatique, parent=self) layout.addWidget(self._wdecision) buttons = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok) buttons.accepted.connect(self._accept) layout.addWidget(buttons) self.setWindowTitle(trans_PGG(u"Decision")) self.adjustSize() self.setFixedSize(self.size()) if self._automatique: self._timer_automatique = QtCore.QTimer() self._timer_automatique.timeout.connect( buttons.button(QtGui.QDialogButtonBox.Ok).click) self._timer_automatique.start(7000)
def remote_display_summary(self, period_content): logger.info(u"{} Summary".format(self._le2mclt.uid)) self.histo.append([period_content.get(k) for k in self._histo_vars]) if self._le2mclt.simulation: return 1 else: defered = defer.Deferred() ecran_recap = GuiRecapitulatif( defered, self._le2mclt.automatique, self._le2mclt.screen, self.currentperiod, self.histo, texts_PGG.get_text_summary(period_content)) ecran_recap.show() return defered
def __init__(self, defered, automatique, parent, periode, historique): super(GuiDecision, self).__init__(parent) # variables self._defered = defered self._automatique = automatique self._historique = GuiHistorique(self, historique) layout = QtGui.QVBoxLayout(self) wperiod = WPeriod(period=periode, ecran_historique=self._historique, parent=self) layout.addWidget(wperiod) wexplanation = WExplication( text=textes_PGG.get_text_explanation(), parent=self, size=(450, 80)) layout.addWidget(wexplanation) self._wdecision = WSpinbox( label=textes_PGG.get_text_label_decision(), minimum=pms.DECISION_MIN, maximum=pms.DECISION_MAX, interval=pms.DECISION_STEP, automatique=self._automatique, parent=self) layout.addWidget(self._wdecision) buttons = QtGui.QDialogButtonBox(QtGui.QDialogButtonBox.Ok) buttons.accepted.connect(self._accept) layout.addWidget(buttons) self.setWindowTitle(trans_PGG(u"Decision")) self.adjustSize() self.setFixedSize(self.size()) if self._automatique: self._timer_automatique = QtCore.QTimer() self._timer_automatique.timeout.connect( buttons.button(QtGui.QDialogButtonBox.Ok).click) self._timer_automatique.start(7000)
def __init__(self, le2mclt): IRemote.__init__(self, le2mclt) self._histo_vars = ["PGG_period", "PGG_indiv", "PGG_public", "PGG_publicgroup", "PGG_periodpayoff", "PGG_cumulativepayoff"] self.histo.append(texts_PGG.get_histo_head())