diff main/MainWindow.cpp @ 151:152619d379e0

* Add a measurement mode tool -- no functionality yet
author Chris Cannam
date Wed, 13 Jun 2007 12:00:01 +0000
parents e2f13213c2f1
children d2cc3b10e26f
line wrap: on
line diff
--- a/main/MainWindow.cpp	Mon Jun 11 12:14:52 2007 +0000
+++ b/main/MainWindow.cpp	Wed Jun 13 12:00:01 2007 +0000
@@ -1588,6 +1588,15 @@
     group->addAction(action);
     m_toolActions[ViewManager::DrawMode] = action;
 
+    action = toolbar->addAction(QIcon(":/icons/measure.png"),
+				tr("Measure"));
+    action->setCheckable(true);
+    action->setShortcut(tr("5"));
+    action->setStatusTip(tr("Make measurements in layer"));
+    connect(action, SIGNAL(triggered()), this, SLOT(toolMeasureSelected()));
+    group->addAction(action);
+    m_toolActions[ViewManager::MeasureMode] = action;
+
 //    action = toolbar->addAction(QIcon(":/icons/text.png"),
 //				tr("Text"));
 //    action->setCheckable(true);
@@ -1781,6 +1790,12 @@
     m_viewManager->setToolMode(ViewManager::DrawMode);
 }
 
+void
+MainWindow::toolMeasureSelected()
+{
+    m_viewManager->setToolMode(ViewManager::MeasureMode);
+}
+
 //void
 //MainWindow::toolTextSelected()
 //{