mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-04 16:31:17 -05:00
363c469b55
73 messages from other QSOs on frequency should now be ignored rather than being processed. Also some long overdue refactoring and tidying of non-idiomatic C++ code in the logbook directory. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8047 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
43 lines
761 B
C++
43 lines
761 B
C++
#include "countriesworked.h"
|
|
|
|
void CountriesWorked::init(const QStringList countryNames)
|
|
{
|
|
_data.clear();
|
|
foreach(QString name,countryNames)
|
|
_data.insert(name,false);
|
|
}
|
|
|
|
void CountriesWorked::setAsWorked(const QString countryName)
|
|
{
|
|
if (_data.contains(countryName))
|
|
_data.insert(countryName,true);
|
|
}
|
|
|
|
bool CountriesWorked::getHasWorked(const QString countryName) const
|
|
{
|
|
if (_data.contains(countryName))
|
|
return _data.value(countryName);
|
|
|
|
return false;
|
|
}
|
|
|
|
int CountriesWorked::getWorkedCount() const
|
|
{
|
|
int count = 0;
|
|
foreach (bool value,_data)
|
|
if (value)
|
|
count += 1;
|
|
return count;
|
|
}
|
|
|
|
int CountriesWorked::getSize() const
|
|
{
|
|
return _data.count();
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|