src/SpacenavWindow.cpp
branchv_0
changeset 8 f351c261cbfd
parent 7 b6c0e1574a8b
child 9 d3716f03efcd
--- a/src/SpacenavWindow.cpp	Thu Mar 07 17:03:43 2019 +0100
+++ b/src/SpacenavWindow.cpp	Thu Mar 07 17:56:38 2019 +0100
@@ -37,19 +37,28 @@
 		m->setValue(0);
 		m->setFormat("%v");
 	}
+
+	widget.period->setMinimum(0);
+	widget.period->setMaximum(100);
+	widget.period->setValue(0);
+	widget.period->setFormat("%v ms");
+	widget.period->setToolTip("duration in milliseconds from the last change");
 }
 
 SpacenavWindow::~SpacenavWindow() {
 }
 
 void SpacenavWindow::spacenavMotionEvent(SpacenavWrapper::Event::MotionEvent e) {
-	setWindowTitle("m event!");
 	widget.motionX->setValue(e.x);
 	widget.motionY->setValue(e.y);
 	widget.motionZ->setValue(e.z);
+	
 	widget.rotationX->setValue(e.rx);
 	widget.rotationY->setValue(e.ry);
 	widget.rotationZ->setValue(e.rz);
+	
+	widget.period->setValue(e.period);
+	// std::wcerr << L"period: " << e.period << std::endl;
 }
 
 void SpacenavWindow::spacenavButtonEvent(SpacenavWrapper::Event::ButtonEvent e) {