summaryrefslogtreecommitdiff
path: root/navit/gui/qt5_qml/qml_map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'navit/gui/qt5_qml/qml_map.cpp')
-rw-r--r--navit/gui/qt5_qml/qml_map.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/navit/gui/qt5_qml/qml_map.cpp b/navit/gui/qt5_qml/qml_map.cpp
new file mode 100644
index 000000000..0f38a4768
--- /dev/null
+++ b/navit/gui/qt5_qml/qml_map.cpp
@@ -0,0 +1,38 @@
+#include "qml_map.h"
+
+MapObject::MapObject(QObject *parent)
+ : QObject(parent)
+{
+}
+
+MapObject::MapObject(const QString &name, const bool &active, QObject *parent)
+ : QObject(parent), m_name(name), m_active(active)
+{
+}
+
+QString MapObject::name() const
+{
+ return m_name;
+}
+
+void MapObject::setName(const QString &name)
+{
+ if (name != m_name) {
+ m_name = name;
+ emit nameChanged();
+ }
+}
+
+bool MapObject::active() const
+{
+ return m_active;
+}
+
+void MapObject::setActive(const bool &active)
+{
+ if (active != m_active) {
+ m_active = active;
+ emit activeChanged();
+ }
+}
+