Nut/src/dbgeography.h

58 lines
1.6 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
class NUT_EXPORT DbGeography //: public QObject
{
qreal m_latitude;
qreal m_longitude;
public:
explicit DbGeography(QObject *parent = 0);
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 latitude() const;
qreal longitude() const;
void setLatitude(qreal latitude);
void setLongitude(qreal longitude);
2017-07-24 16:27:52 +08:00
2017-10-07 13:38:09 +08:00
//QVariant operator QVariant();
2017-07-24 16:27:52 +08:00
QString toString();
void fromString(const QString &s);
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