diff options
| author | Christoph Berg <myon@debian.org> | 2018-12-19 22:58:32 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2018-12-19 22:58:32 +0100 |
| commit | e0737c56c1e384e05064a0c6e1ac46979371041b (patch) | |
| tree | a0123d694a2d36c43dabdf0a3907392fce11d457 /logbook/logbook.h | |
| parent | b4aebf2d137b892f53503b13785ecae900062ff7 (diff) | |
New upstream version 2.0.0+repackupstream/2.0.0+repack
Diffstat (limited to 'logbook/logbook.h')
| -rw-r--r-- | logbook/logbook.h | 60 |
1 files changed, 36 insertions, 24 deletions
diff --git a/logbook/logbook.h b/logbook/logbook.h index 4b80974d..1850aa01 100644 --- a/logbook/logbook.h +++ b/logbook/logbook.h @@ -1,39 +1,51 @@ +// -*- Mode: C++ -*- /* * From an ADIF file and cty.dat, get a call's DXCC entity and its worked before status - * VK3ACF July 2013 */ -#ifndef LOGBOOK_H -#define LOGBOOK_H - +#ifndef LOG_BOOK_H_ +#define LOG_BOOK_H_ +#include <QObject> #include <QString> -#include <QFont> -#include "countrydat.h" -#include "countriesworked.h" -#include "adif.h" +#include "WorkedBefore.hpp" -class QDir; +class Configuration; +class QByteArray; +class QDateTime; -class LogBook +class LogBook final + : public QObject { + Q_OBJECT + public: - void init(); - void match(/*in*/ const QString call, - /*out*/ QString &countryName, - bool &callWorkedBefore, - bool &countryWorkedBefore) const; - void addAsWorked(const QString call, const QString band, const QString mode, const QString date); + LogBook (Configuration const *); + QString const& path () const {return worked_before_.path ();} + bool add (QString const& call + , QString const& grid + , QString const& band + , QString const& mode + , QByteArray const& ADIF_record); + AD1CCty const& countries () const {return worked_before_.countries ();} + void rescan (); + void match (QString const& call, QString const& mode, QString const& grid, + AD1CCty::Record const&, bool& callB4, bool& countryB4, + bool &gridB4, bool &continentB4, bool& CQZoneB4, bool& ITUZoneB4, + QString const& currentBand = QString {}) const; + static QByteArray QSOToADIF (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& myCall, + QString const& m_myGrid, QString const& m_txPower, QString const& operator_call, + QString const& xSent, QString const& xRcvd); + + Q_SIGNAL void finished_loading (int worked_before_record_count, QString const& error) const; private: - CountryDat _countries; - CountriesWorked _worked; - ADIF _log; - - void _setAlreadyWorkedFromLog(); - + Configuration const * config_; + WorkedBefore worked_before_; }; -#endif // LOGBOOK_H - +#endif |
