SBB Host
Host communication with the self balancing bike.
Loading...
Searching...
No Matches
SettingsDialog.h
Go to the documentation of this file.
1
2#ifndef SETTINGWIN_H
3#define SETTINGWIN_H
4
5#include <gtkmm.h>
6#include "Serial.h"
7#include "Params.h"
8#include "EntryLabel.h"
9#include "SBBUtils.h"
10
11#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) || defined(__WIN32__) || defined(WIN64) || defined(_WIN64) || defined(__WIN64) || defined(__WIN64__)
12#ifndef OS_WIN
13#define OS_WIN
14#endif
15#elif defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNUC__) || defined(__GNUG__) || defined(unix) || defined(__unix) || defined(__unix__)
16#ifndef OS_LINUX
17#define OS_LINUX
18#endif
19#else
20#error OS not supported
21#endif
22
29class SettingsDialog : public Gtk::Dialog {
30public:
35
41 void show(Params* p_params, int page);
42
48 int set_params(Params* p_params);
49
54 std::string get_selected_ip();
55
56protected:
57 //objects
58 Gtk::Notebook noteBook;
59 Gtk::Grid streamGrid;
60 Gtk::Grid plotGrid;
74 //Gtk::Separator hsep0, hsep1, hsep2, hsep3, hsep4;
75 //Gtk::Separator vsep0;
76
77 //pointers to Gtk objects
78 Gtk::Button* p_buttonOK;
79 Gtk::Button* p_buttonCancel;
80 Gtk::Button* p_buttonApply;
81
82private:
83 //void on_ok_button_pressed();
84 //void on_apply_button_pressed();
85 //void on_cancel_button_pressed();
87};
88
89#endif
A class with a Gtk::ComboBoxText and Gtk::Label. Slightly different from ComboEntryLabel.
Definition: EntryLabel.h:134
A class with a Gtk::ComboBoxText and Gtk::Label.
Definition: EntryLabel.h:86
A class for the application setting parameters.
Definition: Params.h:16
A class for the setting dialog.
Definition: SettingsDialog.h:29
ComboEntryLabel port
ComboEntryLabel object for the choice of the serial port.
Definition: SettingsDialog.h:62
Gtk::Button * p_buttonOK
Pointer to the OK Gtk::Button.
Definition: SettingsDialog.h:78
TextEntryLabel header
TextEntryLabel object for the header.
Definition: SettingsDialog.h:67
Gtk::Button * p_buttonApply
Pointer to the Apply Gtk::Button.
Definition: SettingsDialog.h:80
SpinEntryLabel maxmissings
SpinEntryLabel object for the timeout.
Definition: SettingsDialog.h:69
SpinEntryLabel baud
SpinEntryLabel object for the baudrate.
Definition: SettingsDialog.h:63
Gtk::Grid plotGrid
Gtk::Grid object for the plot setting page.
Definition: SettingsDialog.h:60
int set_params(Params *p_params)
Set the parameters.
Gtk::Grid streamGrid
Gtk::Grid object for the stream setting page.
Definition: SettingsDialog.h:59
std::string get_selected_ip()
Get the selected ip.
ComboChoiceEntryLabel conntype
ComboChoiceEntryLabel object for the choiche of the connection type.
Definition: SettingsDialog.h:61
SpinEntryLabel socket_port
SpinEntryLabel object for the socket port.
Definition: SettingsDialog.h:64
SpinEntryLabel stream_decim
SpinEntryLabel object for the stream-graph decimation.
Definition: SettingsDialog.h:73
SpinEntryLabel prevsamples
SpinEntryLabel object for the foward samples in the stream-graph.
Definition: SettingsDialog.h:71
Gtk::Notebook noteBook
Gtk::Notebook object for the stream, plot setting tabs.
Definition: SettingsDialog.h:58
TextEntryLabel terminator
TextEntryLabel object for the terminator.
Definition: SettingsDialog.h:68
TextEntryLabel socket_ip
TextEntryLabel object for the socket ip.
Definition: SettingsDialog.h:65
SpinEntryLabel fps
SpinEntryLabel object for the stream-graph frame rate.
Definition: SettingsDialog.h:72
void on_conn_type_changed()
Gtk::Button * p_buttonCancel
Pointer to the Cancel Gtk::Button.
Definition: SettingsDialog.h:79
SpinEntryLabel timeout
SpinEntryLabel object for the timeout.
Definition: SettingsDialog.h:66
SettingsDialog()
Constructor.
SpinEntryLabel winsamples
SpinEntryLabel object for the shown samples in the stream-graph.
Definition: SettingsDialog.h:70
void show(Params *p_params, int page)
Show the dialog.
A class with a Gtk::SpinButton and Gtk::Label.
Definition: EntryLabel.h:15
A class with a Gtk::Entry and Gtk::Label.
Definition: EntryLabel.h:52