generalization and status bar fix
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
- Added 'Update events in snirf file (BLAZES)...' and renamed 'Update events in snirf file...' to 'Update events in snirf file (BORIS)...'
|
- Added 'Update events in snirf file (BLAZES)...' and renamed 'Update events in snirf file...' to 'Update events in snirf file (BORIS)...'
|
||||||
- The BLAZES option will assign events that are exported directly from the software [BLAZES](https://git.research.dezeeuw.ca/tyler/blazes)
|
- The BLAZES option will assign events that are exported directly from the software [BLAZES](https://git.research.dezeeuw.ca/tyler/blazes)
|
||||||
- Moved the updating logic to a seperate file for better reusability and generalization
|
- Moved the updating logic to a seperate file for better reusability and generalization
|
||||||
|
- Fixed 'Toggle Status Bar' having no effect on the visibility of the status bar
|
||||||
|
|
||||||
|
|
||||||
# Version 1.2.1
|
# Version 1.2.1
|
||||||
|
|||||||
19
main.py
19
main.py
@@ -45,10 +45,10 @@ from PySide6.QtSvgWidgets import QSvgWidget # needed to show svgs when app is no
|
|||||||
|
|
||||||
|
|
||||||
CURRENT_VERSION = "1.2.1"
|
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"
|
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
|
# Selectable parameters on the right side of the window
|
||||||
@@ -321,13 +321,13 @@ class AboutWindow(QWidget):
|
|||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super().__init__(parent, Qt.WindowType.Window)
|
super().__init__(parent, Qt.WindowType.Window)
|
||||||
self.setWindowTitle("About FLARES")
|
self.setWindowTitle(f"About {APP_NAME.upper()}")
|
||||||
self.resize(250, 100)
|
self.resize(250, 100)
|
||||||
|
|
||||||
layout = QVBoxLayout()
|
layout = QVBoxLayout()
|
||||||
label = QLabel("About FLARES", self)
|
label = QLabel(f"About {APP_NAME.upper()}", self)
|
||||||
label2 = QLabel("fNIRS Lightweight Analysis, Research, & Evaluation Suite", 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}")
|
label4 = QLabel(f"Version v{CURRENT_VERSION}")
|
||||||
|
|
||||||
layout.addWidget(label)
|
layout.addWidget(label)
|
||||||
@@ -349,7 +349,7 @@ class UserGuideWindow(QWidget):
|
|||||||
|
|
||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super().__init__(parent, Qt.WindowType.Window)
|
super().__init__(parent, Qt.WindowType.Window)
|
||||||
self.setWindowTitle("User Guide - FLARES")
|
self.setWindowTitle(f"User Guide - {APP_NAME.upper()}")
|
||||||
self.resize(250, 100)
|
self.resize(250, 100)
|
||||||
|
|
||||||
layout = QVBoxLayout()
|
layout = QVBoxLayout()
|
||||||
@@ -379,7 +379,7 @@ class UserGuideWindow(QWidget):
|
|||||||
"Stage 23: Compute Contrast Results\n"
|
"Stage 23: Compute Contrast Results\n"
|
||||||
"Stage 24: Finishing Up\n", self)
|
"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.setTextFormat(Qt.TextFormat.RichText)
|
||||||
label3.setTextInteractionFlags(Qt.TextInteractionFlag.TextBrowserInteraction)
|
label3.setTextInteractionFlags(Qt.TextInteractionFlag.TextBrowserInteraction)
|
||||||
label3.setOpenExternalLinks(True)
|
label3.setOpenExternalLinks(True)
|
||||||
@@ -4645,6 +4645,7 @@ class MainApplication(QMainWindow):
|
|||||||
'''Menu Bar at the top of the screen'''
|
'''Menu Bar at the top of the screen'''
|
||||||
|
|
||||||
menu_bar = self.menuBar()
|
menu_bar = self.menuBar()
|
||||||
|
self.statusbar = self.statusBar()
|
||||||
|
|
||||||
def make_action(name, shortcut=None, slot=None, checkable=False, checked=False, icon=None):
|
def make_action(name, shortcut=None, slot=None, checkable=False, checked=False, icon=None):
|
||||||
action = QAction(name, self)
|
action = QAction(name, self)
|
||||||
@@ -4693,6 +4694,7 @@ class MainApplication(QMainWindow):
|
|||||||
view_menu = menu_bar.addMenu("View")
|
view_menu = menu_bar.addMenu("View")
|
||||||
toggle_statusbar_action = make_action("Toggle Status Bar", checkable=True, checked=True, slot=None)
|
toggle_statusbar_action = make_action("Toggle Status Bar", checkable=True, checked=True, slot=None)
|
||||||
view_menu.addAction(toggle_statusbar_action)
|
view_menu.addAction(toggle_statusbar_action)
|
||||||
|
toggle_statusbar_action.toggled.connect(self.statusbar.setVisible)
|
||||||
|
|
||||||
# Options menu (Help & About)
|
# Options menu (Help & About)
|
||||||
options_menu = menu_bar.addMenu("Options")
|
options_menu = menu_bar.addMenu("Options")
|
||||||
@@ -4728,7 +4730,6 @@ class MainApplication(QMainWindow):
|
|||||||
for name, shortcut, slot, icon in terminal_actions:
|
for name, shortcut, slot, icon in terminal_actions:
|
||||||
terminal_menu.addAction(make_action(name, shortcut, slot, icon=icon))
|
terminal_menu.addAction(make_action(name, shortcut, slot, icon=icon))
|
||||||
|
|
||||||
self.statusbar = self.statusBar()
|
|
||||||
self.statusbar.showMessage("Ready")
|
self.statusbar.showMessage("Ready")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user