예제 #1
0
    def get_value(self):
        if CustomEditor.get_value(self) is ValueLoading:
            return ValueLoading

        self.years_spinbox.interpretText()
        years = int(self.years_spinbox.value())
        self.months_spinbox.interpretText()
        months = int(self.months_spinbox.value())
        value = (years * 12) + months
        return value
예제 #2
0
    def get_value(self):
        if CustomEditor.get_value(self) is ValueLoading:
            return ValueLoading

        self.years_spinbox.interpretText()
        years = int(self.years_spinbox.value())
        self.months_spinbox.interpretText()
        months = int(self.months_spinbox.value())
        value = (years * 12) + months
        return value
예제 #3
0
 def get_value(self):
     if CustomEditor.get_value(self) is ValueLoading:
         return ValueLoading
     self.years_spinbox.interpretText()
     years = int(self.years_spinbox.value())
     self.months_spinbox.interpretText()
     months = int(self.months_spinbox.value())
     years_is_none = (years == self.years_spinbox.minimum())
     months_is_none = (months == self.months_spinbox.minimum())
     if years_is_none and months_is_none:
         return None
     if years_is_none:
         years = 0
     if months_is_none:
         months = 0
     return (years * 12) + months