Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
SensorCommandDialog Class Reference

Base class for dialogs for sending commands to a camera. More...

#include <sensor-command-dialog.h>

Inheritance diagram for SensorCommandDialog:
Inheritance graph
[legend]

Public Member Functions

 SensorCommandDialog ()=default
 
 SensorCommandDialog (wxHtmlHelpController *help_ctrl, wxWindow *parent, wxWindowID id, std::string title, int additional_grid_rows, const wxPoint &pos=wxDefaultPosition, long style=wxDEFAULT_DIALOG_STYLE, const wxString &name=wxDialogNameStr)
 
void setActiveSensor (const unsigned int row)
 Select a specific device of the list set by setDiscoveredSensors. More...
 
void setDiscoveredSensors (const wxDataViewListModel *sensor_list, const std::vector< bool > &show={})
 Set list of discovered devices to provide a drop down menu to the user. More...
 
virtual ~SensorCommandDialog ()=default
 

Protected Member Functions

virtual void clear ()
 Reset and clear all fields. More...
 
void displayHelp (const std::string &section)
 
wxFlexGridSizer * getGrid ()
 
std::array< uint8_t, 6 > getMac () const
 
std::string getMacString () const
 
wxPanel * getPanel ()
 
wxBoxSizer * getVerticalBox ()
 

Private Member Functions

void clearMac ()
 Clear MAC address. More...
 
void fillMac ()
 Fill MAC address according to selected device. More...
 
void onSensorSelected (wxCommandEvent &event)
 Event handler for selection of an device from drop down menu. More...
 
 wxDECLARE_EVENT_TABLE ()
 

Private Attributes

wxFlexGridSizer * grid_
 
wxHtmlHelpController * help_ctrl_
 
std::array< wxTextCtrl *, 6 > mac_
 
wxPanel * panel_
 
std::unordered_map< unsigned int, unsigned int > row_map_
 
std::unordered_map< unsigned int, unsigned int > row_map_inv_
 
const wxDataViewListModel * sensor_list_
 
wxChoice * sensors_
 
wxBoxSizer * vbox_
 

Detailed Description

Base class for dialogs for sending commands to a camera.

It will add a drop down list containing the discovered cameras and text boxes for the MAC address.

Definition at line 34 of file sensor-command-dialog.h.

Constructor & Destructor Documentation

SensorCommandDialog::SensorCommandDialog ( )
default
SensorCommandDialog::SensorCommandDialog ( wxHtmlHelpController *  help_ctrl,
wxWindow *  parent,
wxWindowID  id,
std::string  title,
int  additional_grid_rows,
const wxPoint &  pos = wxDefaultPosition,
long  style = wxDEFAULT_DIALOG_STYLE,
const wxString &  name = wxDialogNameStr 
)

Definition at line 30 of file sensor-command-dialog.cc.

virtual SensorCommandDialog::~SensorCommandDialog ( )
virtualdefault

Member Function Documentation

void SensorCommandDialog::clear ( )
protectedvirtual

Reset and clear all fields.

Definition at line 203 of file sensor-command-dialog.cc.

void SensorCommandDialog::clearMac ( )
private

Clear MAC address.

Definition at line 246 of file sensor-command-dialog.cc.

void SensorCommandDialog::displayHelp ( const std::string &  section)
protected

Definition at line 193 of file sensor-command-dialog.cc.

void SensorCommandDialog::fillMac ( )
private

Fill MAC address according to selected device.

Definition at line 223 of file sensor-command-dialog.cc.

wxFlexGridSizer * SensorCommandDialog::getGrid ( )
protected

Definition at line 143 of file sensor-command-dialog.cc.

std::array< uint8_t, 6 > SensorCommandDialog::getMac ( ) const
protected

Definition at line 148 of file sensor-command-dialog.cc.

std::string SensorCommandDialog::getMacString ( ) const
protected

Definition at line 174 of file sensor-command-dialog.cc.

wxPanel * SensorCommandDialog::getPanel ( )
protected

Definition at line 138 of file sensor-command-dialog.cc.

wxBoxSizer * SensorCommandDialog::getVerticalBox ( )
protected

Definition at line 133 of file sensor-command-dialog.cc.

void SensorCommandDialog::onSensorSelected ( wxCommandEvent &  event)
private

Event handler for selection of an device from drop down menu.

Parameters
eventevent

Definition at line 208 of file sensor-command-dialog.cc.

void SensorCommandDialog::setActiveSensor ( const unsigned int  row)

Select a specific device of the list set by setDiscoveredSensors.

Parameters
rowrow of device list

Definition at line 117 of file sensor-command-dialog.cc.

void SensorCommandDialog::setDiscoveredSensors ( const wxDataViewListModel *  sensor_list,
const std::vector< bool > &  show = {} 
)

Set list of discovered devices to provide a drop down menu to the user.

Parameters
sensor_listlist of devices

Definition at line 83 of file sensor-command-dialog.cc.

SensorCommandDialog::wxDECLARE_EVENT_TABLE ( )
private

Member Data Documentation

wxFlexGridSizer* SensorCommandDialog::grid_
private

Definition at line 100 of file sensor-command-dialog.h.

wxHtmlHelpController* SensorCommandDialog::help_ctrl_
private

Definition at line 108 of file sensor-command-dialog.h.

std::array<wxTextCtrl *, 6> SensorCommandDialog::mac_
private

Definition at line 102 of file sensor-command-dialog.h.

wxPanel* SensorCommandDialog::panel_
private

Definition at line 98 of file sensor-command-dialog.h.

std::unordered_map<unsigned int, unsigned int> SensorCommandDialog::row_map_
private

Definition at line 103 of file sensor-command-dialog.h.

std::unordered_map<unsigned int, unsigned int> SensorCommandDialog::row_map_inv_
private

Definition at line 104 of file sensor-command-dialog.h.

const wxDataViewListModel* SensorCommandDialog::sensor_list_
private

Definition at line 106 of file sensor-command-dialog.h.

wxChoice* SensorCommandDialog::sensors_
private

Definition at line 101 of file sensor-command-dialog.h.

wxBoxSizer* SensorCommandDialog::vbox_
private

Definition at line 99 of file sensor-command-dialog.h.


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


rcdiscover
Author(s): Heiko Hirschmueller , Raphael Schaller
autogenerated on Sun Apr 18 2021 02:16:32