Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
AttenuatorDesignTool.h
Go to the documentation of this file.
1
7
8#ifndef ATTENUATORDESIGNTOOL_H
9#define ATTENUATORDESIGNTOOL_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 <QLabel>
19#include <QLineEdit>
20#include <QRadioButton>
21#include <QPushButton>
22#include <QWidget>
23
24#include "Schematic/Network.h"
25
27#include "LPadFirstSeries.h"
28#include "LPadFirstShunt.h"
29#include "PiAttenuator.h"
30#include "QW_SeriesAttenuator.h"
31#include "QW_ShuntAttenuator.h"
32#include "RSeriesAttenuator.h"
34#include "RshuntAttenuator.h"
35#include "TeeAttenuator.h"
36
37
38#define PI_ATTENUATOR 0
39#define TEE_ATTENUATOR 1
40#define BRIDGED_TEE 2
41#define REFLECTION_ATTENUATOR 3
42#define QW_SERIES 4
43#define QW_SHUNT 5
44#define LPAD_1ST_SERIES 6
45#define LPAD_1ST_SHUNT 7
46#define RSERIES 8
47#define RSHUNT 9
48
51class AttenuatorDesignTool : public QWidget {
52 Q_OBJECT
53public:
56 AttenuatorDesignTool(QWidget* parent = nullptr);
57
60
62 void design() { UpdateDesignParameters(); }
63
65 void synthesize();
66
67private slots:
69 void UpdateDesignParameters();
70
72 void UpdatePowerDissipationData();
73
76 void on_TopoCombo_currentIndexChanged(int);
77
79 void showDocumentation() {
80 QString path = QString("/RFCircuitSynthesis/Attenuators/index.html");
81 showHTMLDocs(path);
82 }
83
84private:
87 QLabel* Topology_Label;
88 QComboBox* Topology_Combo;
90
93 QLabel* Attenuation_Label;
94 QLabel* dBLabelAtt;
95 CustomDoubleSpinBox* AttenuationSpinBox;
97
100 QLabel* Zin_Label;
101 QLabel* Ohm_Zin_Label;
102 CustomDoubleSpinBox* ZinSpinBox;
104
107 QLabel* Zout_Label;
108 QLabel* Ohm_Zout_Label;
109 CustomDoubleSpinBox* ZoutSpinBox;
111
114 QLabel* Pin_Label;
115 CustomDoubleSpinBox* Pin_SpinBox;
116 QComboBox* Pin_units_Combo;
118
121 QLabel* freqLabel;
122 CustomDoubleSpinBox* freqSpinBox;
123 QComboBox* FreqScaleCombo;
125
128 QLabel* Pdiss_R1_Label;
129 QLineEdit* Pdiss_R1_Lineedit;
130 QComboBox* R1_Pdiss_Units_Combo;
131
132 QLabel* Pdiss_R2_Label;
133 QLineEdit* Pdiss_R2_Lineedit;
134 QComboBox* R2_Pdiss_Units_Combo;
135
136 QLabel* Pdiss_R3_Label;
137 QLineEdit* Pdiss_R3_Lineedit;
138 QComboBox* R3_Pdiss_Units_Combo;
139
140 QLabel* Pdiss_R4_Label;
141 QLineEdit* Pdiss_R4_Lineedit;
142 QComboBox* R4_Pdiss_Units_Combo;
144
146 double getFreq();
147
151 double getPowerW(double, unsigned int);
152
156 double ConvertPowerFromW(double, unsigned int);
157
158 // Transmission line implementation
159 QLabel* TL_Implementation_Label;
160 QComboBox* TL_Implementation_Combo;
161
162 // Add trace to simulate
163 QLabel* traceNameLabel;
164 QLineEdit* traceNameLineEdit;
165
167
169 // This info is calculated in the synthesis functions and then passed to the tool class
170 SchematicContent SchContent;
171 QMap<QString, double> Pdiss;
172
173signals:
176
179};
180
181#endif // ATTENUATORDESIGNTOOL_H
Bridged-Tee attenuator (definition)
Custom QDoubleSpinBox. It includes a context menu (right-click) for setting the minimum,...
L-pad (first series) 1-port matched attenuator (definition)
L-pad (first shunt) 1-port matched attenuator (definition)
Abstract base class for network implementations.
Pi attenuator synthesis (definition)
Quarter wavelength first-shunt attenuator synthesis (definition)
Series resistor (unmatched) attenuator synthesis (definition)
Reflection attenuator synthesis (definition)
Shunt resistor (unmatched) attenuator synthesi0s (definition)
GUI tool for RF attenuator design tool.
Definition AttenuatorDesignTool.h:51
void updateSchematic(SchematicContent)
Emitted when schematic needs updating.
void synthesize()
Synthesize attenuator circuit based on selected topology.
Definition AttenuatorDesignTool.cpp:470
void updateSimulation(SchematicContent)
Emitted when simulation needs updating.
~AttenuatorDesignTool()
Class destructor.
Definition AttenuatorDesignTool.cpp:210
void design()
Trigger design process.
Definition AttenuatorDesignTool.h:62
A QDoubleSpinBox subclass that provides a context menu for configuring range and step.
Definition CustomDoubleSpinBox.h:28
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
Attenuator design parameters.
Definition structures.h:277