Example #1
0
 def showData(self):
     self.sync_with_widgets.sychClickWithMap(self.tableView.currentIndex())
     row = self.tableView.currentIndex().row()
     index = 2
     self.sexoComboBox.setCurrentText(self.tableView.currentIndex().model().record(row).value(index))
     self.currentItemId = self.tableView.currentIndex().model().record(row).value(0)
     
     if self.currentItemId in self.index_gado_in_log:
         correspondingRow = self.index_gado_in_log.index(self.currentItemId)
         value = self.second_model.model.record(correspondingRow).value(1)
         
         """ Update the comboBox """
         self.acontecimentoComboBox.setCurrentIndex(value - 1)
         
         value = self.second_model.model.record(correspondingRow).value(4)
         """ Update the descricao PlainTextEdit """
         self.descricaoPlainTextEdit.setPlainText(value)
         
         value = self.second_model.model.record(correspondingRow).value(3)
         """ Update the data_acontecimento DateTimeEdit"""
         src.setTxtToWidget(widget = self.acontecimentoDateTime, val = value)
     
     if self.currentItemId in self.index_gado_in_log:
         for widget in self.list_of_widgtes_to_toggle:
             widget.setEnabled(True)
     
     else:
         for widget in self.list_of_widgtes_to_toggle:
             widget.setEnabled(False)
Example #2
0
 def clearData(self):
     for widgt in self.list_of_widgets:
         src.setTxtToWidget(widget=widgt, val='')
Example #3
0
 def clear(self):
     for widgt in self.listOfWidgets:
         src.setTxtToWidget(widget=widgt, val='')
Example #4
0
    def clear(self):
        for widgt in self.listOfWidgetsAcontecimento:
            src.setTxtToWidget(widget=widgt, val='')

        for widg in self.listOfWidgetsGado:
            src.setTxtToWidget(widget=widg, val='')