11 #ifndef SENSORCOMMANDDIALOG_H 12 #define SENSORCOMMANDDIALOG_H 14 #include <wx/dialog.h> 17 #include <unordered_map> 22 class wxDataViewListModel;
23 class wxHtmlHelpController;
26 class wxFlexGridSizer;
40 wxWindow *parent, wxWindowID
id,
42 int additional_grid_rows,
43 const wxPoint &pos = wxDefaultPosition,
44 long style = wxDEFAULT_DIALOG_STYLE,
45 const wxString &name = wxDialogNameStr);
56 const std::vector<bool>& show = {});
69 std::array<uint8_t, 6>
getMac()
const;
102 std::array<wxTextCtrl *, 6>
mac_;
103 std::unordered_map<unsigned int, unsigned int>
row_map_;
111 #endif // SENSORCOMMANDDIALOG_H std::string getMacString() const
wxBoxSizer * getVerticalBox()
std::unordered_map< unsigned int, unsigned int > row_map_
virtual ~SensorCommandDialog()=default
SensorCommandDialog()=default
void onSensorSelected(wxCommandEvent &event)
Event handler for selection of an device from drop down menu.
const wxDataViewListModel * sensor_list_
virtual void clear()
Reset and clear all fields.
wxFlexGridSizer * getGrid()
Base class for dialogs for sending commands to a camera.
wxHtmlHelpController * help_ctrl_
std::array< wxTextCtrl *, 6 > mac_
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.
void fillMac()
Fill MAC address according to selected device.
void clearMac()
Clear MAC address.
void displayHelp(const std::string §ion)
std::unordered_map< unsigned int, unsigned int > row_map_inv_
void setActiveSensor(const unsigned int row)
Select a specific device of the list set by setDiscoveredSensors.
std::array< uint8_t, 6 > getMac() const