dicogis.ui.mw_dicogis module¶
DicoGIS Automatize the creation of a dictionnary of geographic data contained in a folders structures. It produces an Excel output file (.xlsx)
Julien Moura (@geojulien)
- class dicogis.ui.mw_dicogis.DicoGIS(parent=None)¶
Bases:
QMainWindowMain DicoGIS GUI object.
- Parameters:
QMainWindow – inherited Qt main window.
- __init__(parent=None)¶
Main window constructor.
- check_fields(tab_data_type)¶
Check if required form fields are not empty.
- closeEvent(event)¶
Ensure background threads are stopped before the window closes.
A running operation is only stopped once the user confirmed it.
quit() only asks a thread’s event loop to return, which a worker blocked in its own run() never reaches: without the cancellation request below, closing during a scan or an analysis froze the window for the whole timeout and still left the thread running.
- Return type:
- get_selected_output_format()¶
Return the currently selected output format.
- Return type:
- on_folder_selected(foldername)¶
React to a folder being picked in the Files tab: set the default output filename and start the background folder scan.
- output_format_imposed()¶
Tell whether the output format is imposed by its environment variable.
- Returns:
not to save
- Return type:
True if DICOGIS_OUTPUT_FORMAT gives it
- package_about = <module 'dicogis.__about__' from '/__w/DicoGIS/DicoGIS/dicogis/__about__.py'>¶
- process_db(sgbd_reader)¶
Launch PostGIS DB analysis in a background worker.
- Parameters:
sgbd_reader (
ReadPostGIS) – PostGIS georeader- Return type:
- process_publish()¶
Launch the publication in the background: in a QgsTask inside QGIS, the way it expects long operations to run, in a worker thread otherwise.
- Return type:
- set_active_tab_index(index)¶
Select the active tab by index.
- set_selected_language(language_code)¶
Select a language and retranslate the UI.
- set_selected_output_format(output_format)¶
Select an output format. Unknown values are logged and ignored.
- set_status_message(message, level=StatusLevel.INFO)¶
Update the status label text, a warning or an error getting an icon and a prefix.
- Parameters:
message (
str) – message to display.level (
StatusLevel) – level of the message.
- Return type:
- test_connection()¶
Test database connection.
- Returns:
PostGIS reader or None
- Return type:
Optional[ReadPostGIS]