Skip to content

Commit

Permalink
Make transient sensitivity analysis inherit from SimulationComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
wawuwo committed Jun 23, 2024
1 parent b6de636 commit 2c5e687
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
16 changes: 1 addition & 15 deletions qucs/spicecomponents/sp_sens_tr_xyce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* *
***************************************************************************/
#include "sp_sens_tr_xyce.h"
#include "main.h"
#include "extsimkernels/spicecompat.h"


Expand All @@ -24,20 +23,7 @@ SpiceSENS_TR_Xyce::SpiceSENS_TR_Xyce()
isSimulation = true;
Description = QObject::tr("Transient .SENS analysis with Xyce");
Simulator = spicecompat::simXyce;

QString s = Description;
int a = s.indexOf(" ");
if (a != -1) s[a] = '\n';

Texts.append(new Text(0, 0, s.left(a), Qt::darkRed, QucsSettings.largeFontSize));
if (a != -1)
Texts.append(new Text(0, 0, s.mid(a+1), Qt::darkRed, QucsSettings.largeFontSize));

x1 = -10; y1 = -9;
x2 = x1+104; y2 = y1+59;

tx = 0;
ty = y2+1;
initSymbol(Description);
Model = ".SENS_TR_XYCE";
Name = "TSENS";
SpiceModel = ".SENS";
Expand Down
5 changes: 3 additions & 2 deletions qucs/spicecomponents/sp_sens_tr_xyce.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
#ifndef SP_SENS_TR_XYCE_H
#define SP_SENS_TR_XYCE_H

#include "components/component.h"
#include "components/simulation.h"


class SpiceSENS_TR_Xyce : public Component {
class SpiceSENS_TR_Xyce : public qucs::component::SimulationComponent {
public:
SpiceSENS_TR_Xyce();
~SpiceSENS_TR_Xyce();
Expand All @@ -30,6 +30,7 @@ class SpiceSENS_TR_Xyce : public Component {

protected:
QString spice_netlist(bool isXyce = false);
Qt::GlobalColor color() const override { return Qt::darkGreen; }
};

#endif

0 comments on commit 2c5e687

Please sign in to comment.