svir.thread_worker package¶
Submodules¶
svir.thread_worker.abstract_worker module¶
-
class
svir.thread_worker.abstract_worker.
AbstractWorker
[source]¶ Bases:
PyQt4.QtCore.QObject
Abstract 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¶
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.AbstractWorker
worker, to download an existing project from a platform