Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
MatchingNetworkDesignTool.h
1/*
2 * Copyright (C) 2025 Andrés Martínez Mera - andresmmera@protonmail.com
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef MATCHINGNETWORKDESIGNTOOL_H
19#define MATCHINGNETWORKDESIGNTOOL_H
20
21#include <QCheckBox>
22#include <QComboBox>
23#include <QDoubleSpinBox>
24#include <QGridLayout>
25#include <QGroupBox>
26#include <QLabel>
27#include <QLineEdit>
28#include <QPushButton>
29#include <QRadioButton>
30#include <QWidget>
31
32#include "../../Schematic/Network.h"
33#include "../../Schematic/SchematicContent.h"
34#include "../../Schematic/component.h"
35
36#include "LoadSpecificationWidget.h"
37#include "MatchingNetworkDesigner.h" // Class to create the matching network
38#include "MatchingNetworkParametersWidget.h" // Custom widget for the network setup data entry
39
40class MatchingNetworkDesignTool : public QWidget {
41 Q_OBJECT
42public:
43 MatchingNetworkDesignTool(QWidget* parent = nullptr);
45 void design();
46
47private slots:
48 void UpdateDesignParameters();
49 void AdjustOneTwoPortMatchingWidgetsVisibility();
50
51private:
52 QCheckBox* TwoPortCheckBox;
53
55 InputMatchingSetupWidget; // Input matching network data entry widget
57 OutputMatchingSetupWidget; // Output matching network data entry widget
58 LoadSpecificationWidget* LoadSpecWidget;
59
60 QLabel *Zout_Label, *Ohm_Zout_Label, *Zout_J;
61 QDoubleSpinBox *ZoutISpinBox, *ZoutRSpinBox;
62
63 QLabel* f_match_Label;
64
65 // Two-port network widgets
66 QGroupBox* two_port_GroupBox;
67 QCheckBox* enter_S2P_file_CheckBox;
68 QPushButton* browse_S2P_Button;
69 QLabel* s2p_filename_Label;
70
71 QLabel* input_format_Label;
72 QComboBox* input_format_Combo;
73
74 QLabel *S11_Label, *S12_Label, *S21_Label, *S22_Label;
75 QLabel *S11_Separator_Label, *S12_Separator_Label, *S21_Separator_Label,
76 *S22_Separator_Label;
77
78 QDoubleSpinBox *S11_A_SpinBox, *S11_B_SpinBox;
79 QDoubleSpinBox *S12_A_SpinBox, *S12_B_SpinBox;
80 QDoubleSpinBox *S21_A_SpinBox, *S21_B_SpinBox;
81 QDoubleSpinBox *S22_A_SpinBox, *S22_B_SpinBox;
82
83 QDoubleSpinBox *f_match_Spinbox, *FreqEnd_Spinbox;
84 QComboBox *f_match_Scale_Combo, *FreqEnd_Scale_Combo,
85 *StubTermination_ComboBox;
86
87 double getScaleFreq(int);
88
89 SchematicContent SchContent; // Schematic representation
90
91 // Add trace to simulate
92 QLabel* traceNameLabel;
93 QLineEdit* traceNameLineEdit;
94
95signals:
96 void updateSchematic(SchematicContent);
97 void updateSimulation(SchematicContent);
98};
99
100#endif // MATCHINGNETWORKDESIGNTOOL_H
Definition LoadSpecificationWidget.h:43
Definition MatchingNetworkDesignTool.h:40
Definition MatchingNetworkParametersWidget.h:39
Definition SchematicContent.h:33