Skip to content

Commit

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


Expand All @@ -24,20 +23,7 @@ SpiceSENS_AC::SpiceSENS_AC()
isSimulation = true;
Description = QObject::tr("AC sensitivity simulation");
Simulator = spicecompat::simNgspice | spicecompat::simSpiceOpus;

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_AC";
Name = "SENS";
SpiceModel = ".SENS";
Expand Down
4 changes: 2 additions & 2 deletions qucs/spicecomponents/sp_sens_ac.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
#ifndef SP_SENS_AC_H
#define SP_SENS_AC_H

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


class SpiceSENS_AC : public Component {
class SpiceSENS_AC : public qucs::component::SimulationComponent {
public:
SpiceSENS_AC();
~SpiceSENS_AC();
Expand Down

0 comments on commit 66ba881

Please sign in to comment.