ifw-fcf  5.0.0-pre2
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DeviceWdg Class Reference

#include <device.h>

Inheritance diagram for DeviceWdg:
AbstractDevice ActuatorWdg AdcWdg DrotWdg IODevWdg LampWdg MotorWdg PiezoWdg ShutterWdg

Public Slots

void SetActive (int index)
 
void UpdateState (int state)
 
bool UpdateSubstate (int substate)
 
void UpdateSpinner (int substate)
 
void UpdateErrorMsg (std::string msg)
 
void HandleSetupButton ()
 

Signals

void TriggerSetup (QString)
 

Public Member Functions

 DeviceWdg (QWidget *parent, std::unique_ptr< utils::bat::DbInterface > &dbinterface, const std::string &name, const int &cmd_timeout)
 
virtual ~DeviceWdg ()
 
std::string GetName ()
 
void Select ()
 
void Deselect ()
 
bool IsSelected ()
 
virtual void Stop ()
 
virtual void GetDbAttributes ()
 
virtual void UpdateData ()
 
virtual void SetEnable (bool flag)
 
- Public Member Functions inherited from AbstractDevice
virtual void StartSubscription ()=0
 
virtual void GetMessage (std::shared_ptr<::elt::mal::Mal > mal, std::vector< std::shared_ptr<::fcfif::SetupElem >> &setup_buffer, bool ignoreChecked=false)=0
 

Protected Member Functions

void SetupCommonUi ()
 
void SetupInfoUi (const std::string &overview, const std::string &desc)
 
bool IsSimulated ()
 
void SetProperty (QPushButton *button, std::string property, bool flag)
 
void SetProperty (QRadioButton *button, std::string property, bool flag)
 
void SetProperty (QLabel *label, std::string property, bool flag)
 
void SetProperty (QComboBox *combo, std::string property, bool flag)
 
void SetProperty (QSpinBox *spin, std::string property, bool flag)
 
void SetProperty (QDoubleSpinBox *spin, std::string property, bool flag)
 

Protected Attributes

QTimer * m_spinner_timer
 
std::unique_ptr< utils::bat::DbInterface > & m_dbinterface
 
std::string m_name
 
int m_cmd_timeout
 
bool m_simulated
 
std::string m_lcs_prefix
 
std::string m_cfg_prefix
 
QString m_error_text {""}
 
QString m_error_tooltip {""}
 
std::vector< std::string > m_dbattribute_vector
 
CommonUi m_ui
 

Constructor & Destructor Documentation

◆ DeviceWdg()

DeviceWdg::DeviceWdg ( QWidget *  parent,
std::unique_ptr< utils::bat::DbInterface > &  dbinterface,
const std::string &  name,
const int &  cmd_timeout 
)
explicit

◆ ~DeviceWdg()

DeviceWdg::~DeviceWdg ( )
virtual

Member Function Documentation

◆ Deselect()

void DeviceWdg::Deselect ( )
virtual

Implements AbstractDevice.

◆ GetDbAttributes()

void DeviceWdg::GetDbAttributes ( )
virtual

◆ GetName()

std::string DeviceWdg::GetName ( )

◆ HandleSetupButton

void DeviceWdg::HandleSetupButton ( )
slot

◆ IsSelected()

bool DeviceWdg::IsSelected ( )
virtual

Implements AbstractDevice.

◆ IsSimulated()

bool DeviceWdg::IsSimulated ( )
protected

◆ Select()

void DeviceWdg::Select ( )
virtual

Implements AbstractDevice.

◆ SetActive

void DeviceWdg::SetActive ( int  index)
slot

◆ SetEnable()

void DeviceWdg::SetEnable ( bool  flag)
virtual

◆ SetProperty() [1/6]

void DeviceWdg::SetProperty ( QComboBox *  combo,
std::string  property,
bool  flag 
)
protected

◆ SetProperty() [2/6]

void DeviceWdg::SetProperty ( QDoubleSpinBox *  spin,
std::string  property,
bool  flag 
)
protected

◆ SetProperty() [3/6]

void DeviceWdg::SetProperty ( QLabel *  label,
std::string  property,
bool  flag 
)
protected

◆ SetProperty() [4/6]

void DeviceWdg::SetProperty ( QPushButton *  button,
std::string  property,
bool  flag 
)
protected

◆ SetProperty() [5/6]

void DeviceWdg::SetProperty ( QRadioButton *  button,
std::string  property,
bool  flag 
)
protected

◆ SetProperty() [6/6]

void DeviceWdg::SetProperty ( QSpinBox *  spin,
std::string  property,
bool  flag 
)
protected

◆ SetupCommonUi()

void DeviceWdg::SetupCommonUi ( )
protected

◆ SetupInfoUi()

void DeviceWdg::SetupInfoUi ( const std::string &  overview,
const std::string &  desc 
)
protected

◆ Stop()

void DeviceWdg::Stop ( )
virtual

Implements AbstractDevice.

◆ TriggerSetup

void DeviceWdg::TriggerSetup ( QString  )
signal

◆ UpdateData()

void DeviceWdg::UpdateData ( )
virtual

◆ UpdateErrorMsg

void DeviceWdg::UpdateErrorMsg ( std::string  msg)
slot

◆ UpdateSpinner

void DeviceWdg::UpdateSpinner ( int  substate)
slot

◆ UpdateState

void DeviceWdg::UpdateState ( int  state)
slot

◆ UpdateSubstate

bool DeviceWdg::UpdateSubstate ( int  substate)
slot

Member Data Documentation

◆ m_cfg_prefix

std::string DeviceWdg::m_cfg_prefix
protected

◆ m_cmd_timeout

int DeviceWdg::m_cmd_timeout
protected

◆ m_dbattribute_vector

std::vector<std::string> DeviceWdg::m_dbattribute_vector
protected

◆ m_dbinterface

std::unique_ptr<utils::bat::DbInterface>& DeviceWdg::m_dbinterface
protected

◆ m_error_text

QString DeviceWdg::m_error_text {""}
protected

◆ m_error_tooltip

QString DeviceWdg::m_error_tooltip {""}
protected

◆ m_lcs_prefix

std::string DeviceWdg::m_lcs_prefix
protected

◆ m_name

std::string DeviceWdg::m_name
protected

◆ m_simulated

bool DeviceWdg::m_simulated
protected

◆ m_spinner_timer

QTimer* DeviceWdg::m_spinner_timer
protected

◆ m_ui

CommonUi DeviceWdg::m_ui
protected

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