1 // -*- C++ -*-
2 // $Id: gmapdlg.cpp,v 1.3 2009-11-02 20:38:02 robertl Exp $
3 //------------------------------------------------------------------------
4 //
5 // Copyright (C) 2009 S. Khai Mong <khai@mangrai.com>.
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20 // USA.
21 //
22 //------------------------------------------------------------------------
23
24 #include <QStandardItemModel>
25 #include <QMenu>
26 #include <QHeaderView>
27 #include "gmapdlg.h"
28 #include "appname.h"
29 #include "gpx.h"
30
31 //------------------------------------------------------------------------
32 class StandardItem: public QStandardItem
33 {
34 public:
StandardItem(const QString & text)35 StandardItem(const QString& text): QStandardItem(text)
36 {
37 this->setEditable(false);
38 }
39 };
40
41 //------------------------------------------------------------------------
42 class TreeAction: public QAction
43 {
44 public:
TreeAction(const QString & text,QObject * obj,const char * member,QObject * parent)45 TreeAction(const QString& text,
46 QObject* obj, const char* member, QObject* parent): QAction(text, parent)
47 {
48 connect(this, SIGNAL(triggered()), obj, member);
49 }
50 };
51 //------------------------------------------------------------------------
formatLength(double l)52 QString GMapDialog::formatLength(double l)
53 {
54 double metricLength = l;
55 QString metricUnit = tr("meters");
56 int metricPrecision = 2;
57 if (l > 1000.0) {
58 metricLength = l/1000.0;
59 metricUnit = "km";
60 metricPrecision = 3;
61 }
62
63 double fpsLength = l*1000.0/25.4/12.0;
64 QString fpsUnit = tr("feet");
65 int fpsPrecision = 1;
66 if (fpsLength >5280.0) {
67 fpsLength /= 5280.0;
68 fpsUnit = tr("miles");
69 fpsPrecision = 3;
70 }
71 return QString(tr("Length: %1 %2\n %3 %4")
72 .arg(metricLength, 0, 'f', metricPrecision)
73 .arg(metricUnit)
74 .arg(fpsLength, 0, 'f', fpsPrecision)
75 .arg(fpsUnit));
76
77 }
78 //------------------------------------------------------------------------
appendWaypointInfo(QStandardItem * it,const GpxWaypoint & wpt)79 void GMapDialog::appendWaypointInfo(QStandardItem* it, const GpxWaypoint& wpt)
80 {
81 it->appendRow(new StandardItem(tr("Lat: %1").arg(wpt.getLocation().lat(), 0, 'f', 7)));
82 it->appendRow(new StandardItem(tr("Lng: %1").arg(wpt.getLocation().lng(), 0, 'f', 7)));
83 if (wpt.getDescription() != QString()) {
84 it->appendRow(new StandardItem(tr("Desc: %1").arg(wpt.getDescription())));
85 }
86 if (wpt.getComment() != QString() && wpt.getComment() != wpt.getDescription()) {
87 it->appendRow(new StandardItem(tr("Cmt: %1").arg(wpt.getComment())));
88 }
89 if (wpt.getElevation() > -50000) {
90 it->appendRow(new StandardItem(tr("Ele: %1").arg(wpt.getElevation())));
91 }
92
93 }
94
95 //------------------------------------------------------------------------
appendTrackInfo(QStandardItem * it,const GpxTrack & trk)96 void GMapDialog::appendTrackInfo(QStandardItem* it, const GpxTrack& trk)
97 {
98 QDateTime startTime;
99 QDateTime stopTime;
100 bool first = true;
101 int count = 0;
102 foreach (const GpxTrackSegment& seg, trk.getTrackSegments()) {
103 foreach (const GpxTrackPoint& pt, seg.getTrackPoints()) {
104 count++;
105 QDateTime t = pt.getDateTime();
106 if (!t.isValid()) {
107 continue;
108 }
109 if (first) {
110 startTime = t;
111 stopTime = t;
112 first = false;
113 } else {
114 if (t < startTime) {
115 startTime = t;
116 }
117 if (t > stopTime) {
118 stopTime = t;
119 }
120 }
121 }
122 }
123 if (startTime.isValid()) {
124 it->appendRow(new StandardItem(tr("Start: %1")
125 .arg(startTime.toString("yyyy-MMM-dd HH:mm:ss"))));
126 it->appendRow(new StandardItem(tr("Stop: %1")
127 .arg(stopTime.toString("yyyy-MMM-dd HH:mm:ss"))));
128 }
129 it->appendRow(new StandardItem(tr("Points: %1").arg(count)));
130
131 it->appendRow(new StandardItem(formatLength(trk.length())));
132
133 }
134
135 //------------------------------------------------------------------------
appendRouteInfo(QStandardItem * it,const GpxRoute & rte)136 void GMapDialog::appendRouteInfo(QStandardItem* it, const GpxRoute& rte)
137 {
138 it->appendRow(new StandardItem(formatLength(rte.length())));
139 }
140
141 //------------------------------------------------------------------------
GMapDialog(QWidget * parent,const QString & gpxFileName,QPlainTextEdit * te)142 GMapDialog::GMapDialog(QWidget* parent, const QString& gpxFileName, QPlainTextEdit* te): QDialog(parent)
143 {
144 ui_.setupUi(this);
145 this->setWindowTitle(QString(appName) + " " + QString("Google Maps"));
146 gpx_.read(gpxFileName);
147
148 mapWidget_ = new Map(this, gpx_, te);
149 auto* lay = new QHBoxLayout(ui_.frame);
150 lay->setContentsMargins(0, 0, 0, 0);
151 lay->addWidget(mapWidget_);
152
153 model_ = new QStandardItemModel(this);
154 menuIndex_ = -1; // Actually set for real in showContextMenu().
155
156 wptItem_ = new StandardItem(tr("Waypoints"));
157 wptItem_->setCheckable(true);
158 wptItem_->setCheckState(Qt::Checked);
159 model_->appendRow(wptItem_);
160 for (int i=0; i<gpx_.getWaypoints().size(); i++) {
161 GpxWaypoint& wpt = gpx_.getWaypoints()[i];
162 QStandardItem* it = new StandardItem(wpt.getName());
163 wptItem_->appendRow(it);
164 it->setCheckable(true);
165 it->setCheckState(Qt::Checked);
166 it->setData(QVariant::fromValue((void*)&wpt));
167 appendWaypointInfo(it, wpt);
168 wptList_ << it;
169 }
170
171 trkItem_ = new StandardItem(tr("Tracks"));
172 trkItem_->setCheckable(true);
173 trkItem_->setCheckState(Qt::Checked);
174 model_->appendRow(trkItem_);
175 for (int i=0; i<gpx_.getTracks().size(); i++) {
176 GpxTrack& trk = gpx_.getTracks()[i];
177 QStandardItem* it = new StandardItem(trk.getName());
178 trkItem_->appendRow(it);
179 it->setCheckable(true);
180 it->setCheckState(Qt::Checked);
181 it->setData(QVariant::fromValue((void*)&trk));
182 appendTrackInfo(it, trk);
183 trkList_ << it;
184 }
185
186 rteItem_ = new StandardItem(tr("Routes"));
187 rteItem_->setCheckable(true);
188 rteItem_->setCheckState(Qt::Checked);
189 model_->appendRow(rteItem_);
190 for (int i=0; i<gpx_.getRoutes().size(); i++) {
191 GpxRoute& rte = gpx_.getRoutes()[i];
192 QStandardItem* it = new StandardItem(rte.getName());
193 rteItem_->appendRow(it);
194 it->setCheckable(true);
195 it->setCheckState(Qt::Checked);
196 it->setData(QVariant::fromValue((void*)&rte));
197 appendRouteInfo(it, rte);
198 rteList_ << it;
199 }
200
201 ui_.treeView->header()->hide();
202 ui_.treeView->setModel(model_);
203 ui_.treeView->setExpandsOnDoubleClick(false);
204 connect(model_, SIGNAL(itemChanged(QStandardItem*)),
205 this, SLOT(itemChangedX(QStandardItem*)));
206 connect(mapWidget_, SIGNAL(waypointClicked(int)), this, SLOT(waypointClickedX(int)));
207 connect(mapWidget_, SIGNAL(routeClicked(int)), this, SLOT(routeClickedX(int)));
208 connect(mapWidget_, SIGNAL(trackClicked(int)), this, SLOT(trackClickedX(int)));
209 connect(ui_.treeView, SIGNAL(doubleClicked(QModelIndex)),
210 this, SLOT(treeDoubleClicked(QModelIndex)));
211 connect(ui_.treeView->selectionModel(), SIGNAL(selectionChanged(QItemSelection,QItemSelection)),
212 this, SLOT(selectionChangedX(QItemSelection,QItemSelection)));
213
214 ui_.treeView->setContextMenuPolicy(Qt::CustomContextMenu);
215 connect(ui_.treeView, SIGNAL(customContextMenuRequested(QPoint)),
216 this, SLOT(showContextMenu(QPoint)));
217
218 connect(ui_.copyButton, SIGNAL(clicked()), this, SLOT(copyButtonClickedX()));
219
220 ui_.copyButton->hide(); // Hide for now, not working
221 }
222
223 //-------------------------------------------------------------------------
itemChangedX(QStandardItem * it)224 void GMapDialog::itemChangedX(QStandardItem* it)
225 {
226 bool show = (it->checkState() == Qt::Checked);
227 if (it == trkItem_) {
228 if (show) {
229 mapWidget_->showTracks(gpx_.getTracks());
230 } else {
231 mapWidget_->hideAllTracks();
232 }
233 }
234
235 else if (it == wptItem_) {
236 if (show) {
237 mapWidget_->showWaypoints(gpx_.getWaypoints());
238 } else {
239 mapWidget_->hideAllWaypoints();
240 }
241 }
242
243 else if (it == rteItem_) {
244 if (show) {
245 mapWidget_->showRoutes(gpx_.getRoutes());
246 } else {
247 mapWidget_->hideAllRoutes();
248 }
249 }
250
251 else {
252 // Individual items, find the right one.
253 GpxItem* git = static_cast<GpxItem*>(it->data().value<void*>());
254 if (git != nullptr) {
255 git->setVisible(show);
256 for (int i=0; i<gpx_.getWaypoints().size(); i++) {
257 if (&gpx_.getWaypoints()[i] == git) {
258 mapWidget_->setWaypointVisibility(i, show);
259 }
260 }
261 for (int i=0; i<gpx_.getTracks().size(); i++) {
262 if (&gpx_.getTracks()[i] == git) {
263 mapWidget_->setTrackVisibility(i, show);
264 }
265 }
266 for (int i=0; i<gpx_.getRoutes().size(); i++) {
267 if (&gpx_.getRoutes()[i] == git) {
268 mapWidget_->setRouteVisibility(i, show);
269 }
270 }
271 }
272 }
273 }
274
275 //-------------------------------------------------------------------------
waypointIndex(QStandardItem * it)276 int GMapDialog::waypointIndex(QStandardItem* it)
277 {
278 for (int j=0; j<wptList_.size(); j++) {
279 if (it == wptList_[j]) {
280 return j;
281 }
282 }
283 return -1;
284 }
285
286 //-------------------------------------------------------------------------
trackIndex(QStandardItem * it)287 int GMapDialog::trackIndex(QStandardItem* it)
288 {
289 for (int j=0; j<trkList_.size(); j++) {
290 if (it == trkList_[j]) {
291 return j;
292 }
293 }
294 return -1;
295 }
296
297 //-------------------------------------------------------------------------
routeIndex(QStandardItem * it)298 int GMapDialog::routeIndex(QStandardItem* it)
299 {
300 for (int j=0; j<rteList_.size(); j++) {
301 if (it == rteList_[j]) {
302 return j;
303 }
304 }
305 return -1;
306 }
307
308 //-------------------------------------------------------------------------
treeDoubleClicked(const QModelIndex & idx)309 void GMapDialog::treeDoubleClicked(const QModelIndex& idx)
310 {
311 QStandardItem* it = model_->itemFromIndex(idx);
312 int i = waypointIndex(it);
313 if (i >= 0) {
314 it->setCheckState(Qt::Checked);
315 gpx_.getWaypoints()[i].setVisible(true);
316 mapWidget_->panTo(gpx_.getWaypoints()[i].getLocation());
317 mapWidget_->setWaypointVisibility(i, true);
318 return;
319 }
320 i = trackIndex(it);
321 if (i >= 0) {
322 mapWidget_->frameTrack(i);
323 it->setCheckState(Qt::Checked);
324 gpx_.getTracks()[i].setVisible(true);
325 mapWidget_->setTrackVisibility(i, true);
326 return;
327 }
328 i = routeIndex(it);
329 if (i >= 0) {
330 mapWidget_->frameRoute(i);
331 it->setCheckState(Qt::Checked);
332 gpx_.getRoutes()[i].setVisible(true);
333 mapWidget_->setRouteVisibility(i, true);
334 return;
335 }
336 }
337
338 //-------------------------------------------------------------------------
waypointClickedX(int i)339 void GMapDialog::waypointClickedX(int i)
340 {
341 if (i>=0 && i < wptList_.size()) {
342 QStandardItem* it = wptList_[i];
343 QModelIndex idx = model_->indexFromItem(it);
344 ui_.treeView->scrollTo(idx, QAbstractItemView::PositionAtCenter);
345 ui_.treeView->selectionModel()->select(idx, QItemSelectionModel::ClearAndSelect);
346 }
347 }
348 //-------------------------------------------------------------------------
trackClickedX(int i)349 void GMapDialog::trackClickedX(int i)
350 {
351 if (i>=0 && i <trkList_.size()) {
352 QStandardItem* it = trkList_[i];
353 QModelIndex idx = model_->indexFromItem(it);
354 ui_.treeView->scrollTo(idx, QAbstractItemView::PositionAtCenter);
355 ui_.treeView->selectionModel()->select(idx, QItemSelectionModel::ClearAndSelect);
356 }
357 }
358
359 //-------------------------------------------------------------------------
routeClickedX(int i)360 void GMapDialog::routeClickedX(int i)
361 {
362 if (i>=0 && i <rteList_.size()) {
363 QStandardItem* it = rteList_[i];
364 QModelIndex idx = model_->indexFromItem(it);
365 ui_.treeView->scrollTo(idx, QAbstractItemView::PositionAtCenter);
366 ui_.treeView->selectionModel()->select(idx, QItemSelectionModel::ClearAndSelect);
367 }
368 }
369
370 //-------------------------------------------------------------------------
selectionChangedX(const QItemSelection & sel,const QItemSelection & desel)371 void GMapDialog::selectionChangedX(const QItemSelection& sel, const QItemSelection& desel)
372 {
373 int k=0;
374 foreach (QStandardItem* w, wptList_) {
375 QModelIndex idx = model_->indexFromItem(w);
376 if (desel.contains(idx)) {
377 mapWidget_->setWaypointColorBlue(k);
378 }
379 if (sel.contains(idx)) {
380 mapWidget_->setWaypointColorRed(k);
381 }
382 k++;
383 }
384 }
385
386 //------------------------------------------------------------------------
expandCollapseAll(const QList<QStandardItem * > & li,QStandardItem * top,bool exp)387 void GMapDialog::expandCollapseAll(const QList<QStandardItem*>& li,
388 QStandardItem* top, bool exp)
389 {
390 ui_.treeView->setExpanded(model_->indexFromItem(top), exp);
391 foreach (QStandardItem* it, li) {
392 QModelIndex idx = model_->indexFromItem(it);
393 ui_.treeView->setExpanded(idx, exp);
394 }
395 }
396
397 //------------------------------------------------------------------------
expandAllWaypoints()398 void GMapDialog::expandAllWaypoints()
399 {
400 expandCollapseAll(wptList_, wptItem_, true);
401 }
402 //------------------------------------------------------------------------
expandAllTracks()403 void GMapDialog::expandAllTracks()
404 {
405 expandCollapseAll(trkList_, trkItem_, true);
406 }
407 //------------------------------------------------------------------------
expandAllRoutes()408 void GMapDialog::expandAllRoutes()
409 {
410 expandCollapseAll(rteList_, rteItem_, true);
411 }
412
413 //------------------------------------------------------------------------
collapseAllWaypoints()414 void GMapDialog::collapseAllWaypoints()
415 {
416 expandCollapseAll(wptList_, wptItem_,false);
417 }
418 //------------------------------------------------------------------------
collapseAllTracks()419 void GMapDialog::collapseAllTracks()
420 {
421 expandCollapseAll(trkList_, trkItem_,false);
422 }
423 //------------------------------------------------------------------------
collapseAllRoutes()424 void GMapDialog::collapseAllRoutes()
425 {
426 expandCollapseAll(rteList_, rteItem_,false);
427 }
428
429 //------------------------------------------------------------------------
checkUncheckAll(const QList<QStandardItem * > & li,QStandardItem * top,bool ck)430 void GMapDialog::checkUncheckAll(const QList<QStandardItem*>& li,
431 QStandardItem* top, bool ck)
432 {
433 top->setCheckState(ck ? Qt::Checked: Qt::Unchecked);
434 foreach (QStandardItem* it, li) {
435 it->setCheckState(ck ? Qt::Checked: Qt::Unchecked);
436 }
437 }
438 //------------------------------------------------------------------------
showAllWaypoints()439 void GMapDialog::showAllWaypoints()
440 {
441 foreach (GpxWaypoint wpt, gpx_.getWaypoints()) {
442 wpt.setVisible(true);
443 }
444 checkUncheckAll(wptList_, wptItem_, true);
445 mapWidget_->showWaypoints(gpx_.getWaypoints());
446 }
447 //------------------------------------------------------------------------
showAllTracks()448 void GMapDialog::showAllTracks()
449 {
450 foreach (GpxTrack trk, gpx_.getTracks()) {
451 trk.setVisible(true);
452 }
453 checkUncheckAll(trkList_, trkItem_, true);
454 mapWidget_->showTracks(gpx_.getTracks());
455 }
456
457 //------------------------------------------------------------------------
showAllRoutes()458 void GMapDialog::showAllRoutes()
459 {
460 foreach (GpxRoute rte, gpx_.getRoutes()) {
461 rte.setVisible(true);
462 }
463 checkUncheckAll(rteList_, rteItem_, true);
464 mapWidget_->showRoutes(gpx_.getRoutes());
465 }
466
467 //------------------------------------------------------------------------
hideAllWaypoints()468 void GMapDialog::hideAllWaypoints()
469 {
470 foreach (GpxWaypoint wpt, gpx_.getWaypoints()) {
471 wpt.setVisible(false);
472 }
473 checkUncheckAll(wptList_, wptItem_, false);
474 mapWidget_->showWaypoints(gpx_.getWaypoints());
475 }
476 //------------------------------------------------------------------------
hideAllTracks()477 void GMapDialog::hideAllTracks()
478 {
479 foreach (GpxTrack trk, gpx_.getTracks()) {
480 trk.setVisible(false);
481 }
482 checkUncheckAll(trkList_, trkItem_, false);
483 mapWidget_->showTracks(gpx_.getTracks());
484
485 }
486 //------------------------------------------------------------------------
hideAllRoutes()487 void GMapDialog::hideAllRoutes()
488 {
489 foreach (GpxRoute rte, gpx_.getRoutes()) {
490 rte.setVisible(false);
491 }
492 checkUncheckAll(rteList_, rteItem_, false);
493 mapWidget_->showRoutes(gpx_.getRoutes());
494
495 }
496
497 //------------------------------------------------------------------------
showOnlyThisWaypoint()498 void GMapDialog::showOnlyThisWaypoint()
499 {
500 QList <GpxWaypoint>& wlist = gpx_.getWaypoints();
501 for (int i=0; i<wlist.size(); i++) {
502 wlist[i].setVisible(i == menuIndex_);
503 wptList_[i]->setCheckState(i==menuIndex_? Qt::Checked: Qt::Unchecked);
504 }
505 wptItem_->setCheckState(Qt::Checked);
506 mapWidget_->showWaypoints(gpx_.getWaypoints());
507 }
508 //------------------------------------------------------------------------
showOnlyThisTrack()509 void GMapDialog::showOnlyThisTrack()
510 {
511 QList <GpxTrack>& tlist = gpx_.getTracks();
512 for (int i=0; i<tlist.size(); i++) {
513 tlist[i].setVisible(i == menuIndex_);
514 trkList_[i]->setCheckState(i==menuIndex_? Qt::Checked: Qt::Unchecked);
515 }
516 trkItem_->setCheckState(Qt::Checked);
517 mapWidget_->showTracks(gpx_.getTracks());
518
519 }
520 //------------------------------------------------------------------------
showOnlyThisRoute()521 void GMapDialog::showOnlyThisRoute()
522 {
523 QList <GpxRoute>& rlist = gpx_.getRoutes();
524 for (int i=0; i<rlist.size(); i++) {
525 rlist[i].setVisible(i == menuIndex_);
526 rteList_[i]->setCheckState(i==menuIndex_? Qt::Checked: Qt::Unchecked);
527 }
528 rteItem_->setCheckState(Qt::Checked);
529 mapWidget_->showRoutes(gpx_.getRoutes());
530
531 }
532
533 //------------------------------------------------------------------------
showContextMenu(const QPoint & pt)534 void GMapDialog::showContextMenu(const QPoint& pt)
535 {
536 QModelIndex idx = ui_.treeView->indexAt(pt);
537 QStandardItem* it = model_->itemFromIndex(idx);
538 int j;
539 if (model_->indexFromItem(wptItem_) == idx) {
540 QMenu menu(this);
541 menu.addAction(new TreeAction(tr("Show All Waypoints"), this, SLOT(showAllWaypoints()), &menu));
542 menu.addAction(new TreeAction(tr("Hide All Waypoints"), this, SLOT(hideAllWaypoints()),&menu));
543 menu.addAction(new TreeAction(tr("Expand All"), this, SLOT(expandAllWaypoints()),&menu));
544 menu.addAction(new TreeAction(tr("Collapse All"), this, SLOT(collapseAllWaypoints()),&menu));
545 menu.exec(ui_.treeView->mapToGlobal(pt));
546 } else if (model_->indexFromItem(rteItem_) == idx) {
547 QMenu menu(this);
548 menu.addAction(new TreeAction(tr("Show All Routes"), this, SLOT(showAllRoutes()), &menu));
549 menu.addAction(new TreeAction(tr("Hide All Routes"), this, SLOT(hideAllRoutes()),&menu));
550 menu.addAction(new TreeAction(tr("Expand All"), this, SLOT(expandAllRoutes()),&menu));
551 menu.addAction(new TreeAction(tr("Collapse All"), this, SLOT(collapseAllRoutes()),&menu));
552 menu.exec(ui_.treeView->mapToGlobal(pt));
553 } else if (model_->indexFromItem(trkItem_) == idx) {
554 QMenu menu(this);
555 menu.addAction(new TreeAction(tr("Show All Tracks"), this, SLOT(showAllTracks()), &menu));
556 menu.addAction(new TreeAction(tr("Hide All Tracks"), this, SLOT(hideAllTracks()),&menu));
557 menu.addAction(new TreeAction(tr("Expand All"), this, SLOT(expandAllTracks()),&menu));
558 menu.addAction(new TreeAction(tr("Collapse All"), this, SLOT(collapseAllTracks()),&menu));
559 menu.exec(ui_.treeView->mapToGlobal(pt));
560 } else if ((j = waypointIndex(it)) >=0) {
561 QMenu menu(this);
562 menu.addAction(new TreeAction(tr("Show Only This Waypoint"), this, SLOT(showOnlyThisWaypoint()), &menu));
563 menuIndex_ = j;
564 menu.exec(ui_.treeView->mapToGlobal(pt));
565 } else if ((j = trackIndex(it)) >=0) {
566 QMenu menu(this);
567 menu.addAction(new TreeAction(tr("Show Only This Track"), this, SLOT(showOnlyThisTrack()), &menu));
568 menuIndex_ = j;
569 menu.exec(ui_.treeView->mapToGlobal(pt));
570 } else if ((j = routeIndex(it)) >=0) {
571 QMenu menu(this);
572 menu.addAction(new TreeAction(tr("Show Only This Route"), this, SLOT(showOnlyThisRoute()), &menu));
573 menuIndex_ = j;
574 menu.exec(ui_.treeView->mapToGlobal(pt));
575 } else {
576 }
577 }
578 //------------------------------------------------------------------------
copyButtonClickedX()579 void GMapDialog::copyButtonClickedX()
580 {
581
582 }
583