mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-15 00:04:00 -04:00
Cast each child of QgsAnnotationItem in SIP bindings for Python
This commit is contained in:
parent
aef3dd4da4
commit
eeea18ecba
@ -1,11 +1,33 @@
|
|||||||
/** An annotation item can be either placed either on screen corrdinates or on map coordinates.
|
/** An annotation item can be either placed either on screen coordinates or on map coordinates.
|
||||||
It may reference a feature and displays that associatiation with a balloon like appearance*/
|
It may reference a feature and displays that association with a balloon like appearance*/
|
||||||
|
|
||||||
|
%ModuleCode
|
||||||
|
#include "qgsformannotationitem.h"
|
||||||
|
#include "qgshtmlannotationitem.h"
|
||||||
|
#include "qgssvgannotationitem.h"
|
||||||
|
#include "qgstextannotationitem.h"
|
||||||
|
%End
|
||||||
|
|
||||||
class QgsAnnotationItem: QgsMapCanvasItem
|
class QgsAnnotationItem: QgsMapCanvasItem
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgsannotationitem.h>
|
#include <qgsannotationitem.h>
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%ConvertToSubClassCode
|
||||||
|
if (dynamic_cast<QgsFormAnnotationItem*>(sipCpp) )
|
||||||
|
sipType = sipType_QgsFormAnnotationItem;
|
||||||
|
else if (dynamic_cast<QgsHtmlAnnotationItem*>(sipCpp) )
|
||||||
|
sipType = sipType_QgsHtmlAnnotationItem;
|
||||||
|
else if (dynamic_cast<QgsSvgAnnotationItem*>(sipCpp) )
|
||||||
|
sipType = sipType_QgsSvgAnnotationItem;
|
||||||
|
else if (dynamic_cast<QgsTextAnnotationItem*>(sipCpp) )
|
||||||
|
sipType = sipType_QgsTextAnnotationItem;
|
||||||
|
else
|
||||||
|
sipType = 0;
|
||||||
|
%End
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum MouseMoveAction
|
enum MouseMoveAction
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user