My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
spicedialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  spicedialog.h
3  ---------------
4  begin : Tue May 3 2005
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 SPICEDIALOG_H
19 #define SPICEDIALOG_H
20 
21 #include <qdialog.h>
22 #include <qregexp.h>
23 #include <qdir.h>
24 
25 class Schematic;
26 class SpiceFile;
27 class QLineEdit;
28 class QPushButton;
29 class QListBox;
30 class QListBoxItem;
31 class QCheckBox;
32 class QVBoxLayout;
33 class QProcess;
34 class QRegExpValidator;
35 class QComboBox;
36 
37 
38 extern QDir QucsWorkDir;
39 
40 
41 class SpiceDialog : public QDialog {
42  Q_OBJECT
43 public:
45  ~SpiceDialog();
46 
47 private slots:
48  void slotButtOK();
49  void slotButtCancel();
50  void slotButtApply();
51  void slotButtBrowse();
52  void slotButtEdit();
53 
54  void slotButtAdd();
55  void slotButtRemove();
56  void slotAddPort(QListBoxItem*);
57  void slotRemovePort(QListBoxItem*);
58 
59  void slotGetNetlist();
60  void slotGetError();
61 
62  void slotSkipOut();
63  void slotSkipErr();
64  void slotGetPrepOut();
65  void slotGetPrepErr();
66  void slotPrepChanged(int);
67 
68 protected slots:
69  void reject();
70 
71 private:
72  bool loadSpiceNetList(const QString&);
73 
74  QVBoxLayout *all; // the mother of all widgets
75  QRegExpValidator *Validator, *ValRestrict;
76  QRegExp Expr;
77  QListBox *NodesList, *PortsList;
78  QCheckBox *FileCheck, *SimCheck;
79  QLineEdit *FileEdit, *CompNameEdit;
80  QPushButton *ButtBrowse, *ButtEdit, *ButtAdd, *ButtRemove;
81  QComboBox *PrepCombo;
82  SpiceFile *Comp;
83  Schematic *Doc;
84  bool changed;
85  int currentPrep;
86 
87  QTextStream *prestream;
88  QProcess *QucsConv, *SpicePrep;
89  QString Line, Error; // to store the text read from QucsConv
90  int textStatus; // to store with text data QucsConv will sent next
91 };
92 
93 #endif