Skip to content

Commit

Permalink
Coil64 v2.2.33 updated 2024-08-05
Browse files Browse the repository at this point in the history
  • Loading branch information
radioacoustick committed Aug 5, 2024
1 parent fc19912 commit 5516e89
Show file tree
Hide file tree
Showing 89 changed files with 7,026 additions and 3,226 deletions.
5 changes: 4 additions & 1 deletion Coil64.pro
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ TARGET = Coil64
TEMPLATE = app

SOURCES += main.cpp\
mainwindow.cpp \
mainwindow.cpp \
resolves.cpp \
bessel.cpp \
resolve_q.cpp \
Expand All @@ -54,6 +54,7 @@ SOURCES += main.cpp\
crossover.cpp \
rf_toroid.cpp \
bandspread.cpp \
bandspread_utils.cpp \
rmcore.cpp \
scdockwidget.cpp

Expand Down Expand Up @@ -84,6 +85,7 @@ HEADERS += mainwindow.h \
spline.h \
rf_toroid.h \
bandspread.h \
bandspread_utils.h \
rmcore.h \
scdockwidget.h

Expand Down Expand Up @@ -134,6 +136,7 @@ TRANSLATIONS += lang/Coil64_bg.ts \
lang/Coil64_zh.ts

RESOURCES += res.qrc
QMAKE_CXXFLAGS += -Wno-deprecated-declarations

win32:{
RC_FILE = resource.rc
Expand Down
42 changes: 23 additions & 19 deletions about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ along with this program. If not, see <https://www.gnu.org/licenses
#include "about.h"
#include "ui_about.h"
#include "definitions.h"

QString reversPixmapColorHTML(QString input, int start){

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
QString reversePixmapColorHTML(QString input, int start){
int i1 = input.indexOf(".png", start);
int i2 = input.indexOf(">", start);
QString sImg1 = input.mid(start + 10, i1 - start - 6);
Expand All @@ -39,6 +38,22 @@ QString reversPixmapColorHTML(QString input, int start){
return input;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void reverseLabelRichTextIconColor(QLabel *label){
QString txt = label->text();
int j = 0;
do {
if (j == 0){
j = txt.indexOf("<img", j);
txt = reversePixmapColorHTML(txt, j);
} else {
j = txt.indexOf("<img", j + 1);
if (j > 0)
txt = reversePixmapColorHTML(txt, j);
}
} while(j > 0);
label->setText(txt);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
About::About(QWidget *parent) :
QDialog(parent),
ui(new Ui::About)
Expand Down Expand Up @@ -69,22 +84,11 @@ About::~About()
void About::getStyleGUI(int styleGUI)
{
if (styleGUI == _DarkStyle){
ui->label_27->setPixmap(revercePixmapColors(ui->label_27->pixmap()));
ui->label_18->setPixmap(revercePixmapColors(ui->label_18->pixmap()));
ui->pushButton->setIcon(reverceIconColors(ui->pushButton->icon()));
QString txt = ui->label_13->text();
int j = 0;
do {
if (j == 0){
j = txt.indexOf("<img", j);
txt = reversPixmapColorHTML(txt, j);
} else {
j = txt.indexOf("<img", j + 1);
if (j > 0)
txt = reversPixmapColorHTML(txt, j);
}
} while(j > 0);
ui->label_13->setText(txt);
ui->label_27->setPixmap(reversePixmapColors(ui->label_27->pixmap()));
ui->label_18->setPixmap(reversePixmapColors(ui->label_18->pixmap()));
ui->pushButton->setIcon(reverseIconColors(ui->pushButton->icon()));
reverseLabelRichTextIconColor(ui->label_13);
reverseLabelRichTextIconColor(ui->label_21);
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
33 changes: 26 additions & 7 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>550</height>
<height>600</height>
</rect>
</property>
<property name="sizePolicy">
Expand All @@ -22,13 +22,13 @@
<property name="minimumSize">
<size>
<width>650</width>
<height>550</height>
<height>600</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>650</width>
<height>550</height>
<height>600</height>
</size>
</property>
<property name="contextMenuPolicy">
Expand Down Expand Up @@ -484,8 +484,8 @@
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Sans';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Noto Sans'; font-size:9pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="placeholderText">
<string notr="true"/>
Expand Down Expand Up @@ -572,6 +572,25 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="label_21">
<property name="text">
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/menu_ico/res/ico2-mxe.png&quot; style=&quot;vertical-align: middle;&quot;/&gt;&lt;a href=&quot;https://github.com/mxe/mxe&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#1e90ff;&quot;&gt;MXE (M cross environment)&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin">
<number>10</number>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_2">
<property name="orientation">
Expand All @@ -587,7 +606,7 @@ p, li { white-space: pre-wrap; }
</font>
</property>
<property name="text">
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/menu_ico/res/ico2-windows.png&quot; style=&quot;vertical-align: middle;&quot;/&gt;&amp;nbsp;Windows: Qt 5.13.2 (mingw32, gcc 5.5.0, 32bit, 64bit)&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;:/menu_ico/res/ico2-linux.png&quot; style=&quot;vertical-align: middle;&quot;/&gt;&amp;nbsp;Linux: Qt 5.12.0 (gcc 5.4.0, 64bit)&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;:/menu_ico/res/ico2-mac-os.png&quot; style=&quot;vertical-align: middle;&quot;/&gt;&amp;nbsp;OS X: Qt 5.9.1 (clang-800.0.42.1, 64bit)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;img src=&quot;:/menu_ico/res/ico2-windows.png&quot; style=&quot;vertical-align: middle;&quot;/&gt; Windows 7-11: Qt 5.13.2 (MinGW-w64, gcc 5.5.0, 32bit, 64bit)&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;:/menu_ico/res/ico2-windows-xp.png&quot; style=&quot;vertical-align: middle;&quot;/&gt; Windows XP: Qt 5.7.1 (MinGW-w64, gcc 5.5.0, 32bit)&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;:/menu_ico/res/ico2-linux.png&quot; style=&quot;vertical-align: middle;&quot;/&gt; Linux: Qt 5.12.0 (gcc 5.4.0, 64bit)&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;:/menu_ico/res/ico2-mac-os.png&quot; style=&quot;vertical-align: middle;&quot;/&gt; OS X: Qt 5.9.1 (clang-800.0.42.1, 64bit)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
Expand Down Expand Up @@ -628,7 +647,7 @@ p, li { white-space: pre-wrap; }
<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>
<string notr="true">&lt;a href=&quot;https://github.com/icons8/windows-10-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>
Expand Down
8 changes: 4 additions & 4 deletions aircoretoroid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ void AirCoreToroid::getOpt(_OptionStruct gOpt)
on_checkBox_isReverce_clicked();
delete settings;
if (fOpt->styleGUI == _DarkStyle){
ui->pushButton_calculate->setIcon(reverceIconColors(ui->pushButton_calculate->icon()));
ui->pushButton_close->setIcon(reverceIconColors(ui->pushButton_close->icon()));
ui->pushButton_help->setIcon(reverceIconColors(ui->pushButton_help->icon()));
ui->pushButton_calculate->setIcon(reverseIconColors(ui->pushButton_calculate->icon()));
ui->pushButton_close->setIcon(reverseIconColors(ui->pushButton_close->icon()));
ui->pushButton_help->setIcon(reverseIconColors(ui->pushButton_help->icon()));
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -297,7 +297,7 @@ void AirCoreToroid::on_pushButton_calculate_clicked()
}
if (lw > 0){
QString _wire_length = formatLength(lw, fOpt->dwLengthMultiplier);
QStringList list = _wire_length.split(QRegExp(" "), QString::SkipEmptyParts);
QStringList list = _wire_length.split(QRegExp(" "), skip_empty_parts);
QString d_wire_length = list[0];
QString _ssLengthMeasureUnit = list[1];
if (d_wire_length != "-100"){
Expand Down
4 changes: 2 additions & 2 deletions al.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ void AL::getOpt(_OptionStruct gOpt)
move(pos);
delete settings;
if (fOpt->styleGUI == _DarkStyle){
ui->pushButton_calculate->setIcon(reverceIconColors(ui->pushButton_calculate->icon()));
ui->pushButton_close->setIcon(reverceIconColors(ui->pushButton_close->icon()));
ui->pushButton_calculate->setIcon(reverseIconColors(ui->pushButton_calculate->icon()));
ui->pushButton_close->setIcon(reverseIconColors(ui->pushButton_close->icon()));
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
10 changes: 5 additions & 5 deletions amidon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,9 @@ void Amidon::getOpt(_OptionStruct gOpt)
delete settings;
on_tabWidget_currentChanged(ui->tabWidget->currentIndex());
if (fOpt->styleGUI == _DarkStyle){
ui->pushButton_export->setIcon(reverceIconColors(ui->pushButton_export->icon()));
ui->pushButton_close->setIcon(reverceIconColors(ui->pushButton_close->icon()));
ui->pushButton_help->setIcon(reverceIconColors(ui->pushButton_help->icon()));
ui->pushButton_export->setIcon(reverseIconColors(ui->pushButton_export->icon()));
ui->pushButton_close->setIcon(reverseIconColors(ui->pushButton_close->icon()));
ui->pushButton_help->setIcon(reverseIconColors(ui->pushButton_help->icon()));
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -935,7 +935,7 @@ void Amidon::onCalculate()
if (ui->tabWidget->currentIndex() == _FToroid)
lw = getToroidWireLength(fTorDimen->at(0), fTorDimen->at(1), fTorDimen->at(2), dw, N, &one_layer_dw);
QString _wire_length = formatLength(lw, fOpt->dwLengthMultiplier);
QStringList list = _wire_length.split(QRegExp(" "), QString::SkipEmptyParts);
QStringList list = _wire_length.split(QRegExp(" "), skip_empty_parts);
QString d_wire_length = list[0];
QString _ssLengthMeasureUnit = list[1];
double dw1 = std::min(max_dw, one_layer_dw);
Expand Down Expand Up @@ -1150,7 +1150,7 @@ void Amidon::on_lineEdit_dw_textChanged(const QString &arg1)
if (ui->tabWidget->currentIndex() == _FToroid)
lw = getToroidWireLength(fTorDimen->at(0), fTorDimen->at(1), fTorDimen->at(2), d, N);
QString _wire_length = formatLength(lw, fOpt->dwLengthMultiplier);
QStringList list = _wire_length.split(QRegExp(" "), QString::SkipEmptyParts);
QStringList list = _wire_length.split(QRegExp(" "), skip_empty_parts);
QString d_wire_length = list[0];
QString _ssLengthMeasureUnit = list[1];
int i0 = result.indexOf(">", result.lastIndexOf("lw ="));
Expand Down
7 changes: 5 additions & 2 deletions amidon.ui
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,9 @@
</item>
<item>
<widget class="QScrollArea" name="scrollArea">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
Expand All @@ -607,8 +610,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>364</width>
<height>74</height>
<width>378</width>
<height>76</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_14">
Expand Down
Loading

0 comments on commit 5516e89

Please sign in to comment.