Skip to content

Commit

Permalink
Changed to a custom cross hair mouse pointer when using measurement t…
Browse files Browse the repository at this point in the history
…ool. Fixes #862

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7770 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Dec 12, 2007
1 parent 0ba25e4 commit 1b1c88b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/qgsmeasuretool.cpp
Expand Up @@ -23,6 +23,7 @@

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

#include <QMessageBox>
#include <QSettings>
Expand All @@ -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;

Expand Down
23 changes: 23 additions & 0 deletions src/gui/qgscursors.cpp
Expand Up @@ -147,3 +147,26 @@ const char *identify_cursor[] = {
"############.a.#",
"#############.##"
};

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

1 change: 1 addition & 0 deletions src/gui/qgscursors.h
Expand Up @@ -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 1b1c88b

Please sign in to comment.