CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
QMLExecutor Class Reference

#include <qmlexecutor.h>

Inheritance diagram for QMLExecutor:
Collaboration diagram for QMLExecutor:

Public Slots

void stopSimulation () override
 
void startSimulation () override
 
void simBcastRcv (const QJsonObject &msg, const QVariant &param) override
 

Signals

void mainWidgetDockToggled (QWidget *widget) override
 
void simBcastSnd (const QJsonObject &msg, const QVariant &param=QVariant()) override
 

Public Member Functions

 QMLExecutor ()
 constructor
 
 QMLExecutor (QMLExecutorCtx &&ctx)
 explicit constructor with context
 
virtual ~QMLExecutor ()
 virtual dtor
 
QWidget * mainWidget () override
 
void setConfig (const QJsonObject &json) override
 
void setConfig (const QWidget &qobject) override
 
QJsonObject getConfig () const override
 
std::shared_ptr< QWidget > getQConfig () const override
 
void configChanged () override
 
bool mainWidgetDocked () const override
 
ComponentInterface::ComponentProperties getSupportedProperties () const override
 
void setCANBusModel (CANBusModel *model)
 sets can bus model used from QML
 
- Public Member Functions inherited from ComponentInterface
virtual ~ComponentInterface ()
 
virtual void mainWidgetDockToggled (QWidget *widget)=0
 Signal to be implemented by Component. Indicates when dock/undock action was invoked.
 
virtual void stopSimulation ()=0
 Slot to be implemented by Component to execute simulation stop action.
 
virtual void startSimulation ()=0
 Slot to be implemented by Component to execute simulation start action.
 
virtual void simBcastSnd (const QJsonObject &msg, const QVariant &param=QVariant())=0
 
virtual void simBcastRcv (const QJsonObject &msg, const QVariant &param)=0
 

Additional Inherited Members

- Public Types inherited from ComponentInterface
using PropertyEditable = bool
 
using CustomEditFieldCbk = std::function< QWidget *(void)>
 
using ComponentProperty = std::tuple< QString, QVariant::Type, PropertyEditable, CustomEditFieldCbk >
 
using ComponentProperties = std::vector< ComponentProperty >
 
using PropertyContainer = std::map< QString, QVariant >
 
- Static Public Member Functions inherited from ComponentInterface
static constexpr const QString & propertyName (const ComponentProperty &p)
 
static constexpr const QVariant::Type & propertyType (const ComponentProperty &p)
 
static constexpr const PropertyEditablepropertyEditability (const ComponentProperty &p)
 
static constexpr const CustomEditFieldCbkpropertyField (const ComponentProperty &p)
 

Detailed Description

Constructor & Destructor Documentation

◆ QMLExecutor() [1/2]

QMLExecutor::QMLExecutor ( )

constructor

◆ QMLExecutor() [2/2]

QMLExecutor::QMLExecutor ( QMLExecutorCtx &&  ctx)
explicit

explicit constructor with context

Parameters
ctxa context with something inside, most likely an ui

◆ ~QMLExecutor()

QMLExecutor::~QMLExecutor ( )
virtual

virtual dtor

Member Function Documentation

◆ configChanged()

void QMLExecutor::configChanged ( )
overridevirtual

◆ getConfig()

QJsonObject QMLExecutor::getConfig ( ) const
overridevirtual
See also
ComponentInterface::

Implements ComponentInterface.

◆ getQConfig()

std::shared_ptr< QWidget > QMLExecutor::getQConfig ( ) const
overridevirtual

◆ getSupportedProperties()

ComponentInterface::ComponentProperties QMLExecutor::getSupportedProperties ( ) const
overridevirtual

◆ mainWidget()

QWidget * QMLExecutor::mainWidget ( )
overridevirtual

◆ mainWidgetDocked()

bool QMLExecutor::mainWidgetDocked ( ) const
overridevirtual

◆ mainWidgetDockToggled

void QMLExecutor::mainWidgetDockToggled ( QWidget *  widget)
overridesignal

◆ setCANBusModel()

void QMLExecutor::setCANBusModel ( CANBusModel model)

sets can bus model used from QML

Parameters
modelcan bus model used from qml

◆ setConfig() [1/2]

void QMLExecutor::setConfig ( const QJsonObject &  json)
overridevirtual

◆ setConfig() [2/2]

void QMLExecutor::setConfig ( const QWidget &  qobject)
overridevirtual
See also
ComponentInterface::

Implements ComponentInterface.

◆ simBcastRcv

void QMLExecutor::simBcastRcv ( const QJsonObject &  msg,
const QVariant &  param 
)
overrideslot

◆ simBcastSnd

void QMLExecutor::simBcastSnd ( const QJsonObject &  msg,
const QVariant &  param = QVariant() 
)
overridesignal

◆ startSimulation

void QMLExecutor::startSimulation ( )
overrideslot

◆ stopSimulation

void QMLExecutor::stopSimulation ( )
overrideslot

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