mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-27 22:58:40 -05:00
7d198f3d50
-changed log to hash table for faster lookup -improved ADIF compatibility mainwindow.ui -fixed typo in menu entry git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3538 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
46 lines
727 B
C++
46 lines
727 B
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 ADIF
|
|
{
|
|
public:
|
|
void init(QString filename);
|
|
void load();
|
|
void add(const QString call);
|
|
bool match(const QString call, const QString band, const QString mode);
|
|
QList<QString> getCallList();
|
|
int getCount();
|
|
|
|
|
|
private:
|
|
struct QSO
|
|
{
|
|
QString call,band,mode,date;
|
|
};
|
|
|
|
QMultiHash<QString, QSO> _data;
|
|
QString _filename;
|
|
|
|
QString _extractField(const QString line, const QString fieldName);
|
|
};
|
|
|
|
|
|
#endif
|
|
|