From 09dbb43255418041ce603223cb89d4a6348d3055 Mon Sep 17 00:00:00 2001 From: akashihi Date: Mon, 12 Apr 2010 14:10:06 +0000 Subject: [PATCH] Fix:gui/qml:Point and route pages redesign git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@3165 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/gui/qml/skins/navit/Makefile.am | 2 +- .../skins/navit/{point.qml => PageNavigate.qml} | 35 ++++++++------ navit/navit/gui/qml/skins/navit/PageRoute.qml | 54 ---------------------- navit/navit/gui/qml/skins/navit/main.qml | 2 +- 4 files changed, 23 insertions(+), 70 deletions(-) rename navit/navit/gui/qml/skins/navit/{point.qml => PageNavigate.qml} (60%) delete mode 100644 navit/navit/gui/qml/skins/navit/PageRoute.qml diff --git a/navit/navit/gui/qml/skins/navit/Makefile.am b/navit/navit/gui/qml/skins/navit/Makefile.am index 110c4e9..24ebf74 100644 --- a/navit/navit/gui/qml/skins/navit/Makefile.am +++ b/navit/navit/gui/qml/skins/navit/Makefile.am @@ -4,7 +4,7 @@ SKIN = navit qmldir=$(skinsdir)/$(SKIN) -qml_DATA = ButtonIcon.qml ToggleSwitch.qml ToggleButton.qml ListSelector.qml Slider.qml Cellar.qml main.qml point.qml command.qml PageAbout.qml PageBookmarksAdd.qml PageBookmarks.qml PageNavigation.qml PageRoute.qml PageSearch.qml PageSearchSelector.qml PageSettingsDisplay.qml PageSettingsLocale.qml PageSettings.qml PageSettingsRules.qml PageSettingsTools.qml PageSettingsVehicle.qml PagePoi.qml +qml_DATA = ButtonIcon.qml ToggleSwitch.qml ToggleButton.qml ListSelector.qml Slider.qml Cellar.qml main.qml command.qml PageNavigate.qml PageAbout.qml PageBookmarksAdd.qml PageBookmarks.qml PageNavigation.qml PageSearch.qml PageSearchSelector.qml PageSettingsDisplay.qml PageSettingsLocale.qml PageSettings.qml PageSettingsRules.qml PageSettingsTools.qml PageSettingsVehicle.qml PagePoi.qml qml_DATA += background.svg knob.svg do_button_subst = sed -e 's,matchProperties,properties,g' \ diff --git a/navit/navit/gui/qml/skins/navit/point.qml b/navit/navit/gui/qml/skins/navit/PageNavigate.qml similarity index 60% rename from navit/navit/gui/qml/skins/navit/point.qml rename to navit/navit/gui/qml/skins/navit/PageNavigate.qml index d6596e5..950a53e 100644 --- a/navit/navit/gui/qml/skins/navit/point.qml +++ b/navit/navit/gui/qml/skins/navit/PageNavigate.qml @@ -9,7 +9,7 @@ Rectangle { function pageOpen() { if (point.pointType!="Bookmark") { - btnBookmark.opacity=1; + btnAddBookmark.opacity=1; } if (point.pointType!="MapPoint") { btnView.opacity=1; @@ -40,36 +40,43 @@ Rectangle { anchors.top:infoTxt.bottom;anchors.topMargin: 5;anchors.horizontalCenter:parent.horizontalCenter } - Grid { - columns: 3;rows: 1 - anchors.horizontalCenter: parent.horizontalCenter; - anchors.bottom: parent.verticalCenter; anchors.bottomMargin: gui.height/16; - spacing: gui.width/12 ButtonIcon { id: btnView; text: "View on map"; icon: "gui_maps.svg"; onClicked: { navit.setCenter(); gui.backToMap(); } opacity: 0 + anchors.top: nameTxt.bottom;anchors.topMargin:gui.height/32 + anchors.left:page.left;anchors.leftMargin: gui.height/6 } ButtonIcon { id: btnPosition; text: "Set as\nposition"; icon: "gui_active.svg"; onClicked: { navit.setPosition(); gui.backToMap() } opacity: 0 + anchors.top: nameTxt.bottom;anchors.topMargin:gui.height/32 + anchors.left:btnView.right;anchors.leftMargin: gui.height/6 } ButtonIcon { id: btnDestination; text: "Set as\ndestination"; icon: "gui_active.svg"; onClicked: { navit.setDestination(); gui.backToMap() } opacity: 0 + anchors.top: nameTxt.bottom;anchors.topMargin:gui.height/32 + anchors.left:btnPosition.right;anchors.leftMargin: gui.height/6 + } + ButtonIcon { + id: btnAddBookmark; text: "Add as\na bookmark"; icon: "gui_active.svg"; onClicked: gui.setPage("PageBookmarksAdd.qml") + opacity: 0 + anchors.top: nameTxt.bottom;anchors.topMargin:gui.height/32 + anchors.left:btnDestination.right;anchors.leftMargin: gui.height/6 } - } - Grid { - columns: 3;rows: 1 + columns: 4;rows: 1 anchors.horizontalCenter: parent.horizontalCenter; - anchors.top: parent.verticalCenter; anchors.topMargin: gui.height/16; - spacing: gui.width/12 + anchors.top: btnDestination.bottom;anchors.topMargin:gui.height/32 + spacing: gui.height/6 + ButtonIcon { + id: btnBookmarks; text: "Bookmarks"; icon: "gui_bookmark.svg"; onClicked: gui.setPage("PageBookmarks.qml"); + } ButtonIcon { - id: btnQuit; text: "Nearest\nPOIs"; icon: "attraction.svg"; onClicked: gui.setPage("PagePoi.qml"); + id: btnPOI; text: "Nearest\nPOIs"; icon: "attraction.svg"; onClicked: gui.setPage("PagePoi.qml"); } ButtonIcon { - id: btnBookmark; text: "Add as\na Bookmark"; icon: "gui_bookmark.svg"; onClicked: gui.setPage("PageBookmarksAdd.qml") - opacity: 0; + id: btnSearch; text: "Address\nSearch"; icon: "gui_town.svg"; onClicked: gui.setPage("PageSearch.qml") } ButtonIcon { id: btnInfo; text: "Point\ninformation"; icon: "gui_menu.svg"; onClicked: console.log("Implement me!"); diff --git a/navit/navit/gui/qml/skins/navit/PageRoute.qml b/navit/navit/gui/qml/skins/navit/PageRoute.qml deleted file mode 100644 index f586847..0000000 --- a/navit/navit/gui/qml/skins/navit/PageRoute.qml +++ /dev/null @@ -1,54 +0,0 @@ -import Qt 4.6 - -Rectangle { - id: page - - width: gui.width; height: gui.height - color: "Black" - opacity: 0 - - function pageOpen() { - page.opacity = 1; - if (navit.getDestination().length>0) { - btnPoi.opacity=0.8; - } - } - - Component.onCompleted: pageOpen(); - - opacity: Behavior { - NumberAnimation { id: opacityAnimation; duration: 300; alwaysRunToEnd: true } - } - - Grid { - columns: 3;rows: 1 - anchors.horizontalCenter: parent.horizontalCenter; - anchors.bottom: parent.verticalCenter; anchors.bottomMargin: gui.height/16; - spacing: gui.width/12 - ButtonIcon { - id: btnBookmarks; text: "Bookmarks"; icon: "gui_bookmark.svg"; onClicked: {bookmarks.currentPath=""; gui.setPage("PageBookmarks.qml") } - } - ButtonIcon { - id: btnDestinations; text: "Destinations"; icon: "gui_bookmark.svg"; onClicked: console.log("Implement me!"); - } - ButtonIcon { - id: btnSettings; text: "Locations"; icon: "gui_bookmark.svg"; onClicked: console.log("Implement me!"); - } - } - - Grid { - columns: 2;rows: 1 - anchors.horizontalCenter: parent.horizontalCenter; - anchors.top: parent.verticalCenter; anchors.topMargin: gui.height/16; - spacing: gui.width/12 - ButtonIcon { - id: btnSearch; text: "Search"; icon: "gui_town.svg"; onClicked: gui.setPage("PageSearch.qml"); - } - ButtonIcon { - id: btnPoi; text: "POIs near\nDestination"; icon: "attraction.svg"; onClicked: gui.setPage("PagePoi.qml"); - opacity: 0; - } - } - - Cellar {anchors.bottom: page.bottom; anchors.horizontalCenter: page.horizontalCenter; width: page.width } -} diff --git a/navit/navit/gui/qml/skins/navit/main.qml b/navit/navit/gui/qml/skins/navit/main.qml index 8b183d5..b69b1f8 100644 --- a/navit/navit/gui/qml/skins/navit/main.qml +++ b/navit/navit/gui/qml/skins/navit/main.qml @@ -28,7 +28,7 @@ Rectangle { id: btnDestination; text: "Drive to\npoint on map"; icon: "gui_active.svg"; onClicked: { navit.setDestination(); gui.backToMap() } } ButtonIcon { - id: btnNavigate; text: "Navigate\nto . . ."; icon: "cursor.svg"; onClicked: gui.setPage("PageRoute.qml") + id: btnNavigate; text: "Navigate\nto . . ."; icon: "cursor.svg"; onClicked: gui.setPage("PageNavigate.qml") } ButtonIcon { id: btnRoute; text: "Route\ninformation"; icon: "nav_destination_wh.svg"; onClicked: gui.setPage("PageNavigation.qml") -- 2.7.4