4#include "moc_EventSender.cpp"
5#include "ui_EventSender.h"
11 : QModuleWidget(Owner, parent),
20 EventID = Item->data(Qt::UserRole).value<
size_t>();
41 ModuleData->Communicator->PostEvent(*
this, *Event);
55 auto Widget = std::make_unique<EventSenderWidget>(*
this);
62 auto Widget = GetWidget<EventSenderWidget>();
63 auto ModuleData = DynExp::dynamic_ModuleData_cast<EventSender>(ModuleDataGetter());
69 for (
auto& Event : Events)
71 const auto E = Event.second();
73 auto ListItem =
new QListWidgetItem(QString::fromStdString(E->GetName()),
Widget->ui->LWEvents);
74 ListItem->setToolTip(
"ID " + QString::number(Event.first));
75 ListItem->setData(Qt::UserRole, QVariant::fromValue(Event.first));
92 auto ModuleParams = DynExp::dynamic_Params_cast<EventSender>(Instance->
ParamsGetter());
Implementation of a module to let the user manually issue inter-module events.
void ResetImpl(dispatch_tag< QModuleDataBase >) override final
Util::DynExpErrorCodes::DynExpErrorCodes ModuleMainLoop(DynExp::ModuleInstance &Instance) override final
Module main loop. The function is executed periodically by the module thread. Also refer to GetMainLo...
void ResetImpl(dispatch_tag< QModuleBase >) override final
void OnExit(DynExp::ModuleInstance *Instance) const override final
This event is triggered right before the module thread terminates (not due to an exception,...
std::unique_ptr< DynExp::QModuleWidget > MakeUIWidget() override final
Used by InitUI() as a factory function for the module's user interface widget. Create the widget here...
void OnInit(DynExp::ModuleInstance *Instance) const override final
This event is triggered right before the module thread starts. Override it to lock instruments this m...
void UpdateUIChild(const ModuleBase::ModuleDataGetterType &ModuleDataGetter) override final
static InterModuleEventLibrary & Get()
Getter for the singleton instance of InterModuleEventLibrary.
auto & GetEvents() const noexcept
Getter for Events.
const std::unique_ptr< ModuleDataType > ModuleData
Module data belonging to this ModuleBase instance.
Refer to ParamsBase::dispatch_tag.
Defines data for a thread belonging to a ModuleBase instance. Refer to RunnableInstance.
const ModuleBase::ModuleDataGetterType ModuleDataGetter
Getter for module's data. Refer to ModuleBase::ModuleDataGetterType.
Refer to ParamsBase::dispatch_tag.
QModuleWidget * Widget
User interface widget belonging to the module.
const Object::ParamsGetterType ParamsGetter
Invoke to obtain the parameters (derived from ParamsBase) of Owner.
void UnlockObject(LinkedObjectWrapperContainer< ObjectT > &ObjectWrapperContainer)
Unlocks an Object instance stored in the LinkedObjectWrapperContainer ObjectWrapperContainer....
void LockObject(const ParamsBase::Param< ObjectLink< ObjectT > > &LinkParam, LinkedObjectWrapperContainer< ObjectT > &ObjectWrapperContainer, std::chrono::milliseconds Timeout=ObjectLinkBase::LockObjectTimeoutDefault)
Locks an Object instance referenced by a parameter LinkParam of type ParamsBase::Param< ObjectLink< O...
DynExp's module namespace contains the implementation of DynExp modules which extend DynExp's core fu...
DynExpErrorCodes
DynExp's error codes
Accumulates include statements to provide a precompiled header.