| 
									
										
										
										
											2018-11-12 02:11:58 +00:00
										 |  |  | #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; | 
					
						
							| 
									
										
										
										
											2018-11-25 22:19:41 +00:00
										 |  |  | class QSqlTableModel; | 
					
						
							| 
									
										
										
										
											2018-11-12 02:11:58 +00:00
										 |  |  | class QTextStream; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CabrilloLog final | 
					
						
							|  |  |  |   : private boost::noncopyable | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |   using Frequency = Radio::Frequency; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   explicit CabrilloLog (Configuration const *); | 
					
						
							|  |  |  |   ~CabrilloLog (); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // returns false if insert fails
 | 
					
						
							| 
									
										
										
										
											2018-11-23 01:18:39 +00:00
										 |  |  |   bool add_QSO (Frequency, QDateTime const&, QString const& call | 
					
						
							| 
									
										
										
										
											2018-11-12 02:11:58 +00:00
										 |  |  |                 , QString const& report_sent, QString const& report_received); | 
					
						
							|  |  |  |   bool dupe (Frequency, QString const& call) const; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-11-25 22:19:41 +00:00
										 |  |  |   QSqlTableModel * model (); | 
					
						
							| 
									
										
										
										
											2018-11-12 02:11:58 +00:00
										 |  |  |   void reset (); | 
					
						
							|  |  |  |   void export_qsos (QTextStream&) const; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  |   class impl; | 
					
						
							|  |  |  |   pimpl<impl> m_; | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 |