|
JS8Call-Improved master
|
Parser and in-memory store for ADIF QSO records. More...
#include <ADIF.h>
Classes | |
| struct | QSO |
| Minimal representation of a QSO (contact) record. More... | |
Public Member Functions | |
| void | init (QString const &filename) |
| Initialize the ADIF handler with a filename. | |
| void | load () |
| Load and parse the configured ADIF file into memory. | |
| void | add (QString const &call, QString const &band, QString const &mode, const QString &submode, QString const &grid, QString const &date, const QString &name, const QString &comment) |
| Add a QSO to the in-memory store. | |
| bool | match (QString const &call, QString const &band) const |
| Test whether a call/band combination exists in memory. | |
| QList< ADIF::QSO > | find (QString const &call) const |
| Find all QSOs matching a callsign. | |
| QList< QString > | getCallList () const |
| Get a list of unique calls found in the in-memory store. | |
| qsizetype | getCount () const |
| Number of QSO records currently stored in memory. | |
| bool | addQSOToFile (QByteArray const &ADIF_record) |
| Append a raw ADIF record to the configured ADIF file. | |
| QByteArray | QSOToADIF (QString const &hisCall, QString const &hisGrid, QString const &mode, QString const &submode, 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 &operator_call, const QMap< QString, QVariant > &additionalFields) |
| Convert QSO parameters into a ADIF formatted record. | |
Parser and in-memory store for ADIF QSO records.
The ADIF class provides basic functionality to read ADIF files into an in-memory container, search for QSOs by callsign, and append new QSO records back to the ADIF file.
| void ADIF::add | ( | QString const & | call, |
| QString const & | band, | ||
| QString const & | mode, | ||
| const QString & | submode, | ||
| QString const & | grid, | ||
| QString const & | date, | ||
| const QString & | name, | ||
| const QString & | comment ) |
Add a QSO to the in-memory store.
Add a new QSO to the internal data structure.
| call | Remote station callsign. |
| band | Band string (e.g. "20m"). |
| mode | Mode string (e.g. "FT8"). |
| submode | Submode string, if any. |
| grid | Maidenhead grid square of the remote station. |
| date | Date string for the QSO. |
| name | Name associated with the remote station. |
| comment | Optional comment. |
| call | The callsign of the contacted station. |
| band | The band on which the QSO was made. |
| mode | The mode of the QSO. |
| submode | The submode of the QSO. |
| grid | The grid locator of the contacted station. |
| date | The date of the QSO. |
| name | The name of the operator. |
| comment | Any comments associated with the QSO. |

| bool ADIF::addQSOToFile | ( | QByteArray const & | ADIF_record | ) |
Append a raw ADIF record to the configured ADIF file.
Open the ADIF file and append the QSO details.
| ADIF_record | Byte array containing a properly formatted ADIF record. |
| ADIF_record | The ADIF record to append. |
Find all QSOs matching a callsign.
Find QSOs associated with a given callsign.
| call | Callsign to search for. |
| call | The callsign to search for. |
| QList< QString > ADIF::getCallList | ( | ) | const |
Get a list of unique calls found in the in-memory store.
Get a list of all callsigns in the internal data structure.
| qsizetype ADIF::getCount | ( | ) | const |
Number of QSO records currently stored in memory.
Get the count of QSOs in the internal data structure.
| void ADIF::init | ( | QString const & | filename | ) |
| void ADIF::load | ( | ) |
Load and parse the configured ADIF file into memory.
Load ADIF records from the specified file into the internal data structure.
After calling this method, the in-memory store is populated and searchable via find and getCallList.

| bool ADIF::match | ( | QString const & | call, |
| QString const & | band ) const |
Test whether a call/band combination exists in memory.
Check if a callsign and band combination exists in the internal data structure.
| call | Callsign to match. |
| band | Band to match. |
| call | The callsign to search for. |
| band | The band to search for. |
| QByteArray ADIF::QSOToADIF | ( | QString const & | hisCall, |
| QString const & | hisGrid, | ||
| QString const & | mode, | ||
| QString const & | submode, | ||
| 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 & | operator_call, | ||
| const QMap< QString, QVariant > & | additionalFields ) |
Convert QSO parameters into a ADIF formatted record.
Convert QSO details into an ADIF record format.
This helper builds a byte array containing a single ADIF record using the provided fields. Additional fields may be appended via additionalFields.
| hisCall | The callsign of the contacted station. |
| hisGrid | The grid locator of the contacted station. |
| mode | The mode of the QSO. |
| submode | The submode of the QSO. |
| rptSent | The report sent. |
| rptRcvd | The report received. |
| dateTimeOn | The date and time when the QSO started. |
| dateTimeOff | The date and time when the QSO ended. |
| band | The band on which the QSO was made. |
| comments | Any comments associated with the QSO. |
| name | The name of the operator. |
| strDialFreq | The dial frequency as a string. |
| m_myCall | The station's own callsign. |
| m_myGrid | The station's own grid locator. |
| operator_call | The operator's callsign. |
| additionalFields | A map of additional ADIF fields to include. |