[chronojump] personSession stores leg_length, trochanter-floor. gui on addModifyWin
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] personSession stores leg_length, trochanter-floor. gui on addModifyWin
- Date: Tue, 7 Jan 2020 14:26:19 +0000 (UTC)
commit dba4ad10e5ee6faaddde6174b043534d7cb94d3c
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jan 7 15:22:41 2020 +0100
personSession stores leg_length, trochanter-floor. gui on addModifyWin
glade/person_win.glade | 892 +++++++++++++++++++++++++++++---------------
src/gui/networks.cs | 5 +-
src/gui/person.cs | 78 +++-
src/personSession.cs | 30 +-
src/sqlite/main.cs | 4 +-
src/sqlite/personSession.cs | 27 +-
6 files changed, 702 insertions(+), 334 deletions(-)
---
diff --git a/glade/person_win.glade b/glade/person_win.glade
index b02bb286..278364c3 100644
--- a/glade/person_win.glade
+++ b/glade/person_win.glade
@@ -3,7 +3,6 @@
<!-- interface-requires gtk+ 3.0 -->
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkWindow" id="person_win">
- <property name="width_request">425</property>
<property name="can_focus">False</property>
<property name="has_default">True</property>
<property name="border_width">10</property>
@@ -28,24 +27,18 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">8</property>
- <property name="spacing">12</property>
+ <property name="spacing">20</property>
<child>
<widget class="GtkTable" id="table2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">5</property>
+ <property name="n_rows">4</property>
<property name="n_columns">3</property>
<property name="column_spacing">10</property>
<property name="row_spacing">12</property>
<child>
<placeholder/>
</child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
<child>
<widget class="GtkLabel" id="label19">
<property name="visible">True</property>
@@ -166,21 +159,22 @@
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox8">
+ <widget class="GtkHBox" id="hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">10</property>
<child>
- <widget class="GtkLabel" id="label48">
+ <widget class="GtkButton" id="button_weight_metric">
+ <property name="label" translatable="yes">Use metric units</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Weight</property>
- <property name="use_markup">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="on_button_weight_metric_clicked" swapped="no"/>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
@@ -225,36 +219,10 @@
</packing>
</child>
</widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkButton" id="button_weight_metric">
- <property name="label" translatable="yes">Use metric units</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked" handler="on_button_weight_metric_clicked" swapped="no"/>
- </widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
@@ -263,102 +231,8 @@
<property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox11">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkLabel" id="label13">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Height</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox12">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkSpinButton" id="spinbutton_height">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</property>
- <property name="activates_default">True</property>
- <property name="primary_icon_activatable">False</property>
- <property name="secondary_icon_activatable">False</property>
- <property name="primary_icon_sensitive">True</property>
- <property name="secondary_icon_sensitive">True</property>
- <property name="adjustment">0 0 250 0.10000000000000001 10 0</property>
- <property name="climb_rate">1</property>
- <property name="digits">1</property>
- <property name="numeric">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label12">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label">cm</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox13">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <widget class="GtkButton" id="button_height_metric">
- <property name="label" translatable="yes">Use metric units</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked" handler="on_button_height_metric_clicked" swapped="no"/>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
@@ -372,8 +246,8 @@
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"/>
</packing>
@@ -393,11 +267,30 @@
<packing>
<property name="left_attach">2</property>
<property name="right_attach">3</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
<property name="y_options"/>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label48">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Weight</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -412,102 +305,89 @@
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkHBox" id="hbox_photo">
+ <widget class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="spacing">12</property>
<child>
- <widget class="GtkVBox" id="vbox_photo">
+ <widget class="GtkHBox" id="hbox_photo">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">2</property>
+ <property name="border_width">6</property>
+ <property name="spacing">12</property>
<child>
- <widget class="GtkImage" id="image_photo_mini">
- <property name="width_request">150</property>
+ <widget class="GtkVBox" id="vbox_photo">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</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="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">8</property>
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">2</property>
<child>
- <widget class="GtkLabel" id="label4">
+ <widget class="GtkImage" id="image_photo_mini">
+ <property name="width_request">150</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Load from file</property>
+ <property name="stock">gtk-missing-image</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
- <child>
- <widget class="GtkButton" id="button_add_photo_file">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="tooltip" translatable="yes">Add photo from
file</property>
- <signal name="clicked" handler="on_button_add_photo_file_clicked"
swapped="no"/>
- <child>
- <widget class="GtkImage" id="image_photo_from_file">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">1</property>
- </packing>
- </child>
</widget>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox3">
+ <widget class="GtkVBox" id="vbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">4</property>
+ <property name="spacing">10</property>
<child>
- <widget class="GtkLabel" id="label14">
+ <widget class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Snapshot</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Load from file</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_add_photo_file">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip" translatable="yes">Add photo from
file</property>
+ <signal name="clicked" handler="on_button_add_photo_file_clicked"
swapped="no"/>
+ <child>
+ <widget class="GtkImage" id="image_photo_from_file">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-missing-image</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">False</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
@@ -579,29 +459,30 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
</widget>
@@ -651,8 +532,8 @@
</child>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -670,148 +551,356 @@
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox1">
+ <widget class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">10</property>
- <property name="spacing">16</property>
+ <property name="border_width">8</property>
+ <property name="spacing">20</property>
<child>
- <widget class="GtkFrame" id="frame3">
+ <widget class="GtkFrame" id="frame5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkTable" id="table_person">
+ <widget class="GtkHBox" id="hbox14">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">6</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">6</property>
- <property name="row_spacing">4</property>
+ <property name="border_width">14</property>
+ <property name="spacing">10</property>
<child>
- <placeholder/>
- </child>
- <child>
- <widget class="GtkLabel" id="label218">
+ <widget class="GtkLabel" id="label13">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">Date of Birth</property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">Person height</property>
</widget>
<packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox132">
+ <widget class="GtkHBox" id="hbox12">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="border_width">4</property>
- <property name="spacing">8</property>
+ <property name="spacing">10</property>
<child>
- <widget class="GtkLabel" id="label_date">
+ <widget class="GtkSpinButton" id="spinbutton_height">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="activates_default">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">0 0 250 0.10000000000000001 10 0</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
</widget>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkAlignment" id="alignment140">
+ <widget class="GtkLabel" id="label21">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <widget class="GtkButton" id="button_calendar">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <property name="tooltip" translatable="yes">Change date</property>
- <signal name="clicked" handler="on_button_calendar_clicked"
swapped="no"/>
- <child>
- <widget class="GtkImage" id="image_calendar">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- </child>
- </widget>
- </child>
+ <property name="label">cm</property>
</widget>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label507">
+ <widget class="GtkButton" id="button_height_metric">
+ <property name="label" translatable="yes">Use metric units</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Country</property>
- <property name="use_markup">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="on_button_height_metric_clicked" swapped="no"/>
</widget>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</property>
</packing>
</child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label20">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Used on sprint analysis</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</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="GtkFrame" id="frame6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <widget class="GtkVBox" id="vbox6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">14</property>
+ <property name="spacing">20</property>
<child>
- <widget class="GtkHBox" id="hbox_combo_continents">
+ <widget class="GtkVBox" id="vbox7">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="spacing">10</property>
<child>
- <placeholder/>
+ <widget class="GtkHBox" id="hbox15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Leg length</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkSpinButton" id="spinbutton_leg_length">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="activates_default">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">0 0 250 0.10000000000000001 10
0</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label16">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">cm</property>
+ </widget>
+ <packing>
+ <property name="expand">False</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>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_leg_length_metric">
+ <property name="label" translatable="yes">Use metric units</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="on_button_leg_length_metric_clicked"
swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</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="xalign">0</property>
+ <property name="label" translatable="yes">Measured from trochanter to toe
with foot extended</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
</child>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">GTK_FILL</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox_combo_countries">
+ <widget class="GtkVBox" id="vbox8">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="spacing">10</property>
<child>
- <placeholder/>
+ <widget class="GtkHBox" id="hbox11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkLabel" id="label24">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Hips height on SJ
flexion</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox16">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkSpinButton"
id="spinbutton_trochanter_floor_on_flexion">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</property>
+ <property name="activates_default">True</property>
+ <property name="primary_icon_activatable">False</property>
+ <property name="secondary_icon_activatable">False</property>
+ <property name="primary_icon_sensitive">True</property>
+ <property name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">0 0 250 0.10000000000000001 10
0</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">cm</property>
+ </widget>
+ <packing>
+ <property name="expand">False</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>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_trochanter_floor_on_flexion_metric">
+ <property name="label" translatable="yes">Use metric units</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked"
handler="on_button_trochanter_floor_on_flexion_metric_clicked" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</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="label26">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Measured from trochanter to the
ground in Squat jump flexion</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
</child>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
</child>
<child>
- <widget class="GtkLabel" id="label1">
+ <widget class="GtkLabel" id="label23">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Data of person</property>
- <property name="use_markup">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Used on jump force/speed profile</property>
</widget>
<packing>
<property name="type">label_item</property>
@@ -821,36 +910,228 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">0</property>
+ <property name="position">1</property>
</packing>
</child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Test specific</property>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">10</property>
+ <property name="spacing">20</property>
<child>
- <widget class="GtkFrame" id="frame4">
- <property name="height_request">90</property>
+ <widget class="GtkFrame" id="frame3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
- <widget class="GtkScrolledWindow" id="scrolledwindow3">
+ <widget class="GtkVBox" id="vbox9">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
<property name="border_width">6</property>
- <property name="hscrollbar_policy">automatic</property>
- <property name="vscrollbar_policy">automatic</property>
+ <property name="spacing">6</property>
<child>
- <widget class="GtkTextView" id="textview_description">
+ <widget class="GtkTable" id="table_person">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="can_focus">False</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">4</property>
+ <child>
+ <widget class="GtkLabel" id="label218">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Date of Birth</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox132">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">4</property>
+ <property name="spacing">8</property>
+ <child>
+ <widget class="GtkLabel" id="label_date">
+ <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">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment140">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkButton" id="button_calendar">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <property name="tooltip" translatable="yes">Change date</property>
+ <signal name="clicked" handler="on_button_calendar_clicked"
swapped="no"/>
+ <child>
+ <widget class="GtkImage" id="image_calendar">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label507">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Continent</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox_combo_continents">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox_combo_countries">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Country</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"/>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">Description</property>
+ </widget>
+ <packing>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow3">
+ <property name="height_request">55</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="border_width">6</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <widget class="GtkTextView" id="textview_description">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
</widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
</child>
</widget>
</child>
<child>
- <widget class="GtkLabel" id="label5">
+ <widget class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Description</property>
+ <property name="label" translatable="yes">Data of person</property>
<property name="use_markup">True</property>
</widget>
<packing>
@@ -861,7 +1142,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">1</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
@@ -927,19 +1208,21 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
+ <property name="yalign">0</property>
<property name="label" translatable="yes">Comments</property>
</widget>
<packing>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
<property name="x_options">GTK_FILL</property>
- <property name="y_options"/>
+ <property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox254">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="spacing">4</property>
<child>
<widget class="GtkHBox" id="hbox_combo_sports">
<property name="can_focus">False</property>
@@ -1021,6 +1304,8 @@
<property name="height_request">55</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hscrollbar_policy">automatic</property>
+ <property name="vscrollbar_policy">automatic</property>
<child>
<widget class="GtkTextView" id="textview_ps_comments">
<property name="visible">True</property>
@@ -1033,7 +1318,6 @@
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
@@ -1054,22 +1338,22 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
<packing>
- <property name="position">1</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Advanced</property>
+ <property name="label" translatable="yes">Other data</property>
</widget>
<packing>
- <property name="position">1</property>
+ <property name="position">2</property>
<property name="tab_fill">False</property>
<property name="type">tab</property>
</packing>
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index b44f3d75..b363bdd4 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -810,7 +810,10 @@ public partial class ChronoJumpWindow
Constants.SportUndefinedID,
Constants.SpeciallityUndefinedID,
Constants.LevelUndefinedID,
- "", false); //comments, dbconOpened
+ "", //comments
+ Constants.TrochanterToeUndefinedID,
+ Constants.TrochanterFloorOnFlexionUndefinedID,
+ false); //dbconOpened
else
currentPersonSession = ps;
}
diff --git a/src/gui/person.cs b/src/gui/person.cs
index 90dafe2a..8d9f5d81 100644
--- a/src/gui/person.cs
+++ b/src/gui/person.cs
@@ -252,7 +252,9 @@ public class PersonRecuperateWindow {
myPS.Height, myPS.Weight,
myPS.SportID, myPS.SpeciallityID,
myPS.Practice,
- myPS.Comments,
+ myPS.Comments,
+ myPS.TrochanterToe,
+ myPS.TrochanterFloorOnFlexion,
false); //dbconOpened
store = new TreeStore( typeof (string), typeof (string), typeof (string), typeof
(string), typeof (string) );
@@ -568,7 +570,8 @@ public class PersonsRecuperateFromOtherSessionWindow : PersonRecuperateWindow
personSessions.Add(new PersonSession(
psID ++, currentPerson.UniqueID,
currentSession.UniqueID,
currentPersonSession.Height,
currentPersonSession.Weight, currentPersonSession.SportID,
- currentPersonSession.SpeciallityID,
currentPersonSession.Practice, currentPersonSession.Comments)
+ currentPersonSession.SpeciallityID,
currentPersonSession.Practice, currentPersonSession.Comments,
+ currentPersonSession.TrochanterToe,
currentPersonSession.TrochanterFloorOnFlexion)
);
inserted ++;
@@ -823,8 +826,10 @@ public class PersonAddModifyWindow
//[Widget] Gtk.Button button_change_date;
[Widget] Gtk.Image image_calendar;
- [Widget] Gtk.SpinButton spinbutton_height;
[Widget] Gtk.SpinButton spinbutton_weight;
+ [Widget] Gtk.SpinButton spinbutton_height;
+ [Widget] Gtk.SpinButton spinbutton_leg_length;
+ [Widget] Gtk.SpinButton spinbutton_trochanter_floor_on_flexion;
[Widget] Gtk.Box hbox_combo_sports;
[Widget] Gtk.ComboBox combo_sports;
@@ -1417,8 +1422,10 @@ public class PersonAddModifyWindow
//PERSONSESSION STUFF
PersonSession myPS = SqlitePersonSession.Select(currentPerson.UniqueID,
currentSession.UniqueID);
- spinbutton_height.Value = myPS.Height;
spinbutton_weight.Value = myPS.Weight;
+ spinbutton_height.Value = myPS.Height;
+ spinbutton_leg_length.Value = myPS.TrochanterToe; //future1: altura trochanter -
punta del pie en extension
+ spinbutton_trochanter_floor_on_flexion.Value = myPS.TrochanterFloorOnFlexion;
//future2: altura trochanter - suelo en flexión
weightIni = myPS.Weight; //store for tracking if changes
@@ -1491,6 +1498,20 @@ public class PersonAddModifyWindow
on_entries_required_changed(new object(), new EventArgs());
}
+ void on_button_weight_metric_clicked(object obj, EventArgs args)
+ {
+ genericWin = GenericWindow.Show(Catalog.GetString("Weight"),
+ Catalog.GetString("Select your weight in pounds"),
+ Constants.GenericWindowShow.SPINDOUBLE, true);
+ genericWin.Button_accept.Clicked += new EventHandler(on_button_weight_metric_accepted);
+ }
+ void on_button_weight_metric_accepted (object obj, EventArgs args)
+ {
+ genericWin.Button_accept.Clicked -= new EventHandler(on_button_weight_metric_accepted);
+
+ spinbutton_weight.Value = Util.ConvertPoundsToKg(genericWin.SpinDoubleSelected);
+ }
+
void on_button_height_metric_clicked(object obj, EventArgs args)
{
genericWin = GenericWindow.Show(Catalog.GetString("Height"), Catalog.GetString("Select your
height"), Constants.GenericWindowShow.HEIGHTMETRIC, true);
@@ -1507,20 +1528,37 @@ public class PersonAddModifyWindow
);
}
- void on_button_weight_metric_clicked(object obj, EventArgs args)
+ void on_button_leg_length_metric_clicked(object obj, EventArgs args)
{
- genericWin = GenericWindow.Show(Catalog.GetString("Weight"),
- Catalog.GetString("Select your weight in pounds"),
- Constants.GenericWindowShow.SPINDOUBLE, true);
- genericWin.Button_accept.Clicked += new EventHandler(on_button_weight_metric_accepted);
+ genericWin = GenericWindow.Show(Catalog.GetString("Height"), Catalog.GetString("Select your
leg length"), Constants.GenericWindowShow.HEIGHTMETRIC, true);
+ genericWin.Button_accept.Clicked += new EventHandler(on_button_leg_length_metric_accepted);
}
- void on_button_weight_metric_accepted (object obj, EventArgs args)
+ void on_button_leg_length_metric_accepted (object obj, EventArgs args)
{
- genericWin.Button_accept.Clicked -= new EventHandler(on_button_weight_metric_accepted);
+ genericWin.Button_accept.Clicked -= new EventHandler(on_button_leg_length_metric_accepted);
- spinbutton_weight.Value = Util.ConvertPoundsToKg(genericWin.SpinDoubleSelected);
+ string [] myStr = genericWin.TwoSpinSelected.Split(new char[] {':'});
+ spinbutton_leg_length.Value = Util.ConvertFeetInchesToCm(
+ Convert.ToInt32(myStr[0]),
+ Convert.ToDouble(myStr[1])
+ );
}
+ void on_button_trochanter_floor_on_flexion_metric_clicked(object obj, EventArgs args)
+ {
+ genericWin = GenericWindow.Show(Catalog.GetString("Height"), Catalog.GetString("Select your
hips height on flexion"), Constants.GenericWindowShow.HEIGHTMETRIC, true);
+ genericWin.Button_accept.Clicked += new
EventHandler(on_button_trochanter_floor_on_flexion_metric_accepted);
+ }
+ void on_button_trochanter_floor_on_flexion_metric_accepted (object obj, EventArgs args)
+ {
+ genericWin.Button_accept.Clicked -= new
EventHandler(on_button_trochanter_floor_on_flexion_metric_accepted);
+
+ string [] myStr = genericWin.TwoSpinSelected.Split(new char[] {':'});
+ spinbutton_trochanter_floor_on_flexion.Value = Util.ConvertFeetInchesToCm(
+ Convert.ToInt32(myStr[0]),
+ Convert.ToDouble(myStr[1])
+ );
+ }
private void on_combo_sports_changed(object o, EventArgs args) {
if (o == null)
@@ -1802,6 +1840,8 @@ public class PersonAddModifyWindow
myPS.SportID, myPS.SpeciallityID,
myPS.Practice,
myPS.Comments,
+ myPS.TrochanterToe,
+ myPS.TrochanterFloorOnFlexion,
false); //dbconOpened
fakeButtonAccept.Click();
@@ -1859,7 +1899,10 @@ public class PersonAddModifyWindow
sport.UniqueID,
Convert.ToInt32(Util.FindOnArray(':', 2, 0,
UtilGtk.ComboGetActive(combo_speciallities), speciallities)),
Util.FetchID(UtilGtk.ComboGetActive(combo_levels)),
- textview_ps_comments.Buffer.Text, false); //dbconOpened
+ textview_ps_comments.Buffer.Text,
+ (double) spinbutton_leg_length.Value,
+ (double) spinbutton_trochanter_floor_on_flexion.Value,
+ false); //dbconOpened
LogB.Information("inserted both");
//if we added photo while creating, filename is -1.png or -1.png, change name
@@ -1902,7 +1945,9 @@ public class PersonAddModifyWindow
sport.UniqueID,
Convert.ToInt32(Util.FindOnArray(':', 2, 0,
UtilGtk.ComboGetActive(combo_speciallities), speciallities)),
Util.FetchID(UtilGtk.ComboGetActive(combo_levels)),
- textview_ps_comments.Buffer.Text);
+ textview_ps_comments.Buffer.Text,
+ (double) spinbutton_leg_length.Value,
+ (double) spinbutton_trochanter_floor_on_flexion.Value);
//3.- update in database
SqlitePersonSession.Update (currentPersonSession);
@@ -2534,7 +2579,10 @@ public class PersonAddMultipleWindow {
currentSession.PersonsSportID,
currentSession.PersonsSpeciallityID,
currentSession.PersonsPractice,
- "") //comments
+ "", //comments
+ Constants.TrochanterToeUndefinedID,
+ Constants.TrochanterFloorOnFlexionUndefinedID
+ )
);
personsCreatedCount ++;
diff --git a/src/personSession.cs b/src/personSession.cs
index 6a8fec50..6d175a00 100644
--- a/src/personSession.cs
+++ b/src/personSession.cs
@@ -34,6 +34,8 @@ public class PersonSession {
private int speciallityID;
private int practice; //-1 undefined, sedentary, 1 regular practice, 2 competition, 3 (alto
rendimiento)
private string comments;
+ private double trochanterToe;
+ private double trochanterFloorOnFlexion;
public PersonSession()
@@ -45,7 +47,8 @@ public class PersonSession {
public PersonSession(int uniqueID,
int personID, int sessionID,
double height, double weight, int sportID,
- int speciallityID, int practice, string comments)
+ int speciallityID, int practice, string comments,
+ double trochanterToe, double trochanterFloorOnFlexion)
{
comments = Util.RemoveTildeAndColon(comments);
@@ -58,6 +61,8 @@ public class PersonSession {
this.speciallityID = speciallityID;
this.practice = practice;
this.comments = comments;
+ this.trochanterToe = trochanterToe;
+ this.trochanterFloorOnFlexion = trochanterFloorOnFlexion;
}
//creation
@@ -65,7 +70,9 @@ public class PersonSession {
//this adds to personSession77 table in database
public PersonSession(int personID, int sessionID,
double height, double weight, int sportID,
- int speciallityID, int practice, string comments, bool dbconOpened)
+ int speciallityID, int practice, string comments,
+ double trochanterToe, double trochanterFloorOnFlexion,
+ bool dbconOpened)
{
comments = Util.RemoveTildeAndColon(comments);
@@ -77,6 +84,8 @@ public class PersonSession {
this.speciallityID = speciallityID;
this.practice = practice;
this.comments = comments;
+ this.trochanterToe = trochanterToe;
+ this.trochanterFloorOnFlexion = trochanterFloorOnFlexion;
//insert in the personSession table
//when insert as personSession we don't know uniqueID
@@ -92,7 +101,8 @@ public class PersonSession {
uniqueID.ToString(),
personID, sessionID, height, weight,
sportID, speciallityID,
- practice, comments);
+ practice, comments,
+ trochanterToe, trochanterFloorOnFlexion);
return myID;
}
@@ -113,7 +123,9 @@ public class PersonSession {
return uniqueIDStr + ", " + personID + ", " + sessionID + ", " +
Util.ConvertToPoint(height) + ", " + Util.ConvertToPoint(weight) + ", " +
sportID + ", " + speciallityID + ", " + practice + ", '" +
- comments + "', '', ''";
+ comments + ", " +
+ Util.ConvertToPoint(trochanterToe) + ", " +
+ Util.ConvertToPoint(trochanterFloorOnFlexion);
}
//some "set"s are needed. If not data of personSession does not arrive to the server
@@ -163,6 +175,16 @@ public class PersonSession {
set { comments = value; }
}
+ public double TrochanterToe {
+ get { return trochanterToe; }
+ set { trochanterToe = value; }
+ }
+
+ public double TrochanterFloorOnFlexion {
+ get { return trochanterFloorOnFlexion; }
+ set { trochanterFloorOnFlexion = value; }
+ }
+
~PersonSession() {}
diff --git a/src/sqlite/main.cs b/src/sqlite/main.cs
index 4502f9d7..f78b1661 100644
--- a/src/sqlite/main.cs
+++ b/src/sqlite/main.cs
@@ -3149,7 +3149,9 @@ class Sqlite
pOld.SportID,
pOld.SpeciallityID,
pOld.Practice,
- "" //comments
+ "", //comments
+ Constants.TrochanterToeUndefinedID,
+ Constants.TrochanterFloorOnFlexionUndefinedID
);
ps.InsertAtDB(true, Constants.PersonSessionTable);
conversionSubRate ++;
diff --git a/src/sqlite/personSession.cs b/src/sqlite/personSession.cs
index 333ab804..2a57afc6 100644
--- a/src/sqlite/personSession.cs
+++ b/src/sqlite/personSession.cs
@@ -47,14 +47,14 @@ class SqlitePersonSession : Sqlite
"speciallityID INT, " +
"practice INT, " + //also called "level"
"comments TEXT, " +
- "future1 TEXT, " +
- "future2 TEXT)";
+ "future1 TEXT, " + //since Chronojump 2.0 trochanterToe
+ "future2 TEXT)"; //since Chronojump 2.0 trochanterFloorOnFlexion
dbcmd.ExecuteNonQuery();
}
public static int Insert(bool dbconOpened, string uniqueID, int personID, int sessionID,
double height, double weight, int sportID, int speciallityID, int practice,
- string comments)
+ string comments, double trochanterToe, double trochanterFloorOnFlexion)
{
if(!dbconOpened)
Sqlite.Open();
@@ -71,8 +71,9 @@ class SqlitePersonSession : Sqlite
" VALUES ("
+ uniqueID + ", " + personID + ", " + sessionID + ", " +
Util.ConvertToPoint(height) + ", " + Util.ConvertToPoint(weight) + ", " +
- sportID + ", " + speciallityID + ", " + practice + ", \"" +
- comments + "\", \"\", \"\")";
+ sportID + ", " + speciallityID + ", " + practice + ", \"" + comments + "\", " +
+ Util.ConvertToPoint(trochanterToe) + ", " +
+ Util.ConvertToPoint(trochanterFloorOnFlexion) + ")";
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
@@ -152,7 +153,9 @@ class SqlitePersonSession : Sqlite
", speciallityID = " + ps.SpeciallityID +
", practice = " + ps.Practice +
", comments = \"" + ps.Comments +
- "\" WHERE uniqueID == " + ps.UniqueID;
+ "\", future1 = " + Util.ConvertToPoint(ps.TrochanterToe) +
+ ", future2 = " + Util.ConvertToPoint(ps.TrochanterFloorOnFlexion) +
+ " WHERE uniqueID == " + ps.UniqueID;
LogB.SQL(dbcmd.CommandText.ToString());
dbcmd.ExecuteNonQuery();
Sqlite.Close();
@@ -241,7 +244,9 @@ class SqlitePersonSession : Sqlite
Convert.ToInt32(reader[5].ToString()), //sportID
Convert.ToInt32(reader[6].ToString()), //speciallityID
Convert.ToInt32(reader[7].ToString()), //practice
- reader[8].ToString() //comments
+ reader[8].ToString(), //comments
+ Convert.ToDouble(Util.ChangeDecimalSeparator(reader[9].ToString())),
//trochanterToe
+ Convert.ToDouble(Util.ChangeDecimalSeparator(reader[10].ToString()))
//trochanterFloorOnFlexion
);
}
@@ -301,7 +306,9 @@ class SqlitePersonSession : Sqlite
Convert.ToInt32(reader[15].ToString()), //sportID
Convert.ToInt32(reader[16].ToString()),
//speciallityID
Convert.ToInt32(reader[17].ToString()), //practice
- reader[18].ToString() //comments
+ reader[18].ToString(), //comments
+
Convert.ToDouble(Util.ChangeDecimalSeparator(reader[19].ToString())), //trochanterToe
+
Convert.ToDouble(Util.ChangeDecimalSeparator(reader[20].ToString())) //trochanterFloorOnFlexion
);
myArray.Add(new PersonAndPS(person, ps));
@@ -339,7 +346,9 @@ class SqlitePersonSession : Sqlite
Convert.ToInt32(reader[5].ToString()), //sportID
Convert.ToInt32(reader[6].ToString()), //speciallityID
Convert.ToInt32(reader[7].ToString()), //practice
- reader[8].ToString() //comments
+ reader[8].ToString(), //comments
+ Convert.ToDouble(Util.ChangeDecimalSeparator(reader[9].ToString())),
//trochanterToe
+ Convert.ToDouble(Util.ChangeDecimalSeparator(reader[10].ToString()))
//trochanterFloorOnFlexion
);
list.Add(ps);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]