def init_gui(self): #Set integer validator for the port number int_validator = QIntValidator(1024, 49151) self.txtPort.setValidator(int_validator) #Load profiles self.load_profiles() #Set current profile in the combobox curr_profile = current_profile() if not curr_profile is None: setComboCurrentIndexWithText(self.cbo_profiles, curr_profile.name) #Load current database connection properties self._load_db_conn_properties() #Load existing PostgreSQL connections self._load_qgis_pg_connections() #Load directory paths self._load_directory_paths() # Debug logging lvl = debug_logging() if lvl: self.chk_logging.setCheckState(Qt.Checked) else: self.chk_logging.setCheckState(Qt.Unchecked)
def init_gui(self): # Set integer validator for the port number int_validator = QIntValidator(1024, 49151) self.txtPort.setValidator(int_validator) # Load profiles self.load_profiles() # Set current profile in the combobox curr_profile = current_profile() if not curr_profile is None: setComboCurrentIndexWithText(self.cbo_profiles, curr_profile.name) # Load current database connection properties self._load_db_conn_properties() # Load existing PostgreSQL connections self._load_qgis_pg_connections() # Load directory paths self._load_directory_paths() self.edtEntityRecords.setMaximum(MAX_LIMIT) self.edtEntityRecords.setValue(get_entity_browser_record_limit()) # Sorting order self.populate_sort_order() self.set_current_sort_order(get_entity_sort_order()) # Debug logging lvl = debug_logging() if lvl: self.chk_logging.setCheckState(Qt.Checked) else: self.chk_logging.setCheckState(Qt.Unchecked)
def init_gui(self): #Set integer validator for the port number int_validator = QIntValidator(1024, 49151) self.txtPort.setValidator(int_validator) #Load profiles self.load_profiles() #Set current profile in the combobox curr_profile = current_profile() if not curr_profile is None: setComboCurrentIndexWithText(self.cbo_profiles, curr_profile.name) #Load current database connection properties self._load_db_conn_properties() #Load existing PostgreSQL connections self._load_qgis_pg_connections() #Load directory paths self._load_directory_paths() self.edtEntityRecords.setMaximum(MAX_LIMIT) self.edtEntityRecords.setValue(get_entity_browser_record_limit()) # Debug logging lvl = debug_logging() if lvl: self.chk_logging.setCheckState(Qt.Checked) else: self.chk_logging.setCheckState(Qt.Unchecked)
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 set_current_spatial_field(self, spatial_field): """ Selects the current spatial field column in the combo of available spatial columns. :param spatial_field: Name of the spatial field to select. :type spatial_field: str """ setComboCurrentIndexWithText(self.cboSpatialFields, spatial_field)
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_configuration(self, configuration): # Load referenced table editor with item configuration settings. photo_props = LinkedTableProps(linked_table=configuration.linked_table(), source_field=configuration.source_field(), linked_field=configuration.linked_field()) self.ref_table.set_properties(photo_props) setComboCurrentIndexWithText( self.cbo_document_type, configuration.document_type )
def set_configuration(self, configuration): #Load referenced table editor with item configuration settings. photo_props = LinkedTableProps(linked_table=configuration.linked_table(), source_field=configuration.source_field(), linked_field=configuration.linked_field()) self.ref_table.set_properties(photo_props) setComboCurrentIndexWithText( self.cbo_document_type, configuration.document_type )
def onDataSourceSelected(self, dataSource): """ Slot raised upon selecting a data source from the items. """ # Enable/disable referenced table combo only if an item is selected if self.category() == 'View': if not dataSource: self.cboReferencedTable.setEnabled(False) else: self.cboReferencedTable.setEnabled(True) if self._sync_data_source: setComboCurrentIndexWithText(self.cboReferencedTable, dataSource)
def init_gui(self): # Set integer validator for the port number int_validator = QIntValidator(1024, 49151) self.txtPort.setValidator(int_validator) # Load profiles self.load_profiles() # Set current profile in the combobox curr_profile = current_profile() if not curr_profile is None: setComboCurrentIndexWithText(self.cbo_profiles, curr_profile.name) # Load current database connection properties self._load_db_conn_properties() # Load existing PostgreSQL connections self._load_qgis_pg_connections() # Load directory paths self._load_directory_paths() # Load document repository-related settings self._load_cmis_config() # Load holders configuration file path self._load_holders_configuration_file() # Debug logging lvl = debug_logging() if lvl: self.chk_logging.setCheckState(Qt.Checked) else: self.chk_logging.setCheckState(Qt.Unchecked) # Shortcut dialog self._check_shortcuts_settings() self.chk_shortcut_dlg.toggled.connect(self._on_check_shortcut_checkbox)
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_source_field, table_props.source_field) setComboCurrentIndexWithText(self.cbo_referencing_col, table_props.linked_field)