-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCourierToGotoMapRoute.h
41 lines (33 loc) · 1.23 KB
/
CourierToGotoMapRoute.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
#ifndef COURIERTOGOTOMAPROUTE_H
#define COURIERTOGOTOMAPROUTE_H
#include <QAbstractItemModel>
#include <QObject>
class CouriersModel;
class GotosModel;
class CourierToGotoMapRoute : public QObject
{
Q_OBJECT
Q_PROPERTY(QVariantMap routeEnds READ routeEnds NOTIFY routeEndsChanged)
public:
explicit CourierToGotoMapRoute(QObject *parent = nullptr);
Q_INVOKABLE void setModels(CouriersModel *courierModel,
GotosModel *gotosModel);
Q_INVOKABLE void setGotoId(const QString &gotoId);
QVariantMap routeEnds()const{return m_routeEnds;}
signals:
void routeEndsChanged();
private slots:
void onCouriersModelDatatChanged(const QModelIndex &topLeft,
const QModelIndex &bottomRight,
const QVector<int> &roles = QVector<int>());
void onGotosModelDatatChanged(const QModelIndex &topLeft,
const QModelIndex &bottomRight,
const QVector<int> &roles = QVector<int>());
private:
QVariantMap m_routeEnds;
QString m_courierId;
QString m_gotoId;
CouriersModel *m_couriersModel = nullptr;
GotosModel *m_gotosModel = nullptr;
};
#endif // MAPROUTE_H