diff options
author | Alex Zolotarev <alex@maps.me> | 2016-01-16 21:47:15 +0300 |
---|---|---|
committer | Sergey Yershov <yershov@corp.mail.ru> | 2016-03-23 16:14:13 +0300 |
commit | cb2d67f229fcb1f1e8b1dc71afcf415d08ba2f2a (patch) | |
tree | 189c116e1a40531525a70fb9ed55d92a2a2d9bd3 /qt/editor_dialog.cpp | |
parent | 89a7e22666beecd370df6aba3417f8c513d4f539 (diff) |
[qt][editor] Display copyable coordinates for convenience.
Diffstat (limited to 'qt/editor_dialog.cpp')
-rw-r--r-- | qt/editor_dialog.cpp | 11 |
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) |