37 QML_NAMED_ELEMENT(MapCopyrightNotice)
38 QML_ADDED_IN_VERSION(5, 0)
40 Q_PROPERTY(QDeclarativeGeoMap *mapSource READ mapSource WRITE setMapSource NOTIFY mapSourceChanged)
41 Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet NOTIFY styleSheetChanged)
44 QDeclarativeGeoMapCopyrightNotice(QQuickItem *parent =
nullptr);
45 ~QDeclarativeGeoMapCopyrightNotice();
47 void setCopyrightsZ(qreal copyrightsZ);
49 void setCopyrightsVisible(
bool visible);
50 bool copyrightsVisible()
const;
51 void anchorToBottomLeft();
53 void setMapSource(QDeclarativeGeoMap *mapSource);
54 QDeclarativeGeoMap *mapSource();
56 QString styleSheet()
const;
57 void setStyleSheet(
const QString &styleSheet);
60 void copyrightsImageChanged(
const QImage ©rightsImage);
61 void copyrightsChanged(
const QString ©rightsHtml);
62 void onCopyrightsStyleSheetChanged(
const QString &styleSheet);
65 void linkActivated(
const QString &link);
66 void mapSourceChanged();
67 void backgroundColorChanged(
const QColor &color);
68 void styleSheetChanged(
const QString &styleSheet);
69 void copyrightsVisibleChanged();
72 void paint(QPainter *painter) override;
73 void mousePressEvent(QMouseEvent *event) override;
74 void mouseReleaseEvent(QMouseEvent *event) override;
75 void rasterizeHtmlAndUpdate();
79 void createCopyright();
81 QTextDocument *m_copyrightsHtml =
nullptr;
83 QImage m_copyrightsImage;
84 QString m_activeAnchor;
85 bool m_copyrightsVisible =
true;
86 QPointer<QDeclarativeGeoMap> m_mapSource;
87 QColor m_backgroundColor;
89 bool m_userDefinedStyleSheet =
false;
91 Q_DISABLE_COPY(QDeclarativeGeoMapCopyrightNotice)
92 Q_DECLARE_PRIVATE(QDeclarativeGeoMapCopyrightNotice)