Fix bug in reset of mode filters. Make forecast labels theme-dependent.
This commit is contained in:
166
artemis.py
166
artemis.py
@@ -1,5 +1,4 @@
|
|||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from itertools import chain
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
import webbrowser
|
import webbrowser
|
||||||
import os
|
import os
|
||||||
@@ -31,8 +30,7 @@ from constants import (Constants,
|
|||||||
Database,
|
Database,
|
||||||
ChecksumWhat,
|
ChecksumWhat,
|
||||||
Messages,
|
Messages,
|
||||||
Signal,
|
Signal,)
|
||||||
Colors,)
|
|
||||||
from themes import Theme
|
from themes import Theme
|
||||||
from utilities import (checksum_ok,
|
from utilities import (checksum_ok,
|
||||||
uncheck_and_emit,
|
uncheck_and_emit,
|
||||||
@@ -64,6 +62,66 @@ class Artemis(QMainWindow, Ui_MainWindow):
|
|||||||
self.current_signal_name = ''
|
self.current_signal_name = ''
|
||||||
self.signal_names = []
|
self.signal_names = []
|
||||||
self.total_signals = 0
|
self.total_signals = 0
|
||||||
|
self.switchable_r_labels = SwitchableLabelsIterable(self.r0_now_lbl,
|
||||||
|
self.r1_now_lbl,
|
||||||
|
self.r2_now_lbl,
|
||||||
|
self.r3_now_lbl,
|
||||||
|
self.r4_now_lbl,
|
||||||
|
self.r5_now_lbl,)
|
||||||
|
|
||||||
|
self.switchable_s_labels = SwitchableLabelsIterable(self.s0_now_lbl,
|
||||||
|
self.s1_now_lbl,
|
||||||
|
self.s2_now_lbl,
|
||||||
|
self.s3_now_lbl,
|
||||||
|
self.s4_now_lbl,
|
||||||
|
self.s5_now_lbl,)
|
||||||
|
|
||||||
|
self.switchable_g_now_labels = SwitchableLabelsIterable(self.g0_now_lbl,
|
||||||
|
self.g1_now_lbl,
|
||||||
|
self.g2_now_lbl,
|
||||||
|
self.g3_now_lbl,
|
||||||
|
self.g4_now_lbl,
|
||||||
|
self.g5_now_lbl)
|
||||||
|
|
||||||
|
self.switchable_g_today_labels = SwitchableLabelsIterable(self.g0_today_lbl,
|
||||||
|
self.g1_today_lbl,
|
||||||
|
self.g2_today_lbl,
|
||||||
|
self.g3_today_lbl,
|
||||||
|
self.g4_today_lbl,
|
||||||
|
self.g5_today_lbl)
|
||||||
|
|
||||||
|
self.k_storm_labels = SwitchableLabelsIterable(self.k_ex_sev_storm_lbl,
|
||||||
|
self.k_very_sev_storm_lbl,
|
||||||
|
self.k_sev_storm_lbl,
|
||||||
|
self.k_maj_storm_lbl,
|
||||||
|
self.k_min_storm_lbl,
|
||||||
|
self.k_active_lbl,
|
||||||
|
self.k_unsettled_lbl,
|
||||||
|
self.k_quiet_lbl,
|
||||||
|
self.k_very_quiet_lbl,
|
||||||
|
self.k_inactive_lbl)
|
||||||
|
|
||||||
|
self.a_storm_labels = SwitchableLabelsIterable(self.a_sev_storm_lbl,
|
||||||
|
self.a_maj_storm_lbl,
|
||||||
|
self.a_min_storm_lbl,
|
||||||
|
self.a_active_lbl,
|
||||||
|
self.a_unsettled_lbl,
|
||||||
|
self.a_quiet_lbl)
|
||||||
|
|
||||||
|
self.forecast_labels = (self.forecast_lbl_0,
|
||||||
|
self.forecast_lbl_1,
|
||||||
|
self.forecast_lbl_2,
|
||||||
|
self.forecast_lbl_3,
|
||||||
|
self.forecast_lbl_4,
|
||||||
|
self.forecast_lbl_5,
|
||||||
|
self.forecast_lbl_6,
|
||||||
|
self.forecast_lbl_7,
|
||||||
|
self.forecast_lbl_8)
|
||||||
|
|
||||||
|
for lab in self.forecast_labels:
|
||||||
|
lab.set_default_stylesheet()
|
||||||
|
|
||||||
|
self.forecast_label_container.labels = self.forecast_labels
|
||||||
self.theme = Theme(self)
|
self.theme = Theme(self)
|
||||||
|
|
||||||
# Manage frequency filters.
|
# Manage frequency filters.
|
||||||
@@ -377,92 +435,6 @@ class Artemis(QMainWindow, Ui_MainWindow):
|
|||||||
self.update_now_bar.set_idle()
|
self.update_now_bar.set_idle()
|
||||||
self.space_weather_data = SpaceWeatherData()
|
self.space_weather_data = SpaceWeatherData()
|
||||||
self.space_weather_data.update_complete.connect(self.update_space_weather)
|
self.space_weather_data.update_complete.connect(self.update_space_weather)
|
||||||
self.switchable_r_labels = SwitchableLabelsIterable(self.r0_now_lbl,
|
|
||||||
self.r1_now_lbl,
|
|
||||||
self.r2_now_lbl,
|
|
||||||
self.r3_now_lbl,
|
|
||||||
self.r4_now_lbl,
|
|
||||||
self.r5_now_lbl,)
|
|
||||||
self.switchable_s_labels = SwitchableLabelsIterable(self.s0_now_lbl,
|
|
||||||
self.s1_now_lbl,
|
|
||||||
self.s2_now_lbl,
|
|
||||||
self.s3_now_lbl,
|
|
||||||
self.s4_now_lbl,
|
|
||||||
self.s5_now_lbl,)
|
|
||||||
self.switchable_g_now_labels = SwitchableLabelsIterable(self.g0_now_lbl,
|
|
||||||
self.g1_now_lbl,
|
|
||||||
self.g2_now_lbl,
|
|
||||||
self.g3_now_lbl,
|
|
||||||
self.g4_now_lbl,
|
|
||||||
self.g5_now_lbl)
|
|
||||||
self.switchable_g_today_labels = SwitchableLabelsIterable(self.g0_today_lbl,
|
|
||||||
self.g1_today_lbl,
|
|
||||||
self.g2_today_lbl,
|
|
||||||
self.g3_today_lbl,
|
|
||||||
self.g4_today_lbl,
|
|
||||||
self.g5_today_lbl)
|
|
||||||
colors_array = [[Colors.WHITE_LIGHT, Colors.WHITE_DARK],
|
|
||||||
[Colors.BLUE_LIGHT, Colors.BLUE_DARK],
|
|
||||||
[Colors.GREEN_LIGHT, Colors.GREEN_DARK],
|
|
||||||
[Colors.YELLOW_LIGHT, Colors.YELLOW_DARK],
|
|
||||||
[Colors.ORANGE_LIGHT, Colors.ORANGE_DARK],
|
|
||||||
[Colors.RED_LIGHT, Colors.RED_DARK]]
|
|
||||||
|
|
||||||
for lab, [light_color, dark_color] in zip(chain(self.switchable_r_labels,
|
|
||||||
self.switchable_s_labels,
|
|
||||||
self.switchable_g_now_labels,
|
|
||||||
self.switchable_g_today_labels),
|
|
||||||
colors_array * 4):
|
|
||||||
lab.set_colors(None, None)
|
|
||||||
|
|
||||||
k_storms_colors = [[Colors.RED_LIGHT, Colors.RED_DARK],
|
|
||||||
[Colors.RED2_LIGHT, Colors.RED2_DARK],
|
|
||||||
[Colors.RED3_LIGHT, Colors.RED3_DARK],
|
|
||||||
[Colors.ORANGE2_LIGHT, Colors.ORANGE2_DARK],
|
|
||||||
[Colors.ORANGE_LIGHT, Colors.ORANGE_DARK],
|
|
||||||
[Colors.YELLOW_LIGHT, Colors.YELLOW_DARK],
|
|
||||||
[Colors.GREEN2_LIGHT, Colors.GREEN2_DARK],
|
|
||||||
[Colors.GREEN3_LIGHT, Colors.GREEN3_DARK],
|
|
||||||
[Colors.GREEN_LIGHT, Colors.GREEN_DARK],
|
|
||||||
[Colors.BLUE_LIGHT, Colors.BLUE_DARK]]
|
|
||||||
a_storm_colors = [[Colors.RED_LIGHT, Colors.RED_DARK],
|
|
||||||
[Colors.ORANGE2_LIGHT, Colors.ORANGE2_DARK],
|
|
||||||
[Colors.ORANGE_LIGHT, Colors.ORANGE_DARK],
|
|
||||||
[Colors.YELLOW_LIGHT, Colors.YELLOW_DARK],
|
|
||||||
[Colors.GREEN_LIGHT, Colors.GREEN_DARK],
|
|
||||||
[Colors.BLUE_LIGHT, Colors.BLUE_DARK]]
|
|
||||||
|
|
||||||
self.k_storm_labels = SwitchableLabelsIterable(self.k_ex_sev_storm_lbl,
|
|
||||||
self.k_very_sev_storm_lbl,
|
|
||||||
self.k_sev_storm_lbl,
|
|
||||||
self.k_maj_storm_lbl,
|
|
||||||
self.k_min_storm_lbl,
|
|
||||||
self.k_active_lbl,
|
|
||||||
self.k_unsettled_lbl,
|
|
||||||
self.k_quiet_lbl,
|
|
||||||
self.k_very_quiet_lbl,
|
|
||||||
self.k_inactive_lbl)
|
|
||||||
self.a_storm_labels = SwitchableLabelsIterable(self.a_sev_storm_lbl,
|
|
||||||
self.a_maj_storm_lbl,
|
|
||||||
self.a_min_storm_lbl,
|
|
||||||
self.a_active_lbl,
|
|
||||||
self.a_unsettled_lbl,
|
|
||||||
self.a_quiet_lbl)
|
|
||||||
|
|
||||||
for lab, [light_color, dark_color] in zip(chain(self.k_storm_labels, self.a_storm_labels),
|
|
||||||
chain(k_storms_colors, a_storm_colors)):
|
|
||||||
lab.set_colors(None, None)
|
|
||||||
|
|
||||||
self.forecast_labels = (self.forecast_lbl_0,
|
|
||||||
self.forecast_lbl_1,
|
|
||||||
self.forecast_lbl_2,
|
|
||||||
self.forecast_lbl_3,
|
|
||||||
self.forecast_lbl_4,
|
|
||||||
self.forecast_lbl_5,
|
|
||||||
self.forecast_lbl_6,
|
|
||||||
self.forecast_lbl_7,
|
|
||||||
self.forecast_lbl_8)
|
|
||||||
self.forecast_label_container.labels = self.forecast_labels
|
|
||||||
|
|
||||||
# Final operations.
|
# Final operations.
|
||||||
self.theme.initialize()
|
self.theme.initialize()
|
||||||
@@ -608,9 +580,7 @@ class Artemis(QMainWindow, Ui_MainWindow):
|
|||||||
elif k_index_24_hmax == 9:
|
elif k_index_24_hmax == 9:
|
||||||
self.switchable_g_today_labels.switch_on(self.g5_today_lbl)
|
self.switchable_g_today_labels.switch_on(self.g5_today_lbl)
|
||||||
self.expected_noise_lbl.setText(" S30+ (>>-60 dBm) ")
|
self.expected_noise_lbl.setText(" S30+ (>>-60 dBm) ")
|
||||||
self.expected_noise_lbl.setStyleSheet(f"""
|
self.expected_noise_lbl.switch_on()
|
||||||
color:#ffffff;
|
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #4776e6 ,stop: 1 #8e54e9);""")
|
|
||||||
|
|
||||||
val = int(self.space_weather_data.ak_index[7][2].replace('.', ''))
|
val = int(self.space_weather_data.ak_index[7][2].replace('.', ''))
|
||||||
self.sfi_lbl.setText(f"{val}")
|
self.sfi_lbl.setText(f"{val}")
|
||||||
@@ -618,10 +588,9 @@ class Artemis(QMainWindow, Ui_MainWindow):
|
|||||||
self.sn_lbl.setText(f"{val:d}")
|
self.sn_lbl.setText(f"{val:d}")
|
||||||
|
|
||||||
for label, pixmap in zip(self.forecast_labels, self.space_weather_data.images):
|
for label, pixmap in zip(self.forecast_labels, self.space_weather_data.images):
|
||||||
label.setText('')
|
|
||||||
label.pixmap = pixmap
|
label.pixmap = pixmap
|
||||||
label.setPixmap(pixmap.scaled(label.size(), Qt.IgnoreAspectRatio, Qt.SmoothTransformation))
|
label.make_transparent()
|
||||||
label.setStyleSheet("background-color: transparent;")
|
label.apply_pixmap()
|
||||||
else:
|
else:
|
||||||
pop_up(self, title = Messages.BAD_DOWNLOAD,
|
pop_up(self, title = Messages.BAD_DOWNLOAD,
|
||||||
text = Messages.BAD_DOWNLOAD_MSG).show()
|
text = Messages.BAD_DOWNLOAD_MSG).show()
|
||||||
@@ -998,8 +967,15 @@ class Artemis(QMainWindow, Ui_MainWindow):
|
|||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def reset_mode_filters(self):
|
def reset_mode_filters(self):
|
||||||
uncheck_and_emit(self.apply_remove_mode_filter_btn)
|
uncheck_and_emit(self.apply_remove_mode_filter_btn)
|
||||||
|
parents = Constants.MODES.keys()
|
||||||
|
selected_children = []
|
||||||
for item in self.mode_tree_widget.selectedItems():
|
for item in self.mode_tree_widget.selectedItems():
|
||||||
|
if item.text(0) in parents:
|
||||||
item.setSelected(False)
|
item.setSelected(False)
|
||||||
|
else:
|
||||||
|
selected_children.append(item)
|
||||||
|
for children in selected_children:
|
||||||
|
children.setSelected(False)
|
||||||
if self.include_unknown_modes_btn.isChecked():
|
if self.include_unknown_modes_btn.isChecked():
|
||||||
self.include_unknown_modes_btn.setChecked(False)
|
self.include_unknown_modes_btn.setChecked(False)
|
||||||
|
|
||||||
|
|||||||
451
artemis.ui
451
artemis.ui
@@ -4678,6 +4678,22 @@ www.qrg.globaltuners.com</string>
|
|||||||
<string>Now</string>
|
<string>Now</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridLayout_22">
|
<layout class="QGridLayout" name="gridLayout_22">
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="Line" name="line">
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Sunken</enum>
|
||||||
|
</property>
|
||||||
|
<property name="lineWidth">
|
||||||
|
<number>1</number>
|
||||||
|
</property>
|
||||||
|
<property name="midLineWidth">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QWidget" name="widget_12" native="true">
|
<widget class="QWidget" name="widget_12" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -5115,7 +5131,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>N/A</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -5160,7 +5176,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>N/A</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -5194,8 +5210,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>EXTREMELY SEVERE
|
<string>EXTREMELY SEVERE
|
||||||
@@ -5222,8 +5237,7 @@ STORM</string>
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>VERY SEVERE STORM</string>
|
<string>VERY SEVERE STORM</string>
|
||||||
@@ -5249,8 +5263,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>SEVERE STORM</string>
|
<string>SEVERE STORM</string>
|
||||||
@@ -5276,8 +5289,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>MAJOR STORM</string>
|
<string>MAJOR STORM</string>
|
||||||
@@ -5303,8 +5315,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>MINOR STORM</string>
|
<string>MINOR STORM</string>
|
||||||
@@ -5330,8 +5341,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>ACTIVE</string>
|
<string>ACTIVE</string>
|
||||||
@@ -5357,8 +5367,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>UNSETTLED</string>
|
<string>UNSETTLED</string>
|
||||||
@@ -5384,8 +5393,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>QUIET</string>
|
<string>QUIET</string>
|
||||||
@@ -5411,8 +5419,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>VERY QUIET</string>
|
<string>VERY QUIET</string>
|
||||||
@@ -5438,8 +5445,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>INACTIVE</string>
|
<string>INACTIVE</string>
|
||||||
@@ -5480,8 +5486,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>SEVERE STORM</string>
|
<string>SEVERE STORM</string>
|
||||||
@@ -5507,8 +5512,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>MAJOR STORM</string>
|
<string>MAJOR STORM</string>
|
||||||
@@ -5534,8 +5538,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>MINOR STORM</string>
|
<string>MINOR STORM</string>
|
||||||
@@ -5561,8 +5564,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>ACTIVE</string>
|
<string>ACTIVE</string>
|
||||||
@@ -5588,8 +5590,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>UNSETTLED</string>
|
<string>UNSETTLED</string>
|
||||||
@@ -5615,8 +5616,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>QUIET</string>
|
<string>QUIET</string>
|
||||||
@@ -5668,7 +5668,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>N/A</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -5713,7 +5713,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>N/A</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -6083,7 +6083,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>N/A</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
@@ -6095,22 +6095,6 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="Line" name="line">
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Sunken</enum>
|
|
||||||
</property>
|
|
||||||
<property name="lineWidth">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<property name="midLineWidth">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QWidget" name="widget_13" native="true">
|
<widget class="QWidget" name="widget_13" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -6135,6 +6119,8 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_43">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="widget_20" native="true">
|
<widget class="QWidget" name="widget_20" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -6143,178 +6129,235 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_23">
|
<layout class="QGridLayout" name="gridLayout_23" columnstretch="0,0">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_23">
|
<widget class="QLabel" name="label_23">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>11</pointsize>
|
<pointsize>13</pointsize>
|
||||||
<italic>true</italic>
|
<italic>false</italic>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>E.M.E</string>
|
<string>E.M.E→</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="alignment">
|
||||||
</item>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_24">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="margin">
|
||||||
<font>
|
<number>15</number>
|
||||||
<pointsize>11</pointsize>
|
|
||||||
<italic>true</italic>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Meteor Scatter</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_25">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>11</pointsize>
|
|
||||||
<italic>true</italic>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>M.U.F.</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_26">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>11</pointsize>
|
|
||||||
<italic>true</italic>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Hystorical Index</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_27">
|
<widget class="QLabel" name="label_27">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>11</pointsize>
|
<pointsize>13</pointsize>
|
||||||
<italic>true</italic>
|
<italic>false</italic>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>50 MHz in EU</string>
|
<string>50 MHz in EU→</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="alignment">
|
||||||
</item>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
<item row="5" column="0">
|
|
||||||
<widget class="QLabel" name="label_28">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="margin">
|
||||||
<font>
|
<number>15</number>
|
||||||
<pointsize>11</pointsize>
|
|
||||||
<italic>true</italic>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>70 MHz in EU</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0">
|
|
||||||
<widget class="QLabel" name="label_31">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>11</pointsize>
|
|
||||||
<italic>true</italic>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>144 MHz in EU</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0">
|
|
||||||
<widget class="QLabel" name="label_32">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>11</pointsize>
|
|
||||||
<italic>true</italic>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>144 MHz in NA</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0">
|
<item row="8" column="0">
|
||||||
<widget class="QLabel" name="label_33">
|
<widget class="QLabel" name="label_33">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>11</pointsize>
|
<pointsize>13</pointsize>
|
||||||
<italic>true</italic>
|
<italic>false</italic>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>VHF Aurora</string>
|
<string>VHF Aurora→</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>15</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="label_26">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>13</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Hystorical Index→</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>15</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="label_31">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>13</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>144 MHz in EU→</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>15</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_25">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>13</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>M.U.F.→</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>15</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_24">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>13</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Meteor Scatter→</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>15</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="label_32">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>13</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>144 MHz in NA→</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>15</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<widget class="QLabel" name="label_28">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>13</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>70 MHz in EU→</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>15</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -6346,11 +6389,10 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>OFF</string>
|
<string>NO DATA </string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
@@ -6379,11 +6421,10 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>OFF</string>
|
<string>NO DATA </string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
@@ -6409,11 +6450,10 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>OFF</string>
|
<string>NO DATA </string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
@@ -6439,11 +6479,10 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>OFF</string>
|
<string>NO DATA </string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
@@ -6469,11 +6508,10 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>OFF</string>
|
<string>NO DATA </string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
@@ -6499,11 +6537,10 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>OFF</string>
|
<string>NO DATA </string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
@@ -6529,11 +6566,10 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>OFF</string>
|
<string>NO DATA </string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
@@ -6559,11 +6595,10 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>OFF</string>
|
<string>NO DATA </string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
@@ -6589,11 +6624,10 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color:#ffffff;
|
<string notr="true"/>
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>OFF</string>
|
<string>NO DATA </string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
@@ -6609,6 +6643,8 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer_9">
|
<spacer name="verticalSpacer_9">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
@@ -6681,7 +6717,7 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="expected_noise_lbl">
|
<widget class="SwitchableLabel" name="expected_noise_lbl">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Minimum">
|
<sizepolicy hsizetype="Maximum" vsizetype="Minimum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -6690,17 +6726,20 @@ background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,sto
|
|||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>13</pointsize>
|
<pointsize>10</pointsize>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
<bold>true</bold>
|
<bold>true</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string> N/A </string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="margin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
27
constants.py
27
constants.py
@@ -66,30 +66,6 @@ class Database(object):
|
|||||||
Signal.SUP_BAND,
|
Signal.SUP_BAND,
|
||||||
Signal.CATEGORY_CODE,)
|
Signal.CATEGORY_CODE,)
|
||||||
|
|
||||||
class Colors(object):
|
|
||||||
RED_DARK = "#4d0000"
|
|
||||||
RED_LIGHT = "#ff0000"
|
|
||||||
RED2_DARK = "#4c0c00"
|
|
||||||
RED2_LIGHT = "#ff2700"
|
|
||||||
RED3_DARK = "#4b1100"
|
|
||||||
RED3_LIGHT = "#ff3a00"
|
|
||||||
ORANGE_DARK = "#4d2e00"
|
|
||||||
ORANGE_LIGHT = "#ffad33"
|
|
||||||
ORANGE2_DARK = "#4c2000"
|
|
||||||
ORANGE2_LIGHT = "#ff6c00"
|
|
||||||
GREEN_DARK = "#003300"
|
|
||||||
GREEN_LIGHT = "#33ff33"
|
|
||||||
GREEN2_DARK = "#424d00"
|
|
||||||
GREEN2_LIGHT = "#dcff00"
|
|
||||||
GREEN3_DARK = "#344d00"
|
|
||||||
GREEN3_LIGHT = "#aeff00"
|
|
||||||
BLUE_DARK = "#000033"
|
|
||||||
BLUE_LIGHT = "#3333ff"
|
|
||||||
WHITE_DARK = "#333333"
|
|
||||||
WHITE_LIGHT = "#d9b3ff"
|
|
||||||
YELLOW_DARK = "#333300"
|
|
||||||
YELLOW_LIGHT = "#ffff33"
|
|
||||||
|
|
||||||
class Constants(object):
|
class Constants(object):
|
||||||
CLICK_TO_UPDATE_STR = "Click to update"
|
CLICK_TO_UPDATE_STR = "Click to update"
|
||||||
UPDATING_STR = "Updating..."
|
UPDATING_STR = "Updating..."
|
||||||
@@ -117,6 +93,9 @@ class Constants(object):
|
|||||||
AUDIO_FOLDER = "Audio"
|
AUDIO_FOLDER = "Audio"
|
||||||
ACTIVE = "active"
|
ACTIVE = "active"
|
||||||
INACTIVE = "inactive"
|
INACTIVE = "inactive"
|
||||||
|
LABEL_ON_COLOR = "on"
|
||||||
|
LABEL_OFF_COLOR = "off"
|
||||||
|
TEXT_COLOR = "text"
|
||||||
NOT_AVAILABLE = "spectrumnotavailable.png"
|
NOT_AVAILABLE = "spectrumnotavailable.png"
|
||||||
NOT_SELECTED = "nosignalselected.png"
|
NOT_SELECTED = "nosignalselected.png"
|
||||||
__Band = namedtuple("Band", ["lower", "upper"])
|
__Band = namedtuple("Band", ["lower", "upper"])
|
||||||
|
|||||||
@@ -1,14 +1,27 @@
|
|||||||
from PyQt5.QtWidgets import QLabel
|
from PyQt5.QtWidgets import QLabel
|
||||||
from PyQt5.QtCore import QSize, Qt
|
from PyQt5.QtCore import Qt
|
||||||
|
|
||||||
class FixedAspectRatioLabel(QLabel):
|
class FixedAspectRatioLabel(QLabel):
|
||||||
def __init__(self, parent = None):
|
def __init__(self, parent = None):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.pixmap = None
|
self.pixmap = None
|
||||||
|
|
||||||
def rescale(self, w, h):
|
def set_default_stylesheet(self):
|
||||||
self.resize(QSize(w, h))
|
self.setStyleSheet("""
|
||||||
|
color: #ffffff;
|
||||||
|
background-color: #666666;
|
||||||
|
""")
|
||||||
|
|
||||||
|
def make_transparent(self):
|
||||||
|
self.setText('')
|
||||||
|
self.setStyleSheet("background-color: transparent;")
|
||||||
|
|
||||||
|
def apply_pixmap(self):
|
||||||
if self.pixmap:
|
if self.pixmap:
|
||||||
self.setPixmap(
|
self.setPixmap(
|
||||||
self.pixmap.scaled(
|
self.pixmap.scaled(
|
||||||
self.size(), Qt.IgnoreAspectRatio, Qt.SmoothTransformation))
|
self.size(), Qt.IgnoreAspectRatio, Qt.SmoothTransformation))
|
||||||
|
|
||||||
|
def rescale(self, size):
|
||||||
|
self.resize(size)
|
||||||
|
self.apply_pixmap()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from PyQt5.QtWidgets import QWidget
|
from PyQt5.QtWidgets import QWidget
|
||||||
|
from PyQt5.QtCore import QSize
|
||||||
|
|
||||||
class FixedAspectRatioWidget(QWidget):
|
class FixedAspectRatioWidget(QWidget):
|
||||||
space = 10
|
space = 10
|
||||||
@@ -16,4 +17,4 @@ class FixedAspectRatioWidget(QWidget):
|
|||||||
h_lbl = h / 9 - self.space
|
h_lbl = h / 9 - self.space
|
||||||
|
|
||||||
for label in self.labels:
|
for label in self.labels:
|
||||||
label.rescale(w_lbl, h_lbl)
|
label.rescale(QSize(w_lbl, h_lbl))
|
||||||
|
|||||||
@@ -3,32 +3,26 @@ from PyQt5.QtWidgets import QLabel
|
|||||||
class SwitchableLabel(QLabel):
|
class SwitchableLabel(QLabel):
|
||||||
def __init__(self, parent = None):
|
def __init__(self, parent = None):
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.switch_on_color = None
|
self.switch_on_colors = ()
|
||||||
self.switch_off_color = None
|
self.switch_off_colors = ()
|
||||||
|
self.text_color = ''
|
||||||
def set_colors(self, on, off):
|
self.is_on = False
|
||||||
self.switch_on_color = on
|
|
||||||
self.switch_off_color = off
|
|
||||||
|
|
||||||
def switch_on(self):
|
def switch_on(self):
|
||||||
if self.switch_on_color and self.switch_off_color:
|
self.is_on = True
|
||||||
self.setStyleSheet(f"""background-color: {self.switch_on_color};
|
self.__apply_colors(*self.switch_on_colors)
|
||||||
color:#000000;""")
|
|
||||||
else:
|
|
||||||
self.setStyleSheet("""
|
|
||||||
color:#ffffff;
|
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #4776e6 ,stop: 1 #8e54e9);
|
|
||||||
""")
|
|
||||||
|
|
||||||
def switch_off(self):
|
def switch_off(self):
|
||||||
if self.switch_on_color and self.switch_off_color:
|
self.is_on = False
|
||||||
self.setStyleSheet(f"""background-color: {self.switch_off_color};
|
self.__apply_colors(*self.switch_off_colors)
|
||||||
color:#000000;""")
|
|
||||||
else:
|
def __apply_colors(self, start, end):
|
||||||
self.setStyleSheet("""
|
self.setStyleSheet(
|
||||||
color:#ffffff;
|
f"""
|
||||||
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 #283048 ,stop: 1 #859398);
|
color:{self.text_color};
|
||||||
""")
|
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,stop:0 {start} ,stop: 1 {end});
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class SwitchableLabelsIterable(object):
|
class SwitchableLabelsIterable(object):
|
||||||
@@ -49,3 +43,14 @@ class SwitchableLabelsIterable(object):
|
|||||||
def switch_off_all(self):
|
def switch_off_all(self):
|
||||||
for lab in self.labels:
|
for lab in self.labels:
|
||||||
lab.switch_off()
|
lab.switch_off()
|
||||||
|
|
||||||
|
def set(self, attr, value):
|
||||||
|
for lab in self.labels:
|
||||||
|
setattr(lab, attr, value)
|
||||||
|
|
||||||
|
def refresh(self):
|
||||||
|
for lab in self.labels:
|
||||||
|
if lab.is_on:
|
||||||
|
lab.switch_on()
|
||||||
|
else:
|
||||||
|
lab.switch_off()
|
||||||
|
|||||||
74
themes.py
74
themes.py
@@ -1,10 +1,12 @@
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
|
from itertools import chain
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from PyQt5.QtWidgets import QAction, QActionGroup
|
from PyQt5.QtWidgets import QAction, QActionGroup
|
||||||
from PyQt5.QtCore import pyqtSlot
|
from PyQt5.QtCore import pyqtSlot
|
||||||
from PyQt5.QtGui import QPixmap
|
from PyQt5.QtGui import QPixmap
|
||||||
from constants import Constants
|
from constants import Constants
|
||||||
|
from switchable_label import SwitchableLabelsIterable
|
||||||
from utilities import pop_up
|
from utilities import pop_up
|
||||||
|
|
||||||
class ThemeConstants(object):
|
class ThemeConstants(object):
|
||||||
@@ -15,8 +17,11 @@ class ThemeConstants(object):
|
|||||||
CURRENT = ".current_theme"
|
CURRENT = ".current_theme"
|
||||||
COLORS = "colors.txt"
|
COLORS = "colors.txt"
|
||||||
COLOR_SEPARATOR = "="
|
COLOR_SEPARATOR = "="
|
||||||
DEFAULT_ACTIVE_COLOR = "#39eaff"
|
DEFAULT_ACTIVE_COLOR = "#000000"
|
||||||
DEFAULT_INACTIVE_COLOR = "#9f9f9f"
|
DEFAULT_INACTIVE_COLOR = "#9f9f9f"
|
||||||
|
DEFAULT_OFF_COLORS = "#000000", "#434343"
|
||||||
|
DEFAULT_ON_COLORS = "#4b79a1", "#283e51"
|
||||||
|
DEFAULT_TEXT_COLOR = "#ffffff"
|
||||||
THEME_NOT_FOUND = "Theme not found"
|
THEME_NOT_FOUND = "Theme not found"
|
||||||
MISSING_THEME = "Missing theme in '" + FOLDER + "' folder."
|
MISSING_THEME = "Missing theme in '" + FOLDER + "' folder."
|
||||||
|
|
||||||
@@ -25,10 +30,25 @@ class Theme(object):
|
|||||||
self.__parent = parent
|
self.__parent = parent
|
||||||
self.__parent.active_color = ThemeConstants.DEFAULT_ACTIVE_COLOR
|
self.__parent.active_color = ThemeConstants.DEFAULT_ACTIVE_COLOR
|
||||||
self.__parent.inactive_color = ThemeConstants.DEFAULT_INACTIVE_COLOR
|
self.__parent.inactive_color = ThemeConstants.DEFAULT_INACTIVE_COLOR
|
||||||
self.__theme_path = ThemeConstants.DEFAULT
|
|
||||||
|
self.__theme_path = ""
|
||||||
|
self.__current_theme = ""
|
||||||
|
|
||||||
self.__parent.default_images_folder = os.path.join(ThemeConstants.FOLDER,
|
self.__parent.default_images_folder = os.path.join(ThemeConstants.FOLDER,
|
||||||
ThemeConstants.DEFAULT,
|
ThemeConstants.DEFAULT,
|
||||||
ThemeConstants.ICONS_FOLDER)
|
ThemeConstants.ICONS_FOLDER)
|
||||||
|
|
||||||
|
self.__forecast_labels = SwitchableLabelsIterable(*list(chain(self.__parent.switchable_r_labels,
|
||||||
|
self.__parent.switchable_s_labels,
|
||||||
|
self.__parent.switchable_g_now_labels,
|
||||||
|
self.__parent.switchable_g_today_labels,
|
||||||
|
self.__parent.k_storm_labels,
|
||||||
|
self.__parent.a_storm_labels,
|
||||||
|
[self.__parent.expected_noise_lbl])))
|
||||||
|
|
||||||
|
self.__forecast_labels.set("switch_on_colors", ThemeConstants.DEFAULT_ON_COLORS)
|
||||||
|
self.__forecast_labels.set("switch_off_colors", ThemeConstants.DEFAULT_OFF_COLORS)
|
||||||
|
|
||||||
self.__theme_names = {}
|
self.__theme_names = {}
|
||||||
self.__detect_themes()
|
self.__detect_themes()
|
||||||
|
|
||||||
@@ -43,6 +63,7 @@ class Theme(object):
|
|||||||
self.__parent.upper_band_filter_unit,
|
self.__parent.upper_band_filter_unit,
|
||||||
self.__parent.upper_band_confidence,
|
self.__parent.upper_band_confidence,
|
||||||
self.__parent.band_range_lbl)
|
self.__parent.band_range_lbl)
|
||||||
|
|
||||||
self.__parent.set_band_filter_label(self.__parent.activate_low_freq_filter_btn,
|
self.__parent.set_band_filter_label(self.__parent.activate_low_freq_filter_btn,
|
||||||
self.__parent.lower_freq_spinbox,
|
self.__parent.lower_freq_spinbox,
|
||||||
self.__parent.lower_freq_filter_unit,
|
self.__parent.lower_freq_filter_unit,
|
||||||
@@ -56,10 +77,12 @@ class Theme(object):
|
|||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def __apply(self, theme_path):
|
def __apply(self, theme_path):
|
||||||
self.__theme_path = theme_path
|
self.__theme_path = theme_path
|
||||||
|
if self.__theme_path != self.__current_theme:
|
||||||
self.__change()
|
self.__change()
|
||||||
self.__parent.display_specs(self.__parent.result_list.currentItem(), None)
|
self.__parent.display_specs(self.__parent.result_list.currentItem(), None)
|
||||||
self.__refresh_range_labels()
|
self.__refresh_range_labels()
|
||||||
self.__parent.audio_widget.refresh_btns_colors(self.__parent.active_color, self.__parent.inactive_color)
|
self.__parent.audio_widget.refresh_btns_colors(self.__parent.active_color, self.__parent.inactive_color)
|
||||||
|
self.__forecast_labels.refresh()
|
||||||
|
|
||||||
def __pretty_name(self, bad_name):
|
def __pretty_name(self, bad_name):
|
||||||
return ' '.join(
|
return ' '.join(
|
||||||
@@ -135,28 +158,53 @@ class Theme(object):
|
|||||||
path_to_colors = os.path.join(self.__theme_path, ThemeConstants.COLORS)
|
path_to_colors = os.path.join(self.__theme_path, ThemeConstants.COLORS)
|
||||||
active_color_ok = False
|
active_color_ok = False
|
||||||
inactive_color_ok = False
|
inactive_color_ok = False
|
||||||
valid_format = False
|
switch_on_color_ok = False
|
||||||
valid_file = False
|
switch_off_color_ok = False
|
||||||
|
text_color_ok = False
|
||||||
|
|
||||||
if os.path.exists(path_to_colors):
|
if os.path.exists(path_to_colors):
|
||||||
valid_file = True
|
is_valid_html_color = lambda colors : all([bool(re.match("#([a-zA-Z0-9]){6}", color)) for color in colors])
|
||||||
with open(path_to_colors, "r") as colors_file:
|
with open(path_to_colors, "r") as colors_file:
|
||||||
for line in colors_file:
|
for line in colors_file:
|
||||||
if ThemeConstants.COLOR_SEPARATOR in line:
|
if ThemeConstants.COLOR_SEPARATOR in line:
|
||||||
valid_format = True
|
|
||||||
quality, color = line.split(ThemeConstants.COLOR_SEPARATOR)
|
quality, color = line.split(ThemeConstants.COLOR_SEPARATOR)
|
||||||
color = color.rstrip()
|
color = color.rstrip()
|
||||||
is_valid_html_color = lambda color : bool(re.match("#([a-zA-Z0-9]){6}", color))
|
if ',' in color:
|
||||||
if quality.lower() == Constants.ACTIVE and is_valid_html_color(color):
|
color = [c.rstrip().lstrip() for c in color.split(',')]
|
||||||
self.__parent.active_color = color
|
else:
|
||||||
|
color = [color]
|
||||||
|
if len(color) > 2:
|
||||||
|
break
|
||||||
|
if is_valid_html_color(color):
|
||||||
|
if quality.lower() == Constants.ACTIVE:
|
||||||
|
self.__parent.active_color = color[0]
|
||||||
active_color_ok = True
|
active_color_ok = True
|
||||||
if quality.lower() == Constants.INACTIVE and is_valid_html_color(color):
|
if quality.lower() == Constants.INACTIVE:
|
||||||
self.__parent.inactive_color = color
|
self.__parent.inactive_color = color[0]
|
||||||
inactive_color_ok = True
|
inactive_color_ok = True
|
||||||
|
if quality.lower() == Constants.LABEL_ON_COLOR:
|
||||||
|
switch_on_color_ok = True
|
||||||
|
self.__forecast_labels.set("switch_on_colors", color)
|
||||||
|
if quality.lower() == Constants.LABEL_OFF_COLOR:
|
||||||
|
switch_off_color_ok = True
|
||||||
|
self.__forecast_labels.set("switch_off_colors", color)
|
||||||
|
if quality.lower() == Constants.TEXT_COLOR:
|
||||||
|
text_color_ok = True
|
||||||
|
self.__forecast_labels.set("text_color", color[0])
|
||||||
|
|
||||||
if not all([valid_file, valid_format, active_color_ok, inactive_color_ok]):
|
if not (active_color_ok and inactive_color_ok):
|
||||||
self.__parent.active_color = ThemeConstants.DEFAULT_ACTIVE_COLOR
|
self.__parent.active_color = ThemeConstants.DEFAULT_ACTIVE_COLOR
|
||||||
self.__parent.inactive_color = ThemeConstants.DEFAULT_INACTIVE_COLOR
|
self.__parent.inactive_color = ThemeConstants.DEFAULT_INACTIVE_COLOR
|
||||||
|
|
||||||
|
if not (switch_on_color_ok and switch_off_color_ok):
|
||||||
|
for label in self.__forecast_labels:
|
||||||
|
label.switch_on_colors = ThemeConstants.DEFAULT_ON_COLORS
|
||||||
|
label.switch_off_colors = ThemeConstants.DEFAULT_OFF_COLORS
|
||||||
|
|
||||||
|
if not text_color_ok:
|
||||||
|
self.__forecast_labels.set("text_color", ThemeConstants.DEFAULT_TEXT_COLOR)
|
||||||
|
self.__current_theme = self.__theme_path
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open(os.path.join(ThemeConstants.FOLDER,
|
with open(os.path.join(ThemeConstants.FOLDER,
|
||||||
ThemeConstants.CURRENT), "w") as current_theme:
|
ThemeConstants.CURRENT), "w") as current_theme:
|
||||||
@@ -171,7 +219,7 @@ class Theme(object):
|
|||||||
theme_path = current_theme_path.read()
|
theme_path = current_theme_path.read()
|
||||||
theme_name = self.__pretty_name(os.path.basename(theme_path))
|
theme_name = self.__pretty_name(os.path.basename(theme_path))
|
||||||
self.__theme_names[theme_name].setChecked(True)
|
self.__theme_names[theme_name].setChecked(True)
|
||||||
if theme_path != ThemeConstants.DEFAULT:
|
|
||||||
self.__apply(theme_path)
|
self.__apply(theme_path)
|
||||||
else:
|
else:
|
||||||
self.__theme_names[self.__pretty_name(ThemeConstants.DEFAULT)].setChecked(True)
|
self.__theme_names[self.__pretty_name(ThemeConstants.DEFAULT)].setChecked(True)
|
||||||
|
self.__apply(os.path.join(ThemeConstants.FOLDER, ThemeConstants.DEFAULT))
|
||||||
|
|||||||
@@ -1,2 +1,5 @@
|
|||||||
active=#4da6ff
|
active=#4545e5
|
||||||
inactive=#546E7A
|
inactive=#546E7A
|
||||||
|
off=#283048,#859398
|
||||||
|
on=#4776e6, #8e54e9
|
||||||
|
text=#ffffff
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
active=#88cc00
|
active=#88cc00
|
||||||
inactive=#546E7A
|
inactive=#546E7A
|
||||||
|
off=#304352,#d7d2cc
|
||||||
|
on=#3ca55c,#b5ac49
|
||||||
|
|||||||
@@ -1,2 +1,4 @@
|
|||||||
active=#6ECE12
|
active=#6ECE12
|
||||||
inactive=#b3b3cc
|
inactive=#b3b3cc
|
||||||
|
off=#948e99,#2e1437
|
||||||
|
on=#b993d6,#8ca6db
|
||||||
|
|||||||
Reference in New Issue
Block a user