Moved callsign count to header instead of in the ALLCALL row since that row can be hidden now
This commit is contained in:
parent
ebbdd679e1
commit
ce153a4511
@ -5362,25 +5362,26 @@ void MainWindow::createAllcallTableRows(QTableWidget *table, QString const &sele
|
|||||||
|
|
||||||
int startCol = 1;
|
int startCol = 1;
|
||||||
|
|
||||||
if(!m_config.avoid_allcall())
|
foreach(auto cd, m_callActivity.values()){
|
||||||
{
|
if (cd.call.trimmed().isEmpty()){
|
||||||
table->insertRow(table->rowCount());
|
continue;
|
||||||
|
|
||||||
foreach(auto cd, m_callActivity.values()){
|
|
||||||
if (cd.call.trimmed().isEmpty()){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (callsignAging && cd.utcTimestamp.secsTo(now) / 60 >= callsignAging) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
|
if (callsignAging && cd.utcTimestamp.secsTo(now) / 60 >= callsignAging) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
table->horizontalHeaderItem(startCol)->setText(count == 0 ? "Callsigns" : QString("Callsigns (%1)").arg(count));
|
||||||
|
|
||||||
|
if(!m_config.avoid_allcall()){
|
||||||
|
table->insertRow(table->rowCount());
|
||||||
|
|
||||||
auto emptyItem = new QTableWidgetItem("");
|
auto emptyItem = new QTableWidgetItem("");
|
||||||
emptyItem->setData(Qt::UserRole, QVariant("@ALLCALL"));
|
emptyItem->setData(Qt::UserRole, QVariant("@ALLCALL"));
|
||||||
table->setItem(table->rowCount() - 1, 0, emptyItem);
|
table->setItem(table->rowCount() - 1, 0, emptyItem);
|
||||||
|
|
||||||
auto item = new QTableWidgetItem(count == 0 ? QString("@ALLCALL") : QString("@ALLCALL (%1)").arg(count));
|
auto item = new QTableWidgetItem(QString("@ALLCALL"));
|
||||||
item->setData(Qt::UserRole, QVariant("@ALLCALL"));
|
item->setData(Qt::UserRole, QVariant("@ALLCALL"));
|
||||||
|
|
||||||
table->setItem(table->rowCount() - 1, startCol, item);
|
table->setItem(table->rowCount() - 1, startCol, item);
|
||||||
|
@ -1167,7 +1167,7 @@ QTextEdit[transmitting="true"] {
|
|||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Callsign</string>
|
<string>Callsigns</string>
|
||||||
</property>
|
</property>
|
||||||
</column>
|
</column>
|
||||||
<column>
|
<column>
|
||||||
@ -1257,7 +1257,7 @@ QTextEdit[transmitting="true"] {
|
|||||||
<string><html><head/><body><p>Start transmitting</p></body></html></string>
|
<string><html><head/><body><p>Start transmitting</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="autoFillBackground">
|
<property name="autoFillBackground">
|
||||||
<bool>true</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QPushButton:checked {
|
<string notr="true">QPushButton:checked {
|
||||||
|
Loading…
Reference in New Issue
Block a user