Initial commit of detail panel

This commit is contained in:
Jordan Sherer 2019-01-09 17:52:53 -05:00
parent 4c82a5e84a
commit 9d575707f0
2 changed files with 122 additions and 101 deletions

View File

@ -7691,6 +7691,18 @@ void MainWindow::on_tableWidgetRXAll_selectionChanged(const QItemSelection &/*se
} }
ui->extFreeTextMsgEdit->setPlaceholderText(placeholderText); 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("<h1>%1</h1>").arg(selectedCall) +
QString("<p><strong>HEARING</strong>: %1</p>").arg(hearing) +
QString("<p><strong>HEARD BY</strong>: %1</p>").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); // immediately update the display);
updateButtonDisplay(); updateButtonDisplay();
updateTextDisplay(); updateTextDisplay();
@ -10511,16 +10523,6 @@ void MainWindow::displayCallActivity() {
auto displayItem = new QTableWidgetItem(displayCall); auto displayItem = new QTableWidgetItem(displayCall);
displayItem->setData(Qt::UserRole, QVariant(d.call)); 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); ui->tableWidgetCalls->setItem(row, col++, displayItem);

View File

@ -1103,111 +1103,130 @@ QTextEdit[transmitting=&quot;true&quot;] {
</property> </property>
</widget> </widget>
</widget> </widget>
<widget class="QTableWidget" name="tableWidgetCalls"> <widget class="QSplitter" name="callsVerticalSplitter">
<property name="font"> <property name="sizePolicy">
<font> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<pointsize>12</pointsize> <horstretch>10</horstretch>
</font> <verstretch>0</verstretch>
</sizepolicy>
</property> </property>
<property name="toolTip"> <property name="orientation">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Received callsigns are displayed with time since last heard, SNR, and grid locator (if reported).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <enum>Qt::Vertical</enum>
</property> </property>
<property name="autoScroll"> <property name="handleWidth">
<bool>false</bool> <number>6</number>
</property> </property>
<property name="editTriggers"> <widget class="QTableWidget" name="tableWidgetCalls">
<set>QAbstractItemView::NoEditTriggers</set> <property name="font">
</property> <font>
<property name="showDropIndicator" stdset="0"> <pointsize>12</pointsize>
<bool>false</bool> </font>
</property>
<property name="alternatingRowColors">
<bool>true</bool>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
<property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
<property name="textElideMode">
<enum>Qt::ElideRight</enum>
</property>
<property name="gridStyle">
<enum>Qt::DotLine</enum>
</property>
<property name="wordWrap">
<bool>false</bool>
</property>
<attribute name="horizontalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>30</number>
</attribute>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderMinimumSectionSize">
<number>20</number>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string>★</string>
</property> </property>
<property name="textAlignment"> <property name="toolTip">
<set>AlignCenter</set> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Received callsigns are displayed with time since last heard, SNR, and grid locator (if reported).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
</column> <property name="autoScroll">
<column> <bool>false</bool>
<property name="text">
<string>Callsigns</string>
</property> </property>
</column> <property name="editTriggers">
<column> <set>QAbstractItemView::NoEditTriggers</set>
<property name="text">
<string>✓</string>
</property> </property>
<property name="textAlignment"> <property name="showDropIndicator" stdset="0">
<set>AlignCenter</set> <bool>false</bool>
</property> </property>
</column> <property name="alternatingRowColors">
<column> <bool>true</bool>
<property name="text">
<string>Age</string>
</property> </property>
</column> <property name="selectionMode">
<column> <enum>QAbstractItemView::SingleSelection</enum>
<property name="text">
<string>SNR</string>
</property> </property>
</column> <property name="selectionBehavior">
<column> <enum>QAbstractItemView::SelectRows</enum>
<property name="text">
<string>Offset</string>
</property> </property>
</column> <property name="textElideMode">
<column> <enum>Qt::ElideRight</enum>
<property name="text">
<string>Time Delta</string>
</property> </property>
</column> <property name="gridStyle">
<column> <enum>Qt::DotLine</enum>
<property name="text">
<string>Grid</string>
</property> </property>
</column> <property name="wordWrap">
<column> <bool>false</bool>
<property name="text">
<string>Distance</string>
</property> </property>
</column> <attribute name="horizontalHeaderVisible">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderDefaultSectionSize">
<number>30</number>
</attribute>
<attribute name="horizontalHeaderHighlightSections">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderMinimumSectionSize">
<number>20</number>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
<column>
<property name="text">
<string>★</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</column>
<column>
<property name="text">
<string>Callsigns</string>
</property>
</column>
<column>
<property name="text">
<string>✓</string>
</property>
<property name="textAlignment">
<set>AlignCenter</set>
</property>
</column>
<column>
<property name="text">
<string>Age</string>
</property>
</column>
<column>
<property name="text">
<string>SNR</string>
</property>
</column>
<column>
<property name="text">
<string>Offset</string>
</property>
</column>
<column>
<property name="text">
<string>Time Delta</string>
</property>
</column>
<column>
<property name="text">
<string>Grid</string>
</property>
</column>
<column>
<property name="text">
<string>Distance</string>
</property>
</column>
</widget>
<widget class="QTextBrowser" name="callDetailTextBrowser">
<property name="frameShape">
<enum>QFrame::Box</enum>
</property>
</widget>
</widget> </widget>
</widget> </widget>
<widget class="QWidget" name="macroHorizonalWidget" native="true"> <widget class="QWidget" name="macroHorizonalWidget" native="true">