Skip to content

Commit

Permalink
[CC] Path Selector H to V
Browse files Browse the repository at this point in the history
  • Loading branch information
BonneelP committed Sep 2, 2022
1 parent be1bc8a commit 97d771a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 32 deletions.
2 changes: 1 addition & 1 deletion pyleecan/GUI/Dialog/DMachineSetup/SSimu/SSimu.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def __init__(self, machine, material_dict, is_stator):
# Setup path result selection
self.w_path_result.obj = None
self.w_path_result.param_name = None
self.w_path_result.verbose_name = "Path"
self.w_path_result.verbose_name = "Results folder"
self.w_path_result.extension = None
self.w_path_result.is_file = False
self.w_path_result.update()
Expand Down
38 changes: 19 additions & 19 deletions pyleecan/GUI/Dialog/DMachineSetup/SSimu/SSimu.ui
Original file line number Diff line number Diff line change
Expand Up @@ -439,25 +439,9 @@ p, li { white-space: pre-wrap; }
<item>
<widget class="QGroupBox" name="g_out">
<property name="title">
<string>Results</string>
<string>Output</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="WPathSelector" name="w_path_result" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
Expand All @@ -472,6 +456,22 @@ p, li { white-space: pre-wrap; }
</item>
</layout>
</item>
<item>
<widget class="WPathSelectorV" name="w_path_result" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="is_losses">
<property name="text">
Expand Down Expand Up @@ -548,9 +548,9 @@ p, li { white-space: pre-wrap; }
<header>.....GUI/Tools/FloatEdit.h</header>
</customwidget>
<customwidget>
<class>WPathSelector</class>
<class>WPathSelectorV</class>
<extends>QWidget</extends>
<header>.....GUI.Tools.WPathSelector.WPathSelector</header>
<header>.....GUI.Tools.WPathSelector.WPathSelectorV</header>
<container>1</container>
</customwidget>
<customwidget>
Expand Down
27 changes: 15 additions & 12 deletions pyleecan/GUI/Dialog/DMachineSetup/SSimu/Ui_SSimu.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from PySide2.QtWidgets import *

from .....GUI.Tools.FloatEdit import FloatEdit
from .....GUI.Tools.WPathSelector.WPathSelector import WPathSelector
from .....GUI.Tools.WPathSelector.WPathSelectorV import WPathSelectorV
from .....GUI.Tools.MPLCanvas import MPLCanvas

from pyleecan.GUI.Resources import pyleecan_rc
Expand Down Expand Up @@ -230,16 +230,6 @@ def setupUi(self, SSimu):
self.g_out.setObjectName(u"g_out")
self.verticalLayout = QVBoxLayout(self.g_out)
self.verticalLayout.setObjectName(u"verticalLayout")
self.w_path_result = WPathSelector(self.g_out)
self.w_path_result.setObjectName(u"w_path_result")
sizePolicy1.setHeightForWidth(
self.w_path_result.sizePolicy().hasHeightForWidth()
)
self.w_path_result.setSizePolicy(sizePolicy1)
self.w_path_result.setMinimumSize(QSize(100, 0))

self.verticalLayout.addWidget(self.w_path_result)

self.horizontalLayout_2 = QHBoxLayout()
self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
self.in_name = QLabel(self.g_out)
Expand All @@ -254,6 +244,19 @@ def setupUi(self, SSimu):

self.verticalLayout.addLayout(self.horizontalLayout_2)

self.w_path_result = WPathSelectorV(self.g_out)
self.w_path_result.setObjectName(u"w_path_result")
sizePolicy2 = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred)
sizePolicy2.setHorizontalStretch(0)
sizePolicy2.setVerticalStretch(0)
sizePolicy2.setHeightForWidth(
self.w_path_result.sizePolicy().hasHeightForWidth()
)
self.w_path_result.setSizePolicy(sizePolicy2)
self.w_path_result.setMinimumSize(QSize(100, 0))

self.verticalLayout.addWidget(self.w_path_result)

self.is_losses = QCheckBox(self.g_out)
self.is_losses.setObjectName(u"is_losses")

Expand Down Expand Up @@ -434,7 +437,7 @@ def retranslateUi(self, SSimu):
self.in_nb_worker.setText(
QCoreApplication.translate("SSimu", u"Number of workers:", None)
)
self.g_out.setTitle(QCoreApplication.translate("SSimu", u"Results", None))
self.g_out.setTitle(QCoreApplication.translate("SSimu", u"Output", None))
self.in_name.setText(QCoreApplication.translate("SSimu", u"Simu name:", None))
self.is_losses.setText(
QCoreApplication.translate("SSimu", u"Compute core and Joule losses", None)
Expand Down

0 comments on commit 97d771a

Please sign in to comment.