Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdeclarativegeomapcopyrightsnotice_p.h
Go to the documentation of this file.
1// Copyright (C) 2014 Aaron McCarthy <mccarthy.aaron@gmail.com>
2// Copyright (C) 2022 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QDECLARATIVEGEOMAPCOPYRIGHTSNOTICE_H
6#define QDECLARATIVEGEOMAPCOPYRIGHTSNOTICE_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtLocation/private/qlocationglobal_p.h>
20
21#include <QtGui/QImage>
22#include <QPointer>
23#include <QtQuick/QQuickPaintedItem>
24
25Q_MOC_INCLUDE(<QtLocation/private/qdeclarativegeomap_p.h>)
26
27
29
30class QTextDocument;
34{
36 QML_NAMED_ELEMENT(MapCopyrightNotice)
38
39 Q_PROPERTY(QDeclarativeGeoMap *mapSource READ mapSource WRITE setMapSource NOTIFY mapSourceChanged)
40 Q_PROPERTY(QString styleSheet READ styleSheet WRITE setStyleSheet NOTIFY styleSheetChanged)
41
42public:
45
46 void setCopyrightsZ(qreal copyrightsZ);
47
48 void setCopyrightsVisible(bool visible);
49 bool copyrightsVisible() const;
50 void anchorToBottomLeft();
51
52 void setMapSource(QDeclarativeGeoMap *mapSource);
53 QDeclarativeGeoMap *mapSource();
54
55 QString styleSheet() const;
56 void setStyleSheet(const QString &styleSheet);
57
58public Q_SLOTS:
59 void copyrightsImageChanged(const QImage &copyrightsImage);
60 void copyrightsChanged(const QString &copyrightsHtml);
61 void onCopyrightsStyleSheetChanged(const QString &styleSheet);
62
64 void linkActivated(const QString &link);
65 void mapSourceChanged();
66 void backgroundColorChanged(const QColor &color);
67 void styleSheetChanged(const QString &styleSheet);
68 void copyrightsVisibleChanged();
69
70protected:
71 void paint(QPainter *painter) override;
72 void mousePressEvent(QMouseEvent *event) override;
73 void mouseReleaseEvent(QMouseEvent *event) override;
74 void rasterizeHtmlAndUpdate();
75 void connectMap();
76
78 void createCopyright();
79
80 QTextDocument *m_copyrightsHtml = nullptr;
81 QString m_html;
82 QImage m_copyrightsImage;
83 QString m_activeAnchor;
84 bool m_copyrightsVisible = true;
85 QPointer<QDeclarativeGeoMap> m_mapSource;
86 QColor m_backgroundColor;
87 QString m_styleSheet;
88 bool m_userDefinedStyleSheet = false;
89
91 Q_DECLARE_PRIVATE(QDeclarativeGeoMapCopyrightNotice)
92};
93
95
96#endif
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtGui
Definition qimage.h:37
\inmodule QtGui
Definition qevent.h:196
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
The QQuickPaintedItem class provides a way to use the QPainter API in the QML Scene Graph.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\reentrant \inmodule QtGui
QPainter paint
qApp setStyleSheet("QPushButton { color: white }")
[21]
Combined button and popup list for selecting options.
GLuint color
[2]
struct _cl_event * event
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_MOC_INCLUDE(...)
#define signals
double qreal
Definition qtypes.h:187
QPainter painter(this)
[7]