Skip to content

Commit

Permalink
FEM: replace vertical factor scroll bar with a horizonal one
Browse files Browse the repository at this point in the history
Signed-off-by: Przemo Firszt <przemo@firszt.eu>
  • Loading branch information
PrzemoF authored and wwmayer committed Apr 9, 2015
1 parent 54bb4e2 commit 8489a01
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 28 deletions.
6 changes: 3 additions & 3 deletions src/Mod/Fem/MechanicalAnalysis.py
Expand Up @@ -583,7 +583,7 @@ def __init__(self,object):
QtCore.QObject.connect(self.form.comboBox_Type, QtCore.SIGNAL("currentIndexChanged(QString)"), self.typeChanged)

QtCore.QObject.connect(self.form.checkBox_ShowDisplacement, QtCore.SIGNAL("clicked(bool)"), self.showDisplacementClicked)
QtCore.QObject.connect(self.form.verticalScrollBar_Factor, QtCore.SIGNAL("valueChanged(int)"), self.sliderValue)
QtCore.QObject.connect(self.form.horizontalScrollBar_Factor, QtCore.SIGNAL("valueChanged(int)"), self.sliderValue)
QtCore.QObject.connect(self.form.spinBox_SliderFactor, QtCore.SIGNAL("valueChanged(int)"), self.sliderMaxValue)
QtCore.QObject.connect(self.form.spinBox_DisplacementFactor, QtCore.SIGNAL("valueChanged(int)"), self.displacementFactorValue)

Expand Down Expand Up @@ -635,11 +635,11 @@ def sliderValue(self,value):

def sliderMaxValue(self,value):
#print 'sliderMaxValue()'
self.form.verticalScrollBar_Factor.setMaximum(value)
self.form.horizontalScrollBar_Factor.setMaximum(value)

def displacementFactorValue(self,value):
#print 'displacementFactorValue()'
self.form.verticalScrollBar_Factor.setValue(value)
self.form.horizontalScrollBar_Factor.setValue(value)

def setDisplacement(self):
if self.DisplacementObject:
Expand Down
41 changes: 16 additions & 25 deletions src/Mod/Fem/ShowDisplacement.ui
Expand Up @@ -45,9 +45,9 @@
<property name="readOnly">
<bool>true</bool>
</property>
<property name="unit" stdset="0">
<string>mm</string>
</property>
<property name="unit" stdset="0">
<string>mm</string>
</property>
</widget>
</item>
<item row="1" column="0">
Expand All @@ -62,9 +62,9 @@
<property name="readOnly">
<bool>true</bool>
</property>
<property name="unit" stdset="0">
<string>mm</string>
</property>
<property name="unit" stdset="0">
<string>mm</string>
</property>
</widget>
</item>
<item row="2" column="0">
Expand All @@ -79,9 +79,9 @@
<property name="readOnly">
<bool>true</bool>
</property>
<property name="unit" stdset="0">
<string>mm</string>
</property>
<property name="unit" stdset="0">
<string>mm</string>
</property>
</widget>
</item>
</layout>
Expand Down Expand Up @@ -159,6 +159,13 @@
</item>
</layout>
</item>
<item>
<widget class="QScrollBar" name="horizontalScrollBar_Factor">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
</layout>
</widget>
</item>
Expand All @@ -177,22 +184,6 @@
</item>
</layout>
</item>
<item>
<widget class="QScrollBar" name="verticalScrollBar_Factor">
<property name="maximum">
<number>100</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="sliderPosition">
<number>1</number>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
Expand Down

0 comments on commit 8489a01

Please sign in to comment.