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

BC: Reorganize edit window.

Showing with 19 additions and 11 deletions
+19 -11
...@@ -31,18 +31,11 @@ from Model.BoundaryCondition.BoundaryConditionTypes import ( ...@@ -31,18 +31,11 @@ from Model.BoundaryCondition.BoundaryConditionTypes import (
NotDefined, PonctualContribution, NotDefined, PonctualContribution,
TimeOverZ, TimeOverDebit, ZOverDebit TimeOverZ, TimeOverDebit, ZOverDebit
) )
from View.BoundaryCondition.EditBoundaryConditionWindow import EditBoundaryConditionWindow from View.BoundaryCondition.translate import long_types
from View.BoundaryCondition.Edit.Window import EditBoundaryConditionWindow
_translate = QCoreApplication.translate _translate = QCoreApplication.translate
long_types = {
"ND": _translate("BoundaryCondition", "Not defined"),
"PC": _translate("BoundaryCondition", "Ponctual contribution"),
"TZ": _translate("BoundaryCondition", "Time over Z"),
"TD": _translate("BoundaryCondition", "Time over Debit"),
"ZD": _translate("BoundaryCondition", "Z over Debit"),
}
table_headers = { table_headers = {
"name": _translate("BoundaryCondition", "Name"), "name": _translate("BoundaryCondition", "Name"),
"type": _translate("BoundaryCondition", "Type"), "type": _translate("BoundaryCondition", "Type"),
......
...@@ -12,6 +12,8 @@ from PyQt5.QtWidgets import ( ...@@ -12,6 +12,8 @@ from PyQt5.QtWidgets import (
QFileDialog, QTableView, QAbstractItemView, QFileDialog, QTableView, QAbstractItemView,
) )
from View.BoundaryCondition.translate import long_types
_translate = QCoreApplication.translate _translate = QCoreApplication.translate
class EditBoundaryConditionWindow(ASubMainWindow, ListedSubWindow): class EditBoundaryConditionWindow(ASubMainWindow, ListedSubWindow):
...@@ -31,8 +33,8 @@ class EditBoundaryConditionWindow(ASubMainWindow, ListedSubWindow): ...@@ -31,8 +33,8 @@ class EditBoundaryConditionWindow(ASubMainWindow, ListedSubWindow):
else _translate("BoundaryCondition", "Not associate")) else _translate("BoundaryCondition", "Not associate"))
title = ( title = (
_translate("BoundaryCondition", self._title) + _translate("BoundaryCondition", self._title) +
f"{self._data.name} " + f" - {self._data.name} " +
f"({self._data.name} - {node_name})" f"({long_types[self._data.bctype]} - {node_name})"
) )
self.ui.setWindowTitle(title) self.ui.setWindowTitle(title)
else: else:
......
# -*- coding: utf-8 -*-
from PyQt5.QtCore import QCoreApplication
_translate = QCoreApplication.translate
long_types = {
"ND": _translate("BoundaryCondition", "Not defined"),
"PC": _translate("BoundaryCondition", "Ponctual contribution"),
"TZ": _translate("BoundaryCondition", "Time over Z"),
"TD": _translate("BoundaryCondition", "Time over Debit"),
"ZD": _translate("BoundaryCondition", "Z over Debit"),
}
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