mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
c81b3c8e65
Basic validation, must have non-empty exchange sent and received. Abstracted log view window widget behaviour into a base class. Turned on auto resize to row height in log view windows and enabled alternating colours. Convert empty fields to NULL when inserting new log table rows to signify missing data. Trap insert row errors when adding to contest log table so that logging can be held back if constraints are not met. Re-factored log QSO processing to try insert row into log table first and pop up a message box if constraints are not met, this pops up the Log QSO window in case it was initiated by an auto log event.
38 lines
783 B
C++
38 lines
783 B
C++
#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 QAbstractItemModel;
|
|
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;
|
|
|
|
QAbstractItemModel * model ();
|
|
void reset ();
|
|
void export_qsos (QTextStream&) const;
|
|
|
|
private:
|
|
class impl;
|
|
pimpl<impl> m_;
|
|
};
|
|
|
|
#endif
|