mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-15 08:31:57 -05:00
dac5831189
This change also adds seconds resolution to log files and log QSO fields. This change makes the log QSO dialog more layout friendly and uses a QDateTimeEdit for QSO start and end times. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7827 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
52 lines
1.3 KiB
C++
52 lines
1.3 KiB
C++
/*
|
|
* 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);
|
|
QList<QString> getCallList();
|
|
int getCount();
|
|
|
|
// 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);
|
|
|
|
static QString bandFromFrequency(double dialFreq);
|
|
|
|
private:
|
|
struct QSO
|
|
{
|
|
QString call,band,mode,date;
|
|
};
|
|
|
|
QMultiHash<QString, QSO> _data;
|
|
QString _filename;
|
|
|
|
QString _extractField(QString const& line, QString const& fieldName);
|
|
};
|
|
|
|
|
|
#endif
|
|
|