diff --git a/artemis.py b/artemis.py index 0ef3187..d338356 100644 --- a/artemis.py +++ b/artemis.py @@ -51,6 +51,7 @@ Ui_MainWindow, _ = uic.loadUiType(qt_creator_file) class Artemis(QMainWindow, Ui_MainWindow): + def __init__(self): super().__init__() self.setupUi(self) @@ -425,7 +426,6 @@ class Artemis(QMainWindow, Ui_MainWindow): # Set modulation filter screen. - self.modulation_list.addItems(Constants.MODULATIONS) self.search_bar_modulation.textEdited.connect(self.show_matching_modulations) self.apply_remove_modulation_filter_btn.set_texts(Constants.APPLY, Constants.REMOVE) self.apply_remove_modulation_filter_btn.set_slave_filters( @@ -440,7 +440,6 @@ class Artemis(QMainWindow, Ui_MainWindow): # Set location filter screen. - self.locations_list.addItems(Constants.LOCATIONS) self.search_bar_location.textEdited.connect(self.show_matching_locations) self.apply_remove_location_filter_btn.set_texts(Constants.APPLY, Constants.REMOVE) self.apply_remove_location_filter_btn.set_slave_filters( @@ -817,7 +816,7 @@ class Artemis(QMainWindow, Ui_MainWindow): @pyqtSlot() def download_db(self): if not self.download_window.isVisible(): - self.download_window.download_thread.start() + self.download_window.start_download() self.download_window.show() @pyqtSlot() @@ -912,6 +911,30 @@ class Artemis(QMainWindow, Ui_MainWindow): self.result_list.clear() self.result_list.addItems(self.signal_names) self.result_list.setCurrentItem(None) + self.modulation_list.addItems(self.collect_modulations()) + self.locations_list.addItems(self.collect_locations()) + + def collect_locations(self): + all_locs = self.db[Signal.LOCATION] + all_locs = list( + set( + all_locs[all_locs != Constants.UNKNOWN] + ) + ) + all_locs.sort() + all_locs.insert(0, Constants.UNKNOWN) + return all_locs + + def collect_modulations(self): + modulations = self.db[Signal.MODULATION] + modulations = list( + set( + modulations[modulations != Constants.UNKNOWN] + ) + ) + modulations.sort() + modulations.insert(0, Constants.UNKNOWN) + return modulations @pyqtSlot() def set_min_value_upper_limit(self, lower_combo_box, diff --git a/artemis.ui b/artemis.ui index 138febd..cffcd73 100644 --- a/artemis.ui +++ b/artemis.ui @@ -70,6 +70,12 @@ + + + 0 + 0 + + @@ -1845,781 +1851,917 @@ p, li { white-space: pre-wrap; } Frequency - - - - - - 0 - 0 - - - - - - - - - - true - - - - 0 - 0 - - - - - 12 - 75 - true - - - - ELF - - - true - - - - - - - true - - - - 12 - 75 - true - - - - SLF - - - true - - - - - - - true - - - - 12 - 75 - true - - - - ULF - - - true - - - - - - - true - - - - 12 - 75 - true - - - - VLF - - - true - - - - - - - true - - - - 12 - 75 - true - - - - LF - - - true - - - - - - - true - - - - 0 - 0 - - - - - 12 - 75 - true - - - - MF - - - true - - - - - - - true - - - - 0 - 0 - - - - - 12 - 75 - true - - - - HF - - - true - - - - - - - true - - - - 12 - 75 - true - - - - VHF - - - true - - - - - - - true - - - - 12 - 75 - true - - - - UHF - - - true - - - - - - - true - - - - 12 - 75 - true - - - - SHF - - - true - - - - - - - true - - - - 12 - 75 - true - - - - EHF - - - true - - - false - - - - - - - - - - Qt::Horizontal - - - - 24 - 20 - - - - - - - - - 0 - 0 - - - - - - - - - - - 12 - 75 - true - - - - Lower frequency - - - false - - - - - - - false - - - - 0 - 0 - - - - - 100 - 0 - - - - - 100 - 16777215 - - - - - 12 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1 - - - 100000000 - - - - - - - false - - - - 0 - 0 - - - - - 60 - 0 - - - - - 16777215 - 16777215 - - - - - 12 - 75 - true - - - - - - - MHz - - - 4 - - - false - - - 0 - - - - MHz + + + + + + + + + Qt::Horizontal - - - - Hz + + + 178 + 20 + - - - - kHz + + + + + + + 12 + 75 + true + - - - GHz + Include undefined frequencies - - - - - - - - 0 - 0 - - - - - 12 - 75 - true - - - - Confidence % - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - false - - - - 0 - 0 - - - - - 60 - 0 - - - - - 50 - 16777215 - - - - - 12 - - - - - - - false - - - Qt::AlignCenter - - - QAbstractSpinBox::UpDownArrows - - - - - - 100 - - - 0 - - - - - - - - 12 - 75 - true - - - - Upper frequency - - - false - - - - - - - false - - - - 0 - 0 - - - - - 100 - 0 - - - - - 100 - 16777215 - - - - - 12 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1 - - - 100000000 - - - 1 - - - - - - - false - - - - 0 - 0 - - - - - 60 - 0 - - - - - 16777215 - 16777215 - - - - - 12 - 75 - true - - - - - - - MHz - - - - MHz + + true - - - - Hz + + + + + + Qt::Horizontal - - - - kHz + + + 208 + 20 + - - - - GHz + + + + + + Qt::Horizontal - - - - - - - - 0 - 0 - - - - - 12 - 75 - true - - - - Confidence % - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - false - - - - 0 - 0 - - - - - 60 - 0 - - - - - 50 - 16777215 - - - - - 12 - - - - - - - false - - - Qt::AlignCenter - - - QAbstractSpinBox::UpDownArrows - - - - - - 100 - - - 0 - - - - - - - false - - - - 0 - 0 - - - - - 12 - 75 - false - true - false - - - - color: #9f9f9f; - - - Selected range: + + + 178 + 20 + + + + + + + + + 0 + 0 + + + + + + + + + + true + + + + 0 + 0 + + + + + 12 + 75 + true + + + + ELF + + + true + + + + + + + true + + + + 12 + 75 + true + + + + SLF + + + true + + + + + + + true + + + + 12 + 75 + true + + + + ULF + + + true + + + + + + + true + + + + 12 + 75 + true + + + + VLF + + + true + + + + + + + true + + + + 12 + 75 + true + + + + LF + + + true + + + + + + + true + + + + 0 + 0 + + + + + 12 + 75 + true + + + + MF + + + true + + + + + + + true + + + + 0 + 0 + + + + + 12 + 75 + true + + + + HF + + + true + + + + + + + true + + + + 12 + 75 + true + + + + VHF + + + true + + + + + + + true + + + + 12 + 75 + true + + + + UHF + + + true + + + + + + + true + + + + 12 + 75 + true + + + + SHF + + + true + + + + + + + true + + + + 12 + 75 + true + + + + EHF + + + true + + + false + + + + + + + + + + Qt::Horizontal + + + + 208 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 121 + 17 + + + + + + + + + 0 + 0 + + + + + + + + + + + 12 + 75 + true + + + + Lower frequency + + + false + + + + + + + false + + + + 0 + 0 + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + + 12 + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + 100000000 + + + + + + + false + + + + 0 + 0 + + + + + 60 + 0 + + + + + 16777215 + 16777215 + + + + + 12 + 75 + true + + + + + + + MHz + + + 4 + + + false + + + 0 + + + + MHz + + + + + Hz + + + + + kHz + + + + + GHz + + + + + + + + + 0 + 0 + + + + + 12 + 75 + true + + + + Confidence % + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + + 0 + 0 + + + + + 60 + 0 + + + + + 50 + 16777215 + + + + + 12 + + + + + + + false + + + Qt::AlignCenter + + + QAbstractSpinBox::UpDownArrows + + + + + + 100 + + + 0 + + + + + + + + 12 + 75 + true + + + + Upper frequency + + + false + + + + + + + false + + + + 0 + 0 + + + + + 100 + 0 + + + + + 100 + 16777215 + + + + + 12 + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + 100000000 + + + 1 + + + + + + + false + + + + 0 + 0 + + + + + 60 + 0 + + + + + 16777215 + 16777215 + + + + + 12 + 75 + true + + + + + + + MHz + + + + MHz + + + + + Hz + + + + + kHz + + + + + GHz + + + + + + + + + 0 + 0 + + + + + 12 + 75 + true + + + + Confidence % + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + + 0 + 0 + + + + + 60 + 0 + + + + + 50 + 16777215 + + + + + 12 + + + + + + + false + + + Qt::AlignCenter + + + QAbstractSpinBox::UpDownArrows + + + + + + 100 + + + 0 + + + + + + + false + + + + 0 + 0 + + + + + 12 + 75 + false + true + false + + + + color: #9f9f9f; + + + Selected range: Inactive - - - Qt::AlignCenter - - - - - - - - - - Qt::Horizontal - - - - 24 - 20 - - - - - - - - - 12 - 75 - true - - - - Include undefined frequencies - - - true - - - - - - - true - - - - 12 - 75 - true - - - - Apply - - - true - - - - - - - - 12 - 75 - true - - - - Reset - - + + + Qt::AlignCenter + + + + + + + + + + Qt::Horizontal + + + + 118 + 17 + + + + + + + + + + QLayout::SetDefaultConstraint + + + 0 + + + + + Qt::Horizontal + + + + 308 + 24 + + + + + + + + true + + + + 0 + 0 + + + + + 12 + 75 + true + + + + Apply + + + true + + + + + + + Qt::Horizontal + + + + 260 + 24 + + + + + + + + + + + + Qt::Horizontal + + + + 308 + 20 + + + + + + + + + 12 + 75 + true + + + + Reset + + + + + + + Qt::Horizontal + + + + 260 + 24 + + + + + + + @@ -2627,1376 +2769,85 @@ Inactive Bandwidth - - - - - Qt::Horizontal - - - - 44 - 20 - - - + + + + + + + Qt::Horizontal + + + + 246 + 20 + + + + + + + + + 12 + 75 + true + + + + Include undefined bandwidths + + + true + + + + + + + Qt::Horizontal + + + + 287 + 20 + + + + + - - - - - 0 - 0 - - - - - - - - - - false - - - - 0 - 0 - - - - - 100 - 0 - - - - - 100 - 16777215 - - - - - 12 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1 - - - 100000000 - - - 5000 - - - - - - - false - - - - 0 - 0 - - - - - 100 - 0 - - - - - 100 - 16777215 - - - - - 12 - - - - - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - 1 - - - 100000000 - - - 5000 - - - - - - - - 12 - 75 - true - - - - Upper band - - - false - - - - - - - false - - - - 0 - 0 - - - - - 60 - 0 - - - - - 50 - 16777215 - - - - - 12 - - - - - - - false - - - Qt::AlignCenter - - - QAbstractSpinBox::UpDownArrows - - - - - - 100 - - - 0 - - - - - - - - 0 - 0 - - - - - 12 - 75 - true - - - - Confidence % - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - false - - - - 0 - 0 - - - - - 60 - 0 - - - - - 16777215 - 16777215 - - - - - 12 - 75 - true - - - - - - - MHz - - - 4 - - - false - - - 0 - - - - MHz - - - - - Hz - - - - - kHz - - - - - GHz - - - - - - - - false - - - - 0 - 0 - - - - - 60 - 0 - - - - - 50 - 16777215 - - - - - 12 - - - - - - - false - - - Qt::AlignCenter - - - QAbstractSpinBox::UpDownArrows - - - - - - 100 - - - 0 - - - - - - - false - - - - 0 - 0 - - - - - 60 - 0 - - - - - 16777215 - 16777215 - - - - - 12 - 75 - true - - - - - - - MHz - - - - MHz - - - - - Hz - - - - - kHz - - - - - GHz - - - - - - - - - 0 - 0 - - - - - 12 - 75 - true - - - - Confidence % - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 12 - 75 - true - - - - Lower band - - - false - - - - - - - false - - - - 0 - 0 - - - - - 12 - 75 - false - true - false - - - - - - - Selected range: - -Inactive - - - Qt::AlignCenter - - - - - - - - - - Qt::Horizontal - - - - 44 - 20 - - - - - - - - true - - - - 12 - 75 - true - - - - Apply - - - true - - - - - - - - 12 - 75 - true - - - - Reset - - - - - - - - 12 - 75 - true - - - - Include undefined bandwidths - - - true - - - - - - - - Category - - - - - - Qt::Horizontal - - - - 102 - 20 - - - - - - - - - 50 - - - - - - 12 - 75 - true - - - - <html><head/><body><p>Keep all the signals which belong to <span style=" font-style:italic;">at least</span> one of the selected categories.</p></body></html> - - - - - - At least one selected - - - true - - - - - - - - 12 - 75 - true - - - - <html><head/><body><p>Keep all the signals which belong to <span style=" font-style:italic;">all </span>the selected categories.</p></body></html> - - - All selected - - - false - - - - - - - - - - Qt::Horizontal - - - - 102 - 20 - - - - - - - - - 0 - 0 - - - - - - - - 12 - 75 - true - - - - Number Stations - - - true - - - - - - - - 12 - 75 - true - - - - Time Signal - - - true - - - - - - - - 12 - 75 - true - - - - Interfering - - - true - - - - - - - - 12 - 75 - true - - - - Satellite - - - true - - - - - - - - 12 - 75 - true - - - - Navigation - - - true - - - - - - - - 12 - 75 - true - - - - Utility - - - true - - - - - - - - 12 - 75 - true - - - - Digital - - - true - - - - - - - - 12 - 75 - true - - - - Marine - - - true - - - - - - - - 12 - 75 - true - - - - Commercial - - - true - - - - - - - - 12 - 75 - true - - - - Inactive - - - true - - - - - - - - 12 - 75 - true - - - - Radar - - - true - - - - - - - - 12 - 75 - true - - - - Military - - - true - - - - - - - - 12 - 75 - true - - - - Active - - - true - - - - - - - - 12 - 75 - true - - - - HAM - - - true - - - - - - - - 12 - 75 - true - - - - Aviation - - - true - - - - - - - - 12 - 75 - true - - - - Analogue - - - true - - - - - - - - 12 - 75 - true - - - - Trunked - - - true - - - - - - - - - - true - - - - 12 - 75 - true - - - - Apply - - - true - - - - - - - - 12 - 75 - true - - - - Reset - - - - - - - - Mode - - - - - - Qt::Horizontal - - - - 170 - 20 - - - - - - - - - 12 - 75 - true - - - - Qt::NoFocus - - - QAbstractItemView::NoEditTriggers - - - QAbstractItemView::MultiSelection - - - QAbstractItemView::SelectItems - - - true - - - true - - - 1 - - - - 1 - - - - - - - - - 12 - 75 - true - - - - Include unknown modulations - - - true - - - - - - - - 12 - 75 - true - - - - Apply - - - true - - - - - - - - 12 - 75 - true - - - - Reset - - - - - - - Qt::Horizontal - - - - 171 - 20 - - - - - - - - Qt::Vertical - - - QSizePolicy::Minimum - - - - 20 - 20 - - - - - - - - - Modulation - - - - - - Qt::Horizontal - - - - 162 - 20 - - - - - - - - - - - - 0 - 0 - - - - - - - - - 0 - 0 - - - - - 20 - 20 - - - - - 20 - 20 - - - - - - - icons_imgs/search_icon.png - - - true - - - Qt::AlignCenter - - - - - - - - 12 - 50 - false - - - - QAbstractItemView::NoEditTriggers - - - QAbstractItemView::MultiSelection - - - - - - - - - - Qt::Horizontal - - - - 161 - 20 - - - - - - - - true - - - - 12 - 75 - true - - - - Apply - - - true - - - - - - - - 12 - 75 - true - - - - Reset - - - - - - - - Location - - - - - - Qt::Horizontal - - - - 162 - 20 - - - - - - - - - - - - - - - 0 - 0 - - - - - 20 - 20 - - - - - - - icons_imgs/search_icon.png - - - true - - - - - - - - 12 - - - - Qt::NoFocus - - - QAbstractItemView::MultiSelection - - - - - - - - - - Qt::Horizontal - - - - 161 - 20 - - - - - - - - - 12 - 75 - true - - - - Apply - - - true - - - - - - - - 12 - 75 - true - - - - Reset - - - false - - - - - - - - ACF - - - - - - Qt::Horizontal - - - - 52 - 22 - - - - - - - - - - - - - - 12 - 75 - true - - - - AC interval - - - - - + + + + + + Qt::Horizontal + + + + 44 + 20 + + + + + + + + + 0 + 0 + + + + + + + + - true + false @@ -4006,7 +2857,7 @@ Inactive - 80 + 100 0 @@ -4031,48 +2882,60 @@ Inactive 1 - 10000 + 100000000 - 50 + 5000 - - - - - 12 - 75 - true - + + + + false - - ms - - - - - - - Qt::Horizontal - - - - 49 - 20 - - - - - - - + 0 0 + + + 100 + 0 + + + + + 100 + 16777215 + + + + + 12 + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + 100000000 + + + 5000 + + + + + 12 @@ -4081,17 +2944,17 @@ Inactive - Confidence % + Upper band - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + false - - + + - true + false @@ -4139,145 +3002,2017 @@ Inactive - - - - - - false - - - - 0 - 0 - - - - - 12 - 75 - false - true - false - - - - - - - Selected range: + + + + + 0 + 0 + + + + + 12 + 75 + true + + + + Confidence % + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + false + + + + 0 + 0 + + + + + 60 + 0 + + + + + 16777215 + 16777215 + + + + + 12 + 75 + true + + + + + + + MHz + + + 4 + + + false + + + 0 + + + + MHz + + + + + Hz + + + + + kHz + + + + + GHz + + + + + + + + false + + + + 0 + 0 + + + + + 60 + 0 + + + + + 50 + 16777215 + + + + + 12 + + + + + + + false + + + Qt::AlignCenter + + + QAbstractSpinBox::UpDownArrows + + + + + + 100 + + + 0 + + + + + + + false + + + + 0 + 0 + + + + + 60 + 0 + + + + + 16777215 + 16777215 + + + + + 12 + 75 + true + + + + + + + MHz + + + + MHz + + + + + Hz + + + + + kHz + + + + + GHz + + + + + + + + + 0 + 0 + + + + + 12 + 75 + true + + + + Confidence % + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 12 + 75 + true + + + + Lower band + + + false + + + + + + + false + + + + 0 + 0 + + + + + 12 + 75 + false + true + false + + + + + + + Selected range: Inactive - - - Qt::AlignCenter - - - - - + + + Qt::AlignCenter + + + + + + + + + + Qt::Horizontal + + + + 44 + 20 + + + + + - - + + + + + + Qt::Horizontal + + + + 349 + 20 + + + + + + + + true + + + + 12 + 75 + true + + + + Apply + + + true + + + + + + + Qt::Horizontal + + + + 308 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 349 + 20 + + + + + + + + + 12 + 75 + true + + + + Reset + + + + + + + Qt::Horizontal + + + + 308 + 20 + + + + + + + + + + + Category + + + + + + + + Qt::Horizontal + + + + 102 + 20 + + + + + + + + + 50 + + + + + + 12 + 75 + true + + + + <html><head/><body><p>Keep all the signals which belong to <span style=" font-style:italic;">at least</span> one of the selected categories.</p></body></html> + + + + + + At least one selected + + + true + + + + + + + + 12 + 75 + true + + + + <html><head/><body><p>Keep all the signals which belong to <span style=" font-style:italic;">all </span>the selected categories.</p></body></html> + + + All selected + + + false + + + + + + + + + + Qt::Horizontal + + + + 102 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + + + + 12 + 75 + true + + + + Number Stations + + + true + + + + + + + + 12 + 75 + true + + + + Time Signal + + + true + + + + + + + + 12 + 75 + true + + + + Interfering + + + true + + + + + + + + 12 + 75 + true + + + + Satellite + + + true + + + + + + + + 12 + 75 + true + + + + Navigation + + + true + + + + + + + + 12 + 75 + true + + + + Utility + + + true + + + + + + + + 12 + 75 + true + + + + Digital + + + true + + + + + + + + 12 + 75 + true + + + + Marine + + + true + + + + + + + + 12 + 75 + true + + + + Commercial + + + true + + + + + + + + 12 + 75 + true + + + + Inactive + + + true + + + + + + + + 12 + 75 + true + + + + Radar + + + true + + + + + + + + 12 + 75 + true + + + + Military + + + true + + + + + + + + 12 + 75 + true + + + + Active + + + true + + + + + + + + 12 + 75 + true + + + + HAM + + + true + + + + + + + + 12 + 75 + true + + + + Aviation + + + true + + + + + + + + 12 + 75 + true + + + + Analogue + + + true + + + + + + + + 12 + 75 + true + + + + Trunked + + + true + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 368 + 20 + + + + + + + + true + + + + 12 + 75 + true + + + + Apply + + + true + + + + + + + Qt::Horizontal + + + + 368 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 368 + 20 + + + + + + + + + 12 + 75 + true + + + + Reset + + + + + + + Qt::Horizontal + + + + 368 + 20 + + + + + + + + + + + Mode + + + + + + + + Qt::Horizontal + + + + 248 + 20 + + + + + + + + + 12 + 75 + true + + + + Include unknown modulations + + + true + + + + + + + Qt::Horizontal + + + + 228 + 20 + + + + + + + + - Qt::Horizontal + Qt::Vertical + + + QSizePolicy::Minimum - 51 + 20 20 - - - - - 12 - 75 - true - - - - Include undefined ACFs - - - true - - + + + + + + Qt::Horizontal + + + + 171 + 20 + + + + + + + + + 0 + 0 + + + + + 12 + 75 + true + + + + Qt::NoFocus + + + QAbstractItemView::NoEditTriggers + + + QAbstractItemView::MultiSelection + + + QAbstractItemView::SelectItems + + + true + + + true + + + 1 + + + + 1 + + + + + + + + Qt::Horizontal + + + + 170 + 20 + + + + + - - - - - 12 - 75 - true - - - - Apply - - - true - - + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + 12 + 75 + true + + + + Apply + + + true + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + - - - - - 12 - 75 - true - - - - Reset - - - false - - + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + 12 + 75 + true + + + + Reset + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + - - - - - 12 - 75 - true - - - - Info - - + + + + + Modulation + + + + + + + + Qt::Horizontal + + + + 162 + 20 + + + + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 20 + 20 + + + + + 20 + 20 + + + + + + + icons_imgs/search_icon.png + + + true + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 12 + 50 + false + + + + QAbstractItemView::NoEditTriggers + + + QAbstractItemView::MultiSelection + + + + + + + + + + Qt::Horizontal + + + + 161 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + true + + + + 12 + 75 + true + + + + Apply + + + true + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + 12 + 75 + true + + + + Reset + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + + + Location + + + + + + + + Qt::Horizontal + + + + 162 + 20 + + + + + + + + + + + + 0 + 0 + + + + + + + + + 0 + 0 + + + + + 20 + 20 + + + + + + + icons_imgs/search_icon.png + + + true + + + + + + + + 0 + 0 + + + + + 12 + + + + Qt::NoFocus + + + QAbstractItemView::MultiSelection + + + + + + + + + + Qt::Horizontal + + + + 161 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + 12 + 75 + true + + + + Apply + + + true + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + 12 + 75 + true + + + + Reset + + + false + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + + + ACF + + + + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + 12 + 75 + true + + + + Info + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 288 + 20 + + + + + + + + + 12 + 75 + true + + + + Include undefined ACFs + + + true + + + + + + + Qt::Horizontal + + + + 288 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 52 + 22 + + + + + + + + + + + + + + 12 + 75 + true + + + + AC interval + + + + + + + true + + + + 0 + 0 + + + + + 80 + 0 + + + + + 100 + 16777215 + + + + + 12 + + + + + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 1 + + + 10000 + + + 50 + + + + + + + + 12 + 75 + true + + + + ms + + + + + + + Qt::Horizontal + + + + 49 + 20 + + + + + + + + + 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 + + + 0 + + + + + + + + + false + + + + 0 + 0 + + + + + 12 + 75 + false + true + false + + + + + + + Selected range: + +Inactive + + + Qt::AlignCenter + + + + + + + + + + Qt::Horizontal + + + + 51 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + 12 + 75 + true + + + + Apply + + + true + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + + + 12 + 75 + true + + + + Reset + + + false + + + + + + + Qt::Horizontal + + + + 378 + 20 + + + + + + + - - - true - - - - 15 - 75 - true - - - - - - - Reset all filters - - + + + + + Qt::Horizontal + + + + 308 + 20 + + + + + + + + true + + + + 15 + 75 + true + + + + + + + Reset all filters + + + + + + + Qt::Horizontal + + + + 328 + 20 + + + + + diff --git a/constants.py b/constants.py index cfe9260..0e88c0e 100644 --- a/constants.py +++ b/constants.py @@ -154,59 +154,3 @@ class Constants: UNKNOWN = "N/A" EXTRACTING_MSG = "Extracting..." EXTRACTING_CODE = -1 - MODULATIONS = ("8VSB", - "AFSK", - "AM", - "BFSK", - "C4FM", - "CDMA", - "COFDM", - "CW", - "FFSK", - "FM", - "FMCW", - "FMOP", - "FSK", - "GFSK", - "GMSK", - "IFK", - "MFSK", - "MSK", - "OFDM", - "OOK", - "PAM", - "PPM", - "PSK", - "QAM", - "TDMA",) - LOCATIONS = (UNKNOWN, - "Australia", - "Canada", - "Central Europe", - "China", - "Cyprus", - "Eastern Europe", - "Europe", - "Europe, japan and Asia", - "Exmouth, Australia", - "Finland", - "France", - "Germany", - "Home Base Mobile , AL", - "Hungary", - "Iran", - "Israel", - "Japan", - "LaMour, North Dakota", - "Lualualei, Hawaii", - "North America", - "North Korea", - "Poland", - "Romania", - "Ruda, Sweden", - "UK", - "United Kingdom", - "United States", - "Varberg, Sweden", - "World Wide", - "Worldwide",) diff --git a/download_window.py b/download_window.py index 014d216..6bf2831 100644 --- a/download_window.py +++ b/download_window.py @@ -23,18 +23,21 @@ class DownloadWindow(QWidget, Ui_Download_window): # Qt.WindowStaysOnTopHint ) - self.no_internet_msg = pop_up(self, title=Messages.NO_CONNECTION, - text=Messages.NO_CONNECTION_MSG, - connection=self.close) + self.__no_internet_msg = pop_up(self, title=Messages.NO_CONNECTION, + text=Messages.NO_CONNECTION_MSG, + connection=self.close) - self.bad_db_download_msg = pop_up(self, title=Messages.BAD_DOWNLOAD, - text=Messages.BAD_DOWNLOAD_MSG, - connection=self.close) + self.__bad_db_download_msg = pop_up(self, title=Messages.BAD_DOWNLOAD, + text=Messages.BAD_DOWNLOAD_MSG, + connection=self.close) - self.download_thread = DownloadThread() - self.download_thread.finished.connect(self.wait_close) - self.download_thread.progress.connect(self.__display_progress) - self.cancel_btn.clicked.connect(self.terminate_process) + self.__download_thread = DownloadThread() + self.__download_thread.finished.connect(self.__wait_close) + self.__download_thread.progress.connect(self.__display_progress) + self.cancel_btn.clicked.connect(self.__terminate_process) + + def start_download(self): + self.__download_thread.start() def __downlaod_format_str(self, n, speed): return f"Downloaded MB: {n}\nSpeed: {speed} MB/s" @@ -51,26 +54,26 @@ class DownloadWindow(QWidget, Ui_Download_window): self.status_lbl.setText(Constants.EXTRACTING_MSG + '\n') @pyqtSlot() - def terminate_process(self): - if self.download_thread.isRunning(): - self.download_thread.terminate() - self.download_thread.wait() + def __terminate_process(self): + if self.__download_thread.isRunning(): + self.__download_thread.terminate() + self.__download_thread.wait() self.close() @pyqtSlot() - def wait_close(self): - if self.download_thread.status is ThreadStatus.OK: + def __wait_close(self): + if self.__download_thread.status is ThreadStatus.OK: self.complete.emit() self.close() - elif self.download_thread.status is ThreadStatus.NO_CONNECTION_ERR: - self.no_internet_msg.show() - elif self.download_thread.status is ThreadStatus.BAD_DOWNLOAD_ERR: - self.bad_db_download_msg.show() + elif self.__download_thread.status is ThreadStatus.NO_CONNECTION_ERR: + self.__no_internet_msg.show() + elif self.__download_thread.status is ThreadStatus.BAD_DOWNLOAD_ERR: + self.__bad_db_download_msg.show() else: self.close() def reject(self): - if self.download_thread.isRunning(): - self.download_thread.terminate() - self.download_thread.wait() + if self.__download_thread.isRunning(): + self.__download_thread.terminate() + self.__download_thread.wait() super().reject() diff --git a/switchable_label.py b/switchable_label.py index 69773d0..daffe0e 100644 --- a/switchable_label.py +++ b/switchable_label.py @@ -74,10 +74,9 @@ class MultiColorSwitchableLabel(_BaseSwitchableLabel): def switch_on(self): if 5 <= self.level <= 9: super().switch_on() - self.setStyleSheet(f"color: {self.LEVEL_COLORS[self.level]}" - # f"""background-color: {self.LEVEL_COLORS[self.level]}; - # color: #000000; - # """ + self.setStyleSheet( + f"""color: {self.LEVEL_COLORS[self.level]}; + text-decoration: underline;""" ) def switch_off(self): diff --git a/weatherdata.py b/weatherdata.py index d3ebc20..525f636 100644 --- a/weatherdata.py +++ b/weatherdata.py @@ -143,10 +143,13 @@ class ForecastData(_BaseWeatherData): ] def _parse_data(self): - self.forecast = self.forecast.splitlines() # Remove possible '(G\d)' from the kp_index table + self.forecast = re.sub( + '\(G\d\)', lambda obj: '', self.forecast + ) + self.forecast = self.forecast.splitlines() self.probabilities = re.sub( - '(G\d)', lambda obj: '', self.probabilities + '\(G\d\)', lambda obj: '', self.probabilities ) self.probabilities = self.probabilities.splitlines()