Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
free_space_loss.h
1
7
8#ifndef FREE_SPACE_ATTENUATION_H
9#define FREE_SPACE_ATTENUATION_H
10
11#include <QDialog>
13#include "Misc/general.h"
14
16class QLabel;
17class QPushButton;
18class QComboBox;
19class QGroupBox;
20class QTableWidget;
21
34class FreeSpaceAttenuationDialog : public QDialog {
35 Q_OBJECT
36public:
39 explicit FreeSpaceAttenuationDialog(QWidget *parent = nullptr);
40
41private slots:
43 void computePathLoss();
44
46 void on_inputChanged();
47
49 void showDocumentation() {
50 QString path = QString("/Calculators/FreeSpaceLoss/index.html");
51 showHTMLDocs(path);
52 }
53
54private:
55 // ========== Input Widgets ==========
56
58 CustomDoubleSpinBox *spinFrequency;
59
61 QComboBox *comboFreqUnits;
62
64 CustomDoubleSpinBox *spinDistance;
65
67 QComboBox *comboDistanceUnits;
68
70 CustomDoubleSpinBox *spinGainTX;
71
73 CustomDoubleSpinBox *spinGainRX;
74
76 QPushButton* docsButton;
77
78
79 // Distance labels
80 QLabel *label_d_4;
81 QLabel *label_d_2;
82 QLabel *label_d;
83 QLabel *label_dx2;
84 QLabel *label_dx4;
85
86 // ========== Output Display ==========
87
89 QTableWidget *resultsTable;
90
91 // ========== Helper Functions ==========
92
97 double convertFrequencyToHz(double freq, const QString &units) const;
98
103 double convertDistanceToMeters(double distance, const QString &units) const;
104
111 double calculateFSPL(double freqHz, double distanceM, double gainTX, double gainRX) const;
112
116 QString formatDistance(double distanceM) const;
117};
118
119#endif // FREE_SPACE_ATTENUATION_H
Custom QDoubleSpinBox. It includes a context menu (right-click) for setting the minimum,...
A QDoubleSpinBox subclass that provides a context menu for configuring range and step.
Definition CustomDoubleSpinBox.h:28
Dialog for calculating free space path loss.
Definition free_space_loss.h:34
Utility functions needed across the whole project.
void showHTMLDocs(QString path)
Show HTML documentation in the web browser.
Definition showHTMLDocs.cpp:17