Moved callsign count to header instead of in the ALLCALL row since that row can be hidden now

This commit is contained in:
Jordan Sherer 2018-12-26 23:38:24 -05:00
parent ebbdd679e1
commit ce153a4511
2 changed files with 16 additions and 15 deletions

View File

@ -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);

View File

@ -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=&quot;true&quot;] {
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Start transmitting&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Start transmitting&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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 {