refactoring: Add PamhyrWindow and PamhyrDialog (WIP).

This commit is contained in:
Pierre-Antoine Rouby committed 2023-09-25 15:10:30 +02:00
1 parent 9c7f1f7ba9
commit fa32e42933
11 files changed
+408 -194

No files matched your search

+13 -6
View File
@@ -19,14 +19,17 @@
import os
import logging
from View.ASubWindow import ASubWindow
from View.Tools.PamhyrWindow import PamhyrDialog
from PyQt5.QtCore import QCoreApplication
_translate = QCoreApplication.translate
logger = logging.getLogger()
class AboutWindow(ASubWindow):
class AboutWindow(PamhyrDialog):
_pamhyr_ui = "about"
_pamhyr_name = "About"
def _path_file(self, filename):
return os.path.abspath(
os.path.join(
@@ -35,10 +38,14 @@ class AboutWindow(ASubWindow):
)
)
def __init__(self, title="About", parent=None):
super(AboutWindow, self).__init__(name=title, ui="about", parent=parent)
self.ui.setWindowTitle(title)
def __init__(self, study = None, config = None, parent=None):
super(AboutWindow, self).__init__(
title = _translate("About", "About"),
study = study,
config = config,
options = [],
parent = parent
)
# Version
with open(self._path_file("VERSION"), "r") as f: