Skip to content

Commit

Permalink
Added WPX Award stats
Browse files Browse the repository at this point in the history
  • Loading branch information
foldynl committed Nov 24, 2023
1 parent 746c491 commit 4c28671
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
14 changes: 14 additions & 0 deletions ui/AwardsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down Expand Up @@ -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 ";
Expand Down Expand Up @@ -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 )
{
Expand Down

0 comments on commit 4c28671

Please sign in to comment.