mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	reverting 3fb0f66 (followup #45348) Using --no-public-is-protected (default on Windows) also works on Linux and fixes #45331 too
		
			
				
	
	
		
			101 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			101 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/gui/qgsmapcanvasitem.h                                           *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
class QgsMapCanvasItem : QGraphicsItem
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
An abstract class for items that can be placed on the
 | 
						|
map canvas.
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgsmapcanvasitem.h"
 | 
						|
%End
 | 
						|
  protected:
 | 
						|
 | 
						|
    QgsMapCanvasItem( QgsMapCanvas *mapCanvas /TransferThis/ );
 | 
						|
%Docstring
 | 
						|
protected constructor: cannot be constructed directly
 | 
						|
%End
 | 
						|
 | 
						|
    ~QgsMapCanvasItem();
 | 
						|
 | 
						|
    virtual void paint( QPainter *painter ) = 0;
 | 
						|
%Docstring
 | 
						|
function to be implemented by derived classes
 | 
						|
%End
 | 
						|
 | 
						|
     virtual void paint( QPainter *painter,
 | 
						|
                const QStyleOptionGraphicsItem *option,
 | 
						|
                QWidget *widget = 0 );
 | 
						|
 | 
						|
    void updateCanvas();
 | 
						|
%Docstring
 | 
						|
schedules map canvas for repaint
 | 
						|
%End
 | 
						|
 | 
						|
    bool setRenderContextVariables( QPainter *p, QgsRenderContext &context ) const;
 | 
						|
%Docstring
 | 
						|
Sets render context parameters
 | 
						|
 | 
						|
:param p: painter for rendering
 | 
						|
:param context: out: configured context
 | 
						|
 | 
						|
:return: ``True`` in case of success
 | 
						|
%End
 | 
						|
 | 
						|
  public:
 | 
						|
 | 
						|
    virtual void updatePosition();
 | 
						|
%Docstring
 | 
						|
called on changed extent or resize event to update position of the item
 | 
						|
%End
 | 
						|
 | 
						|
    virtual QRectF boundingRect() const;
 | 
						|
 | 
						|
 | 
						|
    QgsRectangle rect() const;
 | 
						|
%Docstring
 | 
						|
returns canvas item rectangle in map units
 | 
						|
%End
 | 
						|
 | 
						|
    void setRect( const QgsRectangle &r, bool resetRotation = true );
 | 
						|
%Docstring
 | 
						|
sets canvas item rectangle in map units
 | 
						|
%End
 | 
						|
 | 
						|
    QgsPointXY toMapCoordinates( QPoint point ) const;
 | 
						|
%Docstring
 | 
						|
transformation from screen coordinates to map coordinates
 | 
						|
%End
 | 
						|
 | 
						|
    QPointF toCanvasCoordinates( const QgsPointXY &point ) const;
 | 
						|
%Docstring
 | 
						|
transformation from map coordinates to screen coordinates
 | 
						|
%End
 | 
						|
 | 
						|
  protected:
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/gui/qgsmapcanvasitem.h                                           *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 |