Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
simulationsetup.h
1/*
2 * Copyright (C) 2025 Andrés Martínez Mera - andresmmera@protonmail.com
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#ifndef SIMULATIONSETUP_H
19#define SIMULATIONSETUP_H
20
21#include "../../Misc/general.h"
22#include "../../Schematic/infoclasses.h"
23#include <QButtonGroup>
24#include <QComboBox>
25#include <QDoubleSpinBox>
26#include <QGridLayout>
27#include <QGroupBox>
28#include <QHBoxLayout>
29#include <QLabel>
30#include <QRadioButton>
31#include <QSpinBox>
32#include <QTabWidget>
33#include <QVBoxLayout>
34#include <QWidget>
35
36// Needed for having the substrate structures for each transmission line
37// implementation
38#include "../TransmissionLineSynthesis/Microstrip.h"
39
40class SimulationSetup : public QWidget {
41 Q_OBJECT
42public:
43 SimulationSetup(QWidget* parent = nullptr);
45
46 // Frequency sweep methods
47 double getFstart();
48 QString getFstart_as_Text();
49 double getFstop();
50 QString getFstop_as_Text();
51 int getNpoints();
52
53 // Substrate properties methods
54 TransmissionLineType getTransmissionLineType();
55 double getSubstrateThickness();
56 double getSubstratePermittivity();
57 double getSubstrateLossTangent();
58 double getConductorThickness();
59 double getConductorConductivity();
60 double getGroundPlaneThickness(); // For stripline
61
62 // Interfacing functions
63 MS_Substrate get_MS_Substrate();
64
65private:
66 // Tab widget
67 QTabWidget* tabWidget;
68
69 // Frequency sweep widgets
70 QDoubleSpinBox *fstartSpinBox, *fstopSpinBox;
71 QComboBox *fstartScaleComboBox, *fstopScaleComboBox;
72 QSpinBox* npointsSpinBox;
73
74 // Substrate properties widgets
75 QComboBox* transmissionLineComboBox;
76 QDoubleSpinBox* substrateThicknessSpinBox;
77 QDoubleSpinBox* substratePermittivitySpinBox;
78 QDoubleSpinBox* substrateLossTangentSpinBox;
79 QDoubleSpinBox* conductorThicknessSpinBox;
80 QDoubleSpinBox* conductorConductivitySpinBox;
81 QDoubleSpinBox* groundPlaneThicknessSpinBox;
82 QLabel* imageLabel;
83
84 // Helper methods
85 QWidget* createFrequencySweepTab();
86 QWidget* createSubstratePropertiesTab();
87 void updateImageDisplay();
88
89 // Substrate data
90 MS_Substrate MS_Subs;
91
92private slots:
93 void updateSubstrateDefinition();
94 void onTransmissionLineTypeChanged();
95
96signals:
97 void updateSimulation();
98 void updateSubstrate();
99};
100
101#endif // SIMULATIONSETUP_H
Definition simulationsetup.h:40
Definition structures.h:92