Updated call activity detail
This commit is contained in:
parent
dd3613b214
commit
91d6836fa5
@ -7641,6 +7641,10 @@ bool MainWindow::isMyCallIncluded(const QString &text){
|
||||
return text.contains(myCall);
|
||||
}
|
||||
|
||||
QString formatSNR(int snr){
|
||||
return QString("%1%2").arg(snr >= 0 ? "+" : "").arg(snr);
|
||||
}
|
||||
|
||||
void MainWindow::displayActivity(){
|
||||
if(!m_rxDirty){
|
||||
return;
|
||||
@ -7703,7 +7707,7 @@ void MainWindow::displayActivity(){
|
||||
auto offsetItem = new QTableWidgetItem(QString("%1").arg(offset));
|
||||
ui->tableWidgetRXAll->setItem(ui->tableWidgetRXAll->rowCount() - 1, 0, offsetItem);
|
||||
|
||||
auto snrItem = new QTableWidgetItem(QString("%1").arg(snr));
|
||||
auto snrItem = new QTableWidgetItem(QString("%1").arg(formatSNR(snr)));
|
||||
snrItem->setTextAlignment(Qt::AlignCenter|Qt::AlignVCenter);
|
||||
ui->tableWidgetRXAll->setItem(ui->tableWidgetRXAll->rowCount() - 1, 1, snrItem);
|
||||
|
||||
@ -7748,7 +7752,6 @@ void MainWindow::displayActivity(){
|
||||
}
|
||||
ui->tableWidgetRXAll->resizeColumnToContents(0);
|
||||
ui->tableWidgetRXAll->resizeColumnToContents(1);
|
||||
ui->tableWidgetRXAll->resizeColumnToContents(2);
|
||||
|
||||
// Call Activity
|
||||
QString selectedCall;
|
||||
@ -7769,16 +7772,21 @@ void MainWindow::displayActivity(){
|
||||
ui->tableWidgetCalls->insertRow(ui->tableWidgetCalls->rowCount());
|
||||
ui->tableWidgetCalls->setItem(ui->tableWidgetCalls->rowCount() - 1, 0, new QTableWidgetItem(call));
|
||||
ui->tableWidgetCalls->setItem(ui->tableWidgetCalls->rowCount() - 1, 1, new QTableWidgetItem(QString("(%1)").arg(since(d.utcTimestamp))));
|
||||
ui->tableWidgetCalls->setItem(ui->tableWidgetCalls->rowCount() - 1, 2, new QTableWidgetItem(QString("%1").arg(formatSNR(d.snr))));
|
||||
ui->tableWidgetCalls->setItem(ui->tableWidgetCalls->rowCount() - 1, 3, new QTableWidgetItem(QString("%1").arg(d.grid)));
|
||||
|
||||
auto distanceItem = new QTableWidgetItem(calculateDistance(d.grid));
|
||||
distanceItem->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter);
|
||||
ui->tableWidgetCalls->setItem(ui->tableWidgetCalls->rowCount() - 1, 2, distanceItem);
|
||||
ui->tableWidgetCalls->setItem(ui->tableWidgetCalls->rowCount() - 1, 4, distanceItem);
|
||||
|
||||
if(call == selectedCall){
|
||||
ui->tableWidgetCalls->selectRow(ui->tableWidgetCalls->rowCount() - 1);
|
||||
}
|
||||
}
|
||||
ui->tableWidgetCalls->resizeColumnToContents(0);
|
||||
ui->tableWidgetCalls->resizeColumnToContents(1);
|
||||
ui->tableWidgetCalls->resizeColumnToContents(2);
|
||||
ui->tableWidgetCalls->resizeColumnToContents(3);
|
||||
|
||||
// RX Activity
|
||||
while(!m_rxFrameQueue.isEmpty()){
|
||||
|
@ -827,7 +827,10 @@ background-color: yellow;
|
||||
</font>
|
||||
</property>
|
||||
<property name="sizeAdjustPolicy">
|
||||
<enum>QAbstractScrollArea::AdjustToContents</enum>
|
||||
<enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
|
||||
</property>
|
||||
<property name="autoScroll">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
@ -923,7 +926,7 @@ background-color: yellow;
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color:#ffeaa7;</string>
|
||||
<string notr="true">QTextEdit { background-color:#ffeaa7; }</string>
|
||||
</property>
|
||||
<property name="undoRedoEnabled">
|
||||
<bool>false</bool>
|
||||
@ -969,6 +972,9 @@ QTextEdit[readOnly="true"] {
|
||||
<pointsize>12</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="autoScroll">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
@ -985,7 +991,7 @@ QTextEdit[readOnly="true"] {
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="textElideMode">
|
||||
<enum>Qt::ElideNone</enum>
|
||||
<enum>Qt::ElideRight</enum>
|
||||
</property>
|
||||
<property name="gridStyle">
|
||||
<enum>Qt::DotLine</enum>
|
||||
@ -996,9 +1002,12 @@ QTextEdit[readOnly="true"] {
|
||||
<attribute name="horizontalHeaderVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||
<attribute name="horizontalHeaderDefaultSectionSize">
|
||||
<number>30</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderMinimumSectionSize">
|
||||
<number>20</number>
|
||||
</attribute>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>true</bool>
|
||||
</attribute>
|
||||
@ -1015,6 +1024,16 @@ QTextEdit[readOnly="true"] {
|
||||
<string>Age</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>SNR</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Grid</string>
|
||||
</property>
|
||||
</column>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Distance</string>
|
||||
|
Loading…
Reference in New Issue
Block a user