svir.thread_worker package¶
Submodules¶
svir.thread_worker.abstract_worker module¶
-
class
svir.thread_worker.abstract_worker.AbstractWorker[source]¶ Bases:
PyQt5.QtCore.QObjectAbstract worker, ihnerit from this and implement the work method
-
error¶
-
finished¶
-
progress¶
-
set_message¶
-
successfully_finished¶
-
toggle_show_cancel¶
-
toggle_show_progress¶
-
-
svir.thread_worker.abstract_worker.set_worker_message(message, message_bar_item)[source]¶ Set the message bar to display the given message
-
svir.thread_worker.abstract_worker.start_worker(worker, message_bar, message)[source]¶ Configure the QgsMessageBar with a Cancel button and start the worker in a new thread
Parameters: - worker – the worker to be started
- message_bar – the message bar to be used to display progress
- message – a message describing the task to be performed
-
svir.thread_worker.abstract_worker.toggle_worker_cancel(show_cancel, cancel_button)[source]¶ Show or hide the cancel button
Parameters: - show_cancel (bool) – indicating if the Cancel button has to be shown
- cancel_button – the button to be shown or hidden
-
svir.thread_worker.abstract_worker.toggle_worker_progress(show_progress, progress_bar)[source]¶ Set the progress to the given progress bar
Parameters: show_progress (bool) – if True, a 0 to 100 progress will be displayed; otherwise, an unquantified progress
svir.thread_worker.download_platform_data_worker module¶
-
class
svir.thread_worker.download_platform_data_worker.DownloadPlatformDataWorker(sv_downloader, sv_variables_ids, load_geometries, country_iso_codes)[source]¶ Bases:
svir.thread_worker.abstract_worker.AbstractWorkerWorker, to download data from a platform
Parameters: - sv_downloader – instance of
svir.utilities.import_sv_data.SvDownloader - sv_variables_ids – comma-separated indicator codes to be downloaded
- load_geometries (bool) – indicating if also zonal geometries have to be downloaded
- country_iso_codes – comma-separated iso codes of the countries for which we want to download socioeconomic data
- sv_downloader – instance of
svir.thread_worker.download_platform_project_worker module¶
-
class
svir.thread_worker.download_platform_project_worker.DownloadPlatformProjectWorker(sv_downloader, layer_id)[source]¶ Bases:
svir.thread_worker.abstract_worker.AbstractWorkerworker, to download an existing project from a platform