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

#include <cansignalsender.h>

Inheritance diagram for CanSignalSender:
Collaboration diagram for CanSignalSender:

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
 
void requestRedraw ()
 
void sendSignal (const QString &name, const QVariant &val)
 

Public Member Functions

 CanSignalSender ()
 
 CanSignalSender (CanSignalSenderCtx &&ctx)
 
 ~CanSignalSender ()
 
QWidget * mainWidget () override
 Gets components's main widget.
 
void setConfig (const QJsonObject &json) override
 Sets configuration for component.
 
void setConfig (const QWidget &qobject) override
 Sets configuration for component.
 
QJsonObject getConfig () const override
 Gets current component configuation.
 
std::shared_ptr< QWidget > getQConfig () const override
 Gets current component configuation.
 
void configChanged () override
 Reconfigure component if necessary.
 
bool mainWidgetDocked () const override
 Main widget docking status.
 
ComponentInterface::ComponentProperties getSupportedProperties () const override
 
- 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)
 

Constructor & Destructor Documentation

◆ CanSignalSender() [1/2]

CanSignalSender::CanSignalSender ( )

◆ CanSignalSender() [2/2]

CanSignalSender::CanSignalSender ( CanSignalSenderCtx &&  ctx)
explicit

◆ ~CanSignalSender()

CanSignalSender::~CanSignalSender ( )

Member Function Documentation

◆ configChanged()

void CanSignalSender::configChanged ( )
overridevirtual

Reconfigure component if necessary.

Implements ComponentInterface.

◆ getConfig()

QJsonObject CanSignalSender::getConfig ( ) const
overridevirtual

Gets current component configuation.

Returns
current config

Implements ComponentInterface.

◆ getQConfig()

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

Gets current component configuation.

Returns
current config

Implements ComponentInterface.

◆ getSupportedProperties()

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

Gets list of properties supported by this component

Returns
list of supported properties

Implements ComponentInterface.

◆ mainWidget()

QWidget * CanSignalSender::mainWidget ( )
overridevirtual

Gets components's main widget.

Returns
Main widget or nullptr if component doesn't have it

Implements ComponentInterface.

◆ mainWidgetDocked()

bool CanSignalSender::mainWidgetDocked ( ) const
overridevirtual

Main widget docking status.

Returns
returns true if widget is docked (part of MDI) or undocked (separate window)

Implements ComponentInterface.

◆ mainWidgetDockToggled

void CanSignalSender::mainWidgetDockToggled ( QWidget *  widget)
overridesignal

◆ requestRedraw

void CanSignalSender::requestRedraw ( )
signal

◆ sendSignal

void CanSignalSender::sendSignal ( const QString &  name,
const QVariant &  val 
)
signal

◆ setConfig() [1/2]

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

Sets configuration for component.

Parameters
jsonconfiguration to be aplied

Implements ComponentInterface.

◆ setConfig() [2/2]

void CanSignalSender::setConfig ( const QWidget &  qobject)
overridevirtual

Sets configuration for component.

Parameters
QWidgetconfiguration to be aplied

Implements ComponentInterface.

◆ simBcastRcv

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

◆ simBcastSnd

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

◆ startSimulation

void CanSignalSender::startSimulation ( )
overrideslot

◆ stopSimulation

void CanSignalSender::stopSimulation ( )
overrideslot

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