My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
spicefile.h
Go to the documentation of this file.
1 /***************************************************************************
2  spicefile.h
3  -------------
4  begin : Tue Dec 28 2004
5  copyright : (C) 2004 by Michael Margraf
6  email : michael.margraf@alumni.tu-berlin.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef SPICEFILE_H
19 #define SPICEFILE_H
20 
21 #include "component.h"
22 
23 #include <qobject.h>
24 #include <qdatetime.h>
25 
26 class QProcess;
27 class QTextStream;
28 class QString;
29 
30 class SpiceFile : public QObject, public MultiViewComponent {
31  Q_OBJECT
32 public:
33  SpiceFile();
34  ~SpiceFile() {};
35  Component* newOne();
36  static Element* info(QString&, char* &, bool getNewOne=false);
37 
38  bool withSim;
39  bool createSubNetlist(QTextStream *);
40  QString getErrorText() { return ErrText; }
41  QString getSubcircuitFile();
42 
43 private:
44  bool makeSubcircuit;
45  bool insertSim;
46  bool changed;
47  QProcess *QucsConv, *SpicePrep;
48  QString NetText, ErrText, NetLine, SimText;
49  QTextStream *outstream, *filstream, *prestream;
50  QDateTime lastLoaded;
51  bool recreateSubNetlist(QString *, QString *);
52 
53 protected:
54  QString netlist();
55  void createSymbol();
56 
57 private slots:
58  void slotGetNetlist();
59  void slotGetError();
60  void slotExited();
61  void slotSkipOut();
62  void slotSkipErr();
63  void slotGetPrepOut();
64  void slotGetPrepErr();
65 };
66 
67 #endif