Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <alex@maps.me>2016-01-16 21:47:15 +0300
committerSergey Yershov <yershov@corp.mail.ru>2016-03-23 16:14:13 +0300
commitcb2d67f229fcb1f1e8b1dc71afcf415d08ba2f2a (patch)
tree189c116e1a40531525a70fb9ed55d92a2a2d9bd3 /qt/editor_dialog.cpp
parent89a7e22666beecd370df6aba3417f8c513d4f539 (diff)
[qt][editor] Display copyable coordinates for convenience.
Diffstat (limited to 'qt/editor_dialog.cpp')
-rw-r--r--qt/editor_dialog.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/qt/editor_dialog.cpp b/qt/editor_dialog.cpp
index 375915e498..d0b460bdb6 100644
--- a/qt/editor_dialog.cpp
+++ b/qt/editor_dialog.cpp
@@ -6,6 +6,7 @@
#include "indexer/classificator.hpp"
#include "indexer/feature.hpp"
+#include "indexer/feature_algo.hpp"
#include "indexer/osm_editor.hpp"
#include "base/collection_cast.hpp"
@@ -34,6 +35,16 @@ EditorDialog::EditorDialog(QWidget * parent, FeatureType const & feature, Framew
QVBoxLayout * vLayout = new QVBoxLayout();
+ // Zero uneditable row: coordinates.
+ ms::LatLon const ll = MercatorBounds::ToLatLon(feature::GetCenter(feature));
+ QHBoxLayout * coordinatesRow = new QHBoxLayout();
+ coordinatesRow->addWidget(new QLabel("Latitude, Longitude:"));
+ QLabel * coords = new QLabel(QString::fromStdString(strings::to_string_dac(ll.lat, 6) +
+ "," + strings::to_string_dac(ll.lon, 6)));
+ coords->setTextInteractionFlags(Qt::TextSelectableByMouse);
+ coordinatesRow->addWidget(coords);
+ vLayout->addLayout(coordinatesRow);
+
// First uneditable row: feature types.
string strTypes;
feature.ForEachType([&strTypes](uint32_t type)