mirror of https://gitlab.com/pamhyr/pamhyr2
pep8: Change to respect pep8 code style.
parent
1ab1cb37b0
commit
eea355a784
|
|
@ -122,7 +122,7 @@ test-pep8:
|
||||||
- pip3 install -r ./requirements.txt
|
- pip3 install -r ./requirements.txt
|
||||||
- pip3 install -U -r ./requirements.txt
|
- pip3 install -U -r ./requirements.txt
|
||||||
- pip3 install pycodestyle
|
- pip3 install pycodestyle
|
||||||
- pycodestyle ./src
|
- pycodestyle --exclude="*_to_*.py" ./src
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
#########
|
#########
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ from Model.Tools.PamhyrDB import SQLSubModel
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
||||||
|
|
||||||
class Friction(SQLSubModel):
|
class Friction(SQLSubModel):
|
||||||
def __init__(self, name: str = "", status=None):
|
def __init__(self, name: str = "", status=None):
|
||||||
super(Friction, self).__init__()
|
super(Friction, self).__init__()
|
||||||
|
|
|
||||||
|
|
@ -437,40 +437,55 @@ class ProfileXYZ(Profile, SQLSubModel):
|
||||||
return abs(rg.dist(rd))
|
return abs(rg.dist(rd))
|
||||||
|
|
||||||
def get_water_limits(self, z):
|
def get_water_limits(self, z):
|
||||||
#==============================================================================
|
# ====================================================================
|
||||||
# détermination des points limites RG et RD pour un niveau d'eau donné
|
# détermination des points limites RG et RD pour un niveau
|
||||||
|
# d'eau donné
|
||||||
#
|
#
|
||||||
# irg et ird sont les premiers indices en partant des rives gauche et
|
# irg et ird sont les premiers indices en partant des rives
|
||||||
# droite qui correspondent à des points sous la surface de l'eau
|
# gauche et droite qui correspondent à des points sous la
|
||||||
# ptX et ptY sont les points interpolés où le plan d'eau intersecte le profil
|
# surface de l'eau ptX et ptY sont les points interpolés où
|
||||||
# known_level est le niveau d'eau pour lequel on a obtenu irg, ird, ptX et ptY
|
# le plan d'eau intersecte le profil known_level est le
|
||||||
#==============================================================================
|
# niveau d'eau pour lequel on a obtenu irg, ird, ptX et ptY
|
||||||
|
# ====================================================================
|
||||||
|
|
||||||
# initialisation
|
# initialisation
|
||||||
irg = -1 ; ird = -1
|
irg = -1
|
||||||
|
ird = -1
|
||||||
|
|
||||||
for i in range(self.number_points):
|
for i in range(self.number_points):
|
||||||
if self.point(i).z <= z:
|
if self.point(i).z <= z:
|
||||||
irg = i
|
irg = i
|
||||||
|
|
||||||
for i in reversed(range(self.number_points)):
|
for i in reversed(range(self.number_points)):
|
||||||
if self.point(i).z <= z:
|
if self.point(i).z <= z:
|
||||||
ird = i
|
ird = i
|
||||||
|
|
||||||
# interpolation des points ptX et ptY
|
# interpolation des points ptX et ptY
|
||||||
if (irg < self.number_points - 1):
|
if (irg < self.number_points - 1):
|
||||||
x=np.interp(z,
|
x = np.interp(
|
||||||
|
z,
|
||||||
[self.point(irg).z, self.point(irg + 1).z],
|
[self.point(irg).z, self.point(irg + 1).z],
|
||||||
[self.point(irg).x,self.point(irg+1).x])
|
[self.point(irg).x, self.point(irg + 1).x]
|
||||||
y=np.interp(z,
|
)
|
||||||
|
y = np.interp(
|
||||||
|
z,
|
||||||
[self.point(irg).z, self.point(irg + 1).z],
|
[self.point(irg).z, self.point(irg + 1).z],
|
||||||
[self.point(irg).y,self.point(irg+1).y])
|
[self.point(irg).y, self.point(irg + 1).y]
|
||||||
|
)
|
||||||
ptX = PointXYZ(x, y, z)
|
ptX = PointXYZ(x, y, z)
|
||||||
else:
|
else:
|
||||||
ptX = self.point(0)
|
ptX = self.point(0)
|
||||||
if (ird > 0):
|
if (ird > 0):
|
||||||
x=np.interp(z,
|
x = np.interp(
|
||||||
|
z,
|
||||||
[self.point(ird-1).z, self.point(ird).z],
|
[self.point(ird-1).z, self.point(ird).z],
|
||||||
[self.point(ird-1).x,self.point(ird).x])
|
[self.point(ird-1).x, self.point(ird).x]
|
||||||
y=np.interp(z,
|
)
|
||||||
|
y = np.interp(
|
||||||
|
z,
|
||||||
[self.point(ird).z, self.point(ird - 1).z],
|
[self.point(ird).z, self.point(ird - 1).z],
|
||||||
[self.point(ird).y,self.point(ird-1).y])
|
[self.point(ird).y, self.point(ird - 1).y]
|
||||||
|
)
|
||||||
ptY = PointXYZ(x, y, z)
|
ptY = PointXYZ(x, y, z)
|
||||||
else:
|
else:
|
||||||
ptY = self.point(self.number_points - 1)
|
ptY = self.point(self.number_points - 1)
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ from Model.HydraulicStructures.Basic.Value import (
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
||||||
|
|
||||||
class BasicHS(SQLSubModel):
|
class BasicHS(SQLSubModel):
|
||||||
_sub_classes = [
|
_sub_classes = [
|
||||||
BHSValue,
|
BHSValue,
|
||||||
|
|
|
||||||
|
|
@ -16,18 +16,22 @@
|
||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from Model.Except import NotImplementedMethodeError
|
|
||||||
|
|
||||||
from Model.HydraulicStructures.Basic.HydraulicStructures import (
|
from Model.HydraulicStructures.Basic.HydraulicStructures import (
|
||||||
BasicHS
|
BasicHS
|
||||||
)
|
)
|
||||||
|
|
||||||
from Model.HydraulicStructures.Basic.Value import (
|
from Model.HydraulicStructures.Basic.Value import (
|
||||||
BHSValue
|
BHSValue
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class NotDefined(BasicHS):
|
class NotDefined(BasicHS):
|
||||||
def __init__(self, id: int = -1, name: str = "", status=None):
|
def __init__(self, id: int = -1, name: str = "",
|
||||||
super(NotDefined, self).__init__(id=id, name=name, status=status)
|
status=None):
|
||||||
|
super(NotDefined, self).__init__(
|
||||||
|
id=id, name=name,
|
||||||
|
status=status
|
||||||
|
)
|
||||||
|
|
||||||
self._type = "ND"
|
self._type = "ND"
|
||||||
self._data = [
|
self._data = [
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
from Model.Tools.PamhyrDB import SQLSubModel
|
from Model.Tools.PamhyrDB import SQLSubModel
|
||||||
|
|
||||||
|
|
||||||
class BHSValue(SQLSubModel):
|
class BHSValue(SQLSubModel):
|
||||||
_sub_classes = []
|
_sub_classes = []
|
||||||
_id_cnt = 0
|
_id_cnt = 0
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ from Model.HydraulicStructures.Basic.Types import (
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
|
||||||
|
|
||||||
class HydraulicStructure(SQLSubModel):
|
class HydraulicStructure(SQLSubModel):
|
||||||
_sub_classes = [
|
_sub_classes = [
|
||||||
BasicHS,
|
BasicHS,
|
||||||
|
|
@ -55,7 +56,10 @@ class HydraulicStructure(SQLSubModel):
|
||||||
self._enabled = True
|
self._enabled = True
|
||||||
self._data = []
|
self._data = []
|
||||||
|
|
||||||
HydraulicStructure._id_cnt = max(HydraulicStructure._id_cnt + 1, self.id)
|
HydraulicStructure._id_cnt = max(
|
||||||
|
HydraulicStructure._id_cnt + 1,
|
||||||
|
self.id
|
||||||
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _db_create(cls, execute):
|
def _db_create(cls, execute):
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ from tools import trace, timer
|
||||||
from Model.Tools.PamhyrList import PamhyrModelList
|
from Model.Tools.PamhyrList import PamhyrModelList
|
||||||
from Model.HydraulicStructures.HydraulicStructures import HydraulicStructure
|
from Model.HydraulicStructures.HydraulicStructures import HydraulicStructure
|
||||||
|
|
||||||
|
|
||||||
class HydraulicStructureList(PamhyrModelList):
|
class HydraulicStructureList(PamhyrModelList):
|
||||||
_sub_classes = [
|
_sub_classes = [
|
||||||
HydraulicStructure,
|
HydraulicStructure,
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,11 @@ class Reservoir(SQLSubModel):
|
||||||
|
|
||||||
new_reservoir._node = None
|
new_reservoir._node = None
|
||||||
if node_id != -1:
|
if node_id != -1:
|
||||||
new_reservoir._node = next(filter(lambda n: n.id == node_id, data["nodes"]))
|
new_reservoir._node = next(
|
||||||
|
filter(
|
||||||
|
lambda n: n.id == node_id, data["nodes"]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
new_data = []
|
new_data = []
|
||||||
table = execute(
|
table = execute(
|
||||||
|
|
|
||||||
|
|
@ -242,7 +242,9 @@ class River(Graph, SQLSubModel):
|
||||||
self._parameters = {}
|
self._parameters = {}
|
||||||
self._sediment_layers = SedimentLayerList(status=self._status)
|
self._sediment_layers = SedimentLayerList(status=self._status)
|
||||||
self._reservoir = ReservoirList(status=self._status)
|
self._reservoir = ReservoirList(status=self._status)
|
||||||
self._hydraulic_structures = HydraulicStructureList(status=self._status)
|
self._hydraulic_structures = HydraulicStructureList(
|
||||||
|
status=self._status
|
||||||
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _db_create(cls, execute):
|
def _db_create(cls, execute):
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ class PamhyrModelDict(SQLSubModel):
|
||||||
if key in self._dict:
|
if key in self._dict:
|
||||||
v = self._dict[key]
|
v = self._dict[key]
|
||||||
|
|
||||||
if type(v) == types.GeneratorType:
|
if type(v) is types.GeneratorType:
|
||||||
return list(v)
|
return list(v)
|
||||||
|
|
||||||
return v
|
return v
|
||||||
|
|
|
||||||
|
|
@ -453,9 +453,20 @@ class Mage(CommandLineSolver):
|
||||||
for hs in hydraulic_structures:
|
for hs in hydraulic_structures:
|
||||||
if hs.reach.is_enable:
|
if hs.reach.is_enable:
|
||||||
reach_id = study.river.get_edge_id(hs.reach)
|
reach_id = study.river.get_edge_id(hs.reach)
|
||||||
params = [p.value for p in hs.basic_hydraulic_structure.param]
|
params = [
|
||||||
param_str = ' '.join([f'{p.value:>10.3f}' for p in hs.basic_hydraulic_structure.param])
|
p.value for p in hs.basic_hydraulic_structure.param
|
||||||
f.write(f"{hs.basic_hydraulic_structure.type} {reach_id} {hs.kp:>12.3f} {params} {hs.name}\n")
|
]
|
||||||
|
param_str = ' '.join(
|
||||||
|
[
|
||||||
|
f'{p.value:>10.3f}'
|
||||||
|
for p in hs.basic_hydraulic_structure.param
|
||||||
|
]
|
||||||
|
)
|
||||||
|
f.write(
|
||||||
|
f"{hs.basic_hydraulic_structure.type} " +
|
||||||
|
f"{reach_id} {hs.kp:>12.3f} {params} " +
|
||||||
|
"{hs.name}\n"
|
||||||
|
)
|
||||||
|
|
||||||
return files
|
return files
|
||||||
|
|
||||||
|
|
@ -465,7 +476,11 @@ class Mage(CommandLineSolver):
|
||||||
qlog.put("Export REP file")
|
qlog.put("Export REP file")
|
||||||
|
|
||||||
# Write header
|
# Write header
|
||||||
with mage_file_open(os.path.join(repertory, f"{name}.REP"), "w+") as f:
|
with mage_file_open(
|
||||||
|
os.path.join(
|
||||||
|
repertory, f"{name}.REP"
|
||||||
|
), "w+"
|
||||||
|
) as f:
|
||||||
f.write("confirmation=non\n")
|
f.write("confirmation=non\n")
|
||||||
|
|
||||||
for file in files:
|
for file in files:
|
||||||
|
|
@ -832,12 +847,13 @@ class Mage8(Mage):
|
||||||
# Set data for profile RI
|
# Set data for profile RI
|
||||||
reach.set(ri, timestamp, key, d)
|
reach.set(ri, timestamp, key, d)
|
||||||
if key == "Z":
|
if key == "Z":
|
||||||
profile = study.river.current_reach().reach.profile(ri)
|
profile = study.river\
|
||||||
|
.current_reach()\
|
||||||
|
.reach.profile(ri)
|
||||||
ptX, ptY = profile.get_water_limits(d)
|
ptX, ptY = profile.get_water_limits(d)
|
||||||
reach.set(ri, timestamp, "ptX", ptX)
|
reach.set(ri, timestamp, "ptX", ptX)
|
||||||
reach.set(ri, timestamp, "ptY", ptY)
|
reach.set(ri, timestamp, "ptY", ptY)
|
||||||
|
|
||||||
|
|
||||||
endline()
|
endline()
|
||||||
end = newline().size <= 0
|
end = newline().size <= 0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,6 @@ class PlotKPC(PamhyrPlot):
|
||||||
color='red', lw=1.
|
color='red', lw=1.
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
self.canvas.figure.tight_layout()
|
self.canvas.figure.tight_layout()
|
||||||
self.canvas.figure.canvas.draw_idle()
|
self.canvas.figure.canvas.draw_idle()
|
||||||
if self.toolbar is not None:
|
if self.toolbar is not None:
|
||||||
|
|
@ -156,4 +155,3 @@ class PlotKPC(PamhyrPlot):
|
||||||
if self.profile is not None:
|
if self.profile is not None:
|
||||||
self.profile.set_data([], [])
|
self.profile.set_data([], [])
|
||||||
self.canvas.figure.canvas.draw_idle()
|
self.canvas.figure.canvas.draw_idle()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,9 @@ class ComboBoxDelegate(QItemDelegate):
|
||||||
|
|
||||||
val = []
|
val = []
|
||||||
if self._mode == "kp":
|
if self._mode == "kp":
|
||||||
reach = self._data.hydraulic_structures.get(index.row()).input_reach
|
reach = self._data.hydraulic_structures\
|
||||||
|
.get(index.row())\
|
||||||
|
.input_reach
|
||||||
if reach is not None:
|
if reach is not None:
|
||||||
val = list(
|
val = list(
|
||||||
map(
|
map(
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ class SetEnabledCommand(QUndoCommand):
|
||||||
logger.info(f"Undo {self._old} -> {self._new}")
|
logger.info(f"Undo {self._old} -> {self._new}")
|
||||||
self._h_s_lst.get(self._index).enabled = self._new
|
self._h_s_lst.get(self._index).enabled = self._new
|
||||||
|
|
||||||
|
|
||||||
class AddCommand(QUndoCommand):
|
class AddCommand(QUndoCommand):
|
||||||
def __init__(self, h_s_lst, index):
|
def __init__(self, h_s_lst, index):
|
||||||
QUndoCommand.__init__(self)
|
QUndoCommand.__init__(self)
|
||||||
|
|
|
||||||
|
|
@ -291,7 +291,6 @@ class HydraulicStructuresWindow(PamhyrWindow):
|
||||||
self.plot_ac.clear()
|
self.plot_ac.clear()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
if profile is not None:
|
if profile is not None:
|
||||||
self.plot_kpc.set_profile(profile[0])
|
self.plot_kpc.set_profile(profile[0])
|
||||||
self.plot_ac.set_profile(profile[0])
|
self.plot_ac.set_profile(profile[0])
|
||||||
|
|
|
||||||
|
|
@ -195,7 +195,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||||
"action_menu_edit_geometry": self.open_geometry,
|
"action_menu_edit_geometry": self.open_geometry,
|
||||||
"action_menu_boundary_conditions": self.open_boundary_cond,
|
"action_menu_boundary_conditions": self.open_boundary_cond,
|
||||||
"action_menu_edit_reservoirs": self.open_reservoir,
|
"action_menu_edit_reservoirs": self.open_reservoir,
|
||||||
"action_menu_edit_hydraulic_structures": self.open_hydraulic_structures,
|
"action_menu_edit_hydraulic_structures":
|
||||||
|
self.open_hydraulic_structures,
|
||||||
"action_menu_initial_conditions": self.open_initial_conditions,
|
"action_menu_initial_conditions": self.open_initial_conditions,
|
||||||
"action_menu_edit_friction": self.open_frictions,
|
"action_menu_edit_friction": self.open_frictions,
|
||||||
"action_menu_edit_lateral_contribution": self.open_lateral_contrib,
|
"action_menu_edit_lateral_contribution": self.open_lateral_contrib,
|
||||||
|
|
@ -282,7 +283,6 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||||
Nothing
|
Nothing
|
||||||
"""
|
"""
|
||||||
self.update_enable_action()
|
self.update_enable_action()
|
||||||
# Maximise window
|
|
||||||
# self.showMaximized()
|
# self.showMaximized()
|
||||||
|
|
||||||
def set_debug_lvl(self, debug=True):
|
def set_debug_lvl(self, debug=True):
|
||||||
|
|
@ -638,7 +638,10 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||||
):
|
):
|
||||||
return
|
return
|
||||||
|
|
||||||
hydraulic_structures = HydraulicStructuresWindow(study=self._study, parent=self)
|
hydraulic_structures = HydraulicStructuresWindow(
|
||||||
|
study=self._study,
|
||||||
|
parent=self
|
||||||
|
)
|
||||||
hydraulic_structures.show()
|
hydraulic_structures.show()
|
||||||
|
|
||||||
def open_lateral_contrib(self):
|
def open_lateral_contrib(self):
|
||||||
|
|
@ -648,7 +651,10 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||||
):
|
):
|
||||||
return
|
return
|
||||||
|
|
||||||
lateral = LateralContributionWindow(study=self._study, parent=self)
|
lateral = LateralContributionWindow(
|
||||||
|
study=self._study,
|
||||||
|
parent=self
|
||||||
|
)
|
||||||
lateral.show()
|
lateral.show()
|
||||||
|
|
||||||
def open_stricklers(self):
|
def open_stricklers(self):
|
||||||
|
|
|
||||||
|
|
@ -88,18 +88,13 @@ class EditReservoirWindow(PamhyrWindow):
|
||||||
def setup_table(self):
|
def setup_table(self):
|
||||||
headers = {}
|
headers = {}
|
||||||
table_headers = self._trad.get_dict("table_headers")
|
table_headers = self._trad.get_dict("table_headers")
|
||||||
#for h in self._data.header:
|
|
||||||
#headers[h] = table_headers[h]
|
|
||||||
|
|
||||||
table = self.find(QTableView, "tableView")
|
table = self.find(QTableView, "tableView")
|
||||||
self._table = TableModel(
|
self._table = TableModel(
|
||||||
table_view=table,
|
table_view=table,
|
||||||
table_headers=table_headers,
|
table_headers=table_headers,
|
||||||
editable_headers=table_headers,
|
editable_headers=table_headers,
|
||||||
#editable_headers=self._data.header,
|
delegates={},
|
||||||
delegates={
|
|
||||||
#"time": self._delegate_time,
|
|
||||||
},
|
|
||||||
data=self._data,
|
data=self._data,
|
||||||
undo=self._undo_stack,
|
undo=self._undo_stack,
|
||||||
opt_data=self._study.time_system
|
opt_data=self._study.time_system
|
||||||
|
|
|
||||||
|
|
@ -105,8 +105,14 @@ class PlotKPC(PamhyrPlot):
|
||||||
)
|
)
|
||||||
|
|
||||||
self.profile, = self.canvas.axes.plot(
|
self.profile, = self.canvas.axes.plot(
|
||||||
[kp[self._current_profile_id], kp[self._current_profile_id]],
|
[
|
||||||
[z_max[self._current_profile_id],z_min[self._current_profile_id]],
|
kp[self._current_profile_id],
|
||||||
|
kp[self._current_profile_id]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
z_max[self._current_profile_id],
|
||||||
|
z_min[self._current_profile_id]
|
||||||
|
],
|
||||||
color='red', lw=1.
|
color='red', lw=1.
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -137,7 +143,13 @@ class PlotKPC(PamhyrPlot):
|
||||||
z_min = reach.geometry.get_z_min()
|
z_min = reach.geometry.get_z_min()
|
||||||
z_max = reach.geometry.get_z_max()
|
z_max = reach.geometry.get_z_max()
|
||||||
self.profile.set_data(
|
self.profile.set_data(
|
||||||
[kp[self._current_profile_id], kp[self._current_profile_id]],
|
[
|
||||||
[z_max[self._current_profile_id],z_min[self._current_profile_id]]
|
kp[self._current_profile_id],
|
||||||
|
kp[self._current_profile_id]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
z_max[self._current_profile_id],
|
||||||
|
z_min[self._current_profile_id]
|
||||||
|
]
|
||||||
)
|
)
|
||||||
self.canvas.figure.canvas.draw_idle()
|
self.canvas.figure.canvas.draw_idle()
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,11 @@ class PlotXY(PamhyrPlot):
|
||||||
poly_x = [0]
|
poly_x = [0]
|
||||||
poly_y = [0]
|
poly_y = [0]
|
||||||
|
|
||||||
self.fill = self.canvas.axes.fill(poly_x, poly_y, color='skyblue', alpha=0.7)
|
self.fill = self.canvas.axes.fill(
|
||||||
|
poly_x, poly_y,
|
||||||
|
color='skyblue',
|
||||||
|
alpha=0.7
|
||||||
|
)
|
||||||
|
|
||||||
# self.canvas.axes.autoscale_view(True, True, True)
|
# self.canvas.axes.autoscale_view(True, True, True)
|
||||||
# self.canvas.axes.autoscale()
|
# self.canvas.axes.autoscale()
|
||||||
|
|
|
||||||
|
|
@ -125,9 +125,13 @@ class ResultsWindow(PamhyrWindow):
|
||||||
self._slider_time.setValue(len(self._timestamps) - 1)
|
self._slider_time.setValue(len(self._timestamps) - 1)
|
||||||
|
|
||||||
self._icon_start = QIcon()
|
self._icon_start = QIcon()
|
||||||
self._icon_start.addPixmap(QPixmap('./src/View/ui/ressources/media-playback-start.png'))
|
self._icon_start.addPixmap(
|
||||||
|
QPixmap('./src/View/ui/ressources/media-playback-start.png')
|
||||||
|
)
|
||||||
self._icon_pause = QIcon()
|
self._icon_pause = QIcon()
|
||||||
self._icon_pause.addPixmap(QPixmap('./src/View/ui/ressources/media-playback-pause.png'))
|
self._icon_pause.addPixmap(
|
||||||
|
QPixmap('./src/View/ui/ressources/media-playback-pause.png')
|
||||||
|
)
|
||||||
self._button_play = self.find(QPushButton, f"playButton")
|
self._button_play = self.find(QPushButton, f"playButton")
|
||||||
self._button_play.setIcon(self._icon_start)
|
self._button_play.setIcon(self._icon_start)
|
||||||
self._button_back = self.find(QPushButton, f"backButton")
|
self._button_back = self.find(QPushButton, f"backButton")
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,7 @@ def logger_color_reset():
|
||||||
return f"{Style.RESET_ALL}"
|
return f"{Style.RESET_ALL}"
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
def logger_exception(exception):
|
def logger_exception(exception):
|
||||||
logger.error(
|
logger.error(
|
||||||
f"[{Fore.RED}ERROR{Style.RESET_ALL}] " +
|
f"[{Fore.RED}ERROR{Style.RESET_ALL}] " +
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue