1
/***************************************************************************
5
copyright : (C) 2005 by Radim Blazek
7
***************************************************************************/
8
/***************************************************************************
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
15
***************************************************************************/
29
#include "qgsmeasurebase.h"
31
#include "qgsmeasurebase.uic.h"
34
class QgsMeasure:public QgsMeasureBase
40
QgsMeasure(QgsMapCanvas *, QWidget *parent = 0, const char * name = 0, WFlags f = Qt::WStyle_Customize | Qt::WStyle_DialogBorder | Qt::WStyle_Title | Qt::WStyle_Dialog | Qt::WStyle_Tool );
45
void saveWindowLocation(void);
47
//! Restore last window position/size and show the window
48
void restorePosition(void);
51
void addPoint(QgsPoint &point);
54
void mouseMove(QgsPoint &point);
60
//! Reset and start new
64
void closeEvent(QCloseEvent *e);
66
//! Connected to canvas renderComplete
67
void draw(QPainter *);
69
//! Show the help for the dialog
73
QgsMapCanvas *mMapCanvas;
77
std::vector<QgsPoint> mPoints;
81
//! Dynamic line from last point to current position was drawn
85
QgsPoint mDynamicPoints[2];
87
//! Draw current points with XOR
90
//! Draw current dynamic line
91
void drawDynamicLine(void);
94
static const int context_id = 940759457;