# HG changeset patch
# User Chris Cannam
# Date 1181736001 0
# Node ID 152619d379e0b2e54ea85c910458519029e6d59a
# Parent e2f13213c2f1a4cf2b9055bc47a0dafbca89cdd0
* Add a measurement mode tool -- no functionality yet
diff -r e2f13213c2f1 -r 152619d379e0 icons/measure.png
Binary file icons/measure.png has changed
diff -r e2f13213c2f1 -r 152619d379e0 icons/measure1cursor.xbm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/icons/measure1cursor.xbm Wed Jun 13 12:00:01 2007 +0000
@@ -0,0 +1,16 @@
+#define measure1cursor_width 32
+#define measure1cursor_height 32
+#define measure1cursor_x_hot 15
+#define measure1cursor_y_hot 14
+static unsigned char measure1cursor_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
+ 0x00, 0xc0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00,
+ 0x00, 0x98, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0x86, 0x00, 0x00,
+ 0x00, 0x83, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
diff -r e2f13213c2f1 -r 152619d379e0 icons/measure1mask.xbm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/icons/measure1mask.xbm Wed Jun 13 12:00:01 2007 +0000
@@ -0,0 +1,14 @@
+#define measure1mask_width 32
+#define measure1mask_height 32
+static unsigned char measure1mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00,
+ 0x00, 0xe0, 0x01, 0x00, 0x00, 0xf0, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00,
+ 0x00, 0xfc, 0x01, 0x00, 0x00, 0xde, 0x01, 0x00, 0x00, 0xcf, 0x01, 0x00,
+ 0x80, 0xc7, 0x01, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00,
+ 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff -r e2f13213c2f1 -r 152619d379e0 icons/measure2cursor.xbm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/icons/measure2cursor.xbm Wed Jun 13 12:00:01 2007 +0000
@@ -0,0 +1,16 @@
+#define measure2cursor_width 32
+#define measure2cursor_height 32
+#define measure2cursor_x_hot 16
+#define measure2cursor_y_hot 17
+static unsigned char measure2cursor_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07,
+ 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xc1, 0x00, 0x00, 0x00, 0x61, 0x00,
+ 0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x0f, 0x00,
+ 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00,
+ 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
diff -r e2f13213c2f1 -r 152619d379e0 icons/measure2mask.xbm
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/icons/measure2mask.xbm Wed Jun 13 12:00:01 2007 +0000
@@ -0,0 +1,14 @@
+#define measure2mask_width 32
+#define measure2mask_height 32
+static unsigned char measure2mask_bits[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0xfc, 0x07,
+ 0x00, 0x00, 0xfc, 0x07, 0x00, 0x80, 0xe3, 0x01, 0x00, 0x80, 0xf3, 0x00,
+ 0x00, 0x80, 0x7b, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x1f, 0x00,
+ 0x00, 0x80, 0x0f, 0x00, 0x00, 0x80, 0x07, 0x00, 0x00, 0x80, 0x03, 0x00,
+ 0x00, 0x80, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
diff -r e2f13213c2f1 -r 152619d379e0 main/MainWindow.cpp
--- 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()
//{
diff -r e2f13213c2f1 -r 152619d379e0 main/MainWindow.h
--- a/main/MainWindow.h Mon Jun 11 12:14:52 2007 +0000
+++ b/main/MainWindow.h Wed Jun 13 12:00:01 2007 +0000
@@ -183,6 +183,7 @@
void toolSelectSelected();
void toolEditSelected();
void toolDrawSelected();
+ void toolMeasureSelected();
void selectAll();
void selectToStart();
diff -r e2f13213c2f1 -r 152619d379e0 sonic-visualiser.qrc
--- a/sonic-visualiser.qrc Mon Jun 11 12:14:52 2007 +0000
+++ b/sonic-visualiser.qrc Wed Jun 13 12:00:01 2007 +0000
@@ -25,6 +25,11 @@
icons/text.png
icons/draw.png
icons/draw-curve.png
+ icons/measure.png
+ icons/measure1cursor.xbm
+ icons/measure1mask.xbm
+ icons/measure2cursor.xbm
+ icons/measure2mask.xbm
icons/move.png
icons/navigate.png
icons/zoom.png