示例#1
0
 def get_value(self):
     value_loading = AbstractCustomEditor.get_value(self)
     if value_loading is not None:
         return value_loading
     state = self.checkState()
     if state==Qt.Unchecked:
         return False
     return True
示例#2
0
 def get_value(self):
     value_loading = AbstractCustomEditor.get_value(self)
     if value_loading is not None:
         return value_loading
     state = self.checkState()
     if state == Qt.Unchecked:
         return False
     return True
示例#3
0
 def get_value(self):
     """Get the current value of the combobox"""
     from camelot.core.utils import variant_to_pyobject
     current_index = self.currentIndex()
     if current_index >= 0:
         value = variant_to_pyobject(self.itemData(self.currentIndex()))
     else:
         value = ValueLoading
     return AbstractCustomEditor.get_value(self) or value
示例#4
0
 def get_value(self):
     from camelot.core.utils import variant_to_pyobject
     current_index = self.currentIndex()
     if current_index >= 0:
         language = variant_to_pyobject(self.itemData(self.currentIndex()))
         locale = QtCore.QLocale( language )
         value = unicode( locale.name() )
     else:
         value = None
     return AbstractCustomEditor.get_value(self) or value
示例#5
0
    def get_value(self):
        value_loading = AbstractCustomEditor.get_value(self)
        if value_loading is not None:
            return value_loading

        value = unicode(self.text())
        if self.value_is_none and not value:
            return None

        return value
示例#6
0
 def get_value(self):
     from camelot.core.utils import variant_to_pyobject
     current_index = self.currentIndex()
     if current_index >= 0:
         language = variant_to_pyobject(self.itemData(self.currentIndex()))
         locale = QtCore.QLocale(language)
         value = unicode(locale.name())
     else:
         value = None
     return AbstractCustomEditor.get_value(self) or value
示例#7
0
    def get_value(self):
        value_loading = AbstractCustomEditor.get_value(self)
        if value_loading is not None:
            return value_loading

        value = unicode(self.text())
        if self.value_is_none and not value:
            return None

        return value
示例#8
0
 def get_value(self):
     val = AbstractCustomEditor.get_value(self)
     if val is not None: # we need to distinguish between None
         return val      # and other falsy values
     return unicode(self.toPlainText())
示例#9
0
 def get_value(self):
     value = self.time()
     value = datetime.time(hour=value.hour(),
                           minute=value.minute(),
                           second=value.second())
     return AbstractCustomEditor.get_value(self) or value
示例#10
0
 def get_value(self):
     value = self.time()
     value = datetime.time(hour=value.hour(),
                           minute=value.minute(),
                           second=value.second())
     return AbstractCustomEditor.get_value(self) or value