Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/dialogs/simmessage.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                                simmessage.h
00003                               --------------
00004     begin                : Sat Sep 6 2003
00005     copyright            : (C) 2003 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 SIMMESSAGE_H
00019 #define SIMMESSAGE_H
00020 
00021 #include <QDialog>
00022 #include <QProcess>
00023 #include <QStringList>
00024 #include <QFile>
00025 #include <QTextStream>
00026 #include <QVBoxLayout>
00027 
00028 class QPlainTextEdit;
00029 class QTextStream;
00030 class QVBoxLayout;
00031 class QPushButton;
00032 class QProgressBar;
00033 class QProcess;
00034 class QFile;
00035 class Component;
00036 class Schematic;
00037 
00038 // #define SPEEDUP_PROGRESSBAR
00039 
00040 
00041 class SimMessage : public QDialog  {
00042 Q_OBJECT
00043 public:
00044   SimMessage(QWidget*, QWidget *parent=0);
00045  ~SimMessage();
00046 
00047   bool startProcess();
00048 
00049 signals:
00050   void SimulationEnded(int, SimMessage*);
00051   void displayDataPage(QString&, QString&);
00052 
00053 public slots:
00054   void slotClose();
00055 
00056 private slots:
00057   void slotDisplayMsg();
00058   void slotDisplayErr();
00059   void slotCloseStdin();
00060   void slotStateChanged(QProcess::ProcessState newState);
00061   void slotSimEnded(int exitCode, QProcess::ExitStatus exitStatus);
00062   void slotDisplayButton();
00063   void AbortSim();
00064 
00065   void slotReadSpiceNetlist();
00066   void slotFinishSpiceNetlist(int status);
00067 
00068 /* #ifdef SPEEDUP_PROGRESSBAR
00069   void slotUpdateProgressBar();
00070 private:
00071   int  iProgress;
00072   bool waitForUpdate;
00073 #endif
00074 */
00075 
00076 private:
00077   void FinishSimulation(int);
00078   void nextSPICE();
00079   void startSimulator();
00080   Component * findOptimization(Schematic *);
00081 
00082 public:
00083   QWidget *DocWidget;
00084   int showBias;
00085   bool SimOpenDpl;
00086   bool SimRunScript;
00087   QString DocName, DataSet, DataDisplay, Script;
00088 
00089   QProcess       SimProcess;
00090   QPlainTextEdit *ProgText, *ErrText;
00091   bool           wasLF;   // linefeed for "ProgText"
00092   bool           simKilled; // true if simulation was aborted by the user
00093   QPushButton    *Display, *Abort;
00094   QProgressBar   *SimProgress;
00095   QString        ProgressText;
00096 
00097   Component      *SimOpt;
00098   int            SimPorts;
00099   bool           makeSubcircuit, insertSim;
00100   QStringList    Collect;
00101   QFile          NetlistFile;
00102   QTextStream    Stream;
00103 
00104   QVBoxLayout  *all;
00105 protected:
00106   QString Program;
00107 };
00108 
00109 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines