Skip to content

Commit

Permalink
Coil64 v2.2.30 updated 2024-02-07
Browse files Browse the repository at this point in the history
  • Loading branch information
radioacoustick committed Feb 7, 2024
1 parent d1dc67a commit af59e00
Show file tree
Hide file tree
Showing 99 changed files with 36,686 additions and 34,634 deletions.
67 changes: 44 additions & 23 deletions about.ui
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<x>0</x>
<y>0</y>
<width>650</width>
<height>469</height>
<height>550</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -22,13 +22,13 @@
<property name="minimumSize">
<size>
<width>650</width>
<height>469</height>
<height>550</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>650</width>
<height>469</height>
<height>550</height>
</size>
</property>
<property name="contextMenuPolicy">
Expand All @@ -50,25 +50,6 @@
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap>:/new/images/res/program.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
Expand All @@ -94,7 +75,7 @@
</sizepolicy>
</property>
<property name="currentIndex">
<number>1</number>
<number>5</number>
</property>
<widget class="QWidget" name="tab_1">
<property name="sizePolicy">
Expand Down Expand Up @@ -619,6 +600,46 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_8">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Free Icons:</string>
</property>
<property name="margin">
<number>10</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string notr="true">&lt;a href=&quot;https://icons8.com/icons&quot;&gt;&lt;span style=&quot;text-decoration: underline; color:DodgerBlue;&quot;&gt;https://icons8.com/icons&lt;/span&gt;&lt;/a&gt;</string>
</property>
<property name="margin">
<number>10</number>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
Expand Down
46 changes: 21 additions & 25 deletions aircoretoroid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,14 @@ void AirCoreToroid::on_checkBox_isReverce_clicked()
default:
break;
}
ui->lineEdit_N->setFocus();
ui->lineEdit_N->selectAll();
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void AirCoreToroid::on_pushButton_calculate_clicked()
{
QString sResult = "<hr>";
if (fOpt->isShowTitle){
sResult = "<h2>" +QCoreApplication::applicationName() + " " + QCoreApplication::applicationVersion() +
" - " + windowTitle();
}
QString sCaption = QCoreApplication::applicationName() + " " + QCoreApplication::applicationVersion() + " - " + windowTitle();
QString sImage = "";
if ((ui->lineEdit_N->text().isEmpty())||(ui->lineEdit_1->text().isEmpty())||(ui->lineEdit_2->text().isEmpty())||(ui->lineEdit_4->text().isEmpty())){
showWarning(tr("Warning"), tr("One or more inputs are empty!"));
return;
Expand All @@ -217,9 +216,8 @@ void AirCoreToroid::on_pushButton_calculate_clicked()
return;
}
if(windingKind == 0){
sResult += " (" + ui->radioButton_round->text() + + ")</h2><br/>";
if (fOpt->isInsertImage)
sResult += "<img src=\":/images/res/toroid-round.png\">";
sCaption += " (" + ui->radioButton_round->text() + + ")";
sImage = "<img src=\":/images/res/toroid-round.png\">";
} else if (windingKind == 1){
if(ui->lineEdit_3->text().isEmpty()){
showWarning(tr("Warning"), tr("One or more inputs are empty!"));
Expand All @@ -234,9 +232,8 @@ void AirCoreToroid::on_pushButton_calculate_clicked()
showWarning(tr("Warning"), tr("One or more inputs have an illegal format!"));
return;
}
sResult += " (" + ui->radioButton_rect->text() + + ")</h2><br/>";
if (fOpt->isInsertImage)
sResult += "<img src=\":/images/res/toroid-square.png\">";
sCaption += " (" + ui->radioButton_rect->text() + + ")";
sImage = "<img src=\":/images/res/toroid-square.png\">";
}
_CoilResult result;
if (ui->checkBox_isReverce->isChecked()){
Expand Down Expand Up @@ -270,25 +267,24 @@ void AirCoreToroid::on_pushButton_calculate_clicked()
N = result.N;
}
}
sResult += "<p><u>" + tr("Input data") + ":</u><br/>";
QString sInput = "<p><u>" + tr("Input data") + ":</u><br/>";
if (ui->checkBox_isReverce->isChecked())
sResult += ui->label_N->text() + " " + ui->lineEdit_N->text() + "<br/>";
sInput += formattedOutput(fOpt, ui->label_N->text(), ui->lineEdit_N->text()) + "<br/>";
else
sResult += ui->label_N->text() + " " + ui->lineEdit_N->text() + " " + ui->label_N_m->text() + "<br/>";
sResult += ui->label_1->text() + " " + ui->lineEdit_1->text() + " " + ui->label_01->text() + "<br/>";
sResult += ui->label_2->text() + " " + ui->lineEdit_2->text() + " " + ui->label_02->text() + "<br/>";
sInput += formattedOutput(fOpt, ui->label_N->text(), ui->lineEdit_N->text(), ui->label_N_m->text()) + "<br/>";
sInput += formattedOutput(fOpt, ui->label_1->text(), ui->lineEdit_1->text(), ui->label_01->text()) + "<br/>";
sInput += formattedOutput(fOpt, ui->label_2->text(), ui->lineEdit_2->text(), ui->label_02->text()) + "<br/>";
if (windingKind == 1){
sResult += ui->label_3->text() + " " + ui->lineEdit_3->text() + " " + ui->label_03->text() + "<br/>";
sInput += formattedOutput(fOpt, ui->label_3->text(), ui->lineEdit_3->text(), ui->label_03->text()) + "<br/>";
}
sResult += ui->label_4->text() + " " + ui->lineEdit_4->text() + " " + ui->label_04->text() + "</p>";
sResult += "<hr>";
sResult += "<p><u>" + tr("Result") + ":</u><br/>";
sInput += formattedOutput(fOpt, ui->label_4->text(), ui->lineEdit_4->text(), ui->label_04->text()) + "</p>";
QString sResult = "<p><u>" + tr("Result") + ":</u><br/>";
if (ui->checkBox_isReverce->isChecked()){
sResult += tr("Inductance") + " L = " + roundTo(ind / fOpt->dwInductanceMultiplier, loc, fOpt->dwAccuracy) + " "
+ qApp->translate("Context", fOpt->ssInductanceMeasureUnit.toUtf8());
sResult += formattedOutput(fOpt, tr("Inductance") + " L = ", roundTo(ind / fOpt->dwInductanceMultiplier, loc, fOpt->dwAccuracy),
qApp->translate("Context", fOpt->ssInductanceMeasureUnit.toUtf8()));
} else {
sResult += tr("Number of turns of the coil") + " N = " + roundTo(N, loc, fOpt->dwAccuracy);
sResult += formattedOutput(fOpt, tr("Number of turns of the coil") + " N = ", roundTo(N, loc, fOpt->dwAccuracy));
}
sResult += "</p><hr>";
emit sendResult(sResult);
sResult += "</p>";
emit sendResult(sCaption + LIST_SEPARATOR + sImage + LIST_SEPARATOR + sInput + LIST_SEPARATOR + sResult);
}
24 changes: 24 additions & 0 deletions aircoretoroid.ui
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<widget class="QRadioButton" name="radioButton_round">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Round cross-section</string>
</property>
Expand All @@ -99,6 +102,9 @@
</item>
<item>
<widget class="QRadioButton" name="radioButton_rect">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="text">
<string>Rectangular cross-section</string>
</property>
Expand Down Expand Up @@ -349,6 +355,9 @@
<height>40</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Context help</string>
</property>
Expand All @@ -359,6 +368,9 @@
<iconset resource="res.qrc">
<normaloff>:/menu_ico/res/icons8-help-32.png</normaloff>:/menu_ico/res/icons8-help-32.png</iconset>
</property>
<property name="shortcut">
<string notr="true">F1</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
Expand All @@ -385,6 +397,12 @@
<height>40</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string notr="true">Enter</string>
</property>
<property name="text">
<string>Calculate</string>
</property>
Expand All @@ -411,6 +429,12 @@
<height>40</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string notr="true">Esc</string>
</property>
<property name="text">
<string>Close</string>
</property>
Expand Down
6 changes: 6 additions & 0 deletions al.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,20 @@ void AL::on_tabWidget_currentChanged(int index)
case 0:
ui->lineEdit_L_1->setText(loc.toString(L_m / fOpt->dwInductanceMultiplier));
ui->lineEdit_N_1->setText(loc.toString(N_m));
ui->lineEdit_L_1->setFocus();
ui->lineEdit_L_1->selectAll();
break;
case 1:
ui->lineEdit_AL_2->setText(loc.toString(al));
ui->lineEdit_L_2->setText(loc.toString(L_r / fOpt->dwInductanceMultiplier));
ui->lineEdit_L_2->setFocus();
ui->lineEdit_L_2->selectAll();
break;
case 2:
ui->lineEdit_AL_3->setText(loc.toString(al));
ui->lineEdit_N_3->setText(loc.toString(N_r));
ui->lineEdit_AL_3->setFocus();
ui->lineEdit_AL_3->selectAll();
break;
default:
break;
Expand Down
17 changes: 16 additions & 1 deletion al.ui
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="currentIndex">
<number>2</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab_1">
<attribute name="title">
Expand Down Expand Up @@ -577,6 +580,12 @@
<height>40</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string notr="true">Enter</string>
</property>
<property name="text">
<string>Calculate</string>
</property>
Expand All @@ -603,6 +612,12 @@
<height>40</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string notr="true">Esc</string>
</property>
<property name="text">
<string>Close</string>
</property>
Expand Down
Loading

0 comments on commit af59e00

Please sign in to comment.