My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
matchdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  matchdialog.h
3  ---------------
4  begin : Fri Jul 22 2005
5  copyright : (C) 2005 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 MATCHDIALOG_H
19 #define MATCHDIALOG_H
20 
21 #include <qdialog.h>
22 #include <qptrlist.h>
23 
24 class Element;
25 class QLabel;
26 class QLineEdit;
27 class QComboBox;
28 class QCheckBox;
29 class QVBoxLayout;
30 class QDoubleValidator;
31 
32 
33 class MatchDialog : public QDialog {
34  Q_OBJECT
35 public:
36  MatchDialog(QWidget *parent=0);
37  ~MatchDialog();
38 
39  static void c2p(double&, double&);
40  static void p2c(double&, double&);
41  static void r2z(double&, double&, double);
42  static void z2r(double&, double&, double);
43  static QString calcMatching(double, double, double, double);
44  static bool calcMatchingCircuit(double, double, double, double);
45  static QString calcBiMatch(double, double, double, double, double, double,
46  double, double);
47  static bool calc2PortMatch(double, double, double, double, double, double,
48  double, double, double);
49  void setFrequency(double);
50 
54  QCheckBox *TwoCheck;
55 
56 public slots:
57  void slotButtCreate();
58  void slotImpedanceChanged(const QString&);
59  void slotReflexionChanged(const QString&);
60  void slotSetTwoPort(bool);
61  void slotChangeMode(int);
62 
63 private:
64  QVBoxLayout *all; // the mother of all widgets
65  QDoubleValidator *DoubleVal;
66  QLabel *Port1Label, *Port2Label, *Ohm1Label, *Ohm2Label,
67  *FormatLabel, *FrequencyLabel,
68  *S11Label, *S11sLabel, *S11uLabel,
69  *S21Label, *S21sLabel, *S21uLabel,
70  *S12Label, *S12sLabel, *S12uLabel,
71  *S22Label, *S22sLabel, *S22uLabel;
72  QComboBox *FormatCombo, *UnitCombo;
73 };
74 
75 #endif