fix(cpn): ACCESS owner registration id validation (#2687)
* fix(cpn): ACCESS owner registration id validation (#2672) * Allow registration id for internal ISRM module * Always display owner id
This commit is contained in:
@@ -275,6 +275,10 @@ ui(new Ui::GeneralSetup)
|
|||||||
ui->pwrOnDelay->hide();
|
ui->pwrOnDelay->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QRegExp rx(CHAR_FOR_NAMES_REGEX);
|
||||||
|
ui->registrationId->setValidator(new QRegExpValidator(rx, this));
|
||||||
|
ui->registrationId->setMaxLength(REGISTRATION_ID_LEN);
|
||||||
|
|
||||||
setValues();
|
setValues();
|
||||||
|
|
||||||
lock = false;
|
lock = false;
|
||||||
@@ -460,7 +464,6 @@ void GeneralSetupPanel::setValues()
|
|||||||
ui->pwrOnDelay->setValue(2 - generalSettings.pwrOnSpeed);
|
ui->pwrOnDelay->setValue(2 - generalSettings.pwrOnSpeed);
|
||||||
ui->pwrOffDelay->setValue(2 - generalSettings.pwrOffSpeed);
|
ui->pwrOffDelay->setValue(2 - generalSettings.pwrOffSpeed);
|
||||||
|
|
||||||
// TODO: only if ACCESS available??
|
|
||||||
ui->registrationId->setText(generalSettings.registrationId);
|
ui->registrationId->setText(generalSettings.registrationId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -781,10 +784,7 @@ void GeneralSetupPanel::on_blAlarm_ChkB_stateChanged()
|
|||||||
|
|
||||||
void GeneralSetupPanel::on_registrationId_editingFinished()
|
void GeneralSetupPanel::on_registrationId_editingFinished()
|
||||||
{
|
{
|
||||||
//copy ownerID back to generalSettings.registrationId
|
strncpy(generalSettings.registrationId, ui->registrationId->text().toLatin1(), REGISTRATION_ID_LEN);
|
||||||
QByteArray array = ui->registrationId->text().toLocal8Bit();
|
|
||||||
strncpy(generalSettings.registrationId, array, 8);
|
|
||||||
generalSettings.registrationId[8] = '\0';
|
|
||||||
emit modified();
|
emit modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -733,9 +733,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="20" column="1">
|
<item row="20" column="1">
|
||||||
<widget class="QLineEdit" name="registrationId">
|
<widget class="QLineEdit" name="registrationId">
|
||||||
<property name="inputMask">
|
|
||||||
<string>nnnnnnNN</string>
|
|
||||||
</property>
|
|
||||||
<property name="maxLength">
|
<property name="maxLength">
|
||||||
<number>8</number>
|
<number>8</number>
|
||||||
</property>
|
</property>
|
||||||
@@ -1046,7 +1043,7 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="20" column="0">
|
<item row="20" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label_registrationId">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Owner Registration ID</string>
|
<string>Owner Registration ID</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
Reference in New Issue
Block a user