comparison 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
comparison
equal deleted inserted replaced
150:e2f13213c2f1 151:152619d379e0
1586 connect(action, SIGNAL(triggered()), this, SLOT(toolDrawSelected())); 1586 connect(action, SIGNAL(triggered()), this, SLOT(toolDrawSelected()));
1587 connect(this, SIGNAL(canEditLayer(bool)), action, SLOT(setEnabled(bool))); 1587 connect(this, SIGNAL(canEditLayer(bool)), action, SLOT(setEnabled(bool)));
1588 group->addAction(action); 1588 group->addAction(action);
1589 m_toolActions[ViewManager::DrawMode] = action; 1589 m_toolActions[ViewManager::DrawMode] = action;
1590 1590
1591 action = toolbar->addAction(QIcon(":/icons/measure.png"),
1592 tr("Measure"));
1593 action->setCheckable(true);
1594 action->setShortcut(tr("5"));
1595 action->setStatusTip(tr("Make measurements in layer"));
1596 connect(action, SIGNAL(triggered()), this, SLOT(toolMeasureSelected()));
1597 group->addAction(action);
1598 m_toolActions[ViewManager::MeasureMode] = action;
1599
1591 // action = toolbar->addAction(QIcon(":/icons/text.png"), 1600 // action = toolbar->addAction(QIcon(":/icons/text.png"),
1592 // tr("Text")); 1601 // tr("Text"));
1593 // action->setCheckable(true); 1602 // action->setCheckable(true);
1594 // action->setShortcut(tr("5")); 1603 // action->setShortcut(tr("5"));
1595 // connect(action, SIGNAL(triggered()), this, SLOT(toolTextSelected())); 1604 // connect(action, SIGNAL(triggered()), this, SLOT(toolTextSelected()));
1777 1786
1778 void 1787 void
1779 MainWindow::toolDrawSelected() 1788 MainWindow::toolDrawSelected()
1780 { 1789 {
1781 m_viewManager->setToolMode(ViewManager::DrawMode); 1790 m_viewManager->setToolMode(ViewManager::DrawMode);
1791 }
1792
1793 void
1794 MainWindow::toolMeasureSelected()
1795 {
1796 m_viewManager->setToolMode(ViewManager::MeasureMode);
1782 } 1797 }
1783 1798
1784 //void 1799 //void
1785 //MainWindow::toolTextSelected() 1800 //MainWindow::toolTextSelected()
1786 //{ 1801 //{