Remove restriction of grid locator to 4 or 6 chars. Upped to 16 chars

This commit is contained in:
Jordan Sherer 2018-08-22 15:15:30 -04:00
parent b7d2a370f8
commit 726484a05a
3 changed files with 3 additions and 3 deletions

View File

@ -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});

View File

@ -80,7 +80,7 @@
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;4-digit Maidenhead Locator&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="maxLength">
<number>4</number>
<number>16</number>
</property>
</widget>
</item>

View File

@ -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);