From 9d575707f0cea88c4d721ee1f6bd2e030a16b619 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Wed, 9 Jan 2019 17:52:53 -0500 Subject: [PATCH] Initial commit of detail panel --- mainwindow.cpp | 22 +++--- mainwindow.ui | 201 +++++++++++++++++++++++++++---------------------- 2 files changed, 122 insertions(+), 101 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index b1f8d6f..fd7f233 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -7691,6 +7691,18 @@ void MainWindow::on_tableWidgetRXAll_selectionChanged(const QItemSelection &/*se } ui->extFreeTextMsgEdit->setPlaceholderText(placeholderText); + // heard detail + auto hearing = m_heardGraphOutgoing.value(selectedCall).values().join(", "); + auto heardby = m_heardGraphIncoming.value(selectedCall).values().join(", "); + auto html = selectedCall.isEmpty() || selectedCall.contains("@") ? "" : ( + QString("

%1

").arg(selectedCall) + + QString("

HEARING: %1

").arg(hearing) + + QString("

HEARD BY: %1

").arg(heardby) + ); + ui->callDetailTextBrowser->setHtml(html); + ui->callDetailTextBrowser->setMinimumHeight((qreal)50.0 + min(ui->callDetailTextBrowser->document()->size().height(), ui->callsVerticalSplitter->height() * 0.33)); + + // immediately update the display); updateButtonDisplay(); updateTextDisplay(); @@ -10511,16 +10523,6 @@ void MainWindow::displayCallActivity() { auto displayItem = new QTableWidgetItem(displayCall); displayItem->setData(Qt::UserRole, QVariant(d.call)); - auto hearing = m_heardGraphOutgoing.value(d.call).values().join(", "); - auto heardby = m_heardGraphIncoming.value(d.call).values().join(", "); - QStringList tip = {}; - if(!hearing.isEmpty()){ - tip.append(QString("HEARING: %1").arg(hearing)); - } - if(!heardby.isEmpty()){ - tip.append(QString("HEARD BY: %1").arg(heardby)); - } - displayItem->setToolTip(tip.join("\n")); ui->tableWidgetCalls->setItem(row, col++, displayItem); diff --git a/mainwindow.ui b/mainwindow.ui index 7b97aab..da696b8 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -1103,111 +1103,130 @@ QTextEdit[transmitting="true"] { - - - - 12 - + + + + 10 + 0 + - - <html><head/><body><p>Received callsigns are displayed with time since last heard, SNR, and grid locator (if reported).</p></body></html> + + Qt::Vertical - - false + + 6 - - QAbstractItemView::NoEditTriggers - - - false - - - true - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - Qt::ElideRight - - - Qt::DotLine - - - false - - - false - - - 30 - - - false - - - 20 - - - true - - - false - - - - + + + + 12 + - - AlignCenter + + <html><head/><body><p>Received callsigns are displayed with time since last heard, SNR, and grid locator (if reported).</p></body></html> - - - - Callsigns + + false - - - - + + QAbstractItemView::NoEditTriggers - - AlignCenter + + false - - - - Age + + true - - - - SNR + + QAbstractItemView::SingleSelection - - - - Offset + + QAbstractItemView::SelectRows - - - - Time Delta + + Qt::ElideRight - - - - Grid + + Qt::DotLine - - - - Distance + + false - + + false + + + 30 + + + false + + + 20 + + + true + + + false + + + + + + + AlignCenter + + + + + Callsigns + + + + + + + + AlignCenter + + + + + Age + + + + + SNR + + + + + Offset + + + + + Time Delta + + + + + Grid + + + + + Distance + + + + + + QFrame::Box + +