Disabled waterfall in space weather tabs
This commit is contained in:
12
artemis.py
12
artemis.py
@@ -14,7 +14,8 @@ from PyQt5.QtWidgets import (QMainWindow,
|
|||||||
QListWidgetItem,
|
QListWidgetItem,
|
||||||
QMessageBox,
|
QMessageBox,
|
||||||
QSplashScreen,
|
QSplashScreen,
|
||||||
QTreeWidgetItem,)
|
QTreeWidgetItem,
|
||||||
|
QTabWidget,)
|
||||||
from PyQt5.QtGui import QPixmap
|
from PyQt5.QtGui import QPixmap
|
||||||
from PyQt5 import uic
|
from PyQt5 import uic
|
||||||
from PyQt5.QtCore import (QFileInfo,
|
from PyQt5.QtCore import (QFileInfo,
|
||||||
@@ -266,6 +267,7 @@ class Artemis(QMainWindow, Ui_MainWindow):
|
|||||||
self.reset_frequency_filters_btn.clicked.connect(
|
self.reset_frequency_filters_btn.clicked.connect(
|
||||||
partial(self.reset_fb_filters, Ftype.FREQ)
|
partial(self.reset_fb_filters, Ftype.FREQ)
|
||||||
)
|
)
|
||||||
|
self.main_tab.currentChanged.connect(self.onChange)
|
||||||
|
|
||||||
# Manage bandwidth filters.
|
# Manage bandwidth filters.
|
||||||
|
|
||||||
@@ -1529,7 +1531,7 @@ class Artemis(QMainWindow, Ui_MainWindow):
|
|||||||
Constants.SPECTRA_FOLDER,
|
Constants.SPECTRA_FOLDER,
|
||||||
spectrogram_name + Constants.SPECTRA_EXT
|
spectrogram_name + Constants.SPECTRA_EXT
|
||||||
)
|
)
|
||||||
if not QFileInfo(path_spectr).exists():
|
if not QFileInfo(path_spectr).exists() or self.main_tab.currentIndex()==3:
|
||||||
path_spectr = Constants.DEFAULT_NOT_AVAILABLE
|
path_spectr = Constants.DEFAULT_NOT_AVAILABLE
|
||||||
else:
|
else:
|
||||||
path_spectr = default_pic
|
path_spectr = default_pic
|
||||||
@@ -1613,6 +1615,12 @@ class Artemis(QMainWindow, Ui_MainWindow):
|
|||||||
self.forecast_data.shutdown_thread()
|
self.forecast_data.shutdown_thread()
|
||||||
super().closeEvent(event)
|
super().closeEvent(event)
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def onChange(self):
|
||||||
|
if self.main_tab.currentIndex()==3:
|
||||||
|
self.spectrogram.setPixmap(QPixmap(Constants.DEFAULT_NOT_AVAILABLE))
|
||||||
|
else:
|
||||||
|
self.display_spectrogram()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
my_app = QApplication(sys.argv)
|
my_app = QApplication(sys.argv)
|
||||||
|
|||||||
Reference in New Issue
Block a user