mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Connect preferences to the rest of the code
The biggest problem here was that bool has different sizes in C and C++ code. So using this in a structure shared between the two sides wasn't a smart idea. Instead I went with 'short', but that caused problems with Qt being to smart for its own good and not doing the right thing when dealing with 'boolean' settings and a short value. This may be something in the way I implemented things (as I doubt that something this fundamental would be broken) but the workaround implemented here (explicitly using 0 or 1 depending on the value of the boolean) seems to work. I also decided to get rid of the confusion of where gflow/gfhigh are floating point (0..1) and when they are integers (0..100). We now use integers anywhere outside of deco.c. I also applied some serious spelling corrections to the preferences dialog's ui file. Finally, this enables the code that selects which partial pressure graph to show. Still to do: font size, metric/imperial logic Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8394828806
commit
4f53ad736d
10 changed files with 120 additions and 92 deletions
|
|
@ -449,12 +449,12 @@
|
|||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>threshould</string>
|
||||
<string>threshold</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="po2Threashould">
|
||||
<widget class="QDoubleSpinBox" name="po2Threshold">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
|
@ -490,12 +490,12 @@
|
|||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>threshould</string>
|
||||
<string>threshold</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="pn2Threshould">
|
||||
<widget class="QDoubleSpinBox" name="pn2Threshold">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
|
@ -531,12 +531,12 @@
|
|||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>threshould</string>
|
||||
<string>threshold</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="pheThreshould">
|
||||
<widget class="QDoubleSpinBox" name="pheThreshold">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
|
|
@ -650,7 +650,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="gflow"/>
|
||||
<widget class="QSpinBox" name="gflow"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_20">
|
||||
|
|
@ -660,7 +660,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="gfhigh"/>
|
||||
<widget class="QSpinBox" name="gfhigh"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
|
@ -754,7 +754,7 @@
|
|||
<connection>
|
||||
<sender>po2</sender>
|
||||
<signal>clicked(bool)</signal>
|
||||
<receiver>po2Threashould</receiver>
|
||||
<receiver>po2Threshold</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
|
@ -786,7 +786,7 @@
|
|||
<connection>
|
||||
<sender>pn2</sender>
|
||||
<signal>clicked(bool)</signal>
|
||||
<receiver>pn2Threshould</receiver>
|
||||
<receiver>pn2Threshold</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
|
@ -818,7 +818,7 @@
|
|||
<connection>
|
||||
<sender>phe</sender>
|
||||
<signal>clicked(bool)</signal>
|
||||
<receiver>pheThreshould</receiver>
|
||||
<receiver>pheThreshold</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue