SMTK
@SMTK_VERSION@
Simulation Modeling Tool Kit
|
An operation launcher that emits a signal containing the operation's result after the operation has successfully executed. More...
#include <qtOperationLauncher.h>
Signals | |
void | operationHasResult (QString parametersName, QString resultName, QPrivateSignal) |
Internal signal from the executing subthread to the primary thread indicating the completion of the operation. | |
Public Member Functions | |
std::shared_ptr< ResultHandler > | operator() (const smtk::operation::Operation::Ptr &operation) |
The primary execution method of this functor. More... | |
int | activeOperations () const |
Return the number of operations launched whose results have not been processed yet. | |
Static Public Member Functions | |
static bool | setBusyCursorBehavior (bool enabled) |
Enable or disable switching to a busy-cursor when operations are running. More... | |
Static Public Attributes | |
static constexpr const char *const | type_name = "smtk::extension::qtOperationLauncher" |
An operation launcher that emits a signal containing the operation's result after the operation has successfully executed.
qtOperationLauncher is a functor that executes an operation in a separate thread and emits a signal with the operation's result on the thread containing the launcher.
std::shared_ptr< ResultHandler > smtk::extension::qtOperationLauncher::operator() | ( | const smtk::operation::Operation::Ptr & | operation | ) |
The primary execution method of this functor.
This function returns a new ResultHandler for each operation.
Signal that the operation's result is ready for parsing. The emit should happen later because you'll miss the signal by the time this function returns. Passing a lamda to invokeMethod and using QueuedConnection will allow the emit to happen after the current path of execution.
|
static |
Enable or disable switching to a busy-cursor when operations are running.
The busy-cursor behavior is enabled (true) by default.
The active-operation counter is always running, but whether it causes the application cursor to change is controlled by this method. The return value indicates whether the setting was changed.