Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Commit

Permalink
Fixed SVG images and removed russian labels in main window
Browse files Browse the repository at this point in the history
  • Loading branch information
ra3xdh committed May 25, 2014
1 parent 2506124 commit bdf5f1c
Show file tree
Hide file tree
Showing 11 changed files with 5,986 additions and 2,312 deletions.
18 changes: 3 additions & 15 deletions AFR.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,195 changes: 1,593 additions & 602 deletions cauer.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 23 additions & 18 deletions filtersintez.cpp
Expand Up @@ -16,13 +16,13 @@ FilterSintez::FilterSintez(QWidget *parent)
QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));

//lblInputData = new QLabel(tr("Входные данные"));
lblA1 = new QLabel(tr("Затухание в полосе пропускания, Ap"));
lblA2 = new QLabel(tr("Мин. затухание в полосе задерживания, As"));
lblF1 = new QLabel(tr("Частота среза фильтра, Fc (Гц)"));
lblF2 = new QLabel(tr("Начало полосы задерживания, Fs (Гц)"));
lblRpl1 = new QLabel(tr("Амплитуда пульсаций в полосе пропускания Rp(дБ)"));
//lblRpl2 = new QLabel(tr("Амплитуда пульсаций в полосе задерживания (дБ)"));
lblKv = new QLabel(tr("Усиление фильтра, Kv (дБ)"));
lblA1 = new QLabel(tr("Passband attenuation, Ap"));
lblA2 = new QLabel(tr("Stopband attenuation, As"));
lblF1 = new QLabel(tr("Cuttof frequency, Fc (Гц)"));
lblF2 = new QLabel(tr("Stopband frequency, Fs (Гц)"));
lblRpl1 = new QLabel(tr("Passband ripple Rp(дБ)"));
//lblRpl2 = new QLabel(tr("Stopband ripple (дБ)"));
lblKv = new QLabel(tr("Passband gain, Kv (дБ)"));


edtA1 = new QLineEdit("3");
Expand All @@ -41,13 +41,13 @@ FilterSintez::FilterSintez(QWidget *parent)
edtKv = new QLineEdit("0");
edtKv->setValidator(val1);

lblTyp = new QLabel(tr("Рассчитать фильтр:"));
lblTyp = new QLabel(tr("Approximation type:"));
cbxFilterFunc = new QComboBox;
QStringList lst2;
lst2<<tr("Фильтр Баттерворта")
<<tr("Фильтр Чебышева")
<<tr("Инверсный фильтр Чебышева")
<<tr("Эллиптический фильтр")
lst2<<tr("Butterworth")
<<tr("Chebyshev")
<<tr("Inverse Chebyshev")
<<tr("Cauer (Elliptic)")
<<tr("User defined");
cbxFilterFunc->addItems(lst2);
connect(cbxFilterFunc,SIGNAL(currentIndexChanged(int)),this,SLOT(slotSwitchParameters()));
Expand All @@ -56,14 +56,14 @@ FilterSintez::FilterSintez(QWidget *parent)
btnDefineTransferFunc->setEnabled(false);
connect(btnDefineTransferFunc,SIGNAL(clicked()),this,SLOT(slotDefineTransferFunc()));

btnCalcSchematic = new QPushButton(tr("Рассчитать элементы схемы фильтра"));
btnCalcSchematic = new QPushButton(tr("Calculate and copy to clipboard"));
connect(btnCalcSchematic,SIGNAL(clicked()),SLOT(slotCalcSchematic()));

lblResult = new QLabel(tr("Результаты расчёта: "));
lblResult = new QLabel(tr("Calculation console"));
txtResult = new QTextEdit;


lblSch = new QLabel(tr("Схемная реализация фильтра"));
lblSch = new QLabel(tr("Filter topology"));
lblResp = new QLabel(tr("Filter type:"));
cbxResponse = new QComboBox;
QStringList lst3;
Expand All @@ -78,13 +78,16 @@ FilterSintez::FilterSintez(QWidget *parent)
cbxFilterType = new QComboBox;
QStringList lst;
lst<<tr("Cauer section")
<<tr("С многопетлевой ОС")
<<tr("Саллена-Ки")
<<tr("Пассивный");
<<tr("Multifeedback (MFB)")
<<tr("Sallen-Key (S-K)");
//<<tr("Пассивный");
cbxFilterType->addItems(lst);
connect(cbxFilterType,SIGNAL(currentIndexChanged(int)),this,SLOT(slotUpdateSchematic()));
this->slotSwitchParameters();

lblAFR = new QLabel(tr("General amplitude frequenc response"));
lblTopology = new QLabel(tr("Filter topology preview (one stage)"));

QString s1 = ":/images/AFR.svg";
QSvgRenderer *ren = new QSvgRenderer(s1);
QSize sz = ren->defaultSize();
Expand Down Expand Up @@ -140,7 +143,9 @@ FilterSintez::FilterSintez(QWidget *parent)
left->addWidget(btnCalcSchematic);
left->addStretch();

right->addWidget(lblAFR);
right->addWidget(imgAFR);
right->addWidget(lblTopology);
right->addWidget(sch_pic);
right->addStretch();

Expand Down
3 changes: 3 additions & 0 deletions filtersintez.h
Expand Up @@ -23,6 +23,9 @@ class FilterSintez : public QMainWindow
QLabel *lblRpl2;
QLabel *lblResp;

QLabel *lblAFR;
QLabel *lblTopology;

QLineEdit *edtA1; // passband attenuation A1
QLineEdit *edtA2; // stopband attenuation A2
QLineEdit *edtF1; // passband cutoff frequency F1
Expand Down
16 changes: 2 additions & 14 deletions high-pass.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bdf5f1c

Please sign in to comment.