Qucs-GUI
0.0.19
|
00001 /*************************************************************************** 00002 matchdialog.h 00003 --------------- 00004 begin : Fri Jul 22 2005 00005 copyright : (C) 2005 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 MATCHDIALOG_H 00019 #define MATCHDIALOG_H 00020 00021 #include <QDialog> 00022 #include <QVBoxLayout> 00023 #include <QLabel> 00024 00025 class Element; 00026 class QLabel; 00027 class QLineEdit; 00028 class QComboBox; 00029 class QCheckBox; 00030 class QVBoxLayout; 00031 class QDoubleValidator; 00032 00033 00034 class MatchDialog : public QDialog { 00035 Q_OBJECT 00036 public: 00037 MatchDialog(QWidget *parent=0); 00038 ~MatchDialog(); 00039 00040 static void c2p(double&, double&); 00041 static void p2c(double&, double&); 00042 static void r2z(double&, double&, double); 00043 static void z2r(double&, double&, double); 00044 static QString calcMatching(double, double, double, double); 00045 static bool calcMatchingCircuit(double, double, double, double); 00046 static QString calcBiMatch(double, double, double, double, double, double, 00047 double, double); 00048 static bool calc2PortMatch(double, double, double, double, double, double, 00049 double, double, double); 00050 void setFrequency(double); 00051 00052 QLineEdit *Ref1Edit, *Ref2Edit, *FrequencyEdit, 00053 *S11magEdit,*S11degEdit, *S21magEdit,*S21degEdit, 00054 *S12magEdit,*S12degEdit, *S22magEdit,*S22degEdit; 00055 QCheckBox *TwoCheck; 00056 00057 public slots: 00058 void slotButtCreate(); 00059 void slotImpedanceChanged(const QString&); 00060 void slotReflexionChanged(const QString&); 00061 void slotSetTwoPort(bool); 00062 void slotChangeMode(int); 00063 00064 private: 00065 QVBoxLayout *all; // the mother of all widgets 00066 QDoubleValidator *DoubleVal; 00067 QLabel *Port1Label, *Port2Label, *Ohm1Label, *Ohm2Label, 00068 *FormatLabel, *FrequencyLabel, 00069 *S11Label, *S11sLabel, *S11uLabel, 00070 *S21Label, *S21sLabel, *S21uLabel, 00071 *S12Label, *S12sLabel, *S12uLabel, 00072 *S22Label, *S22sLabel, *S22uLabel; 00073 QComboBox *FormatCombo, *UnitCombo; 00074 }; 00075 00076 #endif