Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
ImageFrequencyCalculatorDialog.h
Go to the documentation of this file.
1
7
8#ifndef IMAGEFREQUENCYCALCULATORDIALOG_H
9#define IMAGEFREQUENCYCALCULATORDIALOG_H
10
11#include <QDialog>
12#include <QComboBox>
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
31class ImageFrequencyCalculatorDialog : public QDialog
32{
33 Q_OBJECT
34
35public:
38 explicit ImageFrequencyCalculatorDialog(QWidget *parent = nullptr);
39
42
43private slots:
48 void recalculateLO();
49
54 void recalculateRF();
55
58 void onModeChanged(int index);
59
60private:
62 void setupUI();
63
65 void calculate();
66
68 void showDocumentation() {
69 QString path = QString("/Calculators/ImageFrequency/index.html");
70 showHTMLDocs(path);
71 }
72
77 void setFreqInputWithUnits(QDoubleSpinBox* spinBox, QComboBox* comboBox, double val);
78
83 double getFrequencyInHz(QDoubleSpinBox* spinBox, QComboBox* comboBox);
84
88 QString formatFrequency(double freqHz);
89
90 // UI Elements
91 QComboBox* modeComboBox;
92
93 QDoubleSpinBox* fRFSpinBox;
94 QComboBox* fRFScaleComboBox;
95
96 QDoubleSpinBox* fIFSpinBox;
97 QComboBox* fIFScaleComboBox;
98
99 QDoubleSpinBox* fLOSpinBox;
100 QComboBox* fLOScaleComboBox;
101
102 QLabel* fIMResultLabel;
103
104 QPushButton* docsButton;
105
106 // Constants
107
110 enum InjectionMode {
111 LowSide = 0,
112 HighSide = 1
113 };
114
117 enum FrequencyScale {
118 Hz = 0,
119 kHz = 1,
120 MHz = 2,
121 GHz = 3
122 };
123};
124
125#endif // IMAGEFREQUENCYCALCULATORDIALOG_H
A dialog for calculating the image frequency in superheterodyne receivers This calculator determines ...
Definition ImageFrequencyCalculatorDialog.h:32
~ImageFrequencyCalculatorDialog()
Destructor.
Definition ImageFrequencyCalculatorDialog.h:41
Utility functions needed across the whole project.
void showHTMLDocs(QString path)
Show HTML documentation in the web browser.
Definition showHTMLDocs.cpp:17