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

#include <cansignaldata.h>

Inheritance diagram for CanSignalData:
Collaboration diagram for CanSignalData:

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

 CanSignalData ()
 
 CanSignalData (CanSignalDataCtx &&ctx)
 
 ~CanSignalData ()
 
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

◆ CanSignalData() [1/2]

CanSignalData::CanSignalData ( )

◆ CanSignalData() [2/2]

CanSignalData::CanSignalData ( CanSignalDataCtx &&  ctx)
explicit

◆ ~CanSignalData()

CanSignalData::~CanSignalData ( )

Member Function Documentation

◆ configChanged()

void CanSignalData::configChanged ( )
overridevirtual

Reconfigure component if necessary.

Implements ComponentInterface.

◆ getConfig()

QJsonObject CanSignalData::getConfig ( ) const
overridevirtual

Gets current component configuation.

Returns
current config

Implements ComponentInterface.

◆ getQConfig()

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

Gets current component configuation.

Returns
current config

Implements ComponentInterface.

◆ getSupportedProperties()

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

Gets list of properties supported by this component

Returns
list of supported properties

Implements ComponentInterface.

◆ mainWidget()

QWidget * CanSignalData::mainWidget ( )
overridevirtual

Gets components's main widget.

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

Implements ComponentInterface.

◆ mainWidgetDocked()

bool CanSignalData::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 CanSignalData::mainWidgetDockToggled ( QWidget *  widget)
overridesignal

◆ setConfig() [1/2]

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

Sets configuration for component.

Parameters
jsonconfiguration to be aplied

Implements ComponentInterface.

◆ setConfig() [2/2]

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

Sets configuration for component.

Parameters
QWidgetconfiguration to be aplied

Implements ComponentInterface.

◆ simBcastRcv

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

◆ simBcastSnd

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

◆ startSimulation

void CanSignalData::startSimulation ( )
overrideslot

◆ stopSimulation

void CanSignalData::stopSimulation ( )
overrideslot

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