From 4c28671a1463fc2f242ed401fba4bb24345fa9df Mon Sep 17 00:00:00 2001 From: Ladislav Foldyna Date: Fri, 24 Nov 2023 13:46:08 +0100 Subject: [PATCH] Added WPX Award stats --- Changelog | 1 + ui/AwardsDialog.cpp | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/Changelog b/Changelog index 293d0df8..558dd8c8 100644 --- a/Changelog +++ b/Changelog @@ -1,6 +1,7 @@ TBC - 0.30.0 - [NEW] - Added AppStream Metainfo File (PR #262 thanks AsciiWolf) - [NEW] - Added (WPX) prefix (issue #263) +- [NEW] - Added WPX Award statistics - [CHANGED] - Removed QSOID from Export dialog column setting (issue #258) - Fixed Date editor does not support NULL value in Logbook Direct Editor (issue #256) - Fixed duplicate entry in Windows Add or Remove - only Window platform (issue #260) diff --git a/ui/AwardsDialog.cpp b/ui/AwardsDialog.cpp index a8e42d78..e5d74052 100644 --- a/ui/AwardsDialog.cpp +++ b/ui/AwardsDialog.cpp @@ -35,6 +35,7 @@ AwardsDialog::AwardsDialog(QWidget *parent) : ui->awardComboBox->addItem(tr("WAC"), QVariant("wac")); ui->awardComboBox->addItem(tr("WAZ"), QVariant("waz")); ui->awardComboBox->addItem(tr("WAS"), QVariant("was")); + ui->awardComboBox->addItem(tr("WPX"), QVariant("wpx")); ui->awardComboBox->addItem(tr("IOTA"), QVariant("iota")); ui->buttonBox->button(QDialogButtonBox::Ok)->setText(tr("Done")); @@ -134,6 +135,15 @@ void AwardsDialog::refreshTable(int) " LEFT OUTER JOIN modes m on c.mode = m.name " "WHERE (c.id is NULL or c.my_dxcc = '" + entitySelected + "' AND d.dxcc in (6, 110, 291)) "; } + else if ( awardSelected == "wpx" ) + { + headersColumns = "c.pfx col1, null col2 "; + uniqColumns = "c.pfx"; + sqlPart = "FROM contacts c, modes m " + "WHERE c.mode = m.name" + " AND c.pfx is not null" + " AND c.my_dxcc = '" + entitySelected + "'"; + } else if ( awardSelected == "iota" ) { headersColumns = "c.iota col1, NULL col2 "; @@ -301,6 +311,10 @@ void AwardsDialog::awardTableDoubleClicked(QModelIndex idx) { addlFilters << QString("cqz = '%1'").arg(detailedViewModel->data(detailedViewModel->index(idx.row(),1),Qt::DisplayRole).toString()); } + if ( awardSelected == "wpx" ) + { + addlFilters << QString("pfx = '%1'").arg(detailedViewModel->data(detailedViewModel->index(idx.row(),1),Qt::DisplayRole).toString()); + } if ( idx.column() > 2 ) {