Difference between revisions of "User:Tiiiim"
m (Semi-fixed POI chooser) |
|||
Line 319: | Line 319: | ||
file:///usr/local/share/navit/gui/qml/skins/navit/ListSelector.qml:66: Unable to assign QString to int | file:///usr/local/share/navit/gui/qml/skins/navit/ListSelector.qml:66: Unable to assign QString to int | ||
</pre> | </pre> | ||
+ | |||
+ | |||
+ | ==Related Links:== | ||
+ | |||
+ | [http://www.lindaolsson.com/'''palm beach condo'''] |
Revision as of 04:08, 12 May 2010
Contents
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
- Trying to find Qt 4.7 in package manager: Not found.
- Trying to find it online: found source (tech-pre-release) at http://get.qt.nokia.com/qt/source/qt-everywhere-opensource-src-4.7.0-tp.tar.gz (~170MB)
- Un-gzipping: ~ 1 minute
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
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
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