Hi Oliver: Am 31.12.09 10:04 schrieb(en) Oliver Eichler:
non ASCII characters are a problem in general. To do it right, I would need to know the character set of the device. No idea how to do that.
Simple solution: let the user choose. I believe most have only one or two devices, all with the same locale configuration. It might be a good idea to re-organise the "Device" setup dialogue anyway: 1st row: Combo to select the device type 2nd row: entry for serial port for serial devices *OR* host name and port for ethernet devices *OR* nothing for USB devices *OR* label saying that no drivers were found 3rd row: additional device config options, like locale configuration. This would display only the relevant options for the selected device, and the order would be more natural.
I usually try to avoid special characters.
Hmmm, I don't think that's an option... ;-)
I never found out what it takes to make it beep. Let's say it's a feature :).
I see. Garmin's support really sucks!
It's a bit of a problem of limited waypoint name length. Especially the older eTrex series is very limited. If I recall right they have 6 characters only. That's why I decided to do it with numbers only.
But you know it from the protocol the device supports! Looking at the Garmin docs, all waypoints up to type D107, inclusively, support a 6 character identification and a 40 character comment. You could use your numbering scheme here, and set the comment to the (possibly cut) waypoint name.
For the newer formats starting with D108, both are variable length strings. The docs say that that the limitation is the packet size, which is apparently not true as the strings are truncated at least in my Legend HCx, but it would IMHO greatly improve the usability it it would be possible to have more descriptive information here.
You can select waypoints from the list to form a route, already. However the route will create a new copy of the waypoints with the known number scheme when uploaded.
I thought about the attached patch which saves one click... ;-) No idea if it breaks something else, though.
Why is that? Well, GT is not a Garmin-only software and the concept of transferring waypoints as part of a route is more than strange. To be generic to other manufacturer's devices there must be no link between the different data elements like waypoints, tracks or routes. That is why the CDeviceGarmin instance will add waypoints on-the-fly.
I understand. However, my point is that it seems to be natural that the user might give names to nodes in a route. Think of a rail trip where you have to change the train, and the intermediate nodes are the names of the stations where you have to change (bad example, but you get the picture, I hope...). If and how they are actually transferred to the device is the task of the backend driver.
IIRC, if the Garmin receives a point in a route which does already exists as waypoint with *exactly* the same properties, no extra new waypoint is created which is somewhat convenient, as otherwise many identical waypoints might accumulate in the device.
Btw, I never use routes. I upload waypoints and apply "goto" on the device. Much easier :)
That's correct. However, something like a "trip planning feature" would be nice. E.g. think of creating a route to visit several customers, i.e. a route which consists of several nodes (which should all be named, like "Company A", "Company B", etc.). It is a lot easier using an application like QLandkarteGT (never used Mapsource, no idea if it's possible there) than the device itself.
All the best for 2010, and keep up your great work ;-) Albrecht.
Index: src/CSearchToolWidget.cpp =================================================================== --- src/CSearchToolWidget.cpp (Revision 1845) +++ src/CSearchToolWidget.cpp (Arbeitskopie) @@ -25,6 +25,8 @@ #include "GeoMath.h" #include "CMapDB.h" #include "CWptDB.h" +#include "CRoute.h" +#include "CRouteDB.h" #include <QtGui> @@ -47,6 +49,7 @@ CSearchToolWidget::CSearchToolWidget(QTabWidget * contextMenu = new QMenu(this); contextMenu->addAction(QPixmap(":/icons/iconClipboard16x16.png"),tr("Copy Position"),this,SLOT(slotCopyPosition()),Qt::CTRL + Qt::Key_C); contextMenu->addAction(QPixmap(":/icons/iconAdd16x16.png"),tr("Add Waypoint ..."),this,SLOT(slotAdd())); + contextMenu->addAction(QPixmap(":/icons/iconAdd16x16.png"),tr("Add Route ..."),this,SLOT(slotAddRouteTo())); contextMenu->addAction(QPixmap(":/icons/iconClear16x16.png"),tr("Delete"),this,SLOT(slotDelete()),Qt::Key_Delete); connect(listResults,SIGNAL(customContextMenuRequested(const QPoint&)),this,SLOT(slotContextMenu(const QPoint&))); @@ -151,6 +154,20 @@ void CSearchToolWidget::slotAdd() } +void CSearchToolWidget::slotAddRouteTo() +{ + QListWidgetItem * item = listResults->currentItem(); + if(item == 0) return; + CSearch * result = CSearchDB::self().getResultByKey(item->text()); + if(result == 0) return; + + CRoute * route = new CRoute(&CRouteDB::self()); + route->addPosition(result->lon, result->lat); + route->setName(result->query); + CRouteDB::self().addRoute(route, false); +} + + void CSearchToolWidget::keyPressEvent(QKeyEvent * e) { if(e->key() == Qt::Key_Delete) { Index: src/CSearchToolWidget.h =================================================================== --- src/CSearchToolWidget.h (Revision 1845) +++ src/CSearchToolWidget.h (Arbeitskopie) @@ -44,6 +44,7 @@ class CSearchToolWidget : public QWidget, private void slotDelete(); void slotCopyPosition(); void slotAdd(); + void slotAddRouteTo(); private: QMenu * contextMenu;
pgpgte018s3xm.pgp
Description: PGP signature
------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________ QLandkarte-users mailing list QLandkarte-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qlandkarte-users