[chronojump] Done: ForceSensor analyze export currentPerson allSessions
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Done: ForceSensor analyze export currentPerson allSessions
- Date: Wed, 6 Oct 2021 14:25:59 +0000 (UTC)
commit 10f303b31183a1d215b1770ea631dc3588964fe7
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Oct 6 16:25:09 2021 +0200
Done: ForceSensor analyze export currentPerson allSessions
glade/app1.glade | 82 +++++++++++++++++++++++++++++++-------
src/constants.cs | 8 +++-
src/gui/app1/encoder.cs | 18 ++++++++-
src/gui/app1/forceSensorAnalyze.cs | 30 +++++++++++---
src/gui/app1/icons.cs | 1 +
5 files changed, 115 insertions(+), 24 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index cf7f97ed0..df4e2abe7 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -21594,7 +21594,7 @@ Concentric</property>
<property
name="receives_default">False</property>
<property name="draw_indicator">False</property>
<property
name="group">radio_force_sensor_analyze_individual_current_set</property>
- <signal name="toggled"
handler="on_radio_force_sensor_analyze_individual_current_session_toggled" swapped="no"/>
+ <signal name="toggled"
handler="on_radio_force_sensor_analyze_individual_session_current_or_all_toggled" swapped="no"/>
<child>
<widget class="GtkHBox" id="hbox460">
<property name="visible">True</property>
@@ -21633,6 +21633,52 @@ Concentric</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_force_sensor_analyze_individual_all_sessions">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="draw_indicator">False</property>
+ <property
name="group">radio_force_sensor_analyze_individual_current_set</property>
+ <signal name="toggled"
handler="on_radio_force_sensor_analyze_individual_session_current_or_all_toggled" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkImage"
id="image_force_sensor_analyze_individual_all_sessions">
+ <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="label117">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">All
sessions</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">2</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
@@ -24620,6 +24666,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -25448,11 +25497,11 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
<child>
- <widget class="GtkButton"
id="button_force_sensor_export_current_session">
+ <widget class="GtkButton"
id="button_force_sensor_export_not_set">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked"
handler="on_button_force_sensor_export_current_session_clicked" swapped="no"/>
+ <signal name="clicked"
handler="on_button_force_sensor_export_not_set_clicked" swapped="no"/>
<child>
<widget class="GtkHBox" id="hbox461">
<property name="visible">True</property>
@@ -30931,18 +30980,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>
@@ -30979,6 +31016,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>
@@ -40324,6 +40373,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/constants.cs b/src/constants.cs
index 9bda72442..5d9f678b8 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -1124,8 +1124,12 @@ public class Constants
ENCODER_ANALYZE_SAVE_AB, ENCODER_ANALYZE_SAVE_TABLE,
FORCESENSOR_SAVE_IMAGE_SIGNAL, FORCESENSOR_SAVE_IMAGE_RFD_AUTO,
FORCESENSOR_SAVE_IMAGE_RFD_MANUAL, FORCESENSOR_ANALYZE_SAVE_AB,
- FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES,
FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES,
- FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES,
FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES,
+ FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES,
+ FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES,
+ FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES,
+ FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES,
+ FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES,
+ FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES,
RUNENCODER_SAVE_IMAGE, RUNENCODER_SAVE_TABLE,
RUNENCODER_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES,
RUNENCODER_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES,
RUNENCODER_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES,
RUNENCODER_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES,
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index c00b1b67e..400294ad8 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -2159,6 +2159,7 @@ public partial class ChronoJumpWindow
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNENCODER_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNENCODER_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES)
@@ -2177,8 +2178,13 @@ public partial class ChronoJumpWindow
checkFileOp ==
Constants.CheckFileOp.RUNENCODER_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES )
nameString = currentSession.Name + "_" + currentSession.DateShortAsSQL;
+ //on intersession do not show session in nameString
+ else if(
+ checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES)
+ nameString = currentPerson.Name;
+
//on encoder analyze save image, show analysis on filename
- if(
+ else if(
( checkFileOp == Constants.CheckFileOp.ENCODER_ANALYZE_SAVE_IMAGE ||
checkFileOp == Constants.CheckFileOp.ENCODER_ANALYZE_SEND_IMAGE )
&&
@@ -2266,6 +2272,7 @@ public partial class ChronoJumpWindow
nameString += "_races_sprint_export.csv";
else if(
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES)
nameString += "_forcesensor_export.csv";
else if(
@@ -2299,6 +2306,7 @@ public partial class ChronoJumpWindow
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNENCODER_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNENCODER_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES ||
@@ -2387,6 +2395,7 @@ public partial class ChronoJumpWindow
new
EventHandler(on_overwrite_file_sprint_export_accepted);
else if(
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES )
confirmWin.Button_accept.Clicked +=
new
EventHandler(on_overwrite_file_forcesensor_export_accepted);
@@ -2445,6 +2454,7 @@ public partial class ChronoJumpWindow
on_button_sprint_export_file_selected (exportFileName);
else if(
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES )
on_button_force_sensor_export_file_selected (exportFileName);
else if(
@@ -2461,6 +2471,7 @@ public partial class ChronoJumpWindow
checkFileOp !=
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES &&
checkFileOp !=
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES &&
checkFileOp !=
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES &&
+ checkFileOp !=
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES &&
checkFileOp !=
Constants.CheckFileOp.FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES &&
checkFileOp !=
Constants.CheckFileOp.RUNENCODER_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES &&
checkFileOp !=
Constants.CheckFileOp.RUNENCODER_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES )
@@ -2509,6 +2520,8 @@ public partial class ChronoJumpWindow
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNENCODER_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES)
nameString = currentSession.Name + "_" + currentSession.DateShortAsSQL;
+ else if(checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES)
+ nameString = currentPerson.Name;
if(
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES ||
@@ -2516,6 +2529,7 @@ public partial class ChronoJumpWindow
nameString += "_races_sprint_export";
else if(
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES)
nameString += "_forcesensor_export";
else if(
@@ -2567,6 +2581,7 @@ public partial class ChronoJumpWindow
new
EventHandler(on_overwrite_file_sprint_export_cancelled);
} else if(
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES )
{
confirmWin.Button_accept.Clicked +=
@@ -2590,6 +2605,7 @@ public partial class ChronoJumpWindow
on_button_sprint_export_file_selected (exportFileName);
else if(
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES )
on_button_force_sensor_export_file_selected (exportFileName);
else if(
diff --git a/src/gui/app1/forceSensorAnalyze.cs b/src/gui/app1/forceSensorAnalyze.cs
index 9056af569..c58f985e3 100644
--- a/src/gui/app1/forceSensorAnalyze.cs
+++ b/src/gui/app1/forceSensorAnalyze.cs
@@ -33,9 +33,11 @@ public partial class ChronoJumpWindow
//analyze tab
[Widget] Gtk.RadioButton radio_force_sensor_analyze_individual_current_set;
[Widget] Gtk.RadioButton radio_force_sensor_analyze_individual_current_session;
+ [Widget] Gtk.RadioButton radio_force_sensor_analyze_individual_all_sessions;
[Widget] Gtk.RadioButton radio_force_sensor_analyze_groupal_current_session;
[Widget] Gtk.Image image_force_sensor_analyze_individual_current_set;
[Widget] Gtk.Image image_force_sensor_analyze_individual_current_session;
+ [Widget] Gtk.Image image_force_sensor_analyze_individual_all_sessions;
[Widget] Gtk.Image image_force_sensor_analyze_groupal_current_session;
[Widget] Gtk.Notebook notebook_force_sensor_analyze_top;
@@ -708,7 +710,7 @@ public partial class ChronoJumpWindow
label_force_sensor_export_result.Text = "";
button_force_sensor_export_result_open.Visible = false;
}
- private void on_radio_force_sensor_analyze_individual_current_session_toggled (object o, EventArgs
args)
+ private void on_radio_force_sensor_analyze_individual_session_current_or_all_toggled (object o,
EventArgs args)
{
button_force_sensor_analyze_load.Visible = false;
@@ -732,8 +734,20 @@ public partial class ChronoJumpWindow
button_force_sensor_export_result_open.Visible = false;
}
- private void on_button_force_sensor_export_current_session_clicked (object o, EventArgs args)
+ //everything except the current set
+ private void on_button_force_sensor_export_not_set_clicked (object o, EventArgs args)
{
+ // 1) check if all sessions
+ if(radio_force_sensor_analyze_individual_all_sessions.Active)
+ {
+ if(currentPerson == null)
+ return;
+
+ button_force_sensor_export_session (currentPerson.UniqueID, -1);
+ return;
+ }
+
+ // 2) current session (individual or groupal)
if(currentSession == null)
return;
@@ -742,16 +756,16 @@ public partial class ChronoJumpWindow
if(currentPerson == null)
return;
- button_force_sensor_export_session (currentPerson.UniqueID);
+ button_force_sensor_export_session (currentPerson.UniqueID, currentSession.UniqueID);
}
else if (radio_force_sensor_analyze_groupal_current_session.Active)
{
- button_force_sensor_export_session (-1);
+ button_force_sensor_export_session (-1, currentSession.UniqueID);
}
}
ForceSensorExport forceSensorExport;
- private void button_force_sensor_export_session (int personID)
+ private void button_force_sensor_export_session (int personID, int sessionID)
{
double duration = -1;
if(radio_force_duration_seconds.Active)
@@ -789,7 +803,7 @@ public partial class ChronoJumpWindow
check_force_sensor_export_images.Active,
Convert.ToInt32(spinbutton_force_sensor_export_image_width.Value),
Convert.ToInt32(spinbutton_force_sensor_export_image_height.Value),
- UtilAll.IsWindows(), personID, currentSession.UniqueID,
+ UtilAll.IsWindows(), personID, sessionID,
rfdList, impulse,//getImpulseValue(),
duration, Convert.ToInt32(spin_force_rfd_duration_percent.Value),
preferences.forceSensorElasticEccMinDispl,
@@ -809,11 +823,15 @@ public partial class ChronoJumpWindow
{
if(personID == -1)
selectedFile = checkFolder
(Constants.CheckFileOp.FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES);
+ else if (sessionID == -1)
+ selectedFile = checkFolder
(Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES);
else
selectedFile = checkFolder
(Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES);
} else {
if(personID == -1)
selectedFile = checkFile
(Constants.CheckFileOp.FORCESENSOR_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES);
+ else if (sessionID == -1)
+ selectedFile = checkFile
(Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES);
else
selectedFile = checkFile
(Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES);
}
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 34e451927..020e9db90 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -924,6 +924,7 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
Constants.FileNameEncoderAnalyzeIndividualAllSessionsIcon);
image_encoder_analyze_individual_all_sessions.Pixbuf = pixbuf;
+ image_force_sensor_analyze_individual_all_sessions.Pixbuf = pixbuf;
image_tab_jumps_evolution.Pixbuf = pixbuf;
image_tab_runs_evolution.Pixbuf = pixbuf;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]