Esempio n. 1
0
 def setValue(self, new_data):
     w = self.currentWidget()
     if isinstance(w, TimeEditWidget):
         w.setValue(new_data)
     elif isinstance(w, QDateTimeEdit):
         dt = QDateTime()
         dt.setMSecsSinceEpoch(float(new_data) * 1000)
         w.setDateTime(dt)
     elif isinstance(w, QSpinBox):
         w.setValue(int(new_data))
     self.current = new_data
     self.setEnabled(True)
Esempio n. 2
0
 def setValue(self, new_data):
     self.state[0] = int(float(new_data[0]))
     self.state[1] = int(float(new_data[1]))
     dt = QDateTime()
     dt.setMSecsSinceEpoch(self.state[0] * 1000)
     self.date_widget.setDateTime(dt)