Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/spicefile.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                                  spicefile.h
00003                                 -------------
00004     begin                : Tue Dec 28 2004
00005     copyright            : (C) 2004 by Michael Margraf
00006     email                : michael.margraf@alumni.tu-berlin.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef SPICEFILE_H
00019 #define SPICEFILE_H
00020 #include "component.h"
00021 
00022 #include <QObject>
00023 #include <QDateTime>
00024 
00025 class QProcess;
00026 class QTextStream;
00027 class QString;
00028 
00029 class SpiceFile : public QObject, public MultiViewComponent  {
00030    Q_OBJECT
00031 public:
00032   SpiceFile();
00033  ~SpiceFile() {};
00034   Component* newOne();
00035   static Element* info(QString&, char* &, bool getNewOne=false);
00036 
00037   bool withSim;
00038   bool createSubNetlist(QTextStream *);
00039   QString getErrorText() { return ErrText; }
00040   QString getSubcircuitFile();
00041 
00042 private:
00043   bool makeSubcircuit;
00044   bool insertSim;
00045   bool changed;
00046   QProcess *QucsConv, *SpicePrep;
00047   QString NetText, ErrText, NetLine, SimText;
00048   QTextStream *outstream, *filstream, *prestream;
00049   QDateTime lastLoaded;
00050   bool recreateSubNetlist(QString *, QString *);
00051 
00052 protected:
00053   QString netlist();
00054   void createSymbol();
00055 
00056 private slots:
00057   void slotGetNetlist();
00058   void slotGetError();
00059   void slotExited();
00060   void slotSkipOut();
00061   void slotSkipErr();
00062   void slotGetPrepOut();
00063   void slotGetPrepErr();
00064 };
00065 
00066 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines