File: avaluetool.cpp

package info (click to toggle)
aeskulap 0.2.2b1%2Bgit20161206-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,840 kB
  • ctags: 1,302
  • sloc: cpp: 8,894; sh: 5,551; ansic: 685; makefile: 317; xml: 25
file content (18 lines) | stat: -rw-r--r-- 369 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "avaluetool.h"

namespace Aeskulap {
	
ValueTool::ValueTool(StudyView& studyview) : FloatWidget(studyview, 100 , 30) {
	m_label = manage(new Gtk::Label);
	add(*m_label);

	m_label->show();
}

void ValueTool::set_value(double value) {
	char buffer[20];
	g_snprintf(buffer, sizeof(buffer), "%.1lf", value);
	m_label->set_text(buffer);
}

} // namespace Aeskulap