User:Tiiiim

From Navit's Wiki
Revision as of 19:14, 15 May 2010 by Tiiiim (talk | contribs) (Undo revision 3914 by Empress09 (Talk) SPAM)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Attempts at incorporating the QML GUI into Navit

These are my notes when attempting to get the QML GUI working. To be used when writing a proper wiki page about it...

Current Problems

Bugs

  • POIs Near Position actually gives the POIs near destination. Menu --> Navigation --> POIs Near Position (only shows when routing)
  • POIs Near Destination actually gives the POIs near the current position. Menu --> Route --> POIs Near Destination (always shows). Fixed in r3136
  • On Bookmark page. When clicking 3rd icon for any bookmark (greyed out X in the images below), Navit crashes with the following message:
file:///home/tim/src/navit/navit/gui/qml/skins/navit/PageBookmarks.qml:121: Unable to assign QString to int
ASSERT failure in QList<T>::operator[]: "index out of range", file /usr/local/Trolltech/Qt-4.7.0/include/QtCore/qlist.h, line 474
Aborted

and inserts the following as the first entry in the Bookmarks.txt file:

mg:0x0 0x0 type=bookmark label="/"

Subsequent re-starts of Navit are fine, except when trying to re-enter the Bookmarks page, when Navit crashes with the following message:

ASSERT failure in QList<T>::operator[]: "index out of range", file /usr/local/Trolltech/Qt-4.7.0/include/QtCore/qlist.h, line 474
Aborted

Manual removal of the new first entry in the Bookmarks.txt file resolves the issue.

Feature Problems

  • No icons in Bookmarks, so its impossible to distinguish between a Bookmark folder or actual Bookmark
  • When not routing, there is no 'POIs Near Position' selection anymore (as of r3136)

System

Acer One netbook, 160GB HDD, 1GB RAM, Intel Atom processor.
Ubuntu 9.10
Navit from SVN, r3136

Step 1 - Installing Qt

Finding and downloading

Configuring

Using instructions from http://doc.qt.nokia.com/4.7-snapshot/install-x11.html. In a terminal:

cd ~/src/qt-everywhere-opensource-src-4.7.0-tp/
./configure
  • During configure:
    • Asks what type to use: Commercial or Open Source. Selected Open Source ('o')
    • Asks to accept licence: Chose 'yes'
  • Configuring... took ~14 minutes

Making and Installing

In terminal:

make
  • Making... took ~5.5hrs (I'm not joking!)

In terminal:

sudo make install
  • Installing... ~15 mins

Configuring the Environment

Again, using instructions from http://doc.qt.nokia.com/4.7-snapshot/install-x11.html. In a terminal:

PATH=/usr/local/Trolltech/Qt-4.7.0/bin:$PATH
export PATH

To check the PATH, in terminal:

$PATH
bash: /usr/local/Trolltech/Qt-4.7.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: No such file or directory

Step 2 - Re-building Navit

Moving to Navit folder and updating from SVN. Also autogen, configure. Configure is with special switch from http://wiki.navit-project.org/index.php/Gui_QML. In terminal:

cd ~/src/navit
svn up && ./autogen.sh && ./configure --enable-gui-qml
  • Checked during the configure routine for:
Graphics types: yes (default)
  qt_qpainter:       yes (default)
GUI types:
  qml:               yes (configure parameter)
  • Eeerm, no. Saw:
Graphics types: yes (default)
  qt_qpainter:       no (Package qt-mt present)
GUI types:
  qml:               no (Packages QtGui and/or QtCore missing)
  • Tried after running
export PKG_CONFIG_PATH=/usr/local/Trolltech/Qt-4.7.0/lib/pkgconfig

when configuring the environment. Success:

  qt_qpainter:       yes (default)
GUI types:
  qml:               yes (configure parameter)

Then install Navit:

make
sudo make install
  • Success.

Step 3 - Configuring the GUI

Enabling the GUI

In navit.xml:

<!--<graphics type="gtk_drawing_area"/>-->
<graphics type="qt_qpainter"/>
<gui type="qml" enabled="yes" source="/home/tim/src/navit/navit/gui/qml/skins" skin="navit" width="1024" height="550" icon_src="/home/tim/.navit/xpm/"/>

All other GUI types disabled. Starting up Navit.

  • Navit starts - no crashes
  • Single window, map displays, windowed mode <-- Fullscreen not working
  • No buttons or toolbar <-- Use OSD items
  • Map is draggable
  • The following messages appear when starting Navit:
graphics_qt_qpainter:graphics_priv* graphics_qt_qpainter_new(navit*, graphics_methods*, attr**, callback_list*):enter
** (<unknown>:20437): CRITICAL **: atk_object_set_name: assertion `name != NULL' failed
graphics_qt_qpainter:graphics_priv* graphics_qt_qpainter_new(navit*, graphics_methods*, attr**, callback_list*):return
gui_qml:NGQProxySearch::NGQProxySearch(gui_priv*, QObject*):country United Kingdom
gui_qml:void NGQProxyGui::setPage(QString, bool):Page is: main.qml
:-1: File error for URL file:///usr/local/share/navit/gui/qml/skins/navit/main.qml 
graphics_qt_qpainter:virtual void RenderArea::resizeEvent(QResizeEvent*):size 800x600
graphics_qt_qpainter:virtual void RenderArea::resizeEvent(QResizeEvent*):pixmap 0xa1f4380 800x600
  • When clicked (both left and right click), map disappears to leave a blank screen. Navit is still active as GPSD calls are still being made i.e. it hasn't crashed!
    • From the wiki, the menu interface should be displayed when clicked. This isn't so.
    • Notice in printed messages above it expects main.qml in the share directory. Is this hardcoded?
    • Copying files to shared directory and trying again. Fixed using source attribute in <gui> tag.

Testing GUI

Re-starting Navit. Messages:

graphics_qt_qpainter:graphics_priv* graphics_qt_qpainter_new(navit*, graphics_methods*, attr**, callback_list*):enter
** (<unknown>:20691): CRITICAL **: atk_object_set_name: assertion `name != NULL' failed
graphics_qt_qpainter:graphics_priv* graphics_qt_qpainter_new(navit*, graphics_methods*, attr**, callback_list*):return
gui_qml:NGQProxySearch::NGQProxySearch(gui_priv*, QObject*):country United Kingdom
gui_qml:void NGQProxyGui::setPage(QString, bool):Page is: main.qml
Cannot open  QUrl( "file:///usr/local/share/navit/xpm/cursor.svg" )  
couldn't create image from  "" 
couldn't create image from  "" 
..snip..
couldn't create image from  "" 
couldn't create image from  "" 
graphics_qt_qpainter:virtual void RenderArea::resizeEvent(QResizeEvent*):size 800x600
graphics_qt_qpainter:virtual void RenderArea::resizeEvent(QResizeEvent*):pixmap 0x8eaa310 800x600
  • Note it expects xpm folder in share directory. Fixed using icon_src attribute in <gui> tag.

Menu Pages

Option Notes Screenshot
Main Menu
  • Accessible via a normal left-click off the mouse on the screen
Qml menu 20100404.png
Menu --> Route
  • Working:
    • Bookmarks
    • POIs near destination
  • Not working
    • Destinations
    • Locations
    • Search
Qml route 20100404.png
Menu --> Route --> Bookmarks
  • No distinction between bookmarks and folders
  • Selecting a Folder opens up the folder. Clicking ".." moves back up the folder tree.
Qml bookmarks 20100404.png
Menu --> Route --> Bookmarks --> Click a bookmark
  • Displays coordinates.
  • Displays full title.
  • Working:
    • Set as Destination
    • Nearest POIs
    • View on map
    • Set as position
  • Not working:
    • Point information
Qml bookmark item 20100404.png
Menu --> Navigation
  • Working:
    • View route
    • View position on map
    • POIs near position
      • Actually POIs near destination
    • Stop
      • Stops routing
  • Not Working:
    • Roadbook
    • Height profile
Qml navigation 20100404.png
Menu --> Settings
  • Working:
    • Display
    • Vehicle
    • Rules
    • Tools
  • Not Working:
    • Map
Qml settings 20100404.png
Menu --> Settings --> Display
  • Working:
    • Current layout
      • Click to select the desired map layout
    • 2D/3D
      • Left = 2D, right = 3D. Click to move
    • Pitch
      • Only appears if 3D is selected
      • Drag slider to change pitch angle
    • Fullscreen
Qml settings display 20100404.png
Menu --> Settings --> Vehicle
  • Working:
    • Current vehicle profile
      • Click to select the desired vehicle profile
  • Not working:
    • Vehicle options
Qml settings vehicle 20100404.png
Menu --> Settings --> Rules
  • Working:
    • Lock on road
  • Untested:
    • All others
Qml settings rules 20100404.png
Menu --> Settings --> Tools
  • Working:
    • Locale
      • Just displays your locale on the screen
Qml settings tools 20100404.png
POI Page
  • Accessible from:
    • Routes --> POIs near Destination
    • Navigation --> POIs near position
    • Clicked bookmark --> Nearest POIs
    • Right click on screen --> Nearest POIs
  • To disable POI category, click its icon. It will go dark.
  • To re-enable POI category, click its icon. It will light up.
  • Move the slider to show points further from your location.
Qml poi 20100404.png
Point Page
  • Accessible from:
    • POI Page --> Click on a POI
    • Right click on screen
  • Working:
    • Set as destination
    • Set as position
    • Nearest POIs
    • View on Map
    • Add as bookmark
Qml point 20100404.png
Add Bookmark
  • Accessible from:
    • Point Page
  • Working:
    • Add
    • Cancel
    • Changing the name of the bookmark
Qml add bookmark 20100404.png

Issues

  • When clicking Menu --> Settings --> Vehicle the following appears in the terminal:
gui_qml:void NGQProxyGui::setPage(QString, bool):Page is: PageSettings.qml
gui_qml:void NGQProxyGui::setPage(QString, bool):Page is: PageSettingsVehicle.qml
gui_qml:QString NGQProxyNavit::getAttrList(const QString&):retId 0 
model is: QStandardItemModel(0xa3a7510)
file:///usr/local/share/navit/gui/qml/skins/navit/ListSelector.qml:29: Unable to assign [undefined] to QString
file:///usr/local/share/navit/gui/qml/skins/navit/ListSelector.qml:28: Unable to assign [undefined] to QString
file:///usr/local/share/navit/gui/qml/skins/navit/ListSelector.qml:29: Unable to assign [undefined] to QString
file:///usr/local/share/navit/gui/qml/skins/navit/ListSelector.qml:28: Unable to assign [undefined] to QString
file:///usr/local/share/navit/gui/qml/skins/navit/ListSelector.qml:29: Unable to assign [undefined] to QString
file:///usr/local/share/navit/gui/qml/skins/navit/ListSelector.qml:28: Unable to assign [undefined] to QString
file:///usr/local/share/navit/gui/qml/skins/navit/ListSelector.qml:29: Unable to assign [undefined] to QString
file:///usr/local/share/navit/gui/qml/skins/navit/ListSelector.qml:28: Unable to assign [undefined] to QString
  • When clicking Menu --> Settings --> Vehicle --> Vehicle Options the screen goes blank and the following appears in the terminal:
gui_qml:void NGQProxyGui::setPage(QString, bool):Page is: PageSettingsVehicleOptions.qml
:-1: File error for URL file:///usr/local/share/navit/gui/qml/skins/navit/PageSettingsVehicleOptions.qml
  • When clicking any POI button, the following appears in the terminal:
gui_qml:void NGQProxyGui::setPage(QString, bool):Page is: PagePoi.qml
couldn't create image from  "" 
couldn't create image from  "" 
...snip...
couldn't create image from  "" 
couldn't create image from  "" 
model is: QDeclarativeXmlListModel(0x8dff5f8)
file:///usr/local/share/navit/gui/qml/skins/navit/ListSelector.qml:66: Unable to assign QString to int