Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
PowerCombiningTool.h
Go to the documentation of this file.
1
7
8#ifndef POWERCOMBININGTOOL_H
9#define POWERCOMBININGTOOL_H
10
12#include "Misc/general.h" // To build the docs path
13
14#include <QCheckBox>
15#include <QComboBox>
16#include <QGridLayout>
17#include <QGroupBox>
18#include <QHBoxLayout>
19#include <QLabel>
20#include <QLineEdit>
21#include <QMessageBox>
22#include <QRadioButton>
23#include <QSpinBox>
24#include <QVBoxLayout>
25#include <QValidator>
26#include <QWidget>
27#include <QPushButton>
28
29#include "Schematic/Network.h"
30
31#include "Wilkinson2Way.h"
32#include "MultistageWilkinson.h"
33#include "TJunction.h"
34#include "Branchline.h"
35#include "DoubleBoxBranchline.h"
36#include "Bagley.h"
37#include "Gysel.h"
38#include "Lim_Eom.h"
40#include "Recombinant3WayWilkinson.h"
41#include "WyeCombiner.h"
42#include "DeltaCombiner.h"
43#include "AdamsCombiner.h"
44
45#define WILKINSON 0
46#define MULTISTAGE_WILKINSON 1
47#define T_JUNCTION 2
48#define BRANCHLINE 3
49#define DOUBLE_BOX_BRANCHLINE 4
50#define BAGLEY 5
51#define GYSEL 6
52#define LIM_EOM 7
53#define WILKINSON_3_WAY_IMPROVED_ISO 8
54#define RECOMBINANT_3_WAY_WILKINSON 9
55#define WYE 10
56#define DELTA 11
57#define ADAMS 12
58// #define TRAVELLING_WAVE 10
59// #define TREE 11
60
61
62
65class BagleyValidator : public QValidator {
66 Q_OBJECT
67public:
70 BagleyValidator(QObject* parent = 0) : QValidator(parent){}
71
76 virtual State validate(QString& input, int& /*pos*/) const {
77 if (input.isEmpty()) {
78 return Acceptable;
79 }
80
81 bool b;
82 int val = input.toInt(&b);
83
84 if ((b == true) && (val % 2 != 0)) {
85 return Acceptable;
86 }
87 return Invalid;
88 }
89};
90
93class PowerCombiningTool : public QWidget {
94 Q_OBJECT
95public:
98 PowerCombiningTool(QWidget* parent = nullptr);
99
102
104 void design() { UpdateDesignParameters(); }
105
108 SchematicContent getSchematic() { return SchContent; }
109
110private slots:
112 void UpdateDesignParameters();
113
116 void on_TopoCombo_currentIndexChanged(int);
117
119 void showDocumentation() {
120 QString path = QString("/RFCircuitSynthesis/PowerCombining/index.html");
121 showHTMLDocs(path);
122 }
123
124private:
125 QLabel *OhmLabel, *K1LabeldB, *NStagesLabel, *K1Label, *FreqLabel, *RefImp,
126 *TopoLabel;
127 QLabel *AlphaLabel, *AlphadBLabel, *UnitsLabel;
128 CustomDoubleSpinBox *RefImpSpinbox, *FreqSpinbox, *AlphaSpinbox;
129 CustomDoubleSpinBox *K1Spinbox, *K2Spinbox, *K3Spinbox;
130 QSpinBox* NStagesSpinbox;
131 QComboBox* BranchesCombo;
132 QLabel* number_Output_Label;
133 QComboBox *TopoCombo, *FreqScaleCombo, *UnitsCombo;
134
137 double getScaleFreq();
138 QString netlist;
139
142 SchematicContent SchContent;
143
144 // Transmission line implementation
145 QLabel* TL_Implementation_Label;
146 QComboBox* TL_Implementation_Combo;
147
148 // Input validation
149 QValidator* Bagley_Validator;
150
151 // Add trace to simulate
152 QLabel* traceNameLabel;
153 QLineEdit* traceNameLineEdit;
154
156 void synthesize();
157
159 void setSettings_Wilkinson();
160
162 void setSettings_MultistageWilkinson();
163
165 void setSettings_T_Junction();
166
168 void setSettings_Branchline();
169
171 void setSettings_DoubleBoxBranchline();
172
174 void setSettings_Bagley();
175
177 void setSettings_Gysel();
178
180 void setSettings_LimEom();
181
183 void setSettings_Wilkinson_3_Way_Improved_Isolation();
184
186 void setSettings_Recombinant_3_Way_Wilkinson();
187
189 void setSettings_Travelling_Wave();
190
192 void setSettings_Tree();
193
195 void setDefaultSettings();
196
198 void setSettings_Wye();
199
201 void setSettings_Delta();
202
204 void setSettings_Adams();
205
206signals:
210
214};
215
216#endif // POWERCOMBININGTOOL_H
Delta resistive power splitter (definition)
Bagley power combiner/divider network (definition)
Branch-line power combiner/divider network (definition)
Custom QDoubleSpinBox. It includes a context menu (right-click) for setting the minimum,...
Delta resistive power splitter (definition)
Double-box branch-line power combiner/divider network (definition)
Gysel power combiner/divider network (definition)
Lim-Eom power combiner/divider network (definition)
Multistage Wilkinson power combiner/divider network (definition)
Abstract base class for network implementations.
Wilkinson power combiner/divider network (definition)
3-way Wilkinson with improved isolation network (definition)
Direct N-way Wye resistive power splitter (definition)
Validator for Bagley topology ensuring odd number of outputs.
Definition PowerCombiningTool.h:65
BagleyValidator(QObject *parent=0)
Constructor.
Definition PowerCombiningTool.h:70
virtual State validate(QString &input, int &) const
Validate input to ensure odd numbers only.
Definition PowerCombiningTool.h:76
A QDoubleSpinBox subclass that provides a context menu for configuring range and step.
Definition CustomDoubleSpinBox.h:28
Widget for power combining network design and synthesis.
Definition PowerCombiningTool.h:93
void updateSchematic(SchematicContent)
Signal emitted when schematic needs update.
~PowerCombiningTool()
Class destructor.
Definition PowerCombiningTool.cpp:220
void design()
Trigger design update.
Definition PowerCombiningTool.h:104
SchematicContent getSchematic()
Get current schematic content.
Definition PowerCombiningTool.h:108
void updateSimulation(SchematicContent)
Signal emitted when simulation needs update.
Container for schematic circuit data.
Definition SchematicContent.h:27
Utility functions needed across the whole project.
void showHTMLDocs(QString path)
Show HTML documentation in the web browser.
Definition showHTMLDocs.cpp:17
Power combiner parameters.
Definition structures.h:264