From 3c5e71ab0a6ddc71bafad0adc4199ae564c40c0a Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Mon, 6 Jan 2025 17:33:35 +0300 Subject: [PATCH] Clean commneted code --- qucs/extsimkernels/simsettingsdialog.cpp | 63 +----------------------- qucs/extsimkernels/simsettingsdialog.h | 7 --- 2 files changed, 1 insertion(+), 69 deletions(-) diff --git a/qucs/extsimkernels/simsettingsdialog.cpp b/qucs/extsimkernels/simsettingsdialog.cpp index 84b9fbee..eaa201a6 100644 --- a/qucs/extsimkernels/simsettingsdialog.cpp +++ b/qucs/extsimkernels/simsettingsdialog.cpp @@ -29,22 +29,16 @@ SimSettingsDialog::SimSettingsDialog(QWidget *parent) : a_lblXyce(new QLabel(tr("Xyce executable location"))), a_lblNgspice(new QLabel(tr("Ngspice executable location"))), a_lblSpiceOpus(new QLabel(tr("SpiceOpus executable location"))), - //a_lblXycePar(new QLabel(tr("Xyce Parallel executable location (openMPI installed required)"))), - //a_lblNprocs(new QLabel(tr("Number of processors in a system:"))), a_lblQucsator(new QLabel(tr("Qucsator executable location"))), - //a_lblSimulator(new QLabel(tr("Default simulator"))), a_lblNgspiceSimParam(new QLabel(tr("Ngspice CLI parameters"))), a_lblXyceSimParam(new QLabel(tr("Xyce CLI parameters"))), a_lblSpopusSimParam(new QLabel(tr("SpiceOpus CLI parameters"))), a_lblCompatMode(new QLabel(tr("Ngspice compatibility mode"))), a_cbxCompatMode(new QComboBox), - //a_cbxSimulator(new QComboBox(this)), a_edtNgspice(new QLineEdit(QucsSettings.NgspiceExecutable)), a_edtSpiceOpus(new QLineEdit(QucsSettings.SpiceOpusExecutable)), a_edtXyce(new QLineEdit(QucsSettings.XyceExecutable)), - //a_edtXycePar(new QLineEdit(QucsSettings.XyceParExecutable), a_edtQucsator(new QLineEdit(QucsSettings.Qucsator)), - //a_spbNprocs(new QSpinBox(this)), a_edtNgspiceSimParam(new QLineEdit()), a_edtXyceSimParam(new QLineEdit()), a_edtSpopusSimParam(new QLineEdit()), @@ -53,25 +47,9 @@ SimSettingsDialog::SimSettingsDialog(QWidget *parent) : a_btnSetNgspice(new QPushButton(tr("Select ..."))), a_btnSetSpOpus(new QPushButton(tr("Select ..."))), a_btnSetXyce(new QPushButton(tr("Select ..."))), - //a_btnSetXycePar(new QPushButton(tr("Select ..."))), a_btnSetQucsator(new QPushButton(tr("Select ..."))) { -// a_cbxSimulator->addItem("Ngspice", 1); -// a_cbxSimulator->addItem("Xyce", 2); -// a_cbxSimulator->addItem("SpiceOpus", 4); -// a_cbxSimulator->addItem("Qucsator", 8); - //QStringList items; - //items<<"Ngspice"<<"Xyce (Serial)"<<"Xyce (Parallel)"<<"SpiceOpus"<<"Qucsator"; - //a_cbxSimulator->addItems(items); qDebug()<setCurrentIndex(QucsSettings.DefaultSimulator); -// if (QucsSettings.DefaultSimulator==spicecompat::simNotSpecified) -// a_cbxSimulator->setCurrentIndex(spicecompat::simNgspice); - -// a_spbNprocs->setMinimum(1); -// a_spbNprocs->setMaximum(256); -// a_spbNprocs->setValue(1); -// a_spbNprocs->setValue(QucsSettings.NProcs); a_edtNgspiceSimParam->setText(_settings::Get().item("NgspiceParams")); a_edtXyceSimParam->setText(_settings::Get().item("XyceParams")); @@ -83,7 +61,6 @@ SimSettingsDialog::SimSettingsDialog(QWidget *parent) : connect(a_btnSetNgspice,SIGNAL(clicked()),this,SLOT(slotSetNgspice())); connect(a_btnSetXyce,SIGNAL(clicked()),this,SLOT(slotSetXyce())); - //connect(a_btnSetXycePar,SIGNAL(clicked()),this,SLOT(slotSetXycePar())); connect(a_btnSetSpOpus,SIGNAL(clicked()),this,SLOT(slotSetSpiceOpus())); connect(a_btnSetQucsator,SIGNAL(clicked()),this,SLOT(slotSetQucsator())); @@ -95,11 +72,6 @@ SimSettingsDialog::SimSettingsDialog(QWidget *parent) : QVBoxLayout *top = new QVBoxLayout; -// QHBoxLayout *h8 = new QHBoxLayout; -// h8->addWidget(a_lblSimulator,1); -// h8->addWidget(a_cbxSimulator,3); -// top->addLayout(h8); - QGroupBox *gbp1 = new QGroupBox(this); gbp1->setTitle(tr("SPICE settings")); QVBoxLayout *top2 = new QVBoxLayout; @@ -124,17 +96,6 @@ SimSettingsDialog::SimSettingsDialog(QWidget *parent) : top2->addWidget(a_lblXyceSimParam); top2->addWidget(a_edtXyceSimParam); -// top2->addWidget(a_lblXycePar); -// QHBoxLayout *h4 = new QHBoxLayout; -// h4->addWidget(a_edtXycePar,3); -// h4->addWidget(a_btnSetXycePar,1); -// top2->addLayout(h4); -// -// QHBoxLayout *h5 = new QHBoxLayout; -// h5->addWidget(a_lblNprocs); -// h5->addWidget(a_spbNprocs); -// top2->addLayout(h5); - top2->addWidget(a_lblSpiceOpus); QHBoxLayout *h7 = new QHBoxLayout; h7->addWidget(a_edtSpiceOpus,3); @@ -168,14 +129,6 @@ SimSettingsDialog::SimSettingsDialog(QWidget *parent) : this->setFixedWidth(500); this->setWindowTitle(tr("Setup simulators executable location")); -#ifndef Q_OS_UNIX - // Only Unix supports Xyce-parallel -// a_edtXycePar->setDisabled(true); -// a_lblXycePar->setDisabled(true); -// a_lblNprocs->setDisabled(true); -// a_spbNprocs->setDisabled(true); -#endif - } @@ -183,16 +136,8 @@ void SimSettingsDialog::slotApply() { QucsSettings.NgspiceExecutable = a_edtNgspice->text(); QucsSettings.XyceExecutable = a_edtXyce->text(); - //QucsSettings.XyceParExecutable = a_edtXycePar->text(); QucsSettings.SpiceOpusExecutable = a_edtSpiceOpus->text(); QucsSettings.Qucsator = a_edtQucsator->text(); - //QucsSettings.NProcs = a_spbNprocs->value(); -// if ((QucsSettings.DefaultSimulator != a_cbxSimulator->currentIndex())&& -// (QucsSettings.DefaultSimulator != spicecompat::simNotSpecified)) { -// QMessageBox::warning(this,tr("Simulator settings"),tr("Default simulator engine was changed!\n" -// "Please restart Qucs to affect changes!")); -// } -// QucsSettings.DefaultSimulator = a_cbxSimulator->currentIndex(); settingsManager& qs = _settings::Get(); qs.setItem("NgspiceCompatMode", a_cbxCompatMode->currentIndex()); qs.setItem("NgspiceParams", a_edtNgspiceSimParam->text()); @@ -204,8 +149,6 @@ void SimSettingsDialog::slotApply() void SimSettingsDialog::slotCancel() { - //if (QucsSettings.DefaultSimulator == spicecompat::simNotSpecified) - //QucsSettings.DefaultSimulator = spicecompat::simQucsator; reject(); } @@ -227,11 +170,7 @@ void SimSettingsDialog::slotSetXyce() void SimSettingsDialog::slotSetXycePar() // TODO ZERGUD { -// QString s = QFileDialog::getOpenFileName(this,tr("Select Xyce Parallel executable location"),a_edtXycePar->text(),"All files (*)"); -// if (!s.isEmpty()) { -// if (s.endsWith("xmpirun")) s += " -np %p"; -// a_edtXycePar->setText(s); -// } + } void SimSettingsDialog::slotSetSpiceOpus() diff --git a/qucs/extsimkernels/simsettingsdialog.h b/qucs/extsimkernels/simsettingsdialog.h index 78586aa1..e9ed0e9b 100644 --- a/qucs/extsimkernels/simsettingsdialog.h +++ b/qucs/extsimkernels/simsettingsdialog.h @@ -30,24 +30,18 @@ class SimSettingsDialog : public QDialog QLabel *a_lblXyce; QLabel *a_lblNgspice; QLabel *a_lblSpiceOpus; - //QLabel *a_lblXycePar; - //QLabel *a_lblNprocs; QLabel *a_lblQucsator; - //QLabel *a_lblSimulator; QLabel *a_lblNgspiceSimParam; QLabel *a_lblXyceSimParam; QLabel *a_lblSpopusSimParam; QLabel *a_lblCompatMode; QComboBox *a_cbxCompatMode; - //QComboBox *a_cbxSimulator; QLineEdit *a_edtNgspice; QLineEdit *a_edtSpiceOpus; QLineEdit *a_edtXyce; - //QLineEdit *a_edtXycePar; QLineEdit *a_edtQucsator; - //QSpinBox *a_spbNprocs; QLineEdit *a_edtNgspiceSimParam; QLineEdit *a_edtXyceSimParam; QLineEdit *a_edtSpopusSimParam; @@ -58,7 +52,6 @@ class SimSettingsDialog : public QDialog QPushButton *a_btnSetNgspice; QPushButton *a_btnSetSpOpus; QPushButton *a_btnSetXyce; - //QPushButton *a_btnSetXycePar; QPushButton *a_btnSetQucsator; public: