Basic implementation for PluginProgress interface.
More...
#include <SimplePluginProgress.h>
List of all members.
Public Member Functions
- SimplePluginProgress ()
- virtual ProgressState progress (int step, int max_step)
- Notify the progression of the process.
- virtual void cancel ()
- Sets the state flag to cancel, notifying to the process that the user wants to cancel it. Canceling a process must stop it and revert all the changes performed since its start.
- virtual void stop ()
- Sets the state flag to stop, notifying to the process that the user wants to stop it. Stopping a process does not revert changes.
- virtual bool isPreviewMode () const
- The preview mode redraws the graph while applying the algorithm, making it slower.
- virtual void setPreviewMode (bool)
- The preview mode redraws the graph while applying the algorithm, making it slower.
- virtual void showPreview (bool)
- This tells the widget if it should show a preview checkbox, allowing the user to decide if the algorithm should draw a preview or not.
- virtual ProgressState state () const
- Gets the current internal state of the PluginProgress.
- virtual std::string getError ()
- Returns a message describing the error encountered during the process. If no error has been encountered, an empty string is returned.
- virtual void setError (std::string error)
- Sets the message describing the error encountered during the process.
- virtual void setComment (std::string)
- Changes the comment about the process progression.
Protected Member Functions
Detailed Description
Basic implementation for PluginProgress interface.
Constructor & Destructor Documentation
Member Function Documentation
Sets the state flag to cancel, notifying to the process that the user wants to cancel it. Canceling a process must stop it and revert all the changes performed since its start.
- Returns:
- void
Implements tlp::PluginProgress.
Returns a message describing the error encountered during the process. If no error has been encountered, an empty string is returned.
- Returns:
- :string A description of the encountered error, if any.
Implements tlp::PluginProgress.
The preview mode redraws the graph while applying the algorithm, making it slower.
- Returns:
- bool Whether the preview mode is activated.
Implements tlp::PluginProgress.
Notify the progression of the process.
- Parameters:
-
| step | The current step number. |
| max_step | The total number of steps. |
- Returns:
- :ProgressState a value indicating whether the progress has been stopped, cancelled, or will continue.
Implements tlp::PluginProgress.
Changes the comment about the process progression.
- Parameters:
-
| comment | A description of what the plugin is currently doing, displayed to inform the user. |
- Returns:
- void
Implements tlp::PluginProgress.
Sets the message describing the error encountered during the process.
- Parameters:
-
| error | The description of the encountered error. |
- Returns:
- void
Implements tlp::PluginProgress.
The preview mode redraws the graph while applying the algorithm, making it slower.
- Parameters:
-
| drawPreview | Whether the preview should be drawn. |
- Returns:
- void
Implements tlp::PluginProgress.
This tells the widget if it should show a preview checkbox, allowing the user to decide if the algorithm should draw a preview or not.
- Parameters:
-
| showPreview | Whether the progress widget should contain a preview checkbox or not. |
- Returns:
- void
Implements tlp::PluginProgress.
Sets the state flag to stop, notifying to the process that the user wants to stop it. Stopping a process does not revert changes.
- Returns:
- void
Implements tlp::PluginProgress.