| 
									
										
										
										
											2018-11-07 17:49:45 +00:00
										 |  |  | #ifndef FREQUENCY_LINE_EDIT_HPP_
 | 
					
						
							|  |  |  | #define FREQUENCY_LINE_EDIT_HPP_
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QLineEdit>
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "Radio.hpp"
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class QWidget; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | //
 | 
					
						
							| 
									
										
										
										
											2019-05-30 22:20:09 +01:00
										 |  |  | // MHz frequency line edit with validation
 | 
					
						
							| 
									
										
										
										
											2018-11-07 17:49:45 +00:00
										 |  |  | //
 | 
					
						
							|  |  |  | class FrequencyLineEdit final | 
					
						
							|  |  |  |   : public QLineEdit | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   Q_OBJECT; | 
					
						
							|  |  |  |   Q_PROPERTY (Frequency frequency READ frequency WRITE frequency USER true); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  |   using Frequency = Radio::Frequency; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   explicit FrequencyLineEdit (QWidget * parent = nullptr); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   // Property frequency implementation
 | 
					
						
							|  |  |  |   Frequency frequency () const; | 
					
						
							|  |  |  |   void frequency (Frequency); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 |