diff options
author | Yury Melnichek <melnichek@gmail.com> | 2011-06-18 19:25:13 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:19:50 +0300 |
commit | 6b10823f98fc2cbbf3c7879420b70463d3ffbb03 (patch) | |
tree | 0ff743f73a4b4ea462adf956d4dfd8f742588aab /qt/search_panel.cpp | |
parent | e1ba349a1f3f8e18ad20e3650a9cf36ac0b4a443 (diff) |
100 chars / line.
Diffstat (limited to 'qt/search_panel.cpp')
-rw-r--r-- | qt/search_panel.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/qt/search_panel.cpp b/qt/search_panel.cpp index e2ea9b1fd6..cf1f2e3544 100644 --- a/qt/search_panel.cpp +++ b/qt/search_panel.cpp @@ -23,7 +23,8 @@ SearchPanel::SearchPanel(DrawWidget * drawWidget, QWidget * parent) : QWidget(parent), m_pDrawWidget(drawWidget), m_busyIcon(":/ui/busy.png"), m_queryId(0) { m_pEditor = new QLineEdit(this); - connect(m_pEditor, SIGNAL(textChanged(QString const &)), this, SLOT(OnSearchTextChanged(QString const &))); + connect(m_pEditor, SIGNAL(textChanged(QString const &)), + this, SLOT(OnSearchTextChanged(QString const &))); m_pTable = new QTableWidget(0, 4, this); m_pTable->setFocusPolicy(Qt::NoFocus); @@ -76,7 +77,7 @@ void SearchPanel::SearchResultThreadFunc(ResultT const & result, int queryId) emit SearchResultSignal(new ResultT(result), queryId); } -namespace +namespace { QTableWidgetItem * create_item(QString const & s) { @@ -161,14 +162,17 @@ void SearchPanel::OnSearchResult(ResultT * res, int queryId) if (res->GetResultType() == ResultT::RESULT_FEATURE) { - m_pTable->setItem(rowCount, 0, create_item(QString::fromUtf8(res->GetFetureTypeAsString().c_str()))); + m_pTable->setItem(rowCount, 0, + create_item(QString::fromUtf8(res->GetFetureTypeAsString().c_str()))); bool drawDir; - m_pTable->setItem(rowCount, 2, create_item(format_distance(res->GetDistanceFromCenter(), drawDir))); + m_pTable->setItem(rowCount, 2, + create_item(format_distance(res->GetDistanceFromCenter(), drawDir))); if (drawDir) { - QTableWidgetItem * item = new QTableWidgetItem(draw_direction(res->GetDirectionFromCenter()), QString()); + QTableWidgetItem * item = + new QTableWidgetItem(draw_direction(res->GetDirectionFromCenter()), QString()); item->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); m_pTable->setItem(rowCount, 3, item); } |