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
42
43#define WILKINSON 0
44#define MULTISTAGE_WILKINSON 1
45#define T_JUNCTION 2
46#define BRANCHLINE 3
47#define DOUBLE_BOX_BRANCHLINE 4
48#define BAGLEY 5
49#define GYSEL 6
50#define LIM_EOM 7
51#define WILKINSON_3_WAY_IMPROVED_ISO 8
52#define RECOMBINANT_3_WAY_WILKINSON 9
53#define TRAVELLING_WAVE 10
54#define TREE 11
55
56
59class BagleyValidator : public QValidator {
60 Q_OBJECT
61public:
64 BagleyValidator(QObject* parent = 0) : QValidator(parent){}
65
70 virtual State validate(QString& input, int& /*pos*/) const {
71 if (input.isEmpty()) {
72 return Acceptable;
73 }
74
75 bool b;
76 int val = input.toInt(&b);
77
78 if ((b == true) && (val % 2 != 0)) {
79 return Acceptable;
80 }
81 return Invalid;
82 }
83};
84
87class PowerCombiningTool : public QWidget {
88 Q_OBJECT
89public:
92 PowerCombiningTool(QWidget* parent = nullptr);
93
96
98 void design() { UpdateDesignParameters(); }
99
102 SchematicContent getSchematic() { return SchContent; }
103
104private slots:
106 void UpdateDesignParameters();
107
110 void on_TopoCombo_currentIndexChanged(int);
111
113 void showDocumentation() {
114 QString path = QString("/RFCircuitSynthesis/PowerCombining/index.html");
115 showHTMLDocs(path);
116 }
117
118private:
119 QLabel *OhmLabel, *K1LabeldB, *NStagesLabel, *K1Label, *FreqLabel, *RefImp,
120 *TopoLabel;
121 QLabel *AlphaLabel, *AlphadBLabel, *UnitsLabel;
122 CustomDoubleSpinBox *RefImpSpinbox, *FreqSpinbox, *AlphaSpinbox;
123 CustomDoubleSpinBox *K1Spinbox, *K2Spinbox, *K3Spinbox;
124 QSpinBox* NStagesSpinbox;
125 QComboBox* BranchesCombo;
126 QLabel* number_Output_Label;
127 QComboBox *TopoCombo, *FreqScaleCombo, *UnitsCombo;
128
131 double getScaleFreq();
132 QString netlist;
133
136 SchematicContent SchContent;
137
138 // Transmission line implementation
139 QLabel* TL_Implementation_Label;
140 QComboBox* TL_Implementation_Combo;
141
142 // Input validation
143 QValidator* Bagley_Validator;
144
145 // Add trace to simulate
146 QLabel* traceNameLabel;
147 QLineEdit* traceNameLineEdit;
148
150 void synthesize();
151
153 void setSettings_Wilkinson();
154
156 void setSettings_MultistageWilkinson();
157
159 void setSettings_T_Junction();
160
162 void setSettings_Branchline();
163
165 void setSettings_DoubleBoxBranchline();
166
168 void setSettings_Bagley();
169
171 void setSettings_Gysel();
172
174 void setSettings_LimEom();
175
177 void setSettings_Wilkinson_3_Way_Improved_Isolation();
178
180 void setSettings_Recombinant_3_Way_Wilkinson();
181
183 void setSettings_Travelling_Wave();
184
186 void setSettings_Tree();
187
189 void setDefaultSettings();
190
191
192signals:
196
200};
201
202#endif // POWERCOMBININGTOOL_H
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,...
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)
Validator for Bagley topology ensuring odd number of outputs.
Definition PowerCombiningTool.h:59
BagleyValidator(QObject *parent=0)
Constructor.
Definition PowerCombiningTool.h:64
virtual State validate(QString &input, int &) const
Validate input to ensure odd numbers only.
Definition PowerCombiningTool.h:70
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:87
void updateSchematic(SchematicContent)
Signal emitted when schematic needs update.
~PowerCombiningTool()
Class destructor.
Definition PowerCombiningTool.cpp:217
void design()
Trigger design update.
Definition PowerCombiningTool.h:98
SchematicContent getSchematic()
Get current schematic content.
Definition PowerCombiningTool.h:102
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:261