generalization and status bar fix

This commit is contained in:
2026-03-13 14:07:40 -07:00
parent 8c207b17ad
commit 1e346f8ef2
2 changed files with 11 additions and 9 deletions

19
main.py
View File

@@ -45,10 +45,10 @@ from PySide6.QtSvgWidgets import QSvgWidget # needed to show svgs when app is no
CURRENT_VERSION = "1.2.1"
API_URL = "https://git.research.dezeeuw.ca/api/v1/repos/tyler/flares/releases"
API_URL_SECONDARY = "https://git.research2.dezeeuw.ca/api/v1/repos/tyler/flares/releases"
PLATFORM_NAME = platform.system().lower()
APP_NAME = "flares"
API_URL = f"https://git.research.dezeeuw.ca/api/v1/repos/tyler/{APP_NAME}/releases"
API_URL_SECONDARY = f"https://git.research2.dezeeuw.ca/api/v1/repos/tyler/{APP_NAME}/releases"
PLATFORM_NAME = platform.system().lower()
# Selectable parameters on the right side of the window
@@ -321,13 +321,13 @@ class AboutWindow(QWidget):
def __init__(self, parent=None):
super().__init__(parent, Qt.WindowType.Window)
self.setWindowTitle("About FLARES")
self.setWindowTitle(f"About {APP_NAME.upper()}")
self.resize(250, 100)
layout = QVBoxLayout()
label = QLabel("About FLARES", self)
label = QLabel(f"About {APP_NAME.upper()}", self)
label2 = QLabel("fNIRS Lightweight Analysis, Research, & Evaluation Suite", self)
label3 = QLabel("FLARES is licensed under the GPL-3.0 licence. For more information, visit https://www.gnu.org/licenses/gpl-3.0.en.html", self)
label3 = QLabel(f"{APP_NAME.upper()} is licensed under the GPL-3.0 licence. For more information, visit https://www.gnu.org/licenses/gpl-3.0.en.html", self)
label4 = QLabel(f"Version v{CURRENT_VERSION}")
layout.addWidget(label)
@@ -349,7 +349,7 @@ class UserGuideWindow(QWidget):
def __init__(self, parent=None):
super().__init__(parent, Qt.WindowType.Window)
self.setWindowTitle("User Guide - FLARES")
self.setWindowTitle(f"User Guide - {APP_NAME.upper()}")
self.resize(250, 100)
layout = QVBoxLayout()
@@ -379,7 +379,7 @@ class UserGuideWindow(QWidget):
"Stage 23: Compute Contrast Results\n"
"Stage 24: Finishing Up\n", self)
label3 = QLabel("For more information, visit the Git wiki page <a href='https://git.research.dezeeuw.ca/tyler/flares/wiki'>here</a>.", self)
label3 = QLabel(f"For more information, visit the Git wiki page <a href='https://git.research.dezeeuw.ca/tyler/{APP_NAME}/wiki'>here</a>.", self)
label3.setTextFormat(Qt.TextFormat.RichText)
label3.setTextInteractionFlags(Qt.TextInteractionFlag.TextBrowserInteraction)
label3.setOpenExternalLinks(True)
@@ -4645,6 +4645,7 @@ class MainApplication(QMainWindow):
'''Menu Bar at the top of the screen'''
menu_bar = self.menuBar()
self.statusbar = self.statusBar()
def make_action(name, shortcut=None, slot=None, checkable=False, checked=False, icon=None):
action = QAction(name, self)
@@ -4693,6 +4694,7 @@ class MainApplication(QMainWindow):
view_menu = menu_bar.addMenu("View")
toggle_statusbar_action = make_action("Toggle Status Bar", checkable=True, checked=True, slot=None)
view_menu.addAction(toggle_statusbar_action)
toggle_statusbar_action.toggled.connect(self.statusbar.setVisible)
# Options menu (Help & About)
options_menu = menu_bar.addMenu("Options")
@@ -4728,7 +4730,6 @@ class MainApplication(QMainWindow):
for name, shortcut, slot, icon in terminal_actions:
terminal_menu.addAction(make_action(name, shortcut, slot, icon=icon))
self.statusbar = self.statusBar()
self.statusbar.showMessage("Ready")