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): ...@@ -67,5 +67,5 @@ class AboutWindow(PamhyrDialog):
label = f"\n - {author}" + label label = f"\n - {author}" + label
except StopIteration: except StopIteration:
label = _translate("About", "Contributors: ") + label 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) self.set_label_text("label_copyright", label)
...@@ -28,7 +28,7 @@ from tools import logger_exception ...@@ -28,7 +28,7 @@ from tools import logger_exception
from PyQt5 import QtGui from PyQt5 import QtGui
from PyQt5.QtGui import ( from PyQt5.QtGui import (
QKeySequence, QDesktopServices, QKeySequence, QDesktopServices, QIcon,
) )
from PyQt5.QtCore import ( from PyQt5.QtCore import (
...@@ -333,6 +333,15 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit): ...@@ -333,6 +333,15 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
self.update_enable_action() self.update_enable_action()
# self.showMaximized() # 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): def set_debug_lvl(self, debug=True):
if debug: if debug:
logger.setLevel(logging.DEBUG) logger.setLevel(logging.DEBUG)
......
...@@ -496,12 +496,7 @@ class ASubMainWindow(QMainWindow, ASubWindowFeatures, WindowToolKit): ...@@ -496,12 +496,7 @@ class ASubMainWindow(QMainWindow, ASubWindowFeatures, WindowToolKit):
super(ASubMainWindow, self).__init__(parent=parent) super(ASubMainWindow, self).__init__(parent=parent)
if ui is not None: if ui is not None:
self.ui = loadUi( self.ui = loadUi(
os.path.abspath( os.path.join(self._get_ui_directory(), f"{ui}.ui"),
os.path.join(
os.path.dirname(__file__),
"..", "ui", f"{ui}.ui"
)
),
self self
) )
...@@ -510,6 +505,14 @@ class ASubMainWindow(QMainWindow, ASubWindowFeatures, WindowToolKit): ...@@ -510,6 +505,14 @@ class ASubMainWindow(QMainWindow, ASubWindowFeatures, WindowToolKit):
if self.parent is not None: if self.parent is not None:
self.parent.sub_win_add(name, self) 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): def closeEvent(self, event):
if self.parent is not None: if self.parent is not None:
self.parent.sub_win_del(self.hash()) 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