navit  0.5.1-trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups
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();
32  void vehicleChanged();
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:8
Definition: gpx2navit_txt.h:51
QString m_name
Definition: qml_vehicle.h:35
struct vehicle * m_vehicle
Definition: qml_vehicle.h:37
Definition: vehicle.c:58
void vehicleChanged()
QString name() const
void activeChanged()
void nameChanged()
bool m_active
Definition: qml_vehicle.h:36
void setActive(const bool &active)
Definition: qml_vehicle.cpp:31
void setName(const QString &name)
Definition: qml_vehicle.cpp:18
void setVehicle(struct vehicle *vehicle)
Definition: qml_vehicle.cpp:44
bool active() const