SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
smtk::extension::qtOperationLauncher Class Reference

An operation launcher that emits a signal containing the operation's result after the operation has successfully executed. More...

#include <qtOperationLauncher.h>

Inheritance diagram for smtk::extension::qtOperationLauncher:
[legend]
Collaboration diagram for smtk::extension::qtOperationLauncher:
[legend]

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< ResultHandleroperator() (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"
 

Detailed Description

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.

Member Function Documentation

◆ operator()()

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.

◆ setBusyCursorBehavior()

static bool smtk::extension::qtOperationLauncher::setBusyCursorBehavior ( bool  enabled)
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.


The documentation for this class was generated from the following files: