File: factory.cpp

package info (click to toggle)
qt6-positioning 6.10.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 6,064 kB
  • sloc: cpp: 35,740; java: 513; xml: 58; makefile: 23
file content (25 lines) | stat: -rw-r--r-- 551 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#include "factory.h"
#include <QGeoRectangle>
#include <QGeoCircle>

QT_BEGIN_NAMESPACE

Factory::Factory(QObject *parent) : QObject(parent)
{

}

QGeoShape Factory::createShape(const QGeoCoordinate &topLeft, const QGeoCoordinate &bottomRight)
{
    return QGeoRectangle(topLeft, bottomRight);
}

QGeoShape Factory::createShape(const QGeoCoordinate &center, qreal radius) const
{
    return QGeoCircle(center, radius);
}

QT_END_NAMESPACE