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

« back to all changes in this revision

Viewing changes to python/gui/qgsmapcanvasitem.sip

  • 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
class QgsMapCanvasItem : QGraphicsItem
 
3
{
 
4
%TypeHeaderCode
 
5
#include <qgsmapcanvasitem.h>
 
6
%End
 
7
  
 
8
  protected:
 
9
    
 
10
    //! protected constructor: cannot be constructed directly
 
11
    QgsMapCanvasItem(QgsMapCanvas* mapCanvas /TransferThis/);
 
12
 
 
13
    virtual ~QgsMapCanvasItem();
 
14
 
 
15
    //! function to be implemented by derived classes
 
16
    virtual void paint(QPainter * painter) = 0;
 
17
    
 
18
    //! paint function called by map canvas
 
19
    virtual void paint(QPainter * painter,
 
20
                       const QStyleOptionGraphicsItem * option,
 
21
                       QWidget * widget = 0);
 
22
    
 
23
    //! schedules map canvas for repaint
 
24
    void updateCanvas();
 
25
    
 
26
 
 
27
  public:
 
28
 
 
29
    //! called on changed extent or resize event to update position of the item
 
30
    virtual void updatePosition();
 
31
 
 
32
    //! default implementation for canvas items
 
33
    virtual QRectF boundingRect() const;
 
34
 
 
35
    //! sets current offset, to be called from QgsMapCanvas
 
36
    void setPanningOffset(const QPoint& point);
 
37
 
 
38
    //! returns canvas item rectangle
 
39
    QgsRectangle rect() const;
 
40
    
 
41
    //! sets canvas item rectangle
 
42
    void setRect(const QgsRectangle& r);
 
43
    
 
44
    //! transformation from screen coordinates to map coordinates
 
45
    QgsPoint toMapCoordinates(const QPoint& point);
 
46
    
 
47
    //! transformation from map coordinates to screen coordinates
 
48
    QPointF toCanvasCoordinates(const QgsPoint& point);
 
49
 
 
50
};
 
51
 
 
52