CANdevStudio
Development tool for CAN bus simulation
|
Interface to be implemented by every component. More...
#include <componentinterface.h>
Public Types | |
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 > |
Public Member Functions | |
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 | setConfig (const QJsonObject &json)=0 |
Sets configuration for component. | |
virtual void | setConfig (const QWidget &qobject)=0 |
Sets configuration for component. | |
virtual void | configChanged ()=0 |
Reconfigure component if necessary. | |
virtual QJsonObject | getConfig () const =0 |
Gets current component configuation. | |
virtual std::shared_ptr< QWidget > | getQConfig () const =0 |
Gets current component configuation. | |
virtual ComponentProperties | getSupportedProperties () const =0 |
virtual QWidget * | mainWidget ()=0 |
Gets components's main widget. | |
virtual bool | mainWidgetDocked () const =0 |
Main widget docking status. | |
virtual void | simBcastSnd (const QJsonObject &msg, const QVariant ¶m=QVariant())=0 |
virtual void | simBcastRcv (const QJsonObject &msg, const QVariant ¶m)=0 |
Static Public Member Functions | |
static constexpr const QString & | propertyName (const ComponentProperty &p) |
static constexpr const QVariant::Type & | propertyType (const ComponentProperty &p) |
static constexpr const PropertyEditable & | propertyEditability (const ComponentProperty &p) |
static constexpr const CustomEditFieldCbk & | propertyField (const ComponentProperty &p) |
Interface to be implemented by every component.
using ComponentInterface::ComponentProperties = std::vector<ComponentProperty> |
using ComponentInterface::ComponentProperty = std::tuple<QString, QVariant::Type, PropertyEditable, CustomEditFieldCbk> |
using ComponentInterface::CustomEditFieldCbk = std::function<QWidget*(void)> |
using ComponentInterface::PropertyContainer = std::map<QString, QVariant> |
using ComponentInterface::PropertyEditable = bool |
|
inlinevirtual |
|
pure virtual |
Reconfigure component if necessary.
Implemented in CanDevice, CanLoad, CanRawFilter, CanRawLogger, CanRawPlayer, CanRawSender, CanRawView, CanSignalData, CanSignalDecoder, CanSignalEncoder, CanSignalSender, CanSignalViewer, and QMLExecutor.
|
pure virtual |
Gets current component configuation.
Implemented in CanDevice, CanLoad, CanRawFilter, CanRawLogger, CanRawPlayer, CanRawSender, CanRawView, CanSignalData, CanSignalDecoder, CanSignalEncoder, CanSignalSender, CanSignalViewer, and QMLExecutor.
|
pure virtual |
Gets current component configuation.
Implemented in CanDevice, CanLoad, CanRawFilter, CanRawLogger, CanRawPlayer, CanRawSender, CanRawView, CanSignalData, CanSignalDecoder, CanSignalEncoder, CanSignalSender, CanSignalViewer, and QMLExecutor.
|
pure virtual |
Gets list of properties supported by this component
Implemented in CanDevice, CanLoad, CanRawFilter, CanRawLogger, CanRawPlayer, CanRawSender, CanRawView, CanSignalData, CanSignalDecoder, CanSignalEncoder, CanSignalSender, CanSignalViewer, and QMLExecutor.
|
pure virtual |
Gets components's main widget.
Implemented in CanDevice, CanLoad, CanRawFilter, CanRawLogger, CanRawPlayer, CanRawSender, CanRawView, CanSignalData, CanSignalDecoder, CanSignalEncoder, CanSignalSender, CanSignalViewer, and QMLExecutor.
|
pure virtual |
Main widget docking status.
Implemented in CanDevice, CanLoad, CanRawFilter, CanRawLogger, CanRawPlayer, CanRawSender, CanRawView, CanSignalData, CanSignalDecoder, CanSignalEncoder, CanSignalSender, CanSignalViewer, and QMLExecutor.
|
pure virtual |
Signal to be implemented by Component. Indicates when dock/undock action was invoked.
widget | Widget subjected to dock/undock action |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
pure virtual |
Sets configuration for component.
json | configuration to be aplied |
Implemented in CanDevice, CanLoad, CanRawFilter, CanRawLogger, CanRawPlayer, CanRawSender, CanRawView, CanSignalData, CanSignalDecoder, CanSignalEncoder, CanSignalSender, CanSignalViewer, and QMLExecutor.
|
pure virtual |
Sets configuration for component.
QWidget | configuration to be aplied |
Implemented in CanDevice, CanLoad, CanRawFilter, CanRawLogger, CanRawPlayer, CanRawSender, CanRawView, CanSignalData, CanSignalDecoder, CanSignalEncoder, CanSignalSender, CanSignalViewer, and QMLExecutor.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Slot to be implemented by Component to execute simulation start action.
|
pure virtual |
Slot to be implemented by Component to execute simulation stop action.