Skip to content

Commit

Permalink
Make spectrum analysis inherit from SimulationComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
wawuwo committed Jun 24, 2024
1 parent 1acfa36 commit 33f8ad2
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_spectrum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
* *
***************************************************************************/
#include "sp_spectrum.h"
#include "main.h"
#include "misc.h"
#include "extsimkernels/spicecompat.h"

Expand All @@ -25,20 +24,7 @@ SpiceFFT::SpiceFFT()
isSimulation = true;
Description = QObject::tr("Spectrum analysis");
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::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+104; y2 = y1+59;

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

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


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

0 comments on commit 33f8ad2

Please sign in to comment.