diff options
author | vng <viktor.govako@gmail.com> | 2011-10-26 13:48:25 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:26:52 +0300 |
commit | 910e94c5377d3fb26751f35720af1f6a7563de56 (patch) | |
tree | f1a6a8acb8860a1dce315cd44c629587a0d62164 /qt/search_panel.cpp | |
parent | efd712903088cd5d8dd6f473ecb7a1a7fe5f6a72 (diff) |
Fix region name getting from mwm file name.
New column in QT search panel for region name.
Diffstat (limited to 'qt/search_panel.cpp')
-rw-r--r-- | qt/search_panel.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp index 217285d349..0caeb865df 100644 --- a/qt/search_panel.cpp +++ b/qt/search_panel.cpp @@ -26,7 +26,7 @@ SearchPanel::SearchPanel(DrawWidget * drawWidget, QWidget * parent) connect(m_pEditor, SIGNAL(textChanged(QString const &)), this, SLOT(OnSearchTextChanged(QString const &))); - m_pTable = new QTableWidget(0, 4, this); + m_pTable = new QTableWidget(0, 5, this); m_pTable->setFocusPolicy(Qt::NoFocus); m_pTable->setAlternatingRowColors(true); m_pTable->setShowGrid(false); @@ -130,6 +130,7 @@ void SearchPanel::OnSearchResult(ResultT * res, int queryId) m_pTable->insertRow(rowCount); m_pTable->setItem(rowCount, 1, create_item(QString::fromUtf8(res->GetString()))); + m_pTable->setItem(rowCount, 2, create_item(QString::fromUtf8(res->GetRegionString()))); if (res->GetResultType() == ResultT::RESULT_FEATURE) { @@ -138,14 +139,14 @@ void SearchPanel::OnSearchResult(ResultT * res, int queryId) string strDist; bool const drawDir = MeasurementUtils::FormatDistance(res->GetDistanceFromCenter(), strDist); - m_pTable->setItem(rowCount, 2, create_item(strDist.c_str())); + m_pTable->setItem(rowCount, 3, create_item(strDist.c_str())); if (drawDir) { QTableWidgetItem * item = new QTableWidgetItem(draw_direction(res->GetDirectionFromCenter()), QString()); item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - m_pTable->setItem(rowCount, 3, item); + m_pTable->setItem(rowCount, 4, item); } } |