def set_configuration(self, configuration): setComboCurrentIndexWithText(self.cbo_x_field, configuration.x_field()) self.txt_x_label.setText(configuration.x_label()) self.txt_y_label.setText(configuration.y_label()) #Set barvalue configurations for bar_cfg in configuration.value_configurations(): self.add_value_configuration(bar_cfg)
def _load_legend_positions(self): from stdm.composer import legend_positions self.cbo_legend_pos.clear() for k,v in legend_positions.iteritems(): self.cbo_legend_pos.addItem(k,v) #Select 'Automatic' option setComboCurrentIndexWithText(self.cbo_legend_pos, QApplication.translate("ChartConfiguration", "Automatic"))
def set_properties(self, table_props): """ Sets the combo selection based on the text in the linked table object properties. :param table_props: Object containing the linked table information. :type table_props: LinkedTableProps """ setComboCurrentIndexWithText(self.cbo_ref_table, table_props.linked_table) setComboCurrentIndexWithText(self.cbo_referencing_col, table_props.linked_field) setComboCurrentIndexWithText(self.cbo_source_field, table_props.source_field)