Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
MatchingNetworkParametersWidget.h
1
7#ifndef MATCHINGNETWORKPARAMETERSWIDGET_H
8#define MATCHINGNETWORKPARAMETERSWIDGET_H
9
11#include <QCheckBox>
12#include <QComboBox>
13#include <QGridLayout>
14#include <QGroupBox>
15#include <QHBoxLayout>
16#include <QLabel>
17#include <QLineEdit>
18#include <QMessageBox>
19#include <QMouseEvent>
20#include <QPushButton>
21#include <QRadioButton>
22#include <QSpinBox>
23#include <QWidget>
24#include <complex>
25
26#include "Schematic/structures.h"
27
30class MatchingNetworkParametersWidget : public QGroupBox {
31 Q_OBJECT
32
33public:
36 explicit MatchingNetworkParametersWidget(QWidget* parent = nullptr);
37
40
44
47 int getCurrentTopologyIndex() const;
48
52 double getScaleFreq(int index) const;
53
56 bool isCollapsed() const { return m_isCollapsed; }
57
60 void setCollapsed(bool collapsed);
61
64 void setTitle(QString title) {
65 titleLabel->setText(title);
66 }
67
68protected:
71 void mousePressEvent(QMouseEvent* event) override;
72
73public slots:
76 void onTopologyChanged(int index);
77
78private slots:
80 void onParameterChanged();
81
83 void onToggleCollapse(){
84 setCollapsed(!m_isCollapsed);
85 }
86
88 void adjustChebyshevRippleVisibility();
89
90private:
92 void setupUI();
93
95 void connectSignals();
96
98 void setDefaultSettings();
99
102 QGridLayout* m_mainLayout;
103 QWidget* m_contentWidget;
104 QPushButton* m_toggleButton;
105 QLabel* titleLabel;
107
110 QLabel* Topology_Label;
111 QComboBox* Topology_Combo;
113
116 QWidget* SolutionWidget;
117 QRadioButton* Solution1_RB;
118 QRadioButton* Solution2_RB;
120
123 QLabel* StubTermination_Label;
124 QComboBox* StubTermination_ComboBox;
126
129 QGroupBox* Weighting_GroupBox;
130 QComboBox* Weighting_Combo;
131 QLabel* Ripple_Label;
132 CustomDoubleSpinBox* Ripple_SpinBox;
134
137 QLabel* Sections_Label;
138 QSpinBox* Sections_SpinBox;
140
143 QLabel* Q_Label;
144 CustomDoubleSpinBox* Q_SpinBox;
145 QLabel* TeeNetworkMask_Label;
146 QComboBox* TeeNetworkMask_Combo;
148
151 QLabel* Zin_Label;
152 CustomDoubleSpinBox* ZinRSpinBox;
153 QLabel* Ohm_Zin_Label;
155
158 QLabel* Ltap_Label;
159 CustomDoubleSpinBox* Ltap_SpinBox;
161
162 QGroupBox* groupBox;
163
166 QLabel* TL_Implementation_Label;
167 QComboBox* TL_Implementation_Combo;
169
170 QGridLayout* mainLayout;
171
172 bool m_isCollapsed;
173
174signals:
177
180 void topologyChanged(int index);
181
184 void collapsedStateChanged(bool collapsed);
185};
186
187#endif // MATCHINGNETWORKPARAMETERSWIDGET_H
Custom QDoubleSpinBox. It includes a context menu (right-click) for setting the minimum,...
A QDoubleSpinBox subclass that provides a context menu for configuring range and step.
Definition CustomDoubleSpinBox.h:28
Widget for entering matching network design parameters.
Definition MatchingNetworkParametersWidget.h:30
double getScaleFreq(int index) const
Get the frequency scaling multiplier.
Definition MatchingNetworkParametersWidget.cpp:424
void setCollapsed(bool collapsed)
Set collapsed state of widget.
Definition MatchingNetworkParametersWidget.cpp:443
void setTitle(QString title)
Set the title of the widget.
Definition MatchingNetworkParametersWidget.h:64
void collapsedStateChanged(bool collapsed)
Emitted when collapsed state changes.
MatchingNetworkDesignParameters getDesignParameters() const
Get the design parameters.
Definition MatchingNetworkParametersWidget.cpp:379
void parametersChanged()
Emitted when parameters change.
void onTopologyChanged(int index)
Handle topology selection changes.
Definition MatchingNetworkParametersWidget.cpp:280
bool isCollapsed() const
Check if widget is collapsed.
Definition MatchingNetworkParametersWidget.h:56
~MatchingNetworkParametersWidget()
Class destructor.
Definition MatchingNetworkParametersWidget.h:39
int getCurrentTopologyIndex() const
Get the current topology index.
Definition MatchingNetworkParametersWidget.cpp:420
void mousePressEvent(QMouseEvent *event) override
Handle mouse press events for collapsible header.
Definition MatchingNetworkParametersWidget.cpp:461
void topologyChanged(int index)
Emitted when topology changes.
Matching network design parameters.
Definition structures.h:220