Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #3112 from ThomasG77/qgsannotationitemcast
Cast each child of QgsAnnotationItem in SIP bindings for Python
- Loading branch information
Showing
with
24 additions
and
2 deletions.
-
+24
−2
python/gui/qgsannotationitem.sip
|
|
@@ -1,11 +1,33 @@ |
|
|
/** An annotation item can be either placed either on screen corrdinates or on map coordinates. |
|
|
It may reference a feature and displays that associatiation with a balloon like appearance*/ |
|
|
/** An annotation item can be either placed either on screen coordinates or on map coordinates. |
|
|
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 |
|
|
{ |
|
|
%TypeHeaderCode |
|
|
#include <qgsannotationitem.h> |
|
|
%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: |
|
|
enum MouseMoveAction |
|
|
{ |
|
|