Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
SecondaryImageCalculatorDialog.h
Go to the documentation of this file.
1
7
8
9#ifndef SECONDARYIMAGECALCULATORDIALOG_H
10#define SECONDARYIMAGECALCULATORDIALOG_H
11
12#include <QDialog>
13#include <QDoubleSpinBox>
14#include <QLabel>
15#include <QPushButton>
16#include <QGroupBox>
17#include <QVBoxLayout>
18#include <QHBoxLayout>
19#include <QGridLayout>
20#include <QTableWidget>
21#include "Misc/general.h"
22
40class SecondaryImageCalculatorDialog : public QDialog
41{
42 Q_OBJECT
43
44public:
47 explicit SecondaryImageCalculatorDialog(QWidget *parent = nullptr);
48
51
52private slots:
55 void calculate();
56
58 void showDocumentation() {
59 QString path = QString("/Calculators/SecondaryImageFrequency/index.html");
60 showHTMLDocs(path);
61 }
62
63private:
65 void setupUI();
66
70 QString formatFrequency(double freq) {
71 return QString::number(freq, 'f', 1);
72 }
73
74 // UI Elements - Inputs
75 QDoubleSpinBox* fIF1SpinBox;
76 QDoubleSpinBox* fIF2SpinBox;
77 QDoubleSpinBox* fRFSpinBox;
78
79 // UI Elements - Results Table
80 QTableWidget* resultsTable;
81
82 // UI Elements - Buttons
83 QPushButton* docsButton;
84
85 // Result values
86 double f_LO1;
87 double f_LO2;
88 double f_IM1;
89 double f_IM2;
90};
91
92#endif // SECONDARYIMAGECALCULATORDIALOG_H
A dialog for calculating image frequencies in dual-conversion superheterodyne receivers.
Definition SecondaryImageCalculatorDialog.h:41
~SecondaryImageCalculatorDialog()
Destructor.
Definition SecondaryImageCalculatorDialog.h:50
Utility functions needed across the whole project.
void showHTMLDocs(QString path)
Show HTML documentation in the web browser.
Definition showHTMLDocs.cpp:17