Mercurial > hg > svgui
changeset 257:1ab41ee36952
* Add a measurement mode tool -- no functionality yet
author | Chris Cannam |
---|---|
date | Wed, 13 Jun 2007 12:00:01 +0000 |
parents | c492902dba40 |
children | 6732a5b8a2c4 |
files | view/Pane.cpp view/ViewManager.h |
diffstat | 2 files changed, 19 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/view/Pane.cpp Wed Jun 13 10:27:39 2007 +0000 +++ b/view/Pane.cpp Wed Jun 13 12:00:01 2007 +0000 @@ -25,6 +25,8 @@ #include <QPaintEvent> #include <QPainter> +#include <QBitmap> +#include <QCursor> #include <iostream> #include <cmath> @@ -1720,6 +1722,16 @@ ViewManager::ToolMode mode = m_manager->getToolMode(); // std::cerr << "Pane::toolModeChanged(" << mode << ")" << std::endl; + static QCursor measureCursor; + static bool measureCursorCreated = false; + + if (!measureCursorCreated) { + measureCursor = QCursor(QBitmap(":/icons/measure1cursor.xbm"), + QBitmap(":/icons/measure1mask.xbm"), + 15, 14); + measureCursorCreated = true; + } + switch (mode) { case ViewManager::NavigateMode: @@ -1737,6 +1749,11 @@ case ViewManager::DrawMode: setCursor(Qt::CrossCursor); break; + + case ViewManager::MeasureMode: + setCursor(measureCursor); + break; + /* case ViewManager::TextMode: setCursor(Qt::IBeamCursor);