[chronojump] Load session separates isometric/elastic



commit 5da50a3f39af77f366f9331124bf595f0f6c4be8
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Jun 1 17:18:59 2022 +0200

    Load session separates isometric/elastic

 glade/app1.glade                      | 110 +++++++++++++++++++++++++++++-----
 src/gui/app1/icons.cs                 |   3 +-
 src/gui/app1/session/loadAndImport.cs |  47 ++++++++++-----
 src/gui/app1/session/main.cs          |   6 +-
 src/session.cs                        |   3 +-
 5 files changed, 133 insertions(+), 36 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 1b9915f88..599c73d7b 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -25864,6 +25864,9 @@ Concentric</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -32270,18 +32273,6 @@ Concentric</property>
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">6</property>
                                                             <child>
-                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
-                                                            <property name="can_focus">False</property>
-                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
-                                                            </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>
-                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_capturing">
                                                             <property name="can_focus">False</property>
                                                             <property name="spacing">4</property>
@@ -32318,6 +32309,18 @@ Concentric</property>
                                                             </packing>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkLabel" 
id="label_video_encoder_tests_will_be_filmed">
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label" translatable="yes">Tests 
will be filmed</property>
+                                                            </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>
+                                                            <child>
                                                             <widget class="GtkHBox" 
id="hbox_video_encoder_no_capturing">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">False</property>
@@ -41697,6 +41700,9 @@ then click this button.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             <packing>
                                                             <property name="expand">False</property>
@@ -43615,18 +43621,42 @@ then click this button.</property>
                                                             </packing>
                                                             </child>
                                                             <child>
-                                                            <widget class="GtkCheckButton" 
id="app1s_checkbutton_show_data_force_sensor">
+                                                            <widget class="GtkCheckButton" 
id="app1s_checkbutton_show_data_isometric">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
                                                             <property 
name="receives_default">False</property>
                                                             <property name="draw_indicator">False</property>
                                                             <signal name="toggled" 
handler="app1s_on_checkbutton_show_data_toggled" swapped="no"/>
                                                             <child>
-                                                            <widget class="GtkImage" 
id="app1s_image_show_data_force_sensor">
+                                                            <widget class="GtkHBox" id="hbox116">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">2</property>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="app1s_image_show_data_isometric">
                                                             <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>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label107">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label">I</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
                                                             </child>
                                                             </widget>
                                                             <packing>
@@ -43636,6 +43666,51 @@ then click this button.</property>
                                                             </packing>
                                                             </child>
                                                             <child>
+                                                            <widget class="GtkCheckButton" 
id="app1s_checkbutton_show_data_elastic">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">True</property>
+                                                            <property 
name="receives_default">False</property>
+                                                            <property name="draw_indicator">False</property>
+                                                            <signal name="toggled" 
handler="app1s_on_checkbutton_show_data_toggled" swapped="no"/>
+                                                            <child>
+                                                            <widget class="GtkHBox" id="hbox213">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="spacing">2</property>
+                                                            <child>
+                                                            <widget class="GtkImage" 
id="app1s_image_show_data_elastic">
+                                                            <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>
+                                                            <child>
+                                                            <widget class="GtkLabel" id="label245">
+                                                            <property name="visible">True</property>
+                                                            <property name="can_focus">False</property>
+                                                            <property name="label">E</property>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">True</property>
+                                                            <property name="fill">True</property>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                            </widget>
+                                                            </child>
+                                                            </widget>
+                                                            <packing>
+                                                            <property name="expand">False</property>
+                                                            <property name="fill">False</property>
+                                                            <property name="position">5</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
                                                             <widget class="GtkCheckButton" 
id="app1s_checkbutton_show_data_weights">
                                                             <property name="visible">True</property>
                                                             <property name="can_focus">True</property>
@@ -43653,7 +43728,7 @@ then click this button.</property>
                                                             <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
-                                                            <property name="position">5</property>
+                                                            <property name="position">6</property>
                                                             </packing>
                                                             </child>
                                                             <child>
@@ -43674,7 +43749,7 @@ then click this button.</property>
                                                             <packing>
                                                             <property name="expand">False</property>
                                                             <property name="fill">False</property>
-                                                            <property name="position">6</property>
+                                                            <property name="position">7</property>
                                                             </packing>
                                                             </child>
                                                             </widget>
@@ -49647,6 +49722,9 @@ Since Chronojump 2.1.3, backups contain the complete data.</property>
                                                             <child>
                                                             <placeholder/>
                                                             </child>
+                                                            <child>
+                                                            <placeholder/>
+                                                            </child>
                                                             </widget>
                                                             </child>
                                                             </widget>
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 53b78b575..b9d4b683b 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -394,7 +394,8 @@ public partial class ChronoJumpWindow
                app1s_image_show_data_runs.Pixbuf = pixbuf;
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "race_encoder_icon.png");
                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + "force_sensor_icon.png");
-               app1s_image_show_data_force_sensor.Pixbuf = pixbuf;
+               app1s_image_show_data_isometric.Pixbuf = pixbuf;
+               app1s_image_show_data_elastic.Pixbuf = pixbuf;
 
                image_run_simple_show_time.Pixbuf = new Pixbuf (null, Util.GetImagePath(false) + 
"image_run_time.png");
 
diff --git a/src/gui/app1/session/loadAndImport.cs b/src/gui/app1/session/loadAndImport.cs
index cfd9b5c5e..deaacae1f 100644
--- a/src/gui/app1/session/loadAndImport.cs
+++ b/src/gui/app1/session/loadAndImport.cs
@@ -129,7 +129,8 @@ public partial class ChronoJumpWindow
                app1s_checkbutton_show_data_runs.Active = (current_mode == Constants.Modes.RUNSSIMPLE ||
                                current_mode == Constants.Modes.RUNSINTERVALLIC ||
                                current_mode == Constants.Modes.RUNSENCODER);
-               app1s_checkbutton_show_data_force_sensor.Active = (Constants.ModeIsFORCESENSOR 
(current_mode));
+               app1s_checkbutton_show_data_isometric.Active = (current_mode == 
Constants.Modes.FORCESENSORISOMETRIC);
+               app1s_checkbutton_show_data_elastic.Active = (current_mode == 
Constants.Modes.FORCESENSORELASTIC);
                app1s_checkbutton_show_data_weights.Active = (current_mode == 
Constants.Modes.POWERGRAVITATORY);
                app1s_checkbutton_show_data_inertial.Active = (current_mode == Constants.Modes.POWERINERTIAL);
 
@@ -139,7 +140,8 @@ public partial class ChronoJumpWindow
                                app1s_checkbutton_show_data_persons.Active,
                                app1s_checkbutton_show_data_jumps.Active,
                                app1s_checkbutton_show_data_runs.Active,
-                               app1s_checkbutton_show_data_force_sensor.Active,
+                               app1s_checkbutton_show_data_isometric.Active,
+                               app1s_checkbutton_show_data_elastic.Active,
                                app1s_checkbutton_show_data_weights.Active,
                                app1s_checkbutton_show_data_inertial.Active);/*,
                                app1s_checkbutton_show_data_rt.Active,
@@ -150,7 +152,8 @@ public partial class ChronoJumpWindow
                                app1s_checkbutton_show_data_persons.Active,
                                app1s_checkbutton_show_data_jumps.Active,
                                app1s_checkbutton_show_data_runs.Active,
-                               app1s_checkbutton_show_data_force_sensor.Active,
+                               app1s_checkbutton_show_data_isometric.Active,
+                               app1s_checkbutton_show_data_elastic.Active,
                                app1s_checkbutton_show_data_weights.Active,
                                app1s_checkbutton_show_data_inertial.Active);/*,
                                app1s_checkbutton_show_data_rt.Active,
@@ -163,7 +166,8 @@ public partial class ChronoJumpWindow
                                app1s_checkbutton_show_data_persons.Active,
                                app1s_checkbutton_show_data_jumps.Active,
                                app1s_checkbutton_show_data_runs.Active,
-                               app1s_checkbutton_show_data_force_sensor.Active,
+                               app1s_checkbutton_show_data_isometric.Active,
+                               app1s_checkbutton_show_data_elastic.Active,
                                app1s_checkbutton_show_data_weights.Active,
                                app1s_checkbutton_show_data_inertial.Active);/*,
                                app1s_checkbutton_show_data_rt.Active,
@@ -196,7 +200,7 @@ public partial class ChronoJumpWindow
        }
 
        private TreeStore app1s_getStore (bool loadOrImport, bool showPersons,
-                       bool showJumps, bool showRuns, bool showForceSensor,
+                       bool showJumps, bool showRuns, bool showIsometric, bool showElastic,
                        bool showWeights, bool showInertial)//, bool showRT, bool showOther)
        {
                int columns = 6;
@@ -209,7 +213,9 @@ public partial class ChronoJumpWindow
                        columns += 2;
                if(showRuns)
                        columns += 3; //includes race analyzer
-               if(showForceSensor)
+               if(showIsometric)
+                       columns ++;
+               if(showElastic)
                        columns ++;
                if(showWeights)
                        columns ++;
@@ -261,7 +267,7 @@ public partial class ChronoJumpWindow
        }
 
        private void app1s_createTreeView (Gtk.TreeView tv, bool loadOrImport, bool showPersons,
-                       bool showJumps, bool showRuns, bool showForceSensor,
+                       bool showJumps, bool showRuns, bool showIsometric, bool showElastic,
                        bool showWeights, bool showInertial)//, bool showRT, bool showOther)
        {
                tv.HeadersVisible=true;
@@ -308,8 +314,10 @@ public partial class ChronoJumpWindow
                        tv.AppendColumn (Catalog.GetString ("Races interval"), new CellRendererText(), 
"text", count++);
                        tv.AppendColumn (Catalog.GetString ("Race analyzer"), new CellRendererText(), "text", 
count++);
                }
-               if (showForceSensor)
-                       tv.AppendColumn (Catalog.GetString ("Force sensor"), new CellRendererText(), "text", 
count++);
+               if (showIsometric)
+                       tv.AppendColumn (Catalog.GetString ("Isometric"), new CellRendererText(), "text", 
count++);
+               if (showElastic)
+                       tv.AppendColumn (Catalog.GetString ("Elastic"), new CellRendererText(), "text", 
count++);
                if (showWeights)
                        tv.AppendColumn (Catalog.GetString ("Weights") + "\n" +
                                        Catalog.GetString("Sets") + " ; " + Catalog.GetString("Repetitions"),
@@ -419,7 +427,8 @@ public partial class ChronoJumpWindow
                                app1s_checkbutton_show_data_persons.Active,
                                app1s_checkbutton_show_data_jumps.Active,
                                app1s_checkbutton_show_data_runs.Active,
-                               app1s_checkbutton_show_data_force_sensor.Active,
+                               app1s_checkbutton_show_data_isometric.Active,
+                               app1s_checkbutton_show_data_elastic.Active,
                                app1s_checkbutton_show_data_weights.Active,
                                app1s_checkbutton_show_data_inertial.Active);/*,
                                app1s_checkbutton_show_data_rt.Active,
@@ -430,7 +439,8 @@ public partial class ChronoJumpWindow
                                app1s_checkbutton_show_data_persons.Active,
                                app1s_checkbutton_show_data_jumps.Active,
                                app1s_checkbutton_show_data_runs.Active,
-                               app1s_checkbutton_show_data_force_sensor.Active,
+                               app1s_checkbutton_show_data_isometric.Active,
+                               app1s_checkbutton_show_data_elastic.Active,
                                app1s_checkbutton_show_data_weights.Active,
                                app1s_checkbutton_show_data_inertial.Active);/*,
                                app1s_checkbutton_show_data_rt.Active,
@@ -441,7 +451,8 @@ public partial class ChronoJumpWindow
                                app1s_checkbutton_show_data_persons.Active,
                                app1s_checkbutton_show_data_jumps.Active,
                                app1s_checkbutton_show_data_runs.Active,
-                               app1s_checkbutton_show_data_force_sensor.Active,
+                               app1s_checkbutton_show_data_isometric.Active,
+                               app1s_checkbutton_show_data_elastic.Active,
                                app1s_checkbutton_show_data_weights.Active,
                                app1s_checkbutton_show_data_inertial.Active);/*,
                                app1s_checkbutton_show_data_rt.Active,
@@ -466,7 +477,7 @@ public partial class ChronoJumpWindow
        }
 
        private void app1s_fillTreeView (Gtk.TreeView tv, TreeStore store, bool showPersons,
-                       bool showJumps, bool showRuns, bool showForceSensor,
+                       bool showJumps, bool showRuns, bool showIsometric, bool showElastic,
                        bool showWeights, bool showInertial)//, bool showRT, bool showOther)
        {
                string filterName = "";
@@ -491,7 +502,9 @@ public partial class ChronoJumpWindow
                        columns += 2;
                if(showRuns)
                        columns += 3; //includes race analyzer
-               if(showForceSensor)
+               if(showIsometric)
+                       columns ++;
+               if(showElastic)
                        columns ++;
                if(showWeights)
                        columns ++;
@@ -573,8 +586,10 @@ public partial class ChronoJumpWindow
                                strings[i ++] = stc.RunsInterval.ToString ();
                                strings[i ++] = stc.RunsEncoder.ToString ();
                        }
-                       if (showForceSensor)
-                               strings[i ++] = stc.ForceSensor.ToString ();
+                       if (showIsometric)
+                               strings[i ++] = stc.Isometric.ToString ();
+                       if (showElastic)
+                               strings[i ++] = stc.Elastic.ToString ();
                        if (showWeights)
                                strings[i ++] = string.Format ("{0} ; {1}",
                                                stc.WeightsSets, stc.WeightsReps); //number of encoder grav 
signal,reps x session
diff --git a/src/gui/app1/session/main.cs b/src/gui/app1/session/main.cs
index 255c9e50f..973866bc2 100644
--- a/src/gui/app1/session/main.cs
+++ b/src/gui/app1/session/main.cs
@@ -62,7 +62,8 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.CheckButton app1s_checkbutton_show_data_persons;
        [Widget] Gtk.CheckButton app1s_checkbutton_show_data_jumps;
        [Widget] Gtk.CheckButton app1s_checkbutton_show_data_runs;
-       [Widget] Gtk.CheckButton app1s_checkbutton_show_data_force_sensor;
+       [Widget] Gtk.CheckButton app1s_checkbutton_show_data_isometric;
+       [Widget] Gtk.CheckButton app1s_checkbutton_show_data_elastic;
        [Widget] Gtk.CheckButton app1s_checkbutton_show_data_weights;
        [Widget] Gtk.CheckButton app1s_checkbutton_show_data_inertial;
        //[Widget] Gtk.CheckButton app1s_checkbutton_show_data_rt;
@@ -70,7 +71,8 @@ public partial class ChronoJumpWindow
        [Widget] Gtk.Image app1s_image_show_data_persons;
        [Widget] Gtk.Image app1s_image_show_data_jumps;
        [Widget] Gtk.Image app1s_image_show_data_runs;
-       [Widget] Gtk.Image app1s_image_show_data_force_sensor;
+       [Widget] Gtk.Image app1s_image_show_data_isometric;
+       [Widget] Gtk.Image app1s_image_show_data_elastic;
        [Widget] Gtk.Image app1s_image_show_data_encoder_grav;
        [Widget] Gtk.Image app1s_image_show_data_encoder_inertial;
 
diff --git a/src/session.cs b/src/session.cs
index 87afc2587..bcafa1cc7 100644
--- a/src/session.cs
+++ b/src/session.cs
@@ -303,7 +303,8 @@ public class SessionTestsCount
        public int RunsSimple;
        public int RunsInterval;
        public int RunsEncoder;
-       public int ForceSensor;
+       public int Isometric;
+       public int Elastic;
        public int WeightsSets;
        public int WeightsReps;
        public int InertialSets;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]