Commit c1f4aaf9 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Merge branch 'arts' into v0.0.8

Showing with 20 additions and 8 deletions
+20 -8
arts/add.kra 0 → 100644
File added
arts/close.kra 0 → 100644
File added
arts/del.kra 0 → 100644
File added
arts/edit.kra 0 → 100644
File added
File added
File added
File added
arts/logo.kra 0 → 100644
File added
File added
File added
arts/open.kra 0 → 100644
File added
File added
arts/run.kra 0 → 100644
File added
arts/save.kra 0 → 100644
File added
arts/sort.kra 0 → 100644
File added
File added
arts/zoom.kra 0 → 100644
File added
......@@ -67,5 +67,5 @@ class AboutWindow(PamhyrDialog):
label = f"\n - {author}" + label
except StopIteration:
label = _translate("About", "Contributors: ") + label
label = "Copyright © 2023-2024 INRAE\n" + label
label = "Copyright © 2022-2024 INRAE\n" + label
self.set_label_text("label_copyright", label)
......@@ -28,7 +28,7 @@ from tools import logger_exception
from PyQt5 import QtGui
from PyQt5.QtGui import (
QKeySequence, QDesktopServices,
QKeySequence, QDesktopServices, QIcon,
)
from PyQt5.QtCore import (
......@@ -333,6 +333,15 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
self.update_enable_action()
# self.showMaximized()
image = os.path.abspath(
os.path.join(
os.path.dirname(__file__),
"ui", "ressources",
"Pamhyr2_logo.png"
)
)
self.setWindowIcon(QIcon(image))
def set_debug_lvl(self, debug=True):
if debug:
logger.setLevel(logging.DEBUG)
......
......@@ -496,12 +496,7 @@ class ASubMainWindow(QMainWindow, ASubWindowFeatures, WindowToolKit):
super(ASubMainWindow, self).__init__(parent=parent)
if ui is not None:
self.ui = loadUi(
os.path.abspath(
os.path.join(
os.path.dirname(__file__),
"..", "ui", f"{ui}.ui"
)
),
os.path.join(self._get_ui_directory(), f"{ui}.ui"),
self
)
......@@ -510,6 +505,14 @@ class ASubMainWindow(QMainWindow, ASubWindowFeatures, WindowToolKit):
if self.parent is not None:
self.parent.sub_win_add(name, self)
def _get_ui_directory(self):
return os.path.abspath(
os.path.join(
os.path.dirname(__file__),
"..", "ui"
)
)
def closeEvent(self, event):
if self.parent is not None:
self.parent.sub_win_del(self.hash())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment