-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspot.h
61 lines (44 loc) · 1.05 KB
/
spot.h
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef SPOT_H
#define SPOT_H
#include <QObject>
#include <QTime>
#include <QGeoCoordinate>
QTM_USE_NAMESPACE
// Spot: a single spot with additional data
class Spot : public QObject
{
Q_OBJECT
public:
Spot(QObject *parent = 0);
bool operator<(const Spot *other ) const;
enum spotSortMode {SortByName, SortByLocation};
bool initialize(QString data);
QString name() const;
QString address() const;
QString postcode() const;
QString city() const;
QString phone() const;
QString email() const;
QString additionalInfo() const;
QString storeId() const;
qreal latitude() const;
qreal longitude() const;
qreal distance() const;
void setDistance(qreal amount);
spotSortMode sortMode;
signals:
void nameChanged();
private:
QString m_name;
QString m_address;
QString m_postcode;
QString m_city;
QString m_phone;
QString m_email;
QString m_additionalInfo;
QString m_storeId;
qreal m_latitude;
qreal m_longitude;
qreal m_distance;
};
#endif // SPOT_H