From 7c3a7f616455506149bb7d27cd23e3d94167e80f Mon Sep 17 00:00:00 2001 From: Andrey Kalmykov Date: Sun, 23 Jun 2024 11:56:27 +0200 Subject: [PATCH] Make externally driven transient sim. inherit from SimulationComponent --- qucs/components/etr_sim.cpp | 16 +--------------- qucs/components/etr_sim.h | 4 ++-- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/qucs/components/etr_sim.cpp b/qucs/components/etr_sim.cpp index 5ca13e56c..c5eca5515 100644 --- a/qucs/components/etr_sim.cpp +++ b/qucs/components/etr_sim.cpp @@ -15,27 +15,13 @@ * * ***************************************************************************/ #include "etr_sim.h" -#include "main.h" ETR_Sim::ETR_Sim() { Description = QObject::tr("externally driven transient simulation"); Simulator = spicecompat::simQucsator; - - QString s = Description; - int a = 17; - s[a] = '\n'; - - Texts.append(new Text(0, 0, s.left(a), Qt::darkBlue, QucsSettings.largeFontSize)); - if (a != -1) - Texts.append(new Text(0, 0, s.mid(a+1), Qt::darkBlue, QucsSettings.largeFontSize)); - - x1 = -10; y1 = -9; - x2 = x1+130; y2 = y1+59; - - tx = 0; - ty = y2+1; + initSymbol(Description); Model = ".ETR"; Name = "ETR"; diff --git a/qucs/components/etr_sim.h b/qucs/components/etr_sim.h index ffe6411c9..e4ae98e5e 100644 --- a/qucs/components/etr_sim.h +++ b/qucs/components/etr_sim.h @@ -18,10 +18,10 @@ #ifndef ETR_SIM_H #define ETR_SIM_H -#include "component.h" +#include "simulation.h" -class ETR_Sim : public Component { +class ETR_Sim : public qucs::component::SimulationComponent { public: ETR_Sim(); ~ETR_Sim();