mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
merge
This commit is contained in:
commit
bd6e200a70
83 files changed
+1340
-5142
No files matched your search
@@ -253,6 +253,15 @@ class ProfileXYZ(Profile, SQLSubModel):
|
||||
|
||||
return point
|
||||
|
||||
def display_name(self):
|
||||
name = ""
|
||||
if self.name != "":
|
||||
name += f"{self.name} "
|
||||
|
||||
name += f"({self.rk})"
|
||||
|
||||
return name
|
||||
|
||||
def x(self):
|
||||
return [point.x for point in self.points]
|
||||
|
||||
|
||||
@@ -632,8 +632,8 @@ class Reach(SQLSubModel):
|
||||
|
||||
try:
|
||||
list_profile, list_header = self.read_file_st(str(file_path_name))
|
||||
profile_header = ["num", "code1",
|
||||
"code2", "nb_point", "rk", "name"]
|
||||
profile_header = ["num", "code1", "code2",
|
||||
"nb_point", "rk", "name"]
|
||||
|
||||
if list_profile and list_header:
|
||||
for ind, profile in enumerate(list_profile):
|
||||
@@ -707,6 +707,15 @@ class Reach(SQLSubModel):
|
||||
line_is_header = True
|
||||
else:
|
||||
list_point_profile.append(line)
|
||||
elif len(line) > 4:
|
||||
x, y, z = line[:3]
|
||||
if stop_code in x and stop_code in y:
|
||||
line_is_header = True
|
||||
list_profile.append(list_point_profile)
|
||||
list_point_profile = []
|
||||
else:
|
||||
line.append("")
|
||||
list_point_profile.append(line[:3])
|
||||
else:
|
||||
pass
|
||||
|
||||
|
||||
@@ -51,9 +51,9 @@ class Edge(object):
|
||||
elif name == "id":
|
||||
ret = self.id
|
||||
elif name == "node1":
|
||||
ret = self.node1.name
|
||||
ret = self.node1
|
||||
elif name == "node2":
|
||||
ret = self.node2.name
|
||||
ret = self.node2
|
||||
elif name == "enable":
|
||||
ret = self._enable
|
||||
|
||||
@@ -75,10 +75,10 @@ class Edge(object):
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
name = self._name
|
||||
if self._name == "":
|
||||
name = f"{self.node1.name} -> {self.node2.name}"
|
||||
return name
|
||||
return f"R{self.id}"
|
||||
|
||||
return self._name
|
||||
|
||||
def is_enable(self):
|
||||
return self._enable
|
||||
|
||||
@@ -35,11 +35,7 @@ class Node(object):
|
||||
else:
|
||||
self.id = id
|
||||
|
||||
if name == "":
|
||||
self._name = f"Node {self.id}"
|
||||
else:
|
||||
self._name = name
|
||||
|
||||
self._name = name
|
||||
self.pos = Point(x, y)
|
||||
|
||||
def __getitem__(self, key):
|
||||
@@ -64,6 +60,9 @@ class Node(object):
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
if self._name == "":
|
||||
return f"N{self.id}"
|
||||
|
||||
return self._name
|
||||
|
||||
@property
|
||||
|
||||
@@ -113,10 +113,7 @@ class Stricklers(SQLSubModel):
|
||||
return True
|
||||
|
||||
def __str__(self):
|
||||
if self._name != "":
|
||||
return f"{self._name} ({self._minor}, {self._medium})"
|
||||
|
||||
return f"({self._minor}, {self._medium})"
|
||||
return f"{self.name} ({self._minor}, {self._medium})"
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
||||
@@ -55,6 +55,7 @@ class AboutWindow(PamhyrDialog):
|
||||
|
||||
label = self.get_label_text("label_version")
|
||||
label = label.replace("@version", version)
|
||||
label = label.replace("@codename", "(Tahiti)")
|
||||
self.set_label_text("label_version", label)
|
||||
|
||||
# Authors
|
||||
@@ -67,5 +68,5 @@ class AboutWindow(PamhyrDialog):
|
||||
label = f"\n - {author}" + label
|
||||
except StopIteration:
|
||||
label = _translate("About", "Contributors: ") + label
|
||||
label = "Copyright © 2022-2024 INRAE\n" + label
|
||||
# label = "Copyright © 2022-2024 INRAE\n" + label
|
||||
self.set_label_text("label_copyright", label)
|
||||
@@ -224,8 +224,11 @@ class EditBoundaryConditionWindow(PamhyrWindow):
|
||||
self._d50sigma.sigmaChanged.connect(self.sigma_changed)
|
||||
|
||||
def setup_dialog(self):
|
||||
reach = self._data.reach(self._study.river)[0]
|
||||
self.slope_value = abs(reach.get_incline_median_mean())
|
||||
if len(self._data.reach(self._study.river)) > 0:
|
||||
reach = self._data.reach(self._study.river)[0]
|
||||
self.slope_value = abs(reach.get_incline_median_mean())
|
||||
else:
|
||||
self.slope_value = 0.0
|
||||
|
||||
def d50_changed(self, value):
|
||||
self._undo_stack.push(
|
||||
|
||||
@@ -209,9 +209,7 @@ class FrictionsWindow(PamhyrWindow):
|
||||
self.update_plot(highlight)
|
||||
|
||||
def update_plot(self, highlight=None):
|
||||
if highlight is not None:
|
||||
self.plot.highlight = highlight
|
||||
self.plot.draw()
|
||||
self.plot.draw(highlight)
|
||||
|
||||
if highlight is not None:
|
||||
self.plot_2.highlight = highlight
|
||||
|
||||
@@ -44,6 +44,6 @@ class FrictionsTranslate(MainTranslate):
|
||||
# "edge": self._dict["reach"],
|
||||
"begin_rk": _translate("Frictions", "Start (m)"),
|
||||
"end_rk": _translate("Frictions", "End (m)"),
|
||||
"begin_strickler": _translate("Frictions", "Start coefficient"),
|
||||
"end_strickler": _translate("Frictions", "End coefficient"),
|
||||
"begin_strickler": _translate("Frictions", "Coefficient"),
|
||||
# "end_strickler": _translate("Frictions", "End coefficient"),
|
||||
}
|
||||
@@ -50,6 +50,8 @@ class MeshingDialog(PamhyrDialog):
|
||||
self._init_default_values()
|
||||
|
||||
def _init_default_values(self):
|
||||
gl, _ = self._reach.compute_guidelines()
|
||||
self._gl = list(gl)
|
||||
self._space_step = 50.0
|
||||
self._lplan = False
|
||||
self._lm = "3"
|
||||
@@ -58,6 +60,14 @@ class MeshingDialog(PamhyrDialog):
|
||||
self._end_cs = -1
|
||||
self._begin_dir = "un"
|
||||
self._end_dir = "np"
|
||||
|
||||
lower_gl = list(map(str.lower, self._gl))
|
||||
for i, gl in enumerate(lower_gl):
|
||||
if gl == "rg":
|
||||
self._begin_dir = self._gl[i]
|
||||
elif gl == "rd":
|
||||
self._end_dir = self._gl[i]
|
||||
|
||||
self._origin = self._reach.profile(0)
|
||||
|
||||
self._init_default_values_profiles()
|
||||
|
||||
@@ -41,7 +41,7 @@ class PlotAC(PamhyrPlot):
|
||||
self._autoscale_update = True
|
||||
|
||||
self.label_x = self._trad["transverse_abscissa"]
|
||||
self.label_y = self._trad["unit_height"]
|
||||
self.label_y = self._trad["unit_elevation"]
|
||||
|
||||
self.label_previous_plot_selected = self._trad["prev_cs"]
|
||||
self.label_plot_selected = self._trad["cs"]
|
||||
|
||||
@@ -198,7 +198,7 @@ class PlotRKZ(PamhyrPlot):
|
||||
z_min = self.data.get_z_min()
|
||||
z_max = self.data.get_z_max()
|
||||
|
||||
self._colors, self._style = self.color_hightlight()
|
||||
self._colors, self._style = self.color_highlight()
|
||||
|
||||
self.line_rk_zmin_zmax = self.canvas.axes.vlines(
|
||||
x=rk, ymin=z_min, ymax=z_max,
|
||||
@@ -208,7 +208,7 @@ class PlotRKZ(PamhyrPlot):
|
||||
picker=10,
|
||||
)
|
||||
|
||||
def color_hightlight(self):
|
||||
def color_highlight(self):
|
||||
rows = sorted(list(
|
||||
set(
|
||||
(i.row() for i in self.parent.tableView.selectedIndexes())
|
||||
@@ -292,6 +292,8 @@ class PlotRKZ(PamhyrPlot):
|
||||
)
|
||||
|
||||
for hs in lhs:
|
||||
if not hs.enabled:
|
||||
continue
|
||||
x = hs.input_rk
|
||||
if x is not None:
|
||||
z_min = reach.get_z_min()
|
||||
@@ -328,7 +330,7 @@ class PlotRKZ(PamhyrPlot):
|
||||
|
||||
def update_current(self):
|
||||
if self._current_data_update:
|
||||
self._colors, self._style = self.color_hightlight()
|
||||
self._colors, self._style = self.color_highlight()
|
||||
self.line_rk_zmin_zmax.set_colors(self._colors)
|
||||
self.line_rk_zmin_zmax.set_linestyle(self._style)
|
||||
|
||||
@@ -345,7 +347,7 @@ class PlotRKZ(PamhyrPlot):
|
||||
# TODO comprendre à quoi sert ce bout de code
|
||||
# ========>
|
||||
# self.line_rk_zmin_zmax.remove()
|
||||
# self._colors, self._style = self.color_hightlight()
|
||||
# self._colors, self._style = self.color_highlight()
|
||||
# self.line_rk_zmin_zmax = self.canvas.axes.vlines(
|
||||
# x=rk,
|
||||
# ymin=z_min,
|
||||
|
||||
@@ -56,8 +56,8 @@ class Plot(PamhyrPlot):
|
||||
self.line_xy = []
|
||||
self.line_gl = []
|
||||
|
||||
self.label_x = self._trad["unit_rk"]
|
||||
self.label_y = self._trad["unit_height"]
|
||||
self.label_x = self._trad["transverse_abscissa"]
|
||||
self.label_y = self._trad["unit_elevation"]
|
||||
|
||||
self.before_plot_selected = None
|
||||
self.plot_selected = None
|
||||
|
||||
@@ -204,19 +204,29 @@ class ImportCommand(QUndoCommand):
|
||||
self._row = row
|
||||
self._filename = filename
|
||||
self._profiles = None
|
||||
self._old_profiles = []
|
||||
for row in range(len(self._reach)):
|
||||
self._old_profiles.append((self._reach.profile(row)))
|
||||
self._old_profiles.reverse()
|
||||
|
||||
def undo(self):
|
||||
self._reach.delete_profiles(self._profiles)
|
||||
for profile in self._old_profiles:
|
||||
self._reach.insert_profile(self._row, profile)
|
||||
|
||||
def redo(self):
|
||||
if self._profiles is None:
|
||||
self._reach.delete_profiles(self._old_profiles)
|
||||
try:
|
||||
self._profiles = self._reach.import_geometry(self._filename)
|
||||
self._profiles.reverse()
|
||||
except Exception as e:
|
||||
for profile in self._old_profiles:
|
||||
self._reach.insert_profile(self._row, profile)
|
||||
logger_exception(e)
|
||||
exception_message_box(e)
|
||||
else:
|
||||
self._reach.delete_profiles(self._old_profiles)
|
||||
for profile in self._profiles:
|
||||
self._reach.insert_profile(self._row, profile)
|
||||
|
||||
|
||||
@@ -58,9 +58,9 @@ class UpdateRKDialog(PamhyrDialog):
|
||||
|
||||
lower_gl = list(map(str.lower, self._gl))
|
||||
for i, gl in enumerate(lower_gl):
|
||||
if gl == "rd":
|
||||
if gl == "rg":
|
||||
self._begin_dir = self._gl[i]
|
||||
elif gl == "rg":
|
||||
elif gl == "rd":
|
||||
self._end_dir = self._gl[i]
|
||||
|
||||
self._orientation = 0
|
||||
|
||||
@@ -28,7 +28,7 @@ class BasicHydraulicStructuresTranslate(MainTranslate):
|
||||
super(BasicHydraulicStructuresTranslate, self).__init__()
|
||||
|
||||
self._dict["Basic Hydraulic Structures"] = _translate(
|
||||
"BasicHydraulicStructures", "Basic Hydraulic Structure"
|
||||
"BasicHydraulicStructures", "Basic Hydraulic Structures"
|
||||
)
|
||||
|
||||
self._dict['msg_type_change_title'] = _translate(
|
||||
@@ -108,7 +108,7 @@ hydraulic structure values?"
|
||||
self._sub_dict["long_types"] = {
|
||||
"ND": self._dict["not_defined"],
|
||||
"S1": _translate(
|
||||
"BasicHydraulicStructures", "Discharge weir"
|
||||
"BasicHydraulicStructures", "Rectangular weir"
|
||||
),
|
||||
"S2": _translate(
|
||||
"BasicHydraulicStructures", "Trapezoidal weir"
|
||||
|
||||
@@ -118,3 +118,4 @@ class PlotAC(PamhyrPlot):
|
||||
def update_clear(self):
|
||||
if self.line_rk is not None:
|
||||
self.line_rk.set_data([], [])
|
||||
self.update_idle()
|
||||
@@ -69,21 +69,23 @@ class PlotRKC(PamhyrPlot):
|
||||
self.profile = None
|
||||
self.line_rk_zmin_zmax = None
|
||||
self.line_rk_zmin = None
|
||||
self.hs_vlines = None
|
||||
return
|
||||
|
||||
if self._current_reach is None:
|
||||
self.profile = None
|
||||
self.line_rk_zmin_zmax = None
|
||||
self.line_rk_zmin = None
|
||||
self.hs_vlines = None
|
||||
return
|
||||
|
||||
self.draw_data()
|
||||
self.draw_data(highlight)
|
||||
self.draw_current()
|
||||
|
||||
self.idle()
|
||||
self._init = True
|
||||
|
||||
def draw_data(self):
|
||||
def draw_data(self, highlight):
|
||||
reach = self._current_reach
|
||||
|
||||
rk = reach.reach.get_rk()
|
||||
@@ -107,11 +109,68 @@ class PlotRKC(PamhyrPlot):
|
||||
self.line_rk_zmin_zmax = self.canvas.axes.vlines(
|
||||
x=rk,
|
||||
ymin=z_min, ymax=z_max,
|
||||
color=self.color_plot,
|
||||
color=self.color_highlight(highlight),
|
||||
lw=1.,
|
||||
picker=10
|
||||
)
|
||||
|
||||
# Draw HS
|
||||
|
||||
lhs = filter(
|
||||
lambda hs: hs._input_reach is reach,
|
||||
filter(
|
||||
lambda hs: hs._input_reach is not None,
|
||||
self.data.hydraulic_structures.lst
|
||||
)
|
||||
)
|
||||
|
||||
vx = []
|
||||
vymin = []
|
||||
vymax = []
|
||||
self.anotate_lst = []
|
||||
hs_color = []
|
||||
for hs in lhs:
|
||||
if hs.enabled:
|
||||
hs_color.append("black")
|
||||
else:
|
||||
hs_color.append("darkgrey")
|
||||
x = hs.input_rk
|
||||
if x is not None:
|
||||
a = self.canvas.axes.annotate(
|
||||
" > " + hs.name,
|
||||
(x, max(z_max)),
|
||||
horizontalalignment='left',
|
||||
verticalalignment='top',
|
||||
annotation_clip=True,
|
||||
fontsize=9,
|
||||
color=hs_color[-1],
|
||||
)
|
||||
self.anotate_lst.append(a)
|
||||
vx.append(x)
|
||||
vymin.append(min(z_min))
|
||||
vymax.append(max(z_max))
|
||||
|
||||
self.hs_vlines = self.canvas.axes.vlines(
|
||||
x=vx, ymin=vymin, ymax=vymax,
|
||||
linestyle="--",
|
||||
lw=1.,
|
||||
color=hs_color,
|
||||
)
|
||||
|
||||
def color_highlight(self, highlight):
|
||||
|
||||
reach = self._current_reach
|
||||
colors = [self.color_plot] * reach.reach.number_profiles
|
||||
|
||||
if highlight is not None:
|
||||
rk = reach.reach.get_rk()
|
||||
rows = [i for i in range(len(rk))
|
||||
if (rk[i] >= highlight[0] and rk[i] <= highlight[1])]
|
||||
if len(rows) > 0:
|
||||
for row in rows:
|
||||
colors[row] = self.color_plot_current
|
||||
return colors
|
||||
|
||||
def draw_current(self):
|
||||
if self._current_profile is None:
|
||||
self.profile = None
|
||||
@@ -166,11 +225,19 @@ class PlotRKC(PamhyrPlot):
|
||||
if self.line_rk_zmin is not None:
|
||||
self.line_rk_zmin.set_data([], [])
|
||||
|
||||
if self.hs_vlines is not None:
|
||||
self.hs_vlines.remove()
|
||||
self.hs_vlines = None
|
||||
|
||||
for a in self.anotate_lst:
|
||||
a.remove()
|
||||
self.anotate_lst = []
|
||||
|
||||
self.canvas.figure.canvas.draw_idle()
|
||||
|
||||
def clear_profile(self):
|
||||
if self.profile is not None:
|
||||
self.profile.set_data([], [])
|
||||
self.profile[0].set_data([], [])
|
||||
|
||||
self.canvas.figure.canvas.draw_idle()
|
||||
|
||||
|
||||
@@ -65,7 +65,8 @@ class ComboBoxDelegate(QItemDelegate):
|
||||
if reach is not None:
|
||||
val = list(
|
||||
map(
|
||||
lambda rk: str(rk), reach.reach.get_rk()
|
||||
lambda p: p.display_name(),
|
||||
reach.reach.profiles
|
||||
)
|
||||
)
|
||||
else:
|
||||
@@ -89,7 +90,23 @@ class ComboBoxDelegate(QItemDelegate):
|
||||
|
||||
def setModelData(self, editor, model, index):
|
||||
text = str(editor.currentText())
|
||||
model.setData(index, text)
|
||||
|
||||
if self._mode == "rk":
|
||||
reach = self._data.hydraulic_structures\
|
||||
.get(index.row())\
|
||||
.input_reach
|
||||
profiles = list(
|
||||
filter(
|
||||
lambda p: p.display_name() == text,
|
||||
reach.reach.profiles
|
||||
)
|
||||
)
|
||||
|
||||
value = profiles[0].rk if len(profiles) > 0 else None
|
||||
else:
|
||||
value = text
|
||||
|
||||
model.setData(index, value)
|
||||
editor.close()
|
||||
editor.deleteLater()
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ from View.Tools.PamhyrTable import PamhyrTableModel
|
||||
from View.InitialConditions.UndoCommand import (
|
||||
SetCommand, AddCommand, DelCommand,
|
||||
SortCommand, MoveCommand, InsertCommand,
|
||||
DuplicateCommand, GenerateCommand,
|
||||
DuplicateCommand, GenerateCommand, ReplaceDataCommand,
|
||||
)
|
||||
|
||||
logger = logging.getLogger()
|
||||
@@ -267,8 +267,8 @@ class InitialConditionTableModel(PamhyrTableModel):
|
||||
)
|
||||
|
||||
self._undo.push(
|
||||
InsertCommand(
|
||||
self._lst, index,
|
||||
ReplaceDataCommand(
|
||||
self._lst,
|
||||
list(
|
||||
map(
|
||||
lambda d: self._lst.new_from_data(*d),
|
||||
|
||||
@@ -196,3 +196,24 @@ class GenerateCommand(QUndoCommand):
|
||||
self._param[1],
|
||||
self._option,
|
||||
self._param[2])
|
||||
|
||||
|
||||
class ReplaceDataCommand(QUndoCommand):
|
||||
def __init__(self, ics, new_data):
|
||||
QUndoCommand.__init__(self)
|
||||
|
||||
self._ics = ics
|
||||
self._copy = self._ics.data
|
||||
self._new_data = new_data
|
||||
self._rows = list(range(len(ics.data)))
|
||||
self._new_rows = list(range(len(new_data)))
|
||||
|
||||
def undo(self):
|
||||
self._ics.delete_i(self._new_rows)
|
||||
for row, el in enumerate(self._copy):
|
||||
self._ics.insert(row, el)
|
||||
|
||||
def redo(self):
|
||||
self._ics.delete_i(self._rows)
|
||||
for row, el in enumerate(self._new_data):
|
||||
self._ics.insert(row, el)
|
||||
@@ -276,11 +276,15 @@ class InitialConditionsWindow(PamhyrWindow):
|
||||
.replace(".BIN", "")
|
||||
|
||||
def reading():
|
||||
self._tmp_results = solver.results(
|
||||
self._study,
|
||||
os.path.dirname(file_name),
|
||||
name=name
|
||||
)
|
||||
try:
|
||||
self._tmp_results = solver.results(
|
||||
self._study,
|
||||
os.path.dirname(file_name),
|
||||
name=name
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to open results")
|
||||
logger_exception(e)
|
||||
|
||||
dlg = ReadingResultsDialog(
|
||||
reading_fn=reading,
|
||||
|
||||
@@ -28,11 +28,7 @@ class ICTranslate(MainTranslate):
|
||||
super(ICTranslate, self).__init__()
|
||||
|
||||
self._dict["Initial condition"] = _translate(
|
||||
"InitialCondition", "Initial condition")
|
||||
self._dict["Discharge"] = _translate(
|
||||
"InitialCondition", "Discharge")
|
||||
self._dict["Height"] = _translate(
|
||||
"InitialCondition", "Height")
|
||||
"InitialCondition", "Initial conditions")
|
||||
|
||||
self._dict["elevation"] = self._dict["unit_elevation"]
|
||||
self._dict["discharge"] = self._dict["unit_discharge"]
|
||||
|
||||
+15
-23
@@ -177,10 +177,10 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
title = "(dbg) " if self.conf.debug else ""
|
||||
|
||||
if self._study is not None:
|
||||
title += f"Pamhyr2 - {self._study.name}"
|
||||
title += f"Pamhyr2 (Tahiti 🌴) - {self._study.name}"
|
||||
self.setWindowTitle(title)
|
||||
else:
|
||||
title += "Pamhyr2"
|
||||
title += "Pamhyr2 (Tahiti 🌴)"
|
||||
self.setWindowTitle(title)
|
||||
|
||||
def setup_tab(self):
|
||||
@@ -512,6 +512,9 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
self.update()
|
||||
|
||||
def close_model(self):
|
||||
if not self.dialog_close(cancel=True):
|
||||
return
|
||||
|
||||
self._study = None
|
||||
self.update_enable_action()
|
||||
self.conf.set_close_correctly()
|
||||
@@ -761,15 +764,16 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
##################
|
||||
|
||||
def msg_select_reach(self):
|
||||
self.message_box("Please select a reach",
|
||||
"Geometry edition need a reach selected "
|
||||
"into river network window to work on it")
|
||||
self.message_box(
|
||||
self._trad["mb_select_reach_title"],
|
||||
self._trad["mb_select_reach_msg"]
|
||||
)
|
||||
|
||||
def dialog_reopen_study(self):
|
||||
dlg = QMessageBox(self)
|
||||
|
||||
dlg.setWindowTitle("Last open study")
|
||||
dlg.setText("Do you want to open again the last open study?")
|
||||
dlg.setWindowTitle(self._trad["mb_last_open_title"])
|
||||
dlg.setText(self._trad["mb_last_open_msg"])
|
||||
opt = QMessageBox.Cancel | QMessageBox.Ok # | QMessageBox.Open
|
||||
|
||||
dlg.setStandardButtons(opt)
|
||||
@@ -809,9 +813,9 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
def dialog_close(self, cancel=True):
|
||||
dlg = QMessageBox(self)
|
||||
|
||||
dlg.setWindowTitle("Close PAMHYR without saving study")
|
||||
dlg.setText("Do you want to save current study before PAMHYR close ?")
|
||||
opt = QMessageBox.Save | QMessageBox.Ignore
|
||||
dlg.setWindowTitle(self._trad["mb_close_title"])
|
||||
dlg.setText(self._trad["mb_close_msg"])
|
||||
opt = QMessageBox.Save | QMessageBox.Close
|
||||
if cancel:
|
||||
opt |= QMessageBox.Cancel
|
||||
|
||||
@@ -823,7 +827,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
if res == QMessageBox.Save:
|
||||
self.save_study()
|
||||
return True
|
||||
elif res == QMessageBox.Ignore:
|
||||
elif res == QMessageBox.Close:
|
||||
return True
|
||||
elif res == QMessageBox.Cancel:
|
||||
return False
|
||||
@@ -1599,15 +1603,3 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
f"sqlitebrowser {file}",
|
||||
shell=True
|
||||
)
|
||||
|
||||
# TODO: Delete me !
|
||||
###############
|
||||
# DUMMY STUFF #
|
||||
###############
|
||||
|
||||
def open_dummy(self, title="Dummy"):
|
||||
self.dummy = DummyWindow(
|
||||
title=title if type(title) is str else "Dummy",
|
||||
parent=self
|
||||
)
|
||||
self.dummy.show()
|
||||
@@ -368,11 +368,18 @@ class EdgeItem(QGraphicsItem):
|
||||
|
||||
|
||||
class NodeText(QGraphicsTextItem):
|
||||
def __init__(self, node_item):
|
||||
def __init__(self, node_item, graph):
|
||||
super(NodeText, self).__init__()
|
||||
|
||||
self.item = node_item
|
||||
self.setPlainText(self.item.node.name)
|
||||
self.graph = graph
|
||||
|
||||
name = self.item.node.name
|
||||
if name == "":
|
||||
name = self.graph._trad.node_name(self.item.node)
|
||||
|
||||
self.setPlainText(name)
|
||||
|
||||
self.setDefaultTextColor(Qt.black)
|
||||
self.set_custom_pos(self.item.pos())
|
||||
self.setZValue(2)
|
||||
@@ -502,7 +509,7 @@ class GraphWidget(QGraphicsView):
|
||||
|
||||
for node in self.graph.nodes():
|
||||
inode = NodeItem(node, self)
|
||||
self.texts[inode] = NodeText(inode)
|
||||
self.texts[inode] = NodeText(inode, self)
|
||||
self.scene().addItem(self.texts[inode])
|
||||
self.scene().addItem(inode)
|
||||
self.node_items.append(inode)
|
||||
@@ -514,14 +521,14 @@ class GraphWidget(QGraphicsView):
|
||||
for edge in self.graph.edges():
|
||||
n1 = next(
|
||||
filter(
|
||||
lambda n: n.node.name == edge.node1.name,
|
||||
lambda n: n.node == edge.node1,
|
||||
self.node_items
|
||||
)
|
||||
)
|
||||
|
||||
n2 = next(
|
||||
filter(
|
||||
lambda n: n.node.name == edge.node2.name,
|
||||
lambda n: n.node == edge.node2,
|
||||
self.node_items
|
||||
)
|
||||
)
|
||||
@@ -578,7 +585,7 @@ class GraphWidget(QGraphicsView):
|
||||
inode = NodeItem(node, self)
|
||||
self.scene().addItem(inode)
|
||||
self.node_items.append(inode)
|
||||
self.texts[inode] = NodeText(inode)
|
||||
self.texts[inode] = NodeText(inode, self)
|
||||
self.scene().addItem(self.texts[inode])
|
||||
|
||||
self.changeNode.emit(self.sender())
|
||||
|
||||
@@ -94,6 +94,9 @@ class NodeTableModel(PamhyrTableModel):
|
||||
|
||||
return ret
|
||||
|
||||
if self._headers[index.column()] == "name":
|
||||
return self._trad.node_name(self._lst[index.row()])
|
||||
|
||||
return self._lst[index.row()][self._headers[index.column()]]
|
||||
|
||||
@pyqtSlot()
|
||||
@@ -133,6 +136,15 @@ class EdgeTableModel(PamhyrTableModel):
|
||||
if role != Qt.ItemDataRole.DisplayRole:
|
||||
return QVariant()
|
||||
|
||||
if (self._headers[index.column()] == "node1" or
|
||||
self._headers[index.column()] == "node2"):
|
||||
return self._trad.node_name(
|
||||
self._lst[index.row()][self._headers[index.column()]]
|
||||
)
|
||||
|
||||
if self._headers[index.column()] == "name":
|
||||
return self._trad.edge_name(self._lst[index.row()])
|
||||
|
||||
return self._lst[index.row()][self._headers[index.column()]]
|
||||
|
||||
@pyqtSlot()
|
||||
|
||||
@@ -90,6 +90,7 @@ class NetworkWindow(PamhyrWindow):
|
||||
table_view=table,
|
||||
table_headers=self._table_headers_node,
|
||||
editable_headers=["name"],
|
||||
trad=self._trad,
|
||||
data=self._graph,
|
||||
undo=self._undo_stack,
|
||||
)
|
||||
@@ -109,6 +110,7 @@ class NetworkWindow(PamhyrWindow):
|
||||
table_view=table,
|
||||
table_headers=self._table_headers_edge,
|
||||
editable_headers=["name", "node1", "node2"],
|
||||
trad=self._trad,
|
||||
delegates={
|
||||
"node1": self.delegate_combobox,
|
||||
"node2": self.delegate_combobox,
|
||||
|
||||
@@ -31,6 +31,9 @@ class NetworkTranslate(MainTranslate):
|
||||
"Network", "River network"
|
||||
)
|
||||
|
||||
self._dict["node"] = _translate("Network", "Node")
|
||||
self._dict["edge"] = _translate("Network", "Reach")
|
||||
|
||||
self._dict["menu_add_node"] = _translate("Network", "Add node")
|
||||
self._dict["menu_del_node"] = _translate("Network", "Delete the node")
|
||||
self._dict["menu_edit_res_node"] = _translate(
|
||||
@@ -63,3 +66,15 @@ class NetworkTranslate(MainTranslate):
|
||||
"node2": _translate("Network", "Destination node"),
|
||||
"id": _translate("Network", "Index"),
|
||||
}
|
||||
|
||||
def node_name(self, node):
|
||||
if node.name == "":
|
||||
return f"{self['node']} #{node.id}"
|
||||
|
||||
return node.name
|
||||
|
||||
def edge_name(self, edge):
|
||||
if edge.name == "":
|
||||
return f"{self['edge']} #{edge.id}"
|
||||
|
||||
return edge.name
|
||||
@@ -34,7 +34,7 @@ unit = {
|
||||
"water_elevation": "0-meter",
|
||||
"discharge": "1-m3s",
|
||||
"velocity": "2-ms",
|
||||
"depth": "3-meter",
|
||||
"max_depth": "3-meter",
|
||||
"mean_depth": "3-meter",
|
||||
"froude": "4-dimensionless",
|
||||
"wet_area": "5-m2",
|
||||
@@ -157,9 +157,9 @@ class CustomPlot(PamhyrPlot):
|
||||
)
|
||||
lines["velocity"] = line
|
||||
|
||||
if "depth" in self._y:
|
||||
if "max_depth" in self._y:
|
||||
|
||||
ax = self._axes[unit["depth"]]
|
||||
ax = self._axes[unit["max_depth"]]
|
||||
d = list(
|
||||
map(
|
||||
lambda p: p.geometry.max_water_depth(
|
||||
@@ -171,7 +171,7 @@ class CustomPlot(PamhyrPlot):
|
||||
rk, d,
|
||||
color='brown', lw=1.,
|
||||
)
|
||||
lines["depth"] = line
|
||||
lines["max_depth"] = line
|
||||
|
||||
if "mean_depth" in self._y:
|
||||
|
||||
@@ -361,9 +361,9 @@ class CustomPlot(PamhyrPlot):
|
||||
)
|
||||
lines["velocity"] = line
|
||||
|
||||
if "depth" in self._y:
|
||||
if "max_depth" in self._y:
|
||||
|
||||
ax = self._axes[unit["depth"]]
|
||||
ax = self._axes[unit["max_depth"]]
|
||||
d = list(
|
||||
map(lambda z: profile.geometry.max_water_depth(z), z)
|
||||
)
|
||||
@@ -372,7 +372,7 @@ class CustomPlot(PamhyrPlot):
|
||||
ts, d,
|
||||
color='brown', lw=1.,
|
||||
)
|
||||
lines["depth"] = line
|
||||
lines["max_depth"] = line
|
||||
|
||||
if "mean_depth" in self._y:
|
||||
|
||||
@@ -385,7 +385,7 @@ class CustomPlot(PamhyrPlot):
|
||||
ts, d,
|
||||
color='orange', lw=1.,
|
||||
)
|
||||
lines["depth"] = line
|
||||
lines["mean_depth"] = line
|
||||
|
||||
if "froude" in self._y:
|
||||
|
||||
|
||||
@@ -51,8 +51,8 @@ class PlotH(PamhyrPlot):
|
||||
self._current_reach_id = reach_id
|
||||
self._current_profile_id = profile_id
|
||||
|
||||
self.label_x = _translate("Results", "Time (s)")
|
||||
self.label_y = _translate("Results", "Discharge (m³/s)")
|
||||
self.label_x = self._trad["unit_time_s"]
|
||||
self.label_y = self._trad["unit_discharge"]
|
||||
|
||||
self.label_discharge = _translate("Results", "Cross-section discharge")
|
||||
self.label_discharge_max = _translate("Results", "Max discharge")
|
||||
|
||||
@@ -292,9 +292,9 @@ class ResultsWindow(PamhyrWindow):
|
||||
|
||||
pname = profile.name if profile.name != "" else profile.rk
|
||||
|
||||
return (f"Reach: {reach.name} | " +
|
||||
f"Profile: {pname} | " +
|
||||
f"Timestamp : {fts} ({ts} sec)")
|
||||
return (f"{self._trad['reach']}: {reach.name} | " +
|
||||
f"{self._trad['cross_section']}: {pname} | " +
|
||||
f"{self._trad['unit_time_s']} : {fts} ({ts} sec)")
|
||||
|
||||
def setup_statusbar(self):
|
||||
txt = self._compute_status_label()
|
||||
@@ -695,8 +695,8 @@ class ResultsWindow(PamhyrWindow):
|
||||
reach.profiles
|
||||
)
|
||||
)
|
||||
if "depth" in y:
|
||||
my_dict["depth"] = list(
|
||||
if "max_depth" in y:
|
||||
my_dict["max_depth"] = list(
|
||||
map(
|
||||
lambda p: p.geometry.max_water_depth(
|
||||
p.get_ts_key(timestamp, "Z")),
|
||||
@@ -760,8 +760,8 @@ class ResultsWindow(PamhyrWindow):
|
||||
q, z
|
||||
)
|
||||
)
|
||||
if "depth" in y:
|
||||
my_dict["depth"] = list(
|
||||
if "max_depth" in y:
|
||||
my_dict["max_depth"] = list(
|
||||
map(lambda z: profile.geometry.max_water_depth(z), z)
|
||||
)
|
||||
if "mean_depth" in y:
|
||||
|
||||
@@ -43,7 +43,7 @@ class ResultsTranslate(MainTranslate):
|
||||
|
||||
self._dict['x'] = _translate("Results", "X (m)")
|
||||
|
||||
self._dict['label_bottom'] = _translate("Results", "River bottom")
|
||||
self._dict['label_bottom'] = _translate("Results", "Bottom")
|
||||
self._dict['label_water'] = _translate("Results", "Water elevation")
|
||||
self._dict['label_water_max'] = _translate(
|
||||
"Results",
|
||||
@@ -91,7 +91,7 @@ class ResultsTranslate(MainTranslate):
|
||||
"water_elevation": self._dict["unit_water_elevation"],
|
||||
"discharge": self._dict["unit_discharge"],
|
||||
"velocity": self._dict["unit_speed"],
|
||||
"depth": self._dict["unit_max_height"],
|
||||
"max_depth": self._dict["unit_max_height"],
|
||||
"mean_depth": self._dict["unit_mean_height"],
|
||||
"froude": self._dict["unit_froude"],
|
||||
"wet_area": self._dict["unit_wet_area"],
|
||||
|
||||
@@ -149,6 +149,9 @@ class WindowToolKit(object):
|
||||
msg.setInformativeText(informative_text)
|
||||
msg.setWindowTitle(window_title)
|
||||
|
||||
msg.findChild(QLabel, "qt_msgbox_label")\
|
||||
.setFixedWidth(384)
|
||||
|
||||
msg.exec_()
|
||||
|
||||
|
||||
|
||||
+28
-1
@@ -66,8 +66,9 @@ class UnitTranslate(CommonWordTranslate):
|
||||
self._dict["unit_water_elevation"] = _translate(
|
||||
"Unit", "Water elevation (m)"
|
||||
)
|
||||
|
||||
self._dict["unit_speed"] = _translate("Unit", "Velocity (m/s)")
|
||||
self._dict["unit_discharge"] = _translate("Unit", "Discharge (m³/s)")
|
||||
self._dict["unit_discharge"] = _translate("Unit", "Discharge (m^3/s)")
|
||||
self._dict["unit_area"] = _translate("Unit", "Area (hectare)")
|
||||
|
||||
self._dict["unit_time_s"] = _translate("Unit", "Time (sec)")
|
||||
@@ -116,3 +117,29 @@ class MainTranslate(UnitTranslate):
|
||||
self._dict["active_window"] = _translate(
|
||||
"MainWindow", "Enable this window"
|
||||
)
|
||||
|
||||
# Message box
|
||||
self._dict["mb_select_reach_title"] = _translate(
|
||||
"MainWindow", "Please select a reach"
|
||||
)
|
||||
self._dict["mb_select_reach_msg"] = _translate(
|
||||
"MainWindow",
|
||||
"This edition window need a reach selected "
|
||||
"into the river network to work on it"
|
||||
)
|
||||
|
||||
self._dict["mb_last_open_title"] = _translate(
|
||||
"MainWindow", "Last open study"
|
||||
)
|
||||
self._dict["mb_last_open_msg"] = _translate(
|
||||
"MainWindow",
|
||||
"Do you want to open again the last open study?"
|
||||
)
|
||||
|
||||
self._dict["mb_close_title"] = _translate(
|
||||
"MainWindow", "Close without saving study"
|
||||
)
|
||||
self._dict["mb_close_msg"] = _translate(
|
||||
"MainWindow",
|
||||
"Do you want to save current study before closing it?"
|
||||
)
|
||||
@@ -382,7 +382,7 @@
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_language">
|
||||
<attribute name="title">
|
||||
<string>Langue</string>
|
||||
<string>Language</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
|
||||
@@ -27,21 +27,21 @@
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_generate_1">
|
||||
<property name="text">
|
||||
<string>Generate depth</string>
|
||||
<string>Generate uniform depth</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_generate_2">
|
||||
<property name="text">
|
||||
<string>Generate discharge</string>
|
||||
<string>Generate uniform discharge</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_generate_3">
|
||||
<property name="text">
|
||||
<string>Generate elevation</string>
|
||||
<string>Generate uniform elevation</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Discharge (m³/s)</string>
|
||||
<string>Discharge (m^3/s)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>194</width>
|
||||
<width>251</width>
|
||||
<height>114</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -27,7 +27,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>Number of points to keep</string>
|
||||
<string>Maximum number of points to keep</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
</property>
|
||||
<widget class="QWidget" name="tab_4">
|
||||
<attribute name="title">
|
||||
<string>Raw data</string>
|
||||
<string>Data</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="1">
|
||||
|
||||
+234
-35
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>640</width>
|
||||
<height>360</height>
|
||||
<height>361</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -17,8 +17,35 @@
|
||||
<locale language="English" country="Europe"/>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_logo_pamhyr2">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>ressources/Pamhyr2_logo.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_logo_inrae">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>ressources/Logo-INRAE.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_title">
|
||||
<property name="font">
|
||||
@@ -33,34 +60,216 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Copyright © 2022-2024 INRAE</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_version">
|
||||
<property name="text">
|
||||
<string>Version: @version @codename</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_license">
|
||||
<property name="text">
|
||||
<string>License: GPLv3+</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_logo_gpl">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>ressources/GPLv3_Logo.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string><a href="https://gitlab.irstea.fr/theophile.terraz/pamhyr">Source code</a></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6"/>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_copyright">
|
||||
<property name="text">
|
||||
<string>...</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_version">
|
||||
<property name="text">
|
||||
<string>Version: @version</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_license">
|
||||
<property name="text">
|
||||
<string>License: GPLv3+</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string><a href="https://gitlab.irstea.fr/theophile.terraz/pamhyr">Source code</a></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -79,16 +288,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_logo_pamhyr2">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>ressources/Pamhyr2_logo.png</pixmap>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
+450
-330
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user