Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
SchematicContent.h
1/*
2 * Copyright (C) 2019-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 SCHEMATICCONTENT_H
19#define SCHEMATICCONTENT_H
20
21#include <QGraphicsTextItem>
22#include <QPen>
23#include <QRegularExpression>
24#include <QMessageBox> // Needed to show warnings during export process
25
26#include "../Misc/general.h"
27#include "infoclasses.h"
28#include "structures.h"
29
30#include "Export/QucsS/QucsSExporter.h"
31
32class Component;
34 public:
37
38 QString getSParameterNetlist();
39 void setNetlist(QString);
40 QString Name;
41 QString Type;
42
43 QList<ComponentInfo> Comps;
44 QList<WireInfo> Wires;
45 QList<NodeInfo> Nodes;
46
47 // Export schematic
48 QString exportSchematic(QString environment, QString backend);
49
50 QString export2QucsS(QString); // Convert the schematic content to Qucs-S format
51
52 void setFrequencySweep(QString, QString, int);
53
54 // Frequency sweep settings (required for exporting)
55 QString f_start, f_stop;
56 int n_points;
57
58 private:
59 void assignNetToWiresConnectedToNode(QString, QString);
60
61 public:
62 // Setter getter functions
63
64 // Components, wires and nodes
65 void appendComponent(ComponentInfo);
66 void appendWire(WireInfo);
67 void appendWire(QString, int, QString, int);
68 void appendWire(QString, int, QString, int, QColor);
69 void appendNode(NodeInfo);
70 void appendText(QGraphicsTextItem* text);
71
72 double getZin();
73 double getZout();
74 QString getZinString();
75 QString getZoutString();
76
77 QList<ComponentInfo> getComponents();
78 void setComponents(QList<ComponentInfo> C);
79
80 QList<WireInfo> getWires();
81 QList<NodeInfo> getNodes();
82 void setNodes(QList<NodeInfo> N);
83 QList<QGraphicsTextItem*> getTexts();
84
85 int getComponentCounter(ComponentType);
86 QMap<ComponentType, int>
87 NumberComponents; // Indicates how many components of each type the schematic are in teh schematic
88 unsigned int NumberWires;
89
90 private:
91 QList<QGraphicsTextItem*> Texts;
92 QString Description;
93 QString netlist;
94};
95
96#endif // SCHEMATICCONTENT_H
Definition infoclasses.h:26
Definition component.h:40
Definition infoclasses.h:134
Definition SchematicContent.h:33
Definition infoclasses.h:100