Difference between revisions of "User:Tiiiim"

From Navit's Wiki
Jump to: navigation, search
Line 1: Line 1:
 
= Attempts at incorporating the QML GUI into Navit =
 
= 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...  
+
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 ==
 +
* Fullscreen does not work
 +
* Uses hard-coded paths (as far as I can see) and expects the *.qml to be in a particular location
 +
* No icons in Bookmarks, so its impossible to distinguish between a Bookmark folder or actual Bookmark
 +
* 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).
  
 
== System ==
 
== System ==
Line 146: Line 153:
 
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:28: Unable to assign [undefined] to QString
 
</pre>
 
</pre>
**** Vehicle selection screen. Able to select Vehicle profile.(Untested)
+
**** Vehicle selection screen. Able to select Vehicle profile.(Works)
 
**** Also a Vehicle Options button: when clicked, screen goes blank with following message:
 
**** Also a Vehicle Options button: when clicked, screen goes blank with following message:
 
<pre>
 
<pre>
Line 154: Line 161:
 
*** Trying Rules (works)
 
*** Trying Rules (works)
 
**** Options:
 
**** Options:
***** Lock on road (untested)
+
***** Lock on road (works)
 
***** Northing (untested)
 
***** Northing (untested)
 
***** Map follows vehicle (untested)
 
***** Map follows vehicle (untested)
Line 176: Line 183:
 
***** Trying View on Map (nothing happens. Terminal: "Implement me!")
 
***** Trying View on Map (nothing happens. Terminal: "Implement me!")
 
***** Trying Set as Position (not sure: returns to main map, but remains in old location)
 
***** Trying Set as Position (not sure: returns to main map, but remains in old location)
***** Trying Set as Destination (as above. Need testing when connected to GPS)
+
***** Trying Set as Destination (works)
 
***** Trying Nearest POIs (works)
 
***** Trying Nearest POIs (works)
 
<pre>
 
<pre>
Line 189: Line 196:
 
</pre>
 
</pre>
 
****** You can select the POI distance from the location with slider (neat!)
 
****** You can select the POI distance from the location with slider (neat!)
****** Scrolling slider doesn't seem to work.
+
****** Scrolling through the list works by using the scroll wheel on the mouse or dragging the list up and down. It does not work by dragging the scroll bar...
 
****** Clicking POI type icons at top ''removes'' those types from the list. (Icon also goes dark). Clicking again returns them, and the icon lights up again.
 
****** Clicking POI type icons at top ''removes'' those types from the list. (Icon also goes dark). Clicking again returns them, and the icon lights up again.
 
***** Trying Point Information (nothing happens. Terminal: "Implement me!")
 
***** Trying Point Information (nothing happens. Terminal: "Implement me!")

Revision as of 15:46, 4 April 2010

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

  • Fullscreen does not work
  • Uses hard-coded paths (as far as I can see) and expects the *.qml to be in a particular location
  • No icons in Bookmarks, so its impossible to distinguish between a Bookmark folder or actual Bookmark
  • 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).

System

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

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"/>

All other GUI types disabled. Starting up Navit.

  • Navit starts - no crashes
  • Single window, map displays, windowed mode
  • No buttons or toolbar
  • 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.

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.
  • Try left click:
    • Menu appears!
    • Choice of Route:Navigation:Settings:About:Quit
    • Route has no icon.
    • Trying Settings (works)
      • Choice of Display:Map:Vehicle:Rules:Tools
      • Also globe icon to return to the map (works) and Home button (works)
      • Trying Display. (works)
        • Able to change layout (works)
        • Able to change to fullscreen and back (doesn't work)
        • Able to change 2D/3D. When 3D selected, asks for 3D pitch. (works)
        • (Note: when returning to the main display, clicking for the Menu brings you back to the last selected Menu display)
      • Trying Map
        • Nothing happens. Message in Terminal: "Implement me!" (Good stuff!)
      • Trying Vehicle (works)
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
        • Vehicle selection screen. Able to select Vehicle profile.(Works)
        • Also a Vehicle Options button: when clicked, screen goes blank with following message:
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
      • Trying Rules (works)
        • Options:
          • Lock on road (works)
          • Northing (untested)
          • Map follows vehicle (untested)
      • Trying Tools (works)
        • Option of Locale. When clicked, displays locale:
LANG=eng_GB.UTF-8
    • Trying About (works)
      • Displays message:
Hi, i'm Navit!
    • Trying Route (works, but no icon for Route)
      • Options: Bookmarks:Destinations:Locations:Search:POIs Near Destination
      • Trying Bookmarks (works)
        • Selecting a Folder opens up the folder. Clicking ".." moves back up the folder tree.
        • No idea which is a folder and which is a bookmark (needs icons?)
        • Clicking on a Bookmark (works):
          • Displays coordinates.
          • Displays full title.
          • Options: View on Map: Set as Position: Set as Destination: Nearest POIs: Point Information
          • Trying View on Map (nothing happens. Terminal: "Implement me!")
          • Trying Set as Position (not sure: returns to main map, but remains in old location)
          • Trying Set as Destination (works)
          • Trying Nearest POIs (works)
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
            • You can select the POI distance from the location with slider (neat!)
            • Scrolling through the list works by using the scroll wheel on the mouse or dragging the list up and down. It does not work by dragging the scroll bar...
            • Clicking POI type icons at top removes those types from the list. (Icon also goes dark). Clicking again returns them, and the icon lights up again.
          • Trying Point Information (nothing happens. Terminal: "Implement me!")
          • Back to Nearest POIs:
            • CLicking a POI provides the options: View on Map ("Implement me!"):Set as Position: Set as Destination:Nearest POIs:Add as Bookmark:Point Information
            • Trying Add as Bookmark: Asks for bookmark name. Tried typing but nothing appears. Clicked Add and it told me Success! Added a Bookmark called "Enter bookmark name...". Can delete the bookmark from the bookmark list.