diff options
Diffstat (limited to 'models/CabrilloLog.hpp')
| -rw-r--r-- | models/CabrilloLog.hpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/models/CabrilloLog.hpp b/models/CabrilloLog.hpp new file mode 100644 index 00000000..43b9e8f9 --- /dev/null +++ b/models/CabrilloLog.hpp @@ -0,0 +1,37 @@ +#ifndef CABRILLO_LOG_HPP_ +#define CABRILLO_LOG_HPP_ + +#include <boost/core/noncopyable.hpp> +#include "Radio.hpp" +#include "pimpl_h.hpp" + +class Configuration; +class QDateTime; +class QString; +class QSqlTableModel; +class QTextStream; + +class CabrilloLog final + : private boost::noncopyable +{ +public: + using Frequency = Radio::Frequency; + + explicit CabrilloLog (Configuration const *); + ~CabrilloLog (); + + // returns false if insert fails + bool add_QSO (Frequency, QDateTime const&, QString const& call + , QString const& report_sent, QString const& report_received); + bool dupe (Frequency, QString const& call) const; + + QSqlTableModel * model (); + void reset (); + void export_qsos (QTextStream&) const; + +private: + class impl; + pimpl<impl> m_; +}; + +#endif |
