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
99 QGridLayout* m_mainLayout;
100 QWidget* m_contentWidget;
101 QPushButton* m_toggleButton;
102 QLabel* titleLabel;
104
107 QLabel* Topology_Label;
108 QComboBox* Topology_Combo;
110
113 QWidget* SolutionWidget;
114 QRadioButton* Solution1_RB;
115 QRadioButton* Solution2_RB;
117
120 QLabel* StubTermination_Label;
121 QComboBox* StubTermination_ComboBox;
123
126 QGroupBox* Weighting_GroupBox;
127 QComboBox* Weighting_Combo;
128 QLabel* Ripple_Label;
129 CustomDoubleSpinBox* Ripple_SpinBox;
131
134 QLabel* Sections_Label;
135 QSpinBox* Sections_SpinBox;
137
140 QLabel* Zin_Label;
141 CustomDoubleSpinBox* ZinRSpinBox;
142 QLabel* Ohm_Zin_Label;
144
145 QGroupBox* groupBox;
146
149 QLabel* TL_Implementation_Label;
150 QComboBox* TL_Implementation_Combo;
152
153 QGridLayout* mainLayout;
154
155 bool m_isCollapsed;
156
157signals:
160
163 void topologyChanged(int index);
164
167 void collapsedStateChanged(bool collapsed);
168};
169
170#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:370
void setCollapsed(bool collapsed)
Set collapsed state of widget.
Definition MatchingNetworkParametersWidget.cpp:389
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:330
void parametersChanged()
Emitted when parameters change.
void onTopologyChanged(int index)
Handle topology selection changes.
Definition MatchingNetworkParametersWidget.cpp:196
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:366
void mousePressEvent(QMouseEvent *event) override
Handle mouse press events for collapsible header.
Definition MatchingNetworkParametersWidget.cpp:407
void topologyChanged(int index)
Emitted when topology changes.
Matching network design parameters.
Definition structures.h:220