File: TriggerSelector.cpp

package info (click to toggle)
exadrums 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 5,728 kB
  • sloc: cpp: 2,880; xml: 165; makefile: 76
file content (45 lines) | stat: -rw-r--r-- 963 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * TriggerSelector.cpp
 *
 *  Created on: 14 Mar 2017
 *      Author: jeremy
 */

#include "TriggerSelector.h"

namespace Widgets
{


	TriggerSelector::TriggerSelector(int sensorId)
	: sensorId(sensorId), label("Trigger " + std::to_string(sensorId)),
	  preferencesButton(Gtk::StockID("gtk-preferences")),
	  deleteButton(Gtk::StockID("gtk-delete"))
	{

		this->set_halign(Gtk::Align::ALIGN_START);
		this->set_column_homogeneous(true);

		// Set label
		label.set_halign(Gtk::Align::ALIGN_END);
		label.set_margin_right(8);
		label.show();
		this->attach(label, 0, 0, 1, 1);

		// Set preferences button
		this->attach_next_to(preferencesButton, label, Gtk::PositionType::POS_RIGHT, 1, 1);
		preferencesButton.set_margin_right(4);
		preferencesButton.show();

		// Set delete button
		this->attach_next_to(deleteButton, preferencesButton, Gtk::PositionType::POS_RIGHT, 1, 1);
		deleteButton.show();


		this->show();

		return;
	}


} /* namespace Widgets */