SVN r8568
This commit is contained in:
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Reads an ADIF log file into memory
|
||||
* Searches log for call, band and mode
|
||||
* VK3ACF July 2013
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __ADIF_H
|
||||
#define __ADIF_H
|
||||
|
||||
#if defined (QT5)
|
||||
#include <QList>
|
||||
#include <QString>
|
||||
#include <QMultiHash>
|
||||
#else
|
||||
#include <QtGui>
|
||||
#endif
|
||||
|
||||
class QDateTime;
|
||||
|
||||
class ADIF
|
||||
{
|
||||
public:
|
||||
void init(QString const& filename);
|
||||
void load();
|
||||
void add(QString const& call, QString const& band, QString const& mode, QString const& date);
|
||||
bool match(QString const& call, QString const& band, QString const& mode) const;
|
||||
QList<QString> getCallList() const;
|
||||
int getCount() const;
|
||||
|
||||
// open ADIF file and append the QSO details. Return true on success
|
||||
bool addQSOToFile(QString const& hisCall, QString const& hisGrid, QString const& mode, QString const& rptSent, QString const& rptRcvd, QDateTime const& dateTimeOn, QDateTime const& dateTimeOff, QString const& band,
|
||||
QString const& comments, QString const& name, QString const& strDialFreq, QString const& m_myCall, QString const& m_myGrid, QString const& m_txPower);
|
||||
|
||||
private:
|
||||
struct QSO
|
||||
{
|
||||
QString call,band,mode,date;
|
||||
};
|
||||
|
||||
QMultiHash<QString, QSO> _data;
|
||||
QString _filename;
|
||||
|
||||
QString extractField(QString const& line, QString const& fieldName) const;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Reads cty.dat file
|
||||
* Establishes a map between prefixes and their country names
|
||||
* VK3ACF July 2013
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __COUNTRYDAT_H
|
||||
#define __COUNTRYDAT_H
|
||||
|
||||
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QHash>
|
||||
|
||||
|
||||
class CountryDat
|
||||
{
|
||||
public:
|
||||
void init(const QString filename);
|
||||
void load();
|
||||
QString find(QString prefix) const; // return country name or ""
|
||||
QStringList getCountryNames() const { return _countryNames; };
|
||||
|
||||
private:
|
||||
QString _extractName(const QString line) const;
|
||||
void _removeBrackets(QString &line, const QString a, const QString b) const;
|
||||
QStringList _extractPrefix(QString &line, bool &more) const;
|
||||
|
||||
QString _filename;
|
||||
QStringList _countryNames;
|
||||
QHash<QString, QString> _data;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user