SBB Host
Host communication with the self balancing bike.
Loading...
Searching...
No Matches
SettingsDialog Class Reference

A class for the setting dialog. More...

#include <SettingsDialog.h>

Inheritance diagram for SettingsDialog:

Public Member Functions

 SettingsDialog ()
 Constructor. More...
 
void show (Params *p_params, int page)
 Show the dialog. More...
 
int set_params (Params *p_params)
 Set the parameters. More...
 
std::string get_selected_ip ()
 Get the selected ip. More...
 

Protected Attributes

Gtk::Notebook noteBook
 Gtk::Notebook object for the stream, plot setting tabs. More...
 
Gtk::Grid streamGrid
 Gtk::Grid object for the stream setting page. More...
 
Gtk::Grid plotGrid
 Gtk::Grid object for the plot setting page. More...
 
ComboChoiceEntryLabel conntype
 ComboChoiceEntryLabel object for the choiche of the connection type. More...
 
ComboEntryLabel port
 ComboEntryLabel object for the choice of the serial port. More...
 
SpinEntryLabel baud
 SpinEntryLabel object for the baudrate. More...
 
SpinEntryLabel socket_port
 SpinEntryLabel object for the socket port. More...
 
TextEntryLabel socket_ip
 TextEntryLabel object for the socket ip. More...
 
SpinEntryLabel timeout
 SpinEntryLabel object for the timeout. More...
 
TextEntryLabel header
 TextEntryLabel object for the header. More...
 
TextEntryLabel terminator
 TextEntryLabel object for the terminator. More...
 
SpinEntryLabel maxmissings
 SpinEntryLabel object for the timeout. More...
 
SpinEntryLabel winsamples
 SpinEntryLabel object for the shown samples in the stream-graph. More...
 
SpinEntryLabel prevsamples
 SpinEntryLabel object for the foward samples in the stream-graph. More...
 
SpinEntryLabel fps
 SpinEntryLabel object for the stream-graph frame rate. More...
 
SpinEntryLabel stream_decim
 SpinEntryLabel object for the stream-graph decimation. More...
 
Gtk::Button * p_buttonOK
 Pointer to the OK Gtk::Button. More...
 
Gtk::Button * p_buttonCancel
 Pointer to the Cancel Gtk::Button. More...
 
Gtk::Button * p_buttonApply
 Pointer to the Apply Gtk::Button. More...
 

Private Member Functions

void on_conn_type_changed ()
 

Detailed Description

A class for the setting dialog.

Class for setting dialog by extending the Gtk::Dialog class, used in SBBHostApp.

See also
SBBHostApp
Author
Stefano Lovato
Date
2022

Constructor & Destructor Documentation

◆ SettingsDialog()

SettingsDialog::SettingsDialog ( )

Constructor.

Default constructor.

Member Function Documentation

◆ get_selected_ip()

std::string SettingsDialog::get_selected_ip ( )

Get the selected ip.

Function to get the selected ip.

Returns
The IP address.

◆ on_conn_type_changed()

void SettingsDialog::on_conn_type_changed ( )
private

◆ set_params()

int SettingsDialog::set_params ( Params p_params)

Set the parameters.

Function to set the parameters with those of the dialog window.

Parameters
p_paramsThe pointer to the parameter struct where save the values in the dialog window.
Returns
An exit flag (see config.h for details).

◆ show()

void SettingsDialog::show ( Params p_params,
int  page 
)

Show the dialog.

Function to show the dialog. This overrides, and uses, that in Gtk::Dialog.

Parameters
p_paramsThe pointer to the parameter struct to use for the values in the dialog window.
pageThe tab page to be shown when showing the dialog. See STREAM_PAGE and PLOT_PAGE in config.h.

Member Data Documentation

◆ baud

SpinEntryLabel SettingsDialog::baud
protected

SpinEntryLabel object for the baudrate.

◆ conntype

ComboChoiceEntryLabel SettingsDialog::conntype
protected

ComboChoiceEntryLabel object for the choiche of the connection type.

◆ fps

SpinEntryLabel SettingsDialog::fps
protected

SpinEntryLabel object for the stream-graph frame rate.

◆ header

TextEntryLabel SettingsDialog::header
protected

TextEntryLabel object for the header.

◆ maxmissings

SpinEntryLabel SettingsDialog::maxmissings
protected

SpinEntryLabel object for the timeout.

◆ noteBook

Gtk::Notebook SettingsDialog::noteBook
protected

Gtk::Notebook object for the stream, plot setting tabs.

◆ p_buttonApply

Gtk::Button* SettingsDialog::p_buttonApply
protected

Pointer to the Apply Gtk::Button.

◆ p_buttonCancel

Gtk::Button* SettingsDialog::p_buttonCancel
protected

Pointer to the Cancel Gtk::Button.

◆ p_buttonOK

Gtk::Button* SettingsDialog::p_buttonOK
protected

Pointer to the OK Gtk::Button.

◆ plotGrid

Gtk::Grid SettingsDialog::plotGrid
protected

Gtk::Grid object for the plot setting page.

◆ port

ComboEntryLabel SettingsDialog::port
protected

ComboEntryLabel object for the choice of the serial port.

◆ prevsamples

SpinEntryLabel SettingsDialog::prevsamples
protected

SpinEntryLabel object for the foward samples in the stream-graph.

◆ socket_ip

TextEntryLabel SettingsDialog::socket_ip
protected

TextEntryLabel object for the socket ip.

◆ socket_port

SpinEntryLabel SettingsDialog::socket_port
protected

SpinEntryLabel object for the socket port.

◆ stream_decim

SpinEntryLabel SettingsDialog::stream_decim
protected

SpinEntryLabel object for the stream-graph decimation.

◆ streamGrid

Gtk::Grid SettingsDialog::streamGrid
protected

Gtk::Grid object for the stream setting page.

◆ terminator

TextEntryLabel SettingsDialog::terminator
protected

TextEntryLabel object for the terminator.

◆ timeout

SpinEntryLabel SettingsDialog::timeout
protected

SpinEntryLabel object for the timeout.

◆ winsamples

SpinEntryLabel SettingsDialog::winsamples
protected

SpinEntryLabel object for the shown samples in the stream-graph.