Nut/src/dbgeography.h

55 lines
1.5 KiB
C
Raw Normal View History

2017-07-25 22:10:43 +08:00
/**************************************************************************
**
** This file is part of Nut project.
** https://github.com/HamedMasafi/Nut
**
** Nut is free software: you can redistribute it and/or modify
** it under the terms of the GNU Lesser General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** Nut is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public License
** along with Nut. If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************/
2017-05-25 23:46:54 +08:00
#ifndef DBGEOGRAPHY_H
#define DBGEOGRAPHY_H
#include "defines.h"
#include <QtCore/QObject>
#include <QtCore/qglobal.h>
2017-10-07 13:38:09 +08:00
#include <QVariant>
2017-05-25 23:46:54 +08:00
NUT_BEGIN_NAMESPACE
2017-10-07 18:26:05 +08:00
class NUT_EXPORT DbGeography
2017-05-25 23:46:54 +08:00
{
qreal m_longitude;
2017-10-07 18:26:05 +08:00
qreal m_latitude;
2017-05-25 23:46:54 +08:00
public:
2017-10-07 18:26:05 +08:00
explicit DbGeography();
2017-05-25 23:46:54 +08:00
DbGeography(const DbGeography &other);
2017-10-07 13:38:09 +08:00
DbGeography(const QVariant &value);
2017-05-25 23:46:54 +08:00
qreal longitude() const;
2017-10-07 18:26:05 +08:00
qreal latitude() const;
2017-05-25 23:46:54 +08:00
void setLongitude(qreal longitude);
2017-10-07 18:26:05 +08:00
void setLatitude(qreal latitude);
2017-07-24 16:27:52 +08:00
2017-10-07 18:26:05 +08:00
operator QVariant();
2017-05-25 23:46:54 +08:00
};
NUT_END_NAMESPACE
2017-10-07 13:38:09 +08:00
Q_DECLARE_METATYPE(NUT_WRAP_NAMESPACE(DbGeography))
2017-05-25 23:46:54 +08:00
#endif // DBGEOGRAPHY_H