mirror of
https://github.com/ra3xdh/qucs_s
synced 2025-03-28 21:13:26 +00:00
Set explicit locale for QDoubleValidator
This commit is contained in:
parent
11d08c9131
commit
c6dec8391f
@ -95,6 +95,7 @@ QucsActiveFilter::QucsActiveFilter(QWidget *parent)
|
||||
|
||||
edtA1 = new QLineEdit("3");
|
||||
QDoubleValidator *val1 = new QDoubleValidator(0,100000,3);
|
||||
val1->setLocale(QLocale::C);
|
||||
edtA1->setValidator(val1);
|
||||
edtA2 = new QLineEdit("20");
|
||||
edtA2->setValidator(val1);
|
||||
|
@ -107,6 +107,7 @@ QucsAttenuator::QucsAttenuator()
|
||||
inGrid->setSpacing(1);
|
||||
|
||||
DoubleVal = new QDoubleValidator(this);
|
||||
DoubleVal->setLocale(QLocale::C);
|
||||
DoubleVal->setBottom(0);
|
||||
|
||||
LabelAtten = new QLabel(tr("Attenuation:"), InputGroup);
|
||||
|
@ -148,6 +148,7 @@ QucsFilter::QucsFilter()
|
||||
|
||||
IntVal = new QIntValidator(1, 200, this);
|
||||
DoubleVal = new QDoubleValidator(this);
|
||||
DoubleVal->setLocale(QLocale::C);
|
||||
|
||||
LabelOrder = new QLabel(tr("Order:"), this);
|
||||
gbox1->addWidget(LabelOrder, 3,0);
|
||||
|
@ -631,6 +631,7 @@ void QucsTranscalc::createPropItem (QGridLayout * parentGrid, TransValue * val,
|
||||
QLineEdit * e;
|
||||
QComboBox * c;
|
||||
QDoubleValidator * v = new QDoubleValidator (this);
|
||||
v->setLocale(QLocale::C);
|
||||
|
||||
// name label
|
||||
l = new QLabel (val->name);
|
||||
|
@ -59,6 +59,7 @@ OptimizeDialog::OptimizeDialog(Optimize_Sim *c_, Schematic *d_)
|
||||
Expr.setPattern("[\\w_]+");
|
||||
Validator = new QRegularExpressionValidator(Expr, this);
|
||||
numVal = new QDoubleValidator(this);
|
||||
numVal->setLocale(QLocale::C);
|
||||
intVal = new QIntValidator(this);
|
||||
|
||||
all = new QVBoxLayout(); // to provide the necessary size
|
||||
|
@ -129,6 +129,7 @@ DiagramDialog::DiagramDialog(Diagram *d, QWidget *parent, Graph *currentGraph)
|
||||
Validator = new QRegularExpressionValidator(Expr, this);
|
||||
ValInteger = new QIntValidator(0, 360, this);
|
||||
ValDouble = new QDoubleValidator(-1e200, 1e200, 6, this);
|
||||
ValDouble->setLocale(QLocale::C);
|
||||
|
||||
QString NameY, NameZ;
|
||||
if((Diag->Name == "Rect") || (Diag->Name == "Curve")) {
|
||||
|
@ -47,7 +47,9 @@ MarkerDialog::MarkerDialog(Marker *pm_, QWidget *parent)
|
||||
XPosition->setText("0");
|
||||
XPosition->setEnabled(false);
|
||||
}
|
||||
XPosition->setValidator(new QDoubleValidator(this));
|
||||
QDoubleValidator *dblVal = new QDoubleValidator(this);
|
||||
dblVal->setLocale(QLocale::C);
|
||||
XPosition->setValidator(dblVal);
|
||||
|
||||
g->addWidget(new QLabel(tr("Precision: ")), 0, 0);
|
||||
g->addWidget(Precision, 0, 1);
|
||||
|
@ -67,6 +67,7 @@ ExportDialog::ExportDialog(int w, int h, int wsel, int hsel, QString filename_,
|
||||
editResolutionY->setEnabled(false);
|
||||
editScale = new QLineEdit(QString::number(1.0));
|
||||
QDoubleValidator *val1 = new QDoubleValidator(0,20.0,2,this);
|
||||
val1->setLocale(QLocale::C);
|
||||
editScale->setValidator(val1);
|
||||
|
||||
cbxImgType = new QComboBox(this);
|
||||
|
@ -50,6 +50,7 @@ MatchDialog::MatchDialog(QWidget *parent)
|
||||
{
|
||||
setWindowTitle(tr("Create Matching Circuit"));
|
||||
DoubleVal = new QDoubleValidator(this);
|
||||
DoubleVal->setLocale(QLocale::C);
|
||||
|
||||
all = new QVBoxLayout(this);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user