My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
componentdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  componentdialog.h - description
3  -------------------
4  begin : Tue Sep 9 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 COMPONENTDIALOG_H
19 #define COMPONENTDIALOG_H
20 
21 #include "component.h"
22 
23 #include <qlabel.h>
24 #include <qdialog.h>
25 #include <qlistview.h>
26 #include <qlineedit.h>
27 #include <qcheckbox.h>
28 #include <qregexp.h>
29 #include <qcombobox.h>
30 #include <qpushbutton.h>
31 #include <qptrlist.h>
32 #include <qdir.h>
33 
34 class Schematic;
35 class QGridLayout;
36 class QValidator;
37 class QVBoxLayout;
38 class QIntValidator;
39 class QRegExpValidator;
40 
41 extern QDir QucsWorkDir;
42 
43 
44 class ComponentDialog : public QDialog {
45  Q_OBJECT
46 public:
49 
50 private slots:
51  void slotButtOK();
52  void slotButtCancel();
53  void slotSelectProperty(QListViewItem *item);
54  void slotApplyInput();
55  void slotApplyState(int State);
56  void slotBrowseFile();
57  void slotEditFile();
58  void slotApplyChange(const QString& Text);
59  void slotApplyProperty();
60  void slotApplyPropName();
61 
62  void slotButtAdd();
63  void slotButtRem();
64 
65  void slotSimTypeChange(int);
66  void slotNumberChanged(const QString&);
67  void slotStepChanged(const QString&);
68 
69  void slotParamEntered();
70  void slotSimEntered(int);
71  void slotValuesEntered();
72  void slotStartEntered();
73  void slotStopEntered();
74  void slotStepEntered();
75  void slotNumberEntered();
76 
77 protected slots:
78  void reject();
79 
80 private:
81  QVBoxLayout *all; // the mother of all widgets
82  QValidator *Validator, *ValRestrict, *Validator2;
83  QRegExp Expr;
84  QIntValidator *ValInteger;
85  QListView *prop;
86  QLineEdit *edit, *NameEdit, *CompNameEdit;
87  QComboBox *ComboEdit;
88  QLabel *Name, *Description;
89  QPushButton *BrowseButt, *EditButt, *ButtAdd, *ButtRem;
90  QCheckBox *disp;
91  Component *Comp;
92  Schematic *Doc;
93  bool changed;
94  int tx_Dist, ty_Dist; // remember the text position
95 
96  QLabel *textType;
97  QLabel *textSim, *textParam, *textValues, *textStart, *textStop,
98  *textStep, *textNumber;
99  QLineEdit *editParam, *editValues, *editStart, *editStop,
100  *editStep, *editNumber;
101  QCheckBox *checkSim, *checkParam, *checkValues, *checkStart, *checkStop,
102  *checkNumber, *checkType, *showName;
103  QComboBox *editSim, *comboType;
104 };
105 
106 #endif