diff options
| author | Christoph Berg <myon@debian.org> | 2025-01-09 22:12:06 +0100 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-01-09 22:12:06 +0100 |
| commit | 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 (patch) | |
| tree | fbfdfe6bcb0a8a114be2480dac53d88c977e4869 /validators/LiveFrequencyValidator.hpp | |
| parent | 4320ce238aae1fe87fc9f379cdd816e9317885fa (diff) | |
New upstream version 2.7.0~rc8+repackupstream/2.7.0_rc8+repack
Diffstat (limited to 'validators/LiveFrequencyValidator.hpp')
| -rwxr-xr-x | validators/LiveFrequencyValidator.hpp | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/validators/LiveFrequencyValidator.hpp b/validators/LiveFrequencyValidator.hpp index 48c78dc1..4224d89a 100755 --- a/validators/LiveFrequencyValidator.hpp +++ b/validators/LiveFrequencyValidator.hpp @@ -1,54 +1,54 @@ -#ifndef LIVE_FREQUENCY_VALIDATOR_HPP__
-#define LIVE_FREQUENCY_VALIDATOR_HPP__
-
-#include <QObject>
-#include <QRegExpValidator>
-
-#include "Radio.hpp"
-
-class Bands;
-class FrequencyList_v2_101;
-class QComboBox;
-class QWidget;
-
-//
-// Class LiveFrequencyValidator
-//
-// QLineEdit validator that controls input to an editable
-// QComboBox where the user can enter a valid band or a valid
-// frequency in megahetz.
-//
-// Collabrations
-//
-// Implements the QRegExpValidator interface. Validates input
-// from the supplied QComboBox as either a valid frequency in
-// megahertz or a valid band as defined by the supplied column of
-// the supplied QAbstractItemModel.
-//
-class LiveFrequencyValidator final
- : public QRegExpValidator
-{
- Q_OBJECT;
-
-public:
- using Frequency = Radio::Frequency;
-
- LiveFrequencyValidator (QComboBox * combo_box // associated combo box
- , Bands const * bands // bands model
- , FrequencyList_v2_101 const * frequencies // working frequencies model
- , Frequency const * nominal_frequency
- , QWidget * parent = nullptr);
-
- State validate (QString& input, int& pos) const override;
- void fixup (QString& input) const override;
-
- Q_SIGNAL void valid (Frequency) const;
-
-private:
- Bands const * bands_;
- FrequencyList_v2_101 const * frequencies_;
- Frequency const * nominal_frequency_;
- QComboBox * combo_box_;
-};
-
-#endif
+#ifndef LIVE_FREQUENCY_VALIDATOR_HPP__ +#define LIVE_FREQUENCY_VALIDATOR_HPP__ + +#include <QObject> +#include <QRegExpValidator> + +#include "Radio.hpp" + +class Bands; +class FrequencyList_v2_101; +class QComboBox; +class QWidget; + +// +// Class LiveFrequencyValidator +// +// QLineEdit validator that controls input to an editable +// QComboBox where the user can enter a valid band or a valid +// frequency in megahetz. +// +// Collabrations +// +// Implements the QRegExpValidator interface. Validates input +// from the supplied QComboBox as either a valid frequency in +// megahertz or a valid band as defined by the supplied column of +// the supplied QAbstractItemModel. +// +class LiveFrequencyValidator final + : public QRegExpValidator +{ + Q_OBJECT; + +public: + using Frequency = Radio::Frequency; + + LiveFrequencyValidator (QComboBox * combo_box // associated combo box + , Bands const * bands // bands model + , FrequencyList_v2_101 const * frequencies // working frequencies model + , Frequency const * nominal_frequency + , QWidget * parent = nullptr); + + State validate (QString& input, int& pos) const override; + void fixup (QString& input) const override; + + Q_SIGNAL void valid (Frequency) const; + +private: + Bands const * bands_; + FrequencyList_v2_101 const * frequencies_; + Frequency const * nominal_frequency_; + QComboBox * combo_box_; +}; + +#endif |
