8#ifndef LOADSPECIFICATIONWIDGET_H
9#define LOADSPECIFICATIONWIDGET_H
11#include <QButtonGroup>
14#include <QDoubleSpinBox>
24#include <QRadioButton>
69 std::pair<std::complex<double>, std::complex<double>>
90 std::complex<double> getS11()
const;
94 std::complex<double>
getS12()
const;
98 std::complex<double>
getS21()
const;
102 std::complex<double>
getS22()
const;
124 updateReflectionCoefficient();
141 double Z0_Port1, Z0_Port2;
150 void onImpedanceChanged();
153 void onReflectionCoefficientChanged();
156 void onFormatChanged();
159 void onInputMethodChanged();
165 void onSParameterChanged();
168 void onToggleCollapse() {
178 void setupOnePortUI();
181 void setupTwoPortUI();
184 void updateReflectionCoefficient();
187 void updateImpedance();
190 void updateSParameterDisplays();
193 void updateImpedanceFormat();
196 void updateReflectionFormat();
199 void updateSParameterFormat();
203 QMap<QString, QList<double>> loadData;
204 QString spar_file_path;
208 QGridLayout* m_mainLayout;
209 QWidget* m_contentWidget;
210 QPushButton* m_toggleButton;
215 QRadioButton* m_manualInputRadio;
216 QRadioButton* m_fileInputRadio;
217 QButtonGroup* m_inputMethodGroup;
218 QPushButton* m_browseButton;
224 QLabel* m_formatLabel;
225 QComboBox* m_formatCombo;
230 QLabel* m_impedanceLabel;
231 QDoubleSpinBox* m_impedanceReal;
232 QLabel* m_impedanceSeparator;
233 QDoubleSpinBox* m_impedanceImag;
234 QLabel* m_impedanceUnit;
239 QLabel* m_reflectionLabel;
240 QDoubleSpinBox* m_reflectionReal;
241 QLabel* m_reflectionSeparator;
242 QDoubleSpinBox* m_reflectionImag;
247 QWidget* m_twoPortWidget;
248 QGridLayout* m_twoPortLayout;
254 QDoubleSpinBox* m_s11Real;
255 QLabel* m_s11Separator;
256 QDoubleSpinBox* m_s11Imag;
259 QDoubleSpinBox* m_s12Real;
260 QLabel* m_s12Separator;
261 QDoubleSpinBox* m_s12Imag;
264 QDoubleSpinBox* m_s21Real;
265 QLabel* m_s21Separator;
266 QDoubleSpinBox* m_s21Imag;
269 QDoubleSpinBox* m_s22Real;
270 QLabel* m_s22Separator;
271 QDoubleSpinBox* m_s22Imag;
277 bool m_updatingValues;
280 QString m_currentFile;
Utility functions needed across the whole project.