Qucs-GUI  0.0.19
/home/travis/build/Qucs/qucs/qucs/qucs/components/spicedialog.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                               spicedialog.h
00003                              ---------------
00004     begin                : Tue May 3 2005
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 SPICEDIALOG_H
00019 #define SPICEDIALOG_H
00020 
00021 #include <QDialog>
00022 #include <QRegExp>
00023 
00024 class Schematic;
00025 class SpiceFile;
00026 class QLineEdit;
00027 class QPushButton;
00028 class QListWidget;
00029 class QListWidgetItem;
00030 class QCheckBox;
00031 class QVBoxLayout;
00032 class QProcess;
00033 class QRegExpValidator;
00034 class QComboBox;
00035 class QucsApp;
00036 class QTextStream;
00037 
00038 class SpiceDialog : public QDialog {
00039    Q_OBJECT
00040 public:
00041   SpiceDialog(QucsApp*, SpiceFile*, Schematic*);
00042  ~SpiceDialog();
00043 
00044 private slots:
00045   void slotButtOK();
00046   void slotButtCancel();
00047   void slotButtApply();
00048   void slotButtBrowse();
00049   void slotButtEdit();
00050 
00051   void slotButtAdd();
00052   void slotButtRemove();
00053   void slotAddPort(QListWidgetItem *);
00054   void slotRemovePort(QListWidgetItem *);
00055 
00056   void slotGetNetlist();
00057   void slotGetError();
00058 
00059   void slotSkipOut();
00060   void slotSkipErr();
00061   void slotGetPrepOut();
00062   void slotGetPrepErr();
00063   void slotPrepChanged(int);
00064 
00065 protected slots:
00066     void reject();
00067 
00068 private:
00069   bool loadSpiceNetList(const QString&);
00070 
00071   QVBoxLayout *all;   // the mother of all widgets
00072   QRegExpValidator  *Validator, *ValRestrict;
00073   QRegExp     Expr;
00074   QListWidget *NodesList, *PortsList;
00075   QCheckBox   *FileCheck, *SimCheck;
00076   QLineEdit   *FileEdit, *CompNameEdit;
00077   QPushButton *ButtBrowse, *ButtEdit, *ButtAdd, *ButtRemove,
00078               *ButtOK, *ButtApply, *ButtCancel;
00079   QComboBox   *PrepCombo;
00080   SpiceFile   *Comp;
00081   Schematic   *Doc;
00082   bool        changed;
00083   int         currentPrep;
00084 
00085   QTextStream *prestream;
00086   QProcess *QucsConv, *SpicePrep;
00087   QString Line, Error;  // to store the text read from QucsConv
00088   int textStatus; // to store with text data QucsConv will sent next
00089 
00090   QucsApp* App;
00091 };
00092 
00093 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines