From 726484a05a5aff43a8d0b02a2ff62e0b3e29a8c2 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Wed, 22 Aug 2018 15:15:30 -0400 Subject: [PATCH] Remove restriction of grid locator to 4 or 6 chars. Upped to 16 chars --- Configuration.cpp | 2 +- Configuration.ui | 2 +- MaidenheadLocatorValidator.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index 2bb5fc8..d63fe6f 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -1017,7 +1017,7 @@ Configuration::impl::impl (Configuration * self, QDir const& temp_directory, // validation // ui_->callsign_line_edit->setValidator (new CallsignValidator {this}); - ui_->grid_line_edit->setValidator (new MaidenheadLocatorValidator {this}); + ui_->grid_line_edit->setValidator (new MaidenheadLocatorValidator {this, MaidenheadLocatorValidator::Length::doubleextended}); ui_->add_macro_line_edit->setValidator (new QRegExpValidator {message_alphabet, this}); ui_->station_message_line_edit->setValidator (new QRegExpValidator {message_alphabet, this}); ui_->qth_message_line_edit->setValidator (new QRegExpValidator {message_alphabet, this}); diff --git a/Configuration.ui b/Configuration.ui index d32ed20..85bc029 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -80,7 +80,7 @@ <html><head/><body><p>4-digit Maidenhead Locator</p></body></html> - 4 + 16 diff --git a/MaidenheadLocatorValidator.hpp b/MaidenheadLocatorValidator.hpp index 25c2664..29a1a9a 100644 --- a/MaidenheadLocatorValidator.hpp +++ b/MaidenheadLocatorValidator.hpp @@ -11,7 +11,7 @@ class MaidenheadLocatorValidator final : public QValidator { public: - enum class Length {field = 2, square = 4, subsquare = 6, extended = 8}; + enum class Length {field = 2, square = 4, subsquare = 6, extended = 8, doubleextended = 16}; MaidenheadLocatorValidator (QObject * parent = nullptr , Length length = Length::subsquare , Length required = Length::square);