QGIS/python/gui/qgsmapcanvasmap.sip

53 lines
1.1 KiB
Plaintext
Raw Normal View History

%ModuleHeaderCode
// fix to allow compilation with sip 4.7 that for some reason
// doesn't add this include to the file where the code from
// ConvertToSubClassCode goes.
#include <qgsmapcanvasmap.h>
%End
class QgsMapCanvasMap : QGraphicsRectItem
{
%TypeHeaderCode
#include <qgsmapcanvasmap.h>
%End
%ConvertToSubClassCode
2012-12-20 12:35:09 +02:00
if (dynamic_cast<QgsMapCanvasMap*>(sipCpp) != NULL)
{
sipClass = sipClass_QgsMapCanvasMap;
}
else
{
sipClass = NULL;
}
%End
public:
2012-12-20 12:35:09 +02:00
//! constructor
QgsMapCanvasMap( QgsMapCanvas* canvas /TransferThis/ );
//! resize canvas item and pixmap
void resize( QSize size );
void enableAntiAliasing( bool flag );
//! renders map using QgsMapRenderer to mPixmap
void render();
void setBackgroundColor( const QColor& color );
void setPanningOffset( const QPoint& point );
QPaintDevice& paintDevice();
void paint( QPainter* p, const QStyleOptionGraphicsItem*, QWidget* );
QRectF boundingRect() const;
//! Update contents - can be called while drawing to show the status.
//! Added in version 1.2
void updateContents();
};