navit  0.5.3-trunk
qml_vehicle.h
Go to the documentation of this file.
1 #ifndef VEHICLEOBJECT_H
2 #define VEHICLEOBJECT_H
3 
4 #include <QObject>
5 #include "item.h"
6 #include "vehicle.h"
7 
8 class VehicleObject : public QObject
9 {
10  Q_OBJECT
11 
12  Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
13  Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged)
14  //Q_PROPERTY(struct vehicle * vehicle READ vehicle WRITE setVehicle NOTIFY vehicleChanged)
15 
16 public:
17  VehicleObject(QObject *parent=0);
18  VehicleObject(const QString &name, const bool &active, struct vehicle *v, QObject *parent=0);
19 
20  QString name() const;
21  void setName(const QString &name);
22 
23  bool active() const;
24  void setActive(const bool &active);
25 
26  struct vehicle * vehicle() const;
27  void setVehicle(struct vehicle * vehicle);
28 
29 signals:
30  void nameChanged();
31  void activeChanged();
33 
34 private:
35  QString m_name;
36  bool m_active;
37  struct vehicle *m_vehicle;
38 };
39 
40 #endif // MAPOBJECT_H
Definition: qml_vehicle.h:9
struct vehicle * m_vehicle
Definition: qml_vehicle.h:37
QString m_name
Definition: qml_vehicle.h:35
struct vehicle * vehicle() const
Definition: qml_vehicle.cpp:33
VehicleObject(QObject *parent=0)
Definition: qml_vehicle.cpp:3
void setActive(const bool &active)
Definition: qml_vehicle.cpp:26
void vehicleChanged()
bool active
Definition: qml_vehicle.h:13
void setVehicle(struct vehicle *vehicle)
Definition: qml_vehicle.cpp:37
QString name
Definition: qml_vehicle.h:12
bool m_active
Definition: qml_vehicle.h:36
void setName(const QString &name)
Definition: qml_vehicle.cpp:15
void activeChanged()
void nameChanged()
Definition: gpx2navit_txt.h:51
Definition: vehicle.c:59