Skip to content
Permalink
Browse files
Changed to a custom cross hair mouse pointer when using measurement t…
…ool. Fixes #862

git-svn-id: http://svn.osgeo.org/qgis/trunk@7770 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Dec 12, 2007
1 parent f8981c3 commit 8c30b9d23dcf00f07e1e7e35d9d3847e5d637b49
Showing with 27 additions and 1 deletion.
  1. +3 −1 src/app/qgsmeasuretool.cpp
  2. +23 −0 src/gui/qgscursors.cpp
  3. +1 −0 src/gui/qgscursors.h
@@ -23,6 +23,7 @@

#include "qgsmeasuredialog.h"
#include "qgsmeasuretool.h"
#include "qgscursors.h"

#include <QMessageBox>
#include <QSettings>
@@ -34,7 +35,8 @@ QgsMeasureTool::QgsMeasureTool(QgsMapCanvas* canvas, bool measureArea)

mRubberBand = new QgsRubberBand(canvas, mMeasureArea);

mCanvas->setCursor(Qt::CrossCursor);
QPixmap myCrossHairQPixmap = QPixmap((const char **) cross_hair_cursor);
mCursor = QCursor(myCrossHairQPixmap, 8, 8);

mRightMouseClicked = false;

@@ -147,3 +147,26 @@ const char *identify_cursor[] = {
"############.a.#",
"#############.##"
};

const char *cross_hair_cursor[] = {
"16 16 3 1",
" » c None",
".» c #000000",
"+» c #FFFFFF",
" ",
" +.+ ",
" +.+ ",
" +.+ ",
" +.+ ",
" +.+ ",
" . ",
" +++++ +++++",
" ...... ......",
" +++++ +++++",
" . ",
" +.+ ",
" +.+ ",
" +.+ ",
" +.+ ",
" +.+ "};

@@ -27,6 +27,7 @@ extern GUI_EXPORT const unsigned char pan_mask_bits[];
extern GUI_EXPORT const char *capture_point_cursor[];
extern GUI_EXPORT const char *select_cursor[];
extern GUI_EXPORT const char *identify_cursor[];
extern GUI_EXPORT const char *cross_hair_cursor[];

#endif

0 comments on commit 8c30b9d

Please sign in to comment.