~ubuntu-branches/ubuntu/wily/qgis/wily

« back to all changes in this revision

Viewing changes to src/plugins/coordinate_capture/coordinatecapturemaptool.h

  • Committer: Bazaar Package Importer
  • Author(s): Johan Van de Wauw
  • Date: 2010-07-11 20:23:24 UTC
  • mfrom: (3.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100711202324-5ktghxa7hracohmr
Tags: 1.4.0+12730-3ubuntu1
* Merge from Debian unstable (LP: #540941).
* Fix compilation issues with QT 4.7
* Add build-depends on libqt4-webkit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
    coordinatecapturemaptool.h  -  map tool for getting map coordinates
 
3
    ---------------------
 
4
    begin                : August 2008
 
5
    copyright            : (C) 2008 by Tim Sutton
 
6
    email                : tim at linfiniti.com
 
7
 ***************************************************************************
 
8
 *                                                                         *
 
9
 *   This program is free software; you can redistribute it and/or modify  *
 
10
 *   it under the terms of the GNU General Public License as published by  *
 
11
 *   the Free Software Foundation; either version 2 of the License, or     *
 
12
 *   (at your option) any later version.                                   *
 
13
 *                                                                         *
 
14
 ***************************************************************************/
 
15
/* $Id$ */
 
16
 
 
17
#ifndef COORDINATECAPTUREMAPTOOL_H
 
18
#define COORDINATECAPTUREMAPTOOL_H
 
19
 
 
20
#include "qgsmaptool.h"
 
21
#include "qgspoint.h"
 
22
 
 
23
#include <QObject>
 
24
#include <QPointer>
 
25
 
 
26
class QgsRubberBand;
 
27
 
 
28
/**
 
29
  \brief Map tool for capturing mouse clicks to clipboard
 
30
*/
 
31
class CoordinateCaptureMapTool : public QgsMapTool
 
32
{
 
33
    Q_OBJECT
 
34
 
 
35
  public:
 
36
    CoordinateCaptureMapTool( QgsMapCanvas* thepCanvas );
 
37
 
 
38
    ~CoordinateCaptureMapTool();
 
39
 
 
40
    //! Overridden mouse move event
 
41
    virtual void canvasMoveEvent( QMouseEvent * e );
 
42
 
 
43
    //! Overridden mouse press event
 
44
    virtual void canvasPressEvent( QMouseEvent * e );
 
45
 
 
46
    //! Overridden mouse release event
 
47
    virtual void canvasReleaseEvent( QMouseEvent * e );
 
48
 
 
49
    //! called when map tool is being deactivated
 
50
    virtual void deactivate();
 
51
 
 
52
  public slots:
 
53
 
 
54
  signals:
 
55
    void mouseMoved( QgsPoint );
 
56
    void mouseClicked( QgsPoint );
 
57
  private:
 
58
 
 
59
    //! Rubber band for highlighting identified feature
 
60
    QgsRubberBand * mpRubberBand;
 
61
    QPointer<QgsMapCanvas> mpMapCanvas;
 
62
 
 
63
};
 
64
 
 
65
#endif