Skip to content

Commit 97d771a

Browse files
committed
[CC] Path Selector H to V
1 parent be1bc8a commit 97d771a

File tree

3 files changed

+35
-32
lines changed

3 files changed

+35
-32
lines changed

pyleecan/GUI/Dialog/DMachineSetup/SSimu/SSimu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def __init__(self, machine, material_dict, is_stator):
126126
# Setup path result selection
127127
self.w_path_result.obj = None
128128
self.w_path_result.param_name = None
129-
self.w_path_result.verbose_name = "Path"
129+
self.w_path_result.verbose_name = "Results folder"
130130
self.w_path_result.extension = None
131131
self.w_path_result.is_file = False
132132
self.w_path_result.update()

pyleecan/GUI/Dialog/DMachineSetup/SSimu/SSimu.ui

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -439,25 +439,9 @@ p, li { white-space: pre-wrap; }
439439
<item>
440440
<widget class="QGroupBox" name="g_out">
441441
<property name="title">
442-
<string>Results</string>
442+
<string>Output</string>
443443
</property>
444444
<layout class="QVBoxLayout" name="verticalLayout">
445-
<item>
446-
<widget class="WPathSelector" name="w_path_result" native="true">
447-
<property name="sizePolicy">
448-
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
449-
<horstretch>0</horstretch>
450-
<verstretch>0</verstretch>
451-
</sizepolicy>
452-
</property>
453-
<property name="minimumSize">
454-
<size>
455-
<width>100</width>
456-
<height>0</height>
457-
</size>
458-
</property>
459-
</widget>
460-
</item>
461445
<item>
462446
<layout class="QHBoxLayout" name="horizontalLayout_2">
463447
<item>
@@ -472,6 +456,22 @@ p, li { white-space: pre-wrap; }
472456
</item>
473457
</layout>
474458
</item>
459+
<item>
460+
<widget class="WPathSelectorV" name="w_path_result" native="true">
461+
<property name="sizePolicy">
462+
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
463+
<horstretch>0</horstretch>
464+
<verstretch>0</verstretch>
465+
</sizepolicy>
466+
</property>
467+
<property name="minimumSize">
468+
<size>
469+
<width>100</width>
470+
<height>0</height>
471+
</size>
472+
</property>
473+
</widget>
474+
</item>
475475
<item>
476476
<widget class="QCheckBox" name="is_losses">
477477
<property name="text">
@@ -548,9 +548,9 @@ p, li { white-space: pre-wrap; }
548548
<header>.....GUI/Tools/FloatEdit.h</header>
549549
</customwidget>
550550
<customwidget>
551-
<class>WPathSelector</class>
551+
<class>WPathSelectorV</class>
552552
<extends>QWidget</extends>
553-
<header>.....GUI.Tools.WPathSelector.WPathSelector</header>
553+
<header>.....GUI.Tools.WPathSelector.WPathSelectorV</header>
554554
<container>1</container>
555555
</customwidget>
556556
<customwidget>

pyleecan/GUI/Dialog/DMachineSetup/SSimu/Ui_SSimu.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from PySide2.QtWidgets import *
1111

1212
from .....GUI.Tools.FloatEdit import FloatEdit
13-
from .....GUI.Tools.WPathSelector.WPathSelector import WPathSelector
13+
from .....GUI.Tools.WPathSelector.WPathSelectorV import WPathSelectorV
1414
from .....GUI.Tools.MPLCanvas import MPLCanvas
1515

1616
from pyleecan.GUI.Resources import pyleecan_rc
@@ -230,16 +230,6 @@ def setupUi(self, SSimu):
230230
self.g_out.setObjectName(u"g_out")
231231
self.verticalLayout = QVBoxLayout(self.g_out)
232232
self.verticalLayout.setObjectName(u"verticalLayout")
233-
self.w_path_result = WPathSelector(self.g_out)
234-
self.w_path_result.setObjectName(u"w_path_result")
235-
sizePolicy1.setHeightForWidth(
236-
self.w_path_result.sizePolicy().hasHeightForWidth()
237-
)
238-
self.w_path_result.setSizePolicy(sizePolicy1)
239-
self.w_path_result.setMinimumSize(QSize(100, 0))
240-
241-
self.verticalLayout.addWidget(self.w_path_result)
242-
243233
self.horizontalLayout_2 = QHBoxLayout()
244234
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
245235
self.in_name = QLabel(self.g_out)
@@ -254,6 +244,19 @@ def setupUi(self, SSimu):
254244

255245
self.verticalLayout.addLayout(self.horizontalLayout_2)
256246

247+
self.w_path_result = WPathSelectorV(self.g_out)
248+
self.w_path_result.setObjectName(u"w_path_result")
249+
sizePolicy2 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
250+
sizePolicy2.setHorizontalStretch(0)
251+
sizePolicy2.setVerticalStretch(0)
252+
sizePolicy2.setHeightForWidth(
253+
self.w_path_result.sizePolicy().hasHeightForWidth()
254+
)
255+
self.w_path_result.setSizePolicy(sizePolicy2)
256+
self.w_path_result.setMinimumSize(QSize(100, 0))
257+
258+
self.verticalLayout.addWidget(self.w_path_result)
259+
257260
self.is_losses = QCheckBox(self.g_out)
258261
self.is_losses.setObjectName(u"is_losses")
259262

@@ -434,7 +437,7 @@ def retranslateUi(self, SSimu):
434437
self.in_nb_worker.setText(
435438
QCoreApplication.translate("SSimu", u"Number of workers:", None)
436439
)
437-
self.g_out.setTitle(QCoreApplication.translate("SSimu", u"Results", None))
440+
self.g_out.setTitle(QCoreApplication.translate("SSimu", u"Output", None))
438441
self.in_name.setText(QCoreApplication.translate("SSimu", u"Simu name:", None))
439442
self.is_losses.setText(
440443
QCoreApplication.translate("SSimu", u"Compute core and Joule losses", None)

0 commit comments

Comments
 (0)