Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion src/petab_gui/controllers/mother_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import tempfile
import zipfile
from functools import partial
from importlib.metadata import version
from io import BytesIO
from pathlib import Path

Expand Down Expand Up @@ -164,7 +165,7 @@ def window_title(self):
"""Return the window title based on the model."""
if isinstance(self.model.sbml, SbmlViewerModel):
return self.model.sbml.model_id
return "PEtab Editor"
return "PEtabGUI"

def setup_context_menu(self):
"""Sets up context menus for the tables."""
Expand Down Expand Up @@ -438,6 +439,12 @@ def setup_actions(self):
self._whats_this_filter = _WhatsThisClickHelp(actions["whats_this"])
actions["whats_this"].toggled.connect(self._toggle_whats_this_mode)

# About action
actions["about"] = QAction(
qta.icon("mdi6.information"), "&About", self.view
)
actions["about"].triggered.connect(self.about)

# connect actions
actions["reset_view"] = QAction(
qta.icon("mdi6.view-grid-plus"), "Reset View", self.view
Expand Down Expand Up @@ -1150,3 +1157,22 @@ def _show_help_welcome(self):
msg.exec()
if dont.isChecked():
settings.setValue("help_mode/welcome_disabled", True)

def about(self):
"""Show an about dialog."""
repo_url = "https://github.com/PaulJonasJost/PEtab_GUI"
config_file = settings_manager.settings.fileName()
QMessageBox.about(
self.view,
"About PEtabGUI",
f"<b>PEtabGUI</b><br>"
f"Version: {version('petab-gui')}<br>"
f"PEtab version: {version('petab')}<br><br>"
f"PEtabGUI is a tool for editing and visualizing PEtab "
f"problems.<br><br>"
f"Visit the GitHub repository at "
f"<a href='{repo_url}'>{repo_url}</a> "
"for more information.<br><br>"
f"<small>Settings are stored in "
f"<a href='file://{config_file}'>{config_file}</a></small>",
)
1 change: 1 addition & 0 deletions src/petab_gui/views/task_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def __init__(self, parent, actions):
# Add actions to the menu for re-adding tables
self.menu.addAction(actions["open_documentation"])
self.menu.addAction(actions["whats_this"])
self.menu.addAction(actions["about"])


class TaskBar:
Expand Down