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

A class with a Gtk::ComboBoxText and Gtk::Label. More...

#include <EntryLabel.h>

Inheritance diagram for ComboEntryLabel:

Public Member Functions

 ComboEntryLabel (std::vector< int > vals, Glib::ustring lbl)
 Constructor. More...
 
void set_entries (std::vector< int > vals)
 Set the values. More...
 
std::vector< int > get_entries ()
 Get the values. More...
 
bool set_selected (int val)
 Set the selected value. More...
 
int get_selected ()
 Get the selected value. More...
 

Protected Attributes

Gtk::ComboBoxText entry
 Gtk::ComboBoxText object. More...
 
Gtk::Box box
 Gtk::Box object of the widget. More...
 
Gtk::Label label
 label string variable. More...
 
std::vector< int > entries
 Vector to store the values of the ComboBoxText. More...
 

Detailed Description

A class with a Gtk::ComboBoxText and Gtk::Label.

Class including a Gtk::ComboBoxText together with a Gtk::Label, used in SettingsDialog.

See also
SettingsDialog
Author
Stefano Lovato
Date
2022

Constructor & Destructor Documentation

◆ ComboEntryLabel()

ComboEntryLabel::ComboEntryLabel ( std::vector< int >  vals,
Glib::ustring  lbl 
)

Constructor.

Default constructor.

Parameters
valsThe values of the ComboBoxText.
lblThe label.

Member Function Documentation

◆ get_entries()

std::vector< int > ComboEntryLabel::get_entries ( )

Get the values.

Function to get the values of the ComboBoxText.

Returns
The values of the ComboBoxText.

◆ get_selected()

int ComboEntryLabel::get_selected ( )

Get the selected value.

Function to get the selected value of the ComboBoxText.

Returns
The selected value of the ComboBoxText.

◆ set_entries()

void ComboEntryLabel::set_entries ( std::vector< int >  vals)

Set the values.

Function to set the values of the ComboBoxText.

Parameters
valsThe values of the ComboBoxText.

◆ set_selected()

bool ComboEntryLabel::set_selected ( int  val)

Set the selected value.

Function to set the selected value of the ComboBoxText.

Parameters
valThe value to set.
Returns
true if success, false othereise.

Member Data Documentation

◆ box

Gtk::Box ComboEntryLabel::box
protected

Gtk::Box object of the widget.

◆ entries

std::vector<int> ComboEntryLabel::entries
protected

Vector to store the values of the ComboBoxText.

◆ entry

Gtk::ComboBoxText ComboEntryLabel::entry
protected

Gtk::ComboBoxText object.

◆ label

Gtk::Label ComboEntryLabel::label
protected

label string variable.