[chronojump] Encoder configuration anchorage list (different diameters) WIP (2)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder configuration anchorage list (different diameters) WIP (2)
- Date: Thu, 30 Jul 2015 11:25:28 +0000 (UTC)
commit f86d01b908dbf1e11ace524f16f13faacbbce6ad
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Jul 30 13:24:58 2015 +0200
Encoder configuration anchorage list (different diameters) WIP (2)
glade/chronojump.glade | 293 ++++++++++++++++++++++++++-------------
src/encoder.cs | 6 +-
src/gui/encoderConfiguration.cs | 17 ++-
3 files changed, 209 insertions(+), 107 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index a533847..50a3c18 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -7639,6 +7639,9 @@ after time</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
<child>
@@ -9032,6 +9035,9 @@ after time</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">2</property>
@@ -10066,6 +10072,9 @@ after time</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="position">4</property>
@@ -21553,6 +21562,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -22486,6 +22498,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -23911,6 +23926,9 @@ by you</property>
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkButton" id="button_video_url">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -24393,6 +24411,9 @@ by you</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -26899,11 +26920,12 @@ comments</property>
</child>
<child>
<widget class="GtkVBox" id="vbox3">
+ <property name="width_request">300</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">8</property>
<child>
- <widget class="GtkHBox" id="hbox9">
+ <widget class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -26915,108 +26937,108 @@ comments</property>
<signal name="toggled"
handler="on_check_rotary_friction_inertia_on_axis_toggled" swapped="no"/>
</widget>
<packing>
- <property name="expand">True</property>
+ <property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
<child>
<widget class="GtkHBox" id="hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">10</property>
<child>
- <widget class="GtkButton" id="button_previous">
+ <widget class="GtkHBox" id="hbox11">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <signal name="clicked" handler="on_button_previous_clicked"
swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
<child>
- <widget class="GtkAlignment" id="alignment2">
+ <widget class="GtkButton" id="button_previous">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
<property name="xalign">0</property>
+ <signal name="clicked" handler="on_button_previous_clicked"
swapped="no"/>
<child>
- <widget class="GtkImage" id="image2988">
+ <widget class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-media-previous</property>
- <property name="icon-size">3</property>
+ <property name="xalign">0</property>
+ <child>
+ <widget class="GtkImage" id="image2988">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-media-previous</property>
+ <property name="icon-size">3</property>
+ </widget>
+ </child>
</widget>
</child>
</widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
</child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label_count">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkButton" id="button_next">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <signal name="clicked" handler="on_button_next_clicked"
swapped="no"/>
<child>
- <widget class="GtkAlignment" id="alignment4">
+ <widget class="GtkLabel" id="label_count">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_next">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
<property name="xalign">0</property>
+ <signal name="clicked" handler="on_button_next_clicked"
swapped="no"/>
<child>
- <widget class="GtkImage" id="image1">
+ <widget class="GtkAlignment" id="alignment4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-media-next</property>
- <property name="icon-size">3</property>
+ <property name="xalign">0</property>
+ <child>
+ <widget class="GtkImage" id="image1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-media-next</property>
+ <property name="icon-size">3</property>
+ </widget>
+ </child>
</widget>
</child>
</widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
</child>
</widget>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">0</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">True</property>
- <property name="fill">False</property>
- <property name="position">0</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -27101,32 +27123,37 @@ comments</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox_d">
+ <widget class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">10</property>
+ <property name="bottom_padding">8</property>
<child>
- <widget class="GtkHBox" id="hbox10">
+ <widget class="GtkVBox" id="vbox_d">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">8</property>
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Number of
anchorages</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="spacing">10</property>
<child>
- <widget class="GtkComboBox" id="combo_d_num">
+ <widget class="GtkHBox" id="hbox10">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="items">1
+ <property name="spacing">8</property>
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Number
of anchorages</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkComboBox" id="combo_d_num">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="items">1
2
3
4
@@ -27136,7 +27163,30 @@ comments</property>
8
9
10</property>
- <signal name="changed"
handler="on_combo_d_num_changed" swapped="no"/>
+ <signal name="changed"
handler="on_combo_d_num_changed" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label22">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip" translatable="yes">Average
diameter (cm) of wrapped rope on each anchorage.</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Average
diameter (cm) of wrapped rope on each anchorage.</property>
+ <property name="ellipsize">end</property>
+ <property name="max_width_chars">18</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -27144,27 +27194,33 @@ comments</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox_list_d">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
<child>
- <placeholder/>
+ <widget class="GtkHBox" id="hbox_list_d">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHSeparator" id="hseparator1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
</child>
</widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
</child>
</widget>
<packing>
@@ -27536,7 +27592,7 @@ to the center of the loads.</property>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
@@ -35858,6 +35914,24 @@ options</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -37553,6 +37627,18 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -38920,9 +39006,6 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<placeholder/>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<widget class="GtkLabel" id="label218">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -39855,6 +39938,9 @@ To differentiate between male and female, use the values 1/0, or m/f, or M/F on
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -43575,6 +43661,9 @@ It starts before and arrives there with some speed.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="left_attach">2</property>
@@ -44172,6 +44261,9 @@ It starts before and arrives there with some speed.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
@@ -44784,6 +44876,9 @@ It starts before and arrives there with some speed.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
</child>
</widget>
diff --git a/src/encoder.cs b/src/encoder.cs
index 468f539..dfc4ca2 100644
--- a/src/encoder.cs
+++ b/src/encoder.cs
@@ -1124,7 +1124,7 @@ public class EncoderConfiguration {
image = Constants.FileNameEncoderFrictionSideInertialLateral;
code = "Rotary friction - inertial machine side - horizontal movement";
text = Catalog.GetString("Rotary friction encoder on inertial machine when person is
moving horizontally.") + "\n" +
- "*" + Catalog.GetString("Start capture with the string completely
unwrapped.") + "*" + "\n" +
+ "*" + Catalog.GetString("Start capture with the rope completely unwrapped.")
+ "*" + "\n" +
Catalog.GetString("On inertial machines, 'd' means the average diameter where
the pull-push string is rolled");
has_d = true;
@@ -1168,7 +1168,7 @@ public class EncoderConfiguration {
image = Constants.FileNameEncoderFrictionAxisInertialLateral;
code = "Rotary friction - inertial machine axis - horizontal movement";
text = Catalog.GetString("Rotary friction encoder on inertial machine when person is
moving horizontally.") + "\n" +
- "*" + Catalog.GetString("Start capture with the string completely
unwrapped.") + "*" + "\n" +
+ "*" + Catalog.GetString("Start capture with the rope completely unwrapped.")
+ "*" + "\n" +
Catalog.GetString("On inertial machines, 'd' means the average diameter where
the pull-push string is rolled");
has_d = true;
@@ -1232,7 +1232,7 @@ public class EncoderConfiguration {
image = Constants.FileNameEncoderAxisInertialLateral;
code = "Rotary axis - inertial machine - horizontal movement";
text = Catalog.GetString("Rotary axis encoder on inertial machine when person is
moving horizontally.") + "\n" +
- "*" + Catalog.GetString("Start capture with the string completely
unwrapped.") + "*" + "\n" +
+ "*" + Catalog.GetString("Start capture with the rope completely unwrapped.")
+ "*" + "\n" +
Catalog.GetString("On inertial machines, 'd' means the average diameter where
the pull-push string is rolled");
has_d = true;
diff --git a/src/gui/encoderConfiguration.cs b/src/gui/encoderConfiguration.cs
index 9973872..c1bbd45 100644
--- a/src/gui/encoderConfiguration.cs
+++ b/src/gui/encoderConfiguration.cs
@@ -51,8 +51,12 @@ public class EncoderConfigurationWindow
[Widget] Gtk.TextView textview;
- [Widget] Gtk.Box hbox_d; //TODO: this will be deprecated
- [Widget] Gtk.Box vbox_d;
+ //diameter when there's no inertia
+ [Widget] Gtk.Box hbox_d;
+ [Widget] Gtk.SpinButton spin_d;
+
+ //diameters whent there's inertia (is plural because there can be many anchorages)
+ [Widget] Gtk.Box vbox_d;
[Widget] Gtk.Box hbox_list_d;
[Widget] Gtk.ComboBox combo_d_num;
[Widget] Gtk.SpinButton spin_d_0;
@@ -66,6 +70,7 @@ public class EncoderConfigurationWindow
[Widget] Gtk.SpinButton spin_d_8;
[Widget] Gtk.SpinButton spin_d_9;
+
[Widget] Gtk.Box hbox_D;
[Widget] Gtk.Box hbox_angle_push;
[Widget] Gtk.Box hbox_angle_weight;
@@ -74,7 +79,6 @@ public class EncoderConfigurationWindow
[Widget] Gtk.Box hbox_inertia_length;
[Widget] Gtk.Box vbox_inertia_calcule;
- [Widget] Gtk.SpinButton spin_d; //TODO: this will be deprecated
[Widget] Gtk.SpinButton spin_D;
[Widget] Gtk.SpinButton spin_angle_push;
[Widget] Gtk.SpinButton spin_angle_weight;
@@ -265,8 +269,9 @@ public class EncoderConfigurationWindow
tb1.Text = "[" + ec.code + "]\n" + ec.text;
textview.Buffer = tb1;
- hbox_d.Visible = ec.has_d;
- vbox_d.Visible = ec.has_d;
+ hbox_d.Visible = (ec.has_d && ! ec.has_inertia);
+ vbox_d.Visible = (ec.has_d && ec.has_inertia);
+
hbox_D.Visible = ec.has_D;
hbox_angle_push.Visible = ec.has_angle_push;
hbox_angle_weight.Visible = ec.has_angle_weight;
@@ -322,6 +327,8 @@ public class EncoderConfigurationWindow
spin_d_7 = new Gtk.SpinButton(new Adjustment(4, .5f, 80.0f, .01f, 10.0f, 0f), 1, 2);
spin_d_8 = new Gtk.SpinButton(new Adjustment(4, .5f, 80.0f, .01f, 10.0f, 0f), 1, 2);
spin_d_9 = new Gtk.SpinButton(new Adjustment(4, .5f, 80.0f, .01f, 10.0f, 0f), 1, 2);
+
+ combo_d_num.Active = 0;
reset_hbox_list_d (1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]