code format
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
#include "qpiconfignewdialog.h"
|
||||
|
||||
#include "ui_qpiconfignewdialog.h"
|
||||
|
||||
|
||||
QPIConfigNewDialog::QPIConfigNewDialog(QWidget * parent): QDialog(parent) {
|
||||
ui = new Ui::QPIConfigNewDialog();
|
||||
ui->setupUi(this);
|
||||
radios = findChildren<QRadioButton * >();
|
||||
radios = findChildren<QRadioButton *>();
|
||||
ui->widgetValue->hideAll();
|
||||
ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false);
|
||||
}
|
||||
@@ -14,17 +15,14 @@ QPIConfigNewDialog::QPIConfigNewDialog(QWidget * parent): QDialog(parent) {
|
||||
void QPIConfigNewDialog::changeEvent(QEvent * e) {
|
||||
QDialog::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case QEvent::LanguageChange: ui->retranslateUi(this); break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void QPIConfigNewDialog::typeChanged() {
|
||||
for (const QRadioButton * i : radios) {
|
||||
for (const QRadioButton * i: radios) {
|
||||
if (i->isChecked()) {
|
||||
ui->widgetValue->setType(i->property("type").toString());
|
||||
return;
|
||||
@@ -34,7 +32,7 @@ void QPIConfigNewDialog::typeChanged() {
|
||||
|
||||
|
||||
QString QPIConfigNewDialog::type() {
|
||||
for (const QRadioButton * i : radios) {
|
||||
for (const QRadioButton * i: radios) {
|
||||
if (i->isChecked()) {
|
||||
return i->property("type").toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user