36 QML_NAMED_ELEMENT(MapCopyrightNotice)
37 QML_ADDED_IN_VERSION(5, 0)
39 Q_PROPERTY(QDeclarativeGeoMap *mapSource READ mapSource WRITE setMapSource NOTIFY mapSourceChanged)
40 Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet NOTIFY styleSheetChanged)
43 QDeclarativeGeoMapCopyrightNotice(QQuickItem *parent =
nullptr);
44 ~QDeclarativeGeoMapCopyrightNotice();
46 void setCopyrightsZ(qreal copyrightsZ);
48 void setCopyrightsVisible(
bool visible);
49 bool copyrightsVisible()
const;
50 void anchorToBottomLeft();
52 void setMapSource(QDeclarativeGeoMap *mapSource);
53 QDeclarativeGeoMap *mapSource();
55 QString styleSheet()
const;
56 void setStyleSheet(
const QString &styleSheet);
59 void copyrightsImageChanged(
const QImage ©rightsImage);
60 void copyrightsChanged(
const QString ©rightsHtml);
61 void onCopyrightsStyleSheetChanged(
const QString &styleSheet);
64 void linkActivated(
const QString &link);
65 void mapSourceChanged();
66 void backgroundColorChanged(
const QColor &color);
67 void styleSheetChanged(
const QString &styleSheet);
68 void copyrightsVisibleChanged();
71 void paint(QPainter *painter) override;
72 void mousePressEvent(QMouseEvent *event) override;
73 void mouseReleaseEvent(QMouseEvent *event) override;
74 void rasterizeHtmlAndUpdate();
78 void createCopyright();
80 QTextDocument *m_copyrightsHtml =
nullptr;
82 QImage m_copyrightsImage;
83 QString m_activeAnchor;
84 bool m_copyrightsVisible =
true;
85 QPointer<QDeclarativeGeoMap> m_mapSource;
86 QColor m_backgroundColor;
88 bool m_userDefinedStyleSheet =
false;
90 Q_DISABLE_COPY(QDeclarativeGeoMapCopyrightNotice)
91 Q_DECLARE_PRIVATE(QDeclarativeGeoMapCopyrightNotice)