summaryrefslogtreecommitdiff
path: root/src/location/declarativeplaces/qdeclarativecontactdetail_p.h
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-09 17:46:01 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-15 18:22:17 +0200
commitf170e6edbd6960abd8bc0b269118211c515c8587 (patch)
tree6b4b0f83838d0835786ce6ec645b7f252a194dbf /src/location/declarativeplaces/qdeclarativecontactdetail_p.h
parent38fb82bfef8f5a599ee374958a20b9d271002c88 (diff)
downloadqtlocation-f170e6edbd6960abd8bc0b269118211c515c8587.tar.gz
Register QPlaceContactDetail as a QML value type
Make QPlaceContactDetail a gadget, and register it as a value type with the QML engine. Remove declarative wrapper, and consolidate the documentation. Adjust the tests and remove tests that verify that the type behaves like an object. Initialize contactDetail properties as a grouped property. The QDeclarativeContactDetails implementation of QQmlPropertyMap has to stay, so rename the sources accordingly. Change-Id: I473d29405963bbe594cd5f26168a237c189d1d3e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/location/declarativeplaces/qdeclarativecontactdetail_p.h')
-rw-r--r--src/location/declarativeplaces/qdeclarativecontactdetail_p.h107
1 files changed, 0 insertions, 107 deletions
diff --git a/src/location/declarativeplaces/qdeclarativecontactdetail_p.h b/src/location/declarativeplaces/qdeclarativecontactdetail_p.h
deleted file mode 100644
index 33e60bb5..00000000
--- a/src/location/declarativeplaces/qdeclarativecontactdetail_p.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtLocation module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QDECLARATIVECONTACTDETAIL_P_H
-#define QDECLARATIVECONTACTDETAIL_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include <QtLocation/private/qlocationglobal_p.h>
-#include <QtCore/QObject>
-#include <QtLocation/QPlaceContactDetail>
-#include <QtQml/QQmlPropertyMap>
-#include <QtQml/qqml.h>
-
-QT_BEGIN_NAMESPACE
-
-class Q_LOCATION_PRIVATE_EXPORT QDeclarativeContactDetails : public QQmlPropertyMap
-{
- Q_OBJECT
-
-public:
- explicit QDeclarativeContactDetails(QObject *parent = 0);
- QVariant updateValue(const QString &key, const QVariant &input) override;
-};
-
-class Q_LOCATION_PRIVATE_EXPORT QDeclarativeContactDetail : public QObject
-{
- Q_OBJECT
-
- Q_PROPERTY(QPlaceContactDetail contactDetail READ contactDetail WRITE setContactDetail)
- Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY labelChanged)
- Q_PROPERTY(QString value READ value WRITE setValue NOTIFY valueChanged)
-
-public:
- explicit QDeclarativeContactDetail(QObject *parent = 0);
- explicit QDeclarativeContactDetail(const QPlaceContactDetail &src, QObject *parent = 0);
- ~QDeclarativeContactDetail();
-
- QPlaceContactDetail contactDetail() const;
- void setContactDetail(const QPlaceContactDetail &contactDetail);
-
- QString label() const;
- void setLabel(const QString &label);
-
- QString value() const;
- void setValue(const QString &value);
-
-Q_SIGNALS:
- void labelChanged();
- void valueChanged();
-
-private:
- QPlaceContactDetail m_contactDetail;
-
-};
-
-QT_END_NAMESPACE
-
-QML_DECLARE_TYPE(QDeclarativeContactDetail)
-QML_DECLARE_TYPE(QDeclarativeContactDetails)
-
-#endif