diff --git a/main.py b/main.py
index 402f20e..8f572c7 100644
--- a/main.py
+++ b/main.py
@@ -66,8 +66,8 @@ class MyApp(QMainWindow, Ui_MainWindow):
self.lower_freq_confidence.value()
)
)
- self.apply_reset_freq_filter_btn.set_texts("Apply", "Remove")
- self.apply_reset_freq_filter_btn.set_slave_filters(
+ self.apply_remove_freq_filter_btn.set_texts("Apply", "Remove")
+ self.apply_remove_freq_filter_btn.set_slave_filters(
*self.frequency_filters_btns,
self.lower_freq_spinbox,
self.upper_freq_spinbox,
@@ -75,8 +75,9 @@ class MyApp(QMainWindow, Ui_MainWindow):
self.upper_freq_filter_unit,
self.lower_freq_confidence,
self.upper_freq_confidence,
+ self.include_undef_freqs,
)
- self.apply_reset_freq_filter_btn.clicked.connect(self.display_signals)
+ self.apply_remove_freq_filter_btn.clicked.connect(self.display_signals)
self.reset_frequency_filters_btn.clicked.connect(self.reset_frequency_filters)
UrlColors = namedtuple("UrlColors", ["inactive", "active", "clicked"])
self.url_button.colors = UrlColors("#9f9f9f", "#4c75ff", "#942ccc")
@@ -132,20 +133,6 @@ class MyApp(QMainWindow, Ui_MainWindow):
BandLabel(self.ehf_left, self.ehf, self.ehf_right),
]
- def reset_frequency_filters(self):
- if self.apply_reset_freq_filter_btn.isChecked():
- self.apply_reset_freq_filter_btn.setChecked(False)
- self.apply_reset_freq_filter_btn.clicked.emit()
- for f in self.frequency_filters_btns:
- if f.isChecked():
- f.setChecked(False)
- self.lower_freq_spinbox.setValue(0)
- self.upper_freq_spinbox.setValue(0)
- self.lower_freq_filter_unit.setCurrentText("MHz")
- self.upper_freq_filter_unit.setCurrentText("MHz")
- self.lower_freq_confidence.setValue(5)
- self.upper_freq_confidence.setValue(5)
-
def set_initial_size(self):
"""
Function to handle high resolution screens. The function sets bigger sizes
@@ -242,12 +229,31 @@ class MyApp(QMainWindow, Ui_MainWindow):
self.frequency_filters_ok(signal):
self.result_list.addItem(signal)
+ def reset_frequency_filters(self):
+ if self.apply_remove_freq_filter_btn.isChecked():
+ self.apply_remove_freq_filter_btn.setChecked(False)
+ self.apply_remove_freq_filter_btn.clicked.emit()
+ for f in self.frequency_filters_btns:
+ if f.isChecked():
+ f.setChecked(False)
+ if self.include_undef_freqs.isChecked():
+ self.include_undef_freqs.setChecked(False)
+ self.lower_freq_spinbox.setValue(0)
+ self.upper_freq_spinbox.setValue(0)
+ self.lower_freq_filter_unit.setCurrentText("MHz")
+ self.upper_freq_filter_unit.setCurrentText("MHz")
+ self.lower_freq_confidence.setValue(5)
+ self.upper_freq_confidence.setValue(5)
+
def frequency_filters_ok(self, signal_name):
- if not self.apply_reset_freq_filter_btn.isChecked():
+ if not self.apply_remove_freq_filter_btn.isChecked():
return True
undef_freq, _ = self.find_if_undefined(self.db.loc[signal_name])
if undef_freq:
- return True
+ if self.include_undef_freqs.isChecked():
+ return True
+ else:
+ return False
conversion_factors = {"Hz":1, "kHz":1000, "MHz":1000000,
"GHz":1000000000}
diff --git a/main_window.ui b/main_window.ui
index cb9b000..fc93f79 100644
--- a/main_window.ui
+++ b/main_window.ui
@@ -1979,7 +1979,24 @@ QPushButton:checked {
- -
+
-
+
+
+
+ 10
+ 75
+ true
+
+
+
+ Include undefined frequencies
+
+
+ true
+
+
+
+ -
true
@@ -2005,7 +2022,7 @@ QPushButton:checked {
- -
+
-
true
@@ -2025,7 +2042,7 @@ QPushButton:checked {
- -
+
-
true
@@ -2045,7 +2062,7 @@ QPushButton:checked {
- -
+
-
true
@@ -2065,7 +2082,7 @@ QPushButton:checked {
- -
+
-
true
@@ -2085,7 +2102,7 @@ QPushButton:checked {
- -
+
-
true
@@ -2111,7 +2128,7 @@ QPushButton:checked {
- -
+
-
true
@@ -2137,7 +2154,7 @@ QPushButton:checked {
- -
+
-
true
@@ -2157,7 +2174,7 @@ QPushButton:checked {
- -
+
-
true
@@ -2177,7 +2194,7 @@ QPushButton:checked {
- -
+
-
true
@@ -2197,7 +2214,7 @@ QPushButton:checked {
- -
+
-
true
@@ -2241,7 +2258,30 @@ QPushButton:checked {
-
-
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 12
+ 75
+ true
+
+
+
+ Upper frequency
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
true
@@ -2277,30 +2317,7 @@ QPushButton:checked {
- -
-
-
-
- 0
- 0
-
-
-
-
- 12
- 75
- true
-
-
-
- Upper frequency
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
+
-
true
@@ -2355,55 +2372,7 @@ QPushButton:checked {
- -
-
-
- true
-
-
-
- 0
- 0
-
-
-
-
- 60
- 0
-
-
-
-
- 50
- 16777215
-
-
-
-
- 12
-
-
-
- false
-
-
- Qt::AlignCenter
-
-
- QAbstractSpinBox::UpDownArrows
-
-
-
-
-
- 100
-
-
- 5
-
-
-
- -
+
-
true
@@ -2451,7 +2420,7 @@ QPushButton:checked {
- -
+
-
@@ -2475,29 +2444,6 @@ QPushButton:checked {
-
-
-
-
- 0
- 0
-
-
-
-
- 12
- 75
- true
-
-
-
- Confidence %
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
@@ -2520,7 +2466,7 @@ QPushButton:checked {
- -
+
-
true
@@ -2559,7 +2505,7 @@ QPushButton:checked {
- -
+
-
true
@@ -2623,6 +2569,77 @@ QPushButton:checked {
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 12
+ 75
+ true
+
+
+
+ Confidence %
+
+
+ Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
+
+
+
+ -
+
+
+ true
+
+
+
+ 0
+ 0
+
+
+
+
+ 60
+ 0
+
+
+
+
+ 50
+ 16777215
+
+
+
+
+ 12
+
+
+
+ false
+
+
+ Qt::AlignCenter
+
+
+ QAbstractSpinBox::UpDownArrows
+
+
+
+
+
+ 100
+
+
+ 5
+
+
+
@@ -2630,7 +2647,7 @@ QPushButton:checked {
-
-
+
true