summaryrefslogtreecommitdiff
path: root/navit/gui/qml
diff options
context:
space:
mode:
Diffstat (limited to 'navit/gui/qml')
-rw-r--r--navit/gui/qml/bookmarksProxy.h4
-rw-r--r--navit/gui/qml/gui_qml.cpp10
-rw-r--r--navit/gui/qml/ngqpoint.h2
-rw-r--r--navit/gui/qml/proxy.h2
-rw-r--r--navit/gui/qml/routeProxy.h2
-rw-r--r--navit/gui/qml/searchProxy.h6
-rw-r--r--navit/gui/qml/skins/navit/ButtonIcon.qml78
-rw-r--r--navit/gui/qml/skins/navit/PageSettingsRules.qml72
8 files changed, 88 insertions, 88 deletions
diff --git a/navit/gui/qml/bookmarksProxy.h b/navit/gui/qml/bookmarksProxy.h
index 03cbcbc88..de48898a0 100644
--- a/navit/gui/qml/bookmarksProxy.h
+++ b/navit/gui/qml/bookmarksProxy.h
@@ -72,7 +72,7 @@ public slots:
entries.appendChild(entry);
}
- dbg(lvl_info,"%s\n",retDoc.toString().toLocal8Bit().constData());
+ dbg(lvl_info,"%s",retDoc.toString().toLocal8Bit().constData());
return retDoc.toString();
}
QString AddFolder(QString description) {
@@ -144,7 +144,7 @@ public slots:
if (!item_attr_get(item, attr_label, &attr)) continue;
label=QString::fromLocal8Bit(attr.u.str);
- dbg(lvl_debug,"Bookmark is %s\n",bookmark.toStdString().c_str());
+ dbg(lvl_debug,"Bookmark is %s",bookmark.toStdString().c_str());
if (label.compare(bookmark)) continue;
item_coord_get(item, &c, 1);
if (this->object->currentPoint!=NULL) {
diff --git a/navit/gui/qml/gui_qml.cpp b/navit/gui/qml/gui_qml.cpp
index 3efc719dd..456c5d0be 100644
--- a/navit/gui/qml/gui_qml.cpp
+++ b/navit/gui/qml/gui_qml.cpp
@@ -161,11 +161,11 @@ static void gui_qml_button(void *data, int pressed, int button, struct point *p)
// check whether the position of the mouse changed during press/release OR if it is the scrollwheel
if (!navit_handle_button(this_->nav, pressed, button, p, NULL)) {
- dbg(lvl_debug,"navit has handled button\n");
+ dbg(lvl_debug,"navit has handled button");
return;
}
- dbg(lvl_debug,"enter %d %d\n", pressed, button);
+ dbg(lvl_debug,"enter %d %d", pressed, button);
if (this_->signal_on_map_click) {
gui_qml_dbus_signal(this_, p);
return;
@@ -278,7 +278,7 @@ static int gui_qml_set_graphics(struct gui_priv *this_, struct graphics *gra)
if (xid.length()>0) {
_mainWindow->embedInto(xid.toULong(&ok,0));
}else{
- dbg(lvl_error, "\nFATAL: Environment variable NAVIT_XID not set.\n"
+ dbg(lvl_error, "FATAL: Environment variable NAVIT_XID not set."
" Please set NAVIT_XID to the window ID of the window to embed into.\n");
exit(1);
}
@@ -322,7 +322,7 @@ static int gui_qml_set_graphics(struct gui_priv *this_, struct graphics *gra)
QString mainQml = QString(this_->source)+"/"+this_->skin+"/main.qml";
if (!QFile(mainQml).exists()){
- dbg(lvl_error, "FATAL: QML file %s not found. Navit is not installed correctly.\n", mainQml.toAscii().constData());
+ dbg(lvl_error, "FATAL: QML file %s not found. Navit is not installed correctly.", mainQml.toAscii().constData());
exit(1);
}
this_->guiWidget->setSource(QUrl::fromLocalFile(mainQml));
@@ -380,7 +380,7 @@ gui_qml_set_attr(struct gui_priv *this_, struct attr *attr)
this_->radius=attr->u.num;
return 1;
default:
- dbg(lvl_error,"unknown attr: %s\n",attr_to_name(attr->type));
+ dbg(lvl_error,"unknown attr: %s",attr_to_name(attr->type));
return 1;
}
}
diff --git a/navit/gui/qml/ngqpoint.h b/navit/gui/qml/ngqpoint.h
index 05142e5bf..b1e6312ff 100644
--- a/navit/gui/qml/ngqpoint.h
+++ b/navit/gui/qml/ngqpoint.h
@@ -248,7 +248,7 @@ public slots:
}
map_selection_destroy(sel);
mapset_close(h);
- dbg(lvl_info,"%s\n",retDoc.toString().toLocal8Bit().constData());
+ dbg(lvl_info,"%s",retDoc.toString().toLocal8Bit().constData());
return retDoc.toString();
}
protected:
diff --git a/navit/gui/qml/proxy.h b/navit/gui/qml/proxy.h
index 3243dc8cb..72a696f00 100644
--- a/navit/gui/qml/proxy.h
+++ b/navit/gui/qml/proxy.h
@@ -55,7 +55,7 @@ public slots:
struct attr attr_value;
double *helper;
- dbg(lvl_debug,"Setting %s to %s\n",attr_name.toStdString().c_str(),attr_string.toStdString().c_str());
+ dbg(lvl_debug,"Setting %s to %s",attr_name.toStdString().c_str(),attr_string.toStdString().c_str());
getAttrFunc(attr_from_name(attr_name.toStdString().c_str()), &attr_value, NULL);
if (ATTR_IS_INT(attr_value.type)) {
diff --git a/navit/gui/qml/routeProxy.h b/navit/gui/qml/routeProxy.h
index a2fb4c793..f4c5f9911 100644
--- a/navit/gui/qml/routeProxy.h
+++ b/navit/gui/qml/routeProxy.h
@@ -30,7 +30,7 @@ public slots:
QList<struct attr> destinations=this->_routeDestinations();
for (QList<struct attr>::const_iterator iter=destinations.begin();iter!=destinations.end();iter++) {
NGQPoint helperPoint(this->object,iter->u.pcoord,MapPoint);
- dbg(lvl_debug,"Added destination %s\n",helperPoint.coordString().toLocal8Bit().constData());
+ dbg(lvl_debug,"Added destination %s",helperPoint.coordString().toLocal8Bit().constData());
}
//dbg(lvl_debug,QString::number(_itemId).toStdString().c_str());
diff --git a/navit/gui/qml/searchProxy.h b/navit/gui/qml/searchProxy.h
index 579ac3dac..16f79a2a3 100644
--- a/navit/gui/qml/searchProxy.h
+++ b/navit/gui/qml/searchProxy.h
@@ -33,7 +33,7 @@ public:
item=country_search_get_item(cs);
if (item && item_attr_get(item, attr_country_name, &country_name)) {
search_attr.type=attr_country_all;
- dbg(lvl_debug,"country %s\n", country_name.u.str);
+ dbg(lvl_debug,"country %s", country_name.u.str);
this->country_name=QString::fromLocal8Bit(country_name.u.str);
search_attr.u.str=country_name.u.str;
search_list_search(this->sl, &search_attr, 0);
@@ -44,9 +44,9 @@ public:
}
country_search_destroy(cs);
} else {
- dbg(lvl_error,"warning: no default country found\n");
+ dbg(lvl_error,"warning: no default country found");
if (!this->country_iso2.isEmpty()) {
- dbg(lvl_debug,"attempting to use country '%s'\n",this->country_iso2.toStdString().c_str());
+ dbg(lvl_debug,"attempting to use country '%s'",this->country_iso2.toStdString().c_str());
search_attr.type=attr_country_iso2;
search_attr.u.str=(char*)this->country_iso2.toStdString().c_str();
search_list_search(this->sl, &search_attr, 0);
diff --git a/navit/gui/qml/skins/navit/ButtonIcon.qml b/navit/gui/qml/skins/navit/ButtonIcon.qml
index f969ebb5a..9b5d6ae3a 100644
--- a/navit/gui/qml/skins/navit/ButtonIcon.qml
+++ b/navit/gui/qml/skins/navit/ButtonIcon.qml
@@ -1,40 +1,40 @@
-import Qt 4.7
-
-Rectangle {
+import Qt 4.7
+
+Rectangle {
id: container
-
- signal clicked
- property string text: "Button"
- property string icon: "Icon.png"
-
- color: "black"; smooth: true; opacity: 0.75
- width: imgItem.width+20; height: txtItem.height + 6 + imgItem.height;
- transformOrigin: Rectangle.Center;
-
- MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
-
- Image {
- id: imgItem; source: gui.iconPath+container.icon; anchors.top: container.top; anchors.horizontalCenter: container.horizontalCenter;
- width: gui.height/4; height: gui.height/4
- }
-
- Text {
- id: txtItem; text: container.text; anchors.top: imgItem.bottom; anchors.horizontalCenter: container.horizontalCenter;
- color: "White"; font.pointSize: gui.height/32; horizontalAlignment: Qt.AlignHCenter
- }
-
- states: [
- State {
- name: "Pressed"; when: mr.pressed == true
- PropertyChanges { target: container; scale: 2.0 }
- PropertyChanges { target: container; opacity: 1 }
-
- }
- ]
-
- transitions: Transition {
- NumberAnimation { properties: "scale"; easing.type: "OutExpo"; duration: 200 }
- NumberAnimation { properties: "opacity"; easing.type: "InQuad"; duration: 200 }
- }
-
-}
+
+ signal clicked
+ property string text: "Button"
+ property string icon: "Icon.png"
+
+ color: "black"; smooth: true; opacity: 0.75
+ width: imgItem.width+20; height: txtItem.height + 6 + imgItem.height;
+ transformOrigin: Rectangle.Center;
+
+ MouseArea { id: mr; anchors.fill: parent; onClicked: container.clicked() }
+
+ Image {
+ id: imgItem; source: gui.iconPath+container.icon; anchors.top: container.top; anchors.horizontalCenter: container.horizontalCenter;
+ width: gui.height/4; height: gui.height/4
+ }
+
+ Text {
+ id: txtItem; text: container.text; anchors.top: imgItem.bottom; anchors.horizontalCenter: container.horizontalCenter;
+ color: "White"; font.pointSize: gui.height/32; horizontalAlignment: Qt.AlignHCenter
+ }
+
+ states: [
+ State {
+ name: "Pressed"; when: mr.pressed == true
+ PropertyChanges { target: container; scale: 2.0 }
+ PropertyChanges { target: container; opacity: 1 }
+
+ }
+ ]
+
+ transitions: Transition {
+ NumberAnimation { properties: "scale"; easing.type: "OutExpo"; duration: 200 }
+ NumberAnimation { properties: "opacity"; easing.type: "InQuad"; duration: 200 }
+ }
+
+}
diff --git a/navit/gui/qml/skins/navit/PageSettingsRules.qml b/navit/gui/qml/skins/navit/PageSettingsRules.qml
index e5238f584..37b18c8d4 100644
--- a/navit/gui/qml/skins/navit/PageSettingsRules.qml
+++ b/navit/gui/qml/skins/navit/PageSettingsRules.qml
@@ -1,38 +1,38 @@
import Qt 4.7
import "pagenavigation.js" as Navit
-
-Rectangle {
- id: page
-
- width: gui.width; height: gui.height
- border.width: 1
- color: "Black"
- opacity: 0
-
- function pageOpen() {
- page.opacity = 1;
- }
-
- Component.onCompleted: pageOpen();
-
- Behavior on opacity {
- NumberAnimation { id: opacityAnimation; duration: 300; alwaysRunToEnd: true }
- }
-
- VisualItemModel {
- id: selectorsModel
-
- ToggleSwitch { id: trackingSw; stOn: navit.getAttr("tracking"); text: "Lock on road"; onChanged: navit.setAttr("tracking",trackingSw.stOn) }
- ToggleSwitch { id: orientationSw; stOn: navit.getAttr("orientation"); text: "Northing"; onChanged: navit.setAttr("orientation",orientationSw.stOn) }
- ToggleSwitch { id: followcursorSw; stOn: navit.getAttr("follow_cursor"); text: "Map follows Vehicle"; onChanged: navit.setAttr("follow_cursor",followcursorSw.stOn) }
- ToggleSwitch { id: autozoomSw; stOn: navit.getAttr("autozoom_active"); text: "Auto zoom"; onChanged: navit.setAttr("autozoom_active",autozoomSw.stOn) }
- }
-
- ListView {
- id: selectorsList; model: selectorsModel
- focus: true; clip: true; orientation: Qt.Vertical
- anchors.verticalCenter: parent.verticalCenter; anchors.horizontalCenter: parent.horizontalCenter;
- width: trackingSw.width*1.5; height: trackingSw.height*4
- }
- Cellar {anchors.bottom: page.bottom; anchors.horizontalCenter: page.horizontalCenter; width: page.width }
-}
+
+Rectangle {
+ id: page
+
+ width: gui.width; height: gui.height
+ border.width: 1
+ color: "Black"
+ opacity: 0
+
+ function pageOpen() {
+ page.opacity = 1;
+ }
+
+ Component.onCompleted: pageOpen();
+
+ Behavior on opacity {
+ NumberAnimation { id: opacityAnimation; duration: 300; alwaysRunToEnd: true }
+ }
+
+ VisualItemModel {
+ id: selectorsModel
+
+ ToggleSwitch { id: trackingSw; stOn: navit.getAttr("tracking"); text: "Lock on road"; onChanged: navit.setAttr("tracking",trackingSw.stOn) }
+ ToggleSwitch { id: orientationSw; stOn: navit.getAttr("orientation"); text: "Northing"; onChanged: navit.setAttr("orientation",orientationSw.stOn) }
+ ToggleSwitch { id: followcursorSw; stOn: navit.getAttr("follow_cursor"); text: "Map follows Vehicle"; onChanged: navit.setAttr("follow_cursor",followcursorSw.stOn) }
+ ToggleSwitch { id: autozoomSw; stOn: navit.getAttr("autozoom_active"); text: "Auto zoom"; onChanged: navit.setAttr("autozoom_active",autozoomSw.stOn) }
+ }
+
+ ListView {
+ id: selectorsList; model: selectorsModel
+ focus: true; clip: true; orientation: Qt.Vertical
+ anchors.verticalCenter: parent.verticalCenter; anchors.horizontalCenter: parent.horizontalCenter;
+ width: trackingSw.width*1.5; height: trackingSw.height*4
+ }
+ Cellar {anchors.bottom: page.bottom; anchors.horizontalCenter: page.horizontalCenter; width: page.width }
+}