straditize.widgets.progress_widget module¶
Progress widget for the straditization
The ProgressWidget defined here is a ListWidget to show the current state of the stradititization.
Disclaimer
Copyright (C) 2018-2019 Philipp S. Sommer
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Classes
|
Task to specify the column names |
|
A task to separate columns |
|
The task to check the data limits |
|
A task for initializing the reader |
|
Task to digitize the data |
|
Task to export the final results |
|
The task to initialize a straditizer |
|
Task to handle occurences |
|
The base class for an item that should be shown in the ProgressWidget |
|
A widget to show the progress of the straditization |
|
Task to clean the binary image |
|
Task to remove y-axes, x-axes, horizontal and vertical lines |
|
Task to edit and find samples |
|
Task to remember saving the project |
|
Task to handle exaggerations |
|
Task to specify the x-axes conversion from pixel to data units |
|
Task to specify the y-axis conversion from pixel to data units |
-
class
straditize.widgets.progress_widget.
ColumnNamesTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
Task to specify the column names
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['columns']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'column_names'¶
-
rst_file
= 'column_names'¶
-
summary
= 'Specify the column names'¶
-
task_tooltip
= 'Click the <i>Edit column names</i> button to insert the names for each column/variable in the diagram'¶
-
class
straditize.widgets.progress_widget.
ColumnsTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
A task to separate columns
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['init_reader']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'columns'¶
-
rst_file
= 'select_column_starts'¶
-
summary
= 'Separate the columns'¶
-
task_tooltip
= 'Separate the columns (subdiagrams) of the stratigraphic diagram'¶
-
class
straditize.widgets.progress_widget.
DataLimitsTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
The task to check the data limits
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['init_stradi']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'datalim'¶
-
rst_file
= 'select_data_part'¶
-
summary
= 'Limits of the diagram'¶
-
task_tooltip
= 'Specify the corners for the data part of the diagram by clicking the <i>Select data part</i> button'¶
-
class
straditize.widgets.progress_widget.
DataReaderTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
A task for initializing the reader
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['datalim']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'init_reader'¶
-
rst_file
= 'select_reader'¶
-
summary
= 'Initialize the diagram reader'¶
-
task_tooltip
= 'Choose the appropriate reader type and click the <i>Convert image</i> button'¶
-
class
straditize.widgets.progress_widget.
DigitizeTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
Task to digitize the data
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['remove_artifacts', 'remove_lines']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'digitize'¶
-
rst_file
= 'digitize'¶
-
summary
= 'Digitize the diagram'¶
-
task_tooltip
= 'Click the `Digitize` button to digitize the diagram'¶
-
class
straditize.widgets.progress_widget.
ExportTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
Task to export the final results
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['samples']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'export'¶
-
rst_file
= 'export'¶
-
summary
= 'Export the final data'¶
-
task_tooltip
= 'Export the final data'¶
-
class
straditize.widgets.progress_widget.
InitStraditizerTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
The task to initialize a straditizer
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'init_stradi'¶
-
rst_file
= 'load_image'¶
-
summary
= 'Load an image or project'¶
-
task_tooltip
= 'Load a straditizer image or project to get started'¶
-
class
straditize.widgets.progress_widget.
OccurencesTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
Task to handle occurences
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['columns']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'occurences'¶
-
rst_file
= 'occurences'¶
-
summary
= 'Select occurence markers'¶
-
task_tooltip
= 'Pollen diagrams often have markers for low taxon percentages to show their occurence. Mark this task as done if your diagram does not have them.'¶
-
class
straditize.widgets.progress_widget.
ProgressTask
(parent)[source]¶ Bases:
PyQt5.QtWidgets.QListWidgetItem
The base class for an item that should be shown in the ProgressWidget
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
The column names reader of the straditizer
The data reader of the straditizer
List of
name
attributes that this task is depending onTrue if
is_finished
ordone_by_user
boolean that is True, when the task is marked as done by the user
The tooltip when the straditizer is done.
A property that is True, when the task is finished
Boolean that is True if the task is ready to be solved
The name of the task
The progress widget that shows this task
rst file that should be displayed on double click. The filename shuould
The state of the task
The straditizer of the GUI
The summary of the task that is shown in the progress widget
The tooltip of the item
Same as
is_finished
but catches every exceptionMethods
refresh
()-
property
colnames_reader
¶ The column names reader of the straditizer
-
property
data_reader
¶ The data reader of the straditizer
-
property
dependencies_tasks
¶
-
property
done
¶ True if
is_finished
ordone_by_user
-
property
done_by_user
¶ boolean that is True, when the task is marked as done by the user
-
done_tooltip
= None¶ The tooltip when the straditizer is done. If None, the
task_tooltip
is used
-
property
is_finished
¶ A property that is True, when the task is finished
-
is_ready
= True¶ Boolean that is True if the task is ready to be solved
-
name
= ''¶ The name of the task
-
property
progress_widget
¶ The progress widget that shows this task
-
rst_file
= None¶ rst file that should be displayed on double click. The filename shuould be without .rst ending.
-
property
state
¶ The state of the task
-
property
straditizer
¶ The straditizer of the GUI
-
summary
= ''¶ The summary of the task that is shown in the progress widget
-
task_tooltip
= ''¶ The tooltip of the item
-
property
try_finished
¶ Same as
is_finished
but catches every exception
-
class
straditize.widgets.progress_widget.
ProgressWidget
(straditizer_widgets, item)[source]¶ Bases:
PyQt5.QtWidgets.QWidget
,straditize.widgets.StraditizerControlBase
A widget to show the progress of the straditization
Attributes
A QComboBox to select which tasks to display (todo, done, not yet ready
A QLabel to display the tooltip of the selected task
A QListWidget to display the
ProgressTask
instancesMethods
contextMenuEvent
(event)Reimplement Qt method
Populate the
progress_list
refresh
()Refresh from the straditizer
Set up the context menu
show_rst
(item[, old])Show the documentation corresponding to a :class:`ProgressTask
update_info_label
(item[, old])Update the
info_label
from aProgressTask
-
combo_display
= None¶ A QComboBox to select which tasks to display (todo, done, not yet ready or all tasks)
-
info_label
= None¶ A QLabel to display the tooltip of the selected task
-
populate_list
()[source]¶ Populate the
progress_list
This method adds instances of the
ProgressTask
class (or it’s subclasses) to the theprogress_list
-
progress_list
= None¶ A QListWidget to display the
ProgressTask
instances
Set up the context menu
-
show_rst
(item, old=None)[source]¶ Show the documentation corresponding to a :class:`ProgressTask
- Parameters
item (ProgressTask) – The task to display it’s
rst_file
in thepsyplot_gui.main.MainWindow.help_explorer
old (ProgressTask) – The old task that has been selected previously (this parameter is ignored)
-
update_info_label
(item, old=None)[source]¶ Update the
info_label
from aProgressTask
- Parameters
item (ProgressTask) – The selected task whose tooltip the
info_label
shall displayold (ProgressTask) – The old task that has been selected previously (this parameter is ignored)
-
-
class
straditize.widgets.progress_widget.
RemoveArtifactsTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
Task to clean the binary image
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['columns']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'remove_artifacts'¶
-
rst_file
= 'removing_features'¶
-
summary
= 'Clean the diagram image'¶
-
task_tooltip
= 'Remove all artifacts in the diagram part that do not represent data. Mark this task as done when you are finished.'¶
-
class
straditize.widgets.progress_widget.
RemoveLinesTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.RemoveArtifactsTask
Task to remove y-axes, x-axes, horizontal and vertical lines
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['columns']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'remove_lines'¶
-
rst_file
= 'remove_lines'¶
-
summary
= 'Remove y-, x-axes and other lines'¶
-
task_tooltip
= 'In order to clean the diagram part, remove all vertical and horizontal lines in the reader image. Mark this task as done when you are finished.'¶
-
class
straditize.widgets.progress_widget.
SamplesTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
Task to edit and find samples
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['digitize']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'samples'¶
-
rst_file
= 'samples'¶
-
summary
= 'Find and edit the samples'¶
-
task_tooltip
= 'Find and edit the samples using the `Edit samples` menu'¶
-
class
straditize.widgets.progress_widget.
SaveProjectTask
(*args, **kwargs)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
Task to remember saving the project
Attributes
Built-in mutable sequence.
True if the project was saved less than 5 minutes ago
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
Methods
tooltip
()-
dependencies
= ['init_stradi']¶
-
property
is_finished
¶ True if the project was saved less than 5 minutes ago
-
name
= 'save_project'¶
-
rst_file
= 'save_and_load'¶
-
summary
= 'Save the straditizer'¶
-
property
task_tooltip
¶ str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
-
-
class
straditize.widgets.progress_widget.
SelectExaggerationsTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
Task to handle exaggerations
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['columns']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'exag'¶
-
rst_file
= 'exaggerations'¶
-
summary
= 'Select exagerations'¶
-
task_tooltip
= 'Pollen diagrams often display an exaggerated value of of the taxon percentage. You can select these exaggerations using the <i>Exaggerations</i> menu. Mark this task as done if your diagram does not have them.'¶
-
class
straditize.widgets.progress_widget.
XTranslationTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
Task to specify the x-axes conversion from pixel to data units
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['columns']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'xaxes_trans'¶
-
rst_file
= 'xaxis_translation'¶
-
summary
= 'Transform the x-axes'¶
-
property
task_tooltip
¶ str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
-
class
straditize.widgets.progress_widget.
YTranslationTask
(parent)[source]¶ Bases:
straditize.widgets.progress_widget.ProgressTask
Task to specify the y-axis conversion from pixel to data units
- Parameters
parent (QListWidget) – The list that holds this item
Attributes
Built-in mutable sequence.
A property that is True, when the task is finished
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
str(object=’’) -> str
-
dependencies
= ['init_reader']¶
-
property
done_tooltip
¶
-
property
is_finished
¶ A property that is True, when the task is finished
-
name
= 'yaxis_trans'¶
-
rst_file
= 'yaxis_translation'¶
-
summary
= 'Transform the y-axis'¶
-
task_tooltip
= 'Transform the y-axis from pixel to data units'¶