2018-11-07 12:49:45 -05:00
|
|
|
#ifndef FOX_LOG_HPP_
|
|
|
|
#define FOX_LOG_HPP_
|
|
|
|
|
|
|
|
#include <boost/core/noncopyable.hpp>
|
|
|
|
#include "pimpl_h.hpp"
|
|
|
|
|
|
|
|
class QDateTime;
|
|
|
|
class QString;
|
2018-11-25 17:19:41 -05:00
|
|
|
class QSqlTableModel;
|
2018-12-30 07:35:41 -05:00
|
|
|
class QTextStream;
|
|
|
|
class Configuration;
|
2018-11-07 12:49:45 -05:00
|
|
|
|
|
|
|
class FoxLog final
|
|
|
|
: private boost::noncopyable
|
|
|
|
{
|
|
|
|
public:
|
2018-12-30 07:35:41 -05:00
|
|
|
explicit FoxLog (Configuration const *);
|
2018-11-07 12:49:45 -05:00
|
|
|
~FoxLog ();
|
|
|
|
|
|
|
|
// returns false if insert fails, dupe call+band
|
|
|
|
bool add_QSO (QDateTime const&, QString const& call, QString const& grid
|
2018-11-12 13:26:05 -05:00
|
|
|
, QString const& report_sent, QString const& report_received
|
2018-11-07 12:49:45 -05:00
|
|
|
, QString const& band);
|
2018-11-11 21:06:44 -05:00
|
|
|
bool dupe (QString const& call, QString const& band) const;
|
2018-11-07 12:49:45 -05:00
|
|
|
|
2018-11-25 17:19:41 -05:00
|
|
|
QSqlTableModel * model ();
|
2018-11-11 21:06:44 -05:00
|
|
|
void reset ();
|
2018-12-30 07:35:41 -05:00
|
|
|
void export_qsos (QTextStream&) const;
|
2018-11-07 12:49:45 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
class impl;
|
|
|
|
pimpl<impl> m_;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|