mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-14 08:01:49 -05:00
947b429723
This change incorporates a reorganization of the GUI code with widgets, validators, models, and item delegates being moved to sub-directories. Relax the requirements of the ForeignKeyDelegate and related CandidateKeyFilter classes to allow them to work with constant model pointers for both referenced and referencing models.
46 lines
965 B
C++
46 lines
965 B
C++
#ifndef FREQUENCY_LINE_EDIT_HPP_
|
|
#define FREQUENCY_LINE_EDIT_HPP_
|
|
|
|
#include <QLineEdit>
|
|
|
|
#include "Radio.hpp"
|
|
|
|
class QWidget;
|
|
|
|
//
|
|
// MHz frequency line edits with validation
|
|
//
|
|
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);
|
|
};
|
|
|
|
class FrequencyDeltaLineEdit final
|
|
: public QLineEdit
|
|
{
|
|
Q_OBJECT;
|
|
Q_PROPERTY (FrequencyDelta frequency_delta READ frequency_delta WRITE frequency_delta USER true);
|
|
|
|
public:
|
|
using FrequencyDelta = Radio::FrequencyDelta;
|
|
|
|
explicit FrequencyDeltaLineEdit (QWidget * parent = nullptr);
|
|
|
|
// Property frequency_delta implementation
|
|
FrequencyDelta frequency_delta () const;
|
|
void frequency_delta (FrequencyDelta);
|
|
};
|
|
|
|
#endif
|