Merge pull request #13 from wh201906/master

Replace textChanged() with valueChanged(). This fixes #9
pull/14/head
wh201906 4 years ago committed by GitHub
commit 77d8049738
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,10 +15,10 @@ MF_trailerDecoderDialog::MF_trailerDecoderDialog(QWidget *parent) :
sizeGroup->addButton(ui->size4Button, 4); sizeGroup->addButton(ui->size4Button, 4);
sizeGroup->addButton(ui->size16Button, 16); sizeGroup->addButton(ui->size16Button, 16);
connect(sizeGroup, QOverload<int, bool>::of(&QButtonGroup::buttonToggled), this, &MF_trailerDecoderDialog::on_blockSizeChanged); connect(sizeGroup, QOverload<int, bool>::of(&QButtonGroup::buttonToggled), this, &MF_trailerDecoderDialog::on_blockSizeChanged);
connect(ui->C0Box, &QSpinBox::textChanged, this, &MF_trailerDecoderDialog::on_boxChanged); connect(ui->C0Box, QOverload<int>::of(&QSpinBox::valueChanged), this, &MF_trailerDecoderDialog::on_boxChanged);
connect(ui->C1Box, &QSpinBox::textChanged, this, &MF_trailerDecoderDialog::on_boxChanged); connect(ui->C1Box, QOverload<int>::of(&QSpinBox::valueChanged), this, &MF_trailerDecoderDialog::on_boxChanged);
connect(ui->C2Box, &QSpinBox::textChanged, this, &MF_trailerDecoderDialog::on_boxChanged); connect(ui->C2Box, QOverload<int>::of(&QSpinBox::valueChanged), this, &MF_trailerDecoderDialog::on_boxChanged);
connect(ui->C3Box, &QSpinBox::textChanged, this, &MF_trailerDecoderDialog::on_boxChanged); connect(ui->C3Box, QOverload<int>::of(&QSpinBox::valueChanged), this, &MF_trailerDecoderDialog::on_boxChanged);
ui->dataBlockWidget->setRowCount(3); ui->dataBlockWidget->setRowCount(3);
ui->dataBlockWidget->setColumnCount(4); ui->dataBlockWidget->setColumnCount(4);
@ -123,7 +123,7 @@ void MF_trailerDecoderDialog::setTableItem(QTableWidget* widget, int row, int co
widget->item(row, column)->setText(text); widget->item(row, column)->setText(text);
} }
void MF_trailerDecoderDialog::on_boxChanged(const QString &arg1) void MF_trailerDecoderDialog::on_boxChanged(int arg1)
{ {
quint8 ACBits[4]; quint8 ACBits[4];
ACBits[0] = ui->C0Box->value(); ACBits[0] = ui->C0Box->value();

@ -27,7 +27,7 @@ private slots:
void on_blockSizeChanged(int id, bool st); void on_blockSizeChanged(int id, bool st);
void on_boxChanged(const QString& arg1); void on_boxChanged(int arg1);
private: private:
Ui::MF_trailerDecoderDialog *ui; Ui::MF_trailerDecoderDialog *ui;
QRegularExpressionValidator* validator; QRegularExpressionValidator* validator;

Loading…
Cancel
Save