Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
QucsSExporter.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 QUCSSEXPORTER_H
19#define QUCSSEXPORTER_H
20
21#include "../SchematicExporter.h"
22
23// This is needed for catching the current Qucs-S version
24#ifdef HAVE_CONFIG_H
25#include <config.h>
26#endif
27
28
30public:
31 explicit QucsSExporter(SchematicContent& owner);
33
34 void setSchematiContent(const SchematicContent& schematic);
35
36 QString exportSchematic();
37 QString backend_simulator;
38
39
40private:
41 SchematicContent& schematic;
42
43private:
44 // These variables apply a general offset in the Qucs-S schematic export process
45 int x_offset, y_offset;
46
47 // General schematic scaling versus the tool's schematic
48 int scale_x, scale_y;
49
50 // Component processing
51 QString processComponents_QucsS(QString);
52 QString parseTerm_QucsS(ComponentInfo);
53 QString parseResistor_QucsS(ComponentInfo);
54 QString parseInductor_QucsS(ComponentInfo);
55 QString parseCapacitor_QucsS(ComponentInfo);
56 QString parseGND_QucsS(ComponentInfo);
57 QString parseIdealTransmissionLine_QucsS(ComponentInfo);
58 QString parseIdealCoupledTransmissionLines_QucsS(ComponentInfo);
59 QString parseShortStub_QucsS(ComponentInfo);
60 QString parseIdealCoupler_QucsS(ComponentInfo);
61 QString parseComplexImpedance_QucsS(ComponentInfo, double);
62 QString parseSPAR_Block_QucsS(ComponentInfo);
63
64 // Microstrip components
65 MS_Substrate get_MS_Substrate(ComponentInfo Comp);
66 QString addSubstrateBox(QList<MS_Substrate> subs_list, int x_bottom, int y_bottom);
67 QString parseMicrostripLine_QucsS(ComponentInfo);
68 QString parseMicrostripCoupledLines_QucsS(ComponentInfo);
69 QString parseMicrostripStep_QucsS(ComponentInfo);
70 QString parseMicrostripOpen_QucsS(ComponentInfo);
71 QString parseMicrostripVia_QucsS(ComponentInfo);
72
73 // Wire processing
74 QString processWires_QucsS();
75
76 // Process internal nodes
77 void processNodes_QucsS();
78
79 // Export blacklist
80 // List of components not supported by the backenb simulator (Qucsator, NGspice, Xyce)
81 QMap<QString, QList<ComponentType>> Export_Blacklists;
82};
83
84#endif // QUCSSEXPORTER_H
Definition infoclasses.h:26
Definition QucsSExporter.h:29
Definition SchematicContent.h:33
Definition SchematicExporter.h:25
Definition structures.h:92