# HG changeset patch # User Chris Cannam # Date 1181736001 0 # Node ID 1ab41ee36952cd1e6d823053ccc73fdc5deb2366 # Parent c492902dba40f4c7a895d9a176a6c012e6f78ccb * Add a measurement mode tool -- no functionality yet diff -r c492902dba40 -r 1ab41ee36952 view/Pane.cpp --- 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 #include +#include +#include #include #include @@ -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); diff -r c492902dba40 -r 1ab41ee36952 view/ViewManager.h --- a/view/ViewManager.h Wed Jun 13 10:27:39 2007 +0000 +++ b/view/ViewManager.h Wed Jun 13 12:00:01 2007 +0000 @@ -91,7 +91,8 @@ NavigateMode, SelectMode, EditMode, - DrawMode + DrawMode, + MeasureMode }; ToolMode getToolMode() const { return m_toolMode; } void setToolMode(ToolMode mode);