Qucs-GUI  0.0.18
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
simmessage.h
Go to the documentation of this file.
1 /***************************************************************************
2  simmessage.h
3  --------------
4  begin : Sat Sep 6 2003
5  copyright : (C) 2003 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 SIMMESSAGE_H
19 #define SIMMESSAGE_H
20 
21 #include <QDialog>
22 #include <QProcess>
23 #include <QStringList>
24 #include <QFile>
25 #include <QTextStream>
26 #include <QVBoxLayout>
27 
28 class QTextEdit;
29 class QTextStream;
30 class QVBoxLayout;
31 class QPushButton;
32 class QProgressBar;
33 class QProcess;
34 class QFile;
35 class Component;
36 class Schematic;
37 
38 // #define SPEEDUP_PROGRESSBAR
39 
40 
41 class SimMessage : public QDialog {
42 Q_OBJECT
43 public:
44  SimMessage(QWidget*, QWidget *parent=0);
45  ~SimMessage();
46 
47  bool startProcess();
48 
49 signals:
50  void SimulationEnded(int, SimMessage*);
51  void displayDataPage(QString&, QString&);
52 
53 public slots:
54  void slotClose();
55 
56 private slots:
57  void slotDisplayMsg();
58  void slotDisplayErr();
59  void slotCloseStdin();
60  void slotSimEnded(int status);
61  void slotDisplayButton();
62  void AbortSim();
63 
64  void slotReadSpiceNetlist();
65  void slotFinishSpiceNetlist(int status);
66 
67 /* #ifdef SPEEDUP_PROGRESSBAR
68  void slotUpdateProgressBar();
69 private:
70  int iProgress;
71  bool waitForUpdate;
72 #endif
73 */
74 
75 private:
76  void FinishSimulation(int);
77  void nextSPICE();
78  void startSimulator();
80 
81 public:
82  QWidget *DocWidget;
83  int showBias;
84  bool SimOpenDpl;
87 
88  QProcess SimProcess;
89  QTextEdit *ProgText, *ErrText;
90  bool wasLF; // linefeed for "ProgText"
91  QPushButton *Display, *Abort;
92  QProgressBar *SimProgress;
93  QString ProgressText;
94 
96  int SimPorts;
98  QStringList Collect;
99  QFile NetlistFile;
100  QTextStream Stream;
101 
102  QVBoxLayout *all;
103 };
104 
105 #endif
void nextSPICE()
Definition: simmessage.cpp:189
void slotReadSpiceNetlist()
Definition: simmessage.cpp:269
void AbortSim()
Definition: simmessage.cpp:746
QFile NetlistFile
Definition: simmessage.h:99
QTextEdit * ErrText
Definition: simmessage.h:89
QString DocName
Definition: simmessage.h:86
void slotDisplayErr()
Definition: simmessage.cpp:660
void FinishSimulation(int)
Definition: simmessage.cpp:677
Component * findOptimization(Schematic *)
Definition: simmessage.cpp:596
void displayDataPage(QString &, QString &)
QTextStream Stream
Definition: simmessage.h:100
QString Script
Definition: simmessage.h:86
SimMessage(QWidget *, QWidget *parent=0)
Definition: simmessage.cpp:49
QPushButton * Display
Definition: simmessage.h:91
QPushButton * Abort
Definition: simmessage.h:91
int showBias
Definition: simmessage.h:83
QProgressBar * SimProgress
Definition: simmessage.h:92
bool insertSim
Definition: simmessage.h:97
bool SimOpenDpl
Definition: simmessage.h:84
void SimulationEnded(int, SimMessage *)
void slotDisplayButton()
Definition: simmessage.cpp:740
QProcess SimProcess
Definition: simmessage.h:88
Component * SimOpt
Definition: simmessage.h:95
void startSimulator()
SimMessage::startSimulator simulates the document in view.
Definition: simmessage.cpp:321
QWidget * DocWidget
Definition: simmessage.h:82
bool startProcess()
Definition: simmessage.cpp:131
QString DataSet
Definition: simmessage.h:86
void slotCloseStdin()
Definition: simmessage.cpp:262
QStringList Collect
Definition: simmessage.h:98
void slotClose()
Definition: simmessage.cpp:734
bool makeSubcircuit
Definition: simmessage.h:97
void slotFinishSpiceNetlist(int status)
Definition: simmessage.cpp:293
int SimPorts
Definition: simmessage.h:96
QVBoxLayout * all
Definition: simmessage.h:102
void slotDisplayMsg()
Definition: simmessage.cpp:608
void slotSimEnded(int status)
Definition: simmessage.cpp:669
bool wasLF
Definition: simmessage.h:90
QString ProgressText
Definition: simmessage.h:93
bool SimRunScript
Definition: simmessage.h:85
QString DataDisplay
Definition: simmessage.h:86
QTextEdit * ProgText
Definition: simmessage.h:89