Debian Codegraph @

Source/Widgets/TriggerSelector.cpp

raw
1 /*
2 * TriggerSelector.cpp
3 *
4 * Created on: 14 Mar 2017
5 * Author: jeremy
6 */
7
8 #include "TriggerSelector.h"
9
10 namespace Widgets
11 {
12
13
14 TriggerSelector::TriggerSelector(int sensorId)
15 : sensorId(sensorId), label("Trigger " + std::to_string(sensorId)),
16 preferencesButton(Gtk::StockID("gtk-preferences")),
17 deleteButton(Gtk::StockID("gtk-delete"))
18 {
19
20 this->set_halign(Gtk::Align::ALIGN_START);
21 this->set_column_homogeneous(true);
22
23 // Set label
24 label.set_halign(Gtk::Align::ALIGN_END);
25 label.set_margin_right(8);
26 label.show();
27 this->attach(label, 0, 0, 1, 1);
28
29 // Set preferences button
30 this->attach_next_to(preferencesButton, label, Gtk::PositionType::POS_RIGHT, 1, 1);
31 preferencesButton.set_margin_right(4);
32 preferencesButton.show();
33
34 // Set delete button
35 this->attach_next_to(deleteButton, preferencesButton, Gtk::PositionType::POS_RIGHT, 1, 1);
36 deleteButton.show();
37
38
39 this->show();
40
41 return;
42 }
43
44
45 } /* namespace Widgets */