[chronojump] Done: sprint (photocells) analyze export currentPerson allSessions
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Done: sprint (photocells) analyze export currentPerson allSessions
- Date: Thu, 7 Oct 2021 09:50:54 +0000 (UTC)
commit f79104004e9ef4eb201abc4da52c475c14041304
Author: Xavier de Blas <xaviblas gmail com>
Date: Thu Oct 7 11:46:42 2021 +0200
Done: sprint (photocells) analyze export currentPerson allSessions
glade/app1.glade | 80 ++++++++++++++++++++++++++++++++++++++++---------
src/constants.cs | 11 +++++--
src/gui/app1/encoder.cs | 14 ++++++++-
src/gui/app1/icons.cs | 1 +
src/gui/sprint.cs | 30 ++++++++++++++-----
5 files changed, 111 insertions(+), 25 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 8c4e8c86f..bca4ed167 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -20718,7 +20718,7 @@ Concentric</property>
<property
name="receives_default">False</property>
<property name="draw_indicator">False</property>
<property
name="group">radio_sprint_analyze_individual_current_set</property>
- <signal name="toggled"
handler="on_radio_sprint_analyze_individual_current_session_toggled" swapped="no"/>
+ <signal name="toggled"
handler="on_radio_sprint_analyze_individual_session_current_or_all_toggled" swapped="no"/>
<child>
<widget class="GtkHBox" id="hbox487">
<property name="visible">True</property>
@@ -20757,6 +20757,52 @@ Concentric</property>
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_sprint_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_sprint_analyze_individual_current_set</property>
+ <signal name="toggled"
handler="on_radio_sprint_analyze_individual_session_current_or_all_toggled" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox22">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkImage"
id="image_sprint_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="label151">
+ <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>
@@ -21274,7 +21320,7 @@ Concentric</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
- <signal name="clicked"
handler="on_button_sprint_export_current_session_clicked" swapped="no"/>
+ <signal name="clicked"
handler="on_button_sprint_export_not_set_clicked" swapped="no"/>
<child>
<widget class="GtkHBox" id="hbox495">
<property name="visible">True</property>
@@ -24669,6 +24715,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -31026,6 +31075,18 @@ 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>
@@ -31062,18 +31123,6 @@ 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>
@@ -40422,6 +40471,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 38866bebe..8ab49e7e2 100644
--- a/src/constants.cs
+++ b/src/constants.cs
@@ -1110,15 +1110,20 @@ public class Constants
//public static string ConcentricEccentric = "Concentric-eccentric";
public enum EncoderGI {ALL, GRAVITATORY, INERTIAL}
- public enum CheckFileOp {
+ public enum CheckFileOp
+ {
JUMPS_SIMPLE_CAPTURE_SAVE_IMAGE,
JUMPS_PROFILE_SAVE_IMAGE, JUMPS_DJ_OPTIMAL_FALL_SAVE_IMAGE,
JUMPS_WEIGHT_FV_PROFILE_SAVE_IMAGE, JUMPS_EVOLUTION_SAVE_IMAGE,
JUMPS_RJ_FATIGUE_SAVE_IMAGE,
RUNS_SIMPLE_CAPTURE_SAVE_IMAGE,
RUNS_EVOLUTION_SAVE_IMAGE,
RUNS_SPRINT_SAVE_IMAGE,
- RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES,
RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES,
- RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES,
RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES,
+ RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES,
+ RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES,
+ RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES,
+ RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES,
+ RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES,
+ RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES,
ENCODER_CAPTURE_EXPORT_ALL, ENCODER_CAPTURE_SAVE_IMAGE, ENCODER_ANALYZE_SAVE_IMAGE,
ENCODER_ANALYZE_SEND_IMAGE, //like save image but just defines the name exportFileName to be
sended
ENCODER_ANALYZE_SAVE_AB, ENCODER_ANALYZE_SAVE_TABLE,
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index fbdc4cefb..04e5d4825 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -2157,6 +2157,7 @@ public partial class ChronoJumpWindow
else if(
checkFileOp == Constants.CheckFileOp.ENCODER_ANALYZE_SAVE_AB ||
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_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 ||
@@ -2181,6 +2182,7 @@ public partial class ChronoJumpWindow
//on intersession do not show session in nameString
else if(
+ checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNENCODER_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES)
nameString = currentPerson.Name;
@@ -2270,6 +2272,7 @@ public partial class ChronoJumpWindow
nameString += "_forcesensor_analyze_AB_export.csv";
else if(
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES)
nameString += "_races_sprint_export.csv";
else if(
@@ -2307,6 +2310,7 @@ public partial class ChronoJumpWindow
checkFileOp == Constants.CheckFileOp.ENCODER_ANALYZE_SAVE_AB ||
checkFileOp == Constants.CheckFileOp.FORCESENSOR_ANALYZE_SAVE_AB ||
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_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 ||
@@ -2394,6 +2398,7 @@ public partial class ChronoJumpWindow
new
EventHandler(on_overwrite_file_forcesensor_save_AB_accepted);
else if(
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES )
confirmWin.Button_accept.Clicked +=
new
EventHandler(on_overwrite_file_sprint_export_accepted);
@@ -2455,6 +2460,7 @@ public partial class ChronoJumpWindow
on_button_force_sensor_save_AB_file_selected (exportFileName);
else if(
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES )
on_button_sprint_export_file_selected (exportFileName);
else if(
@@ -2475,6 +2481,7 @@ public partial class ChronoJumpWindow
//show message, but not in long processes managed by a thread
if(
checkFileOp !=
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES &&
+ checkFileOp !=
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_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 &&
@@ -2527,12 +2534,15 @@ 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 ||
+ else if(
+ checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.FORCESENSOR_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNENCODER_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES)
nameString = currentPerson.Name;
if(
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES)
nameString += "_races_sprint_export";
else if(
@@ -2582,6 +2592,7 @@ public partial class ChronoJumpWindow
if(
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES )
{
confirmWin.Button_accept.Clicked +=
@@ -2611,6 +2622,7 @@ public partial class ChronoJumpWindow
else {
if(
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES ||
+ checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES ||
checkFileOp ==
Constants.CheckFileOp.RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES )
on_button_sprint_export_file_selected (exportFileName);
else if(
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 80aa70105..4f2092fcc 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_sprint_analyze_individual_all_sessions.Pixbuf = pixbuf;
image_force_sensor_analyze_individual_all_sessions.Pixbuf = pixbuf;
image_run_encoder_analyze_individual_all_sessions.Pixbuf = pixbuf;
image_tab_jumps_evolution.Pixbuf = pixbuf;
diff --git a/src/gui/sprint.cs b/src/gui/sprint.cs
index d05c10871..cbca6800b 100644
--- a/src/gui/sprint.cs
+++ b/src/gui/sprint.cs
@@ -37,9 +37,11 @@ public partial class ChronoJumpWindow
[Widget] Gtk.HBox hbox_sprint_analyze_top_modes;
[Widget] Gtk.RadioButton radio_sprint_analyze_individual_current_session;
+ [Widget] Gtk.RadioButton radio_sprint_analyze_individual_all_sessions;
[Widget] Gtk.RadioButton radio_sprint_analyze_groupal_current_session;
[Widget] Gtk.Image image_sprint_analyze_individual_current_set;
[Widget] Gtk.Image image_sprint_analyze_individual_current_session;
+ [Widget] Gtk.Image image_sprint_analyze_individual_all_sessions;
[Widget] Gtk.Image image_sprint_analyze_groupal_current_session;
[Widget] Gtk.Notebook notebook_sprint_analyze_top;
@@ -307,7 +309,7 @@ public partial class ChronoJumpWindow
button_sprint_export_result_open.Visible = false;
}
- private void on_radio_sprint_analyze_individual_current_session_toggled (object o, EventArgs args)
+ private void on_radio_sprint_analyze_individual_session_current_or_all_toggled (object o, EventArgs
args)
{
notebook_sprint_analyze_top.CurrentPage = 1;
@@ -330,8 +332,19 @@ public partial class ChronoJumpWindow
button_sprint_export_result_open.Visible = false;
}
- private void on_button_sprint_export_current_session_clicked (object o, EventArgs args)
+ private void on_button_sprint_export_not_set_clicked (object o, EventArgs args)
{
+ // 1) check if all sessions
+ if(radio_sprint_analyze_individual_all_sessions.Active)
+ {
+ if(currentPerson == null)
+ return;
+
+ button_sprint_export_session (currentPerson.UniqueID, -1);
+ return;
+ }
+
+ // 2) current session (individual or groupal)
if(currentSession == null)
return;
@@ -340,16 +353,16 @@ public partial class ChronoJumpWindow
if(currentPerson == null)
return;
- button_sprint_export_session (currentPerson.UniqueID);
+ button_sprint_export_session (currentPerson.UniqueID, currentSession.UniqueID);
}
else if (radio_sprint_analyze_groupal_current_session.Active)
{
- button_sprint_export_session (-1);
+ button_sprint_export_session (-1, currentSession.UniqueID);
}
}
SprintExport sprintExport;
- private void button_sprint_export_session (int personID)
+ private void button_sprint_export_session (int personID, int sessionID)
{
//continue based on: private void button_run_encoder_export_session (int personID)
//TODO: sensitive stuff (false)
@@ -383,8 +396,7 @@ public partial class ChronoJumpWindow
Convert.ToInt32(spinbutton_sprint_export_image_width.Value),
Convert.ToInt32(spinbutton_sprint_export_image_height.Value),
UtilAll.IsWindows(),
- personID,
- currentSession.UniqueID,
+ personID, sessionID,
preferences.CSVExportDecimalSeparatorChar, //decimalIsPointAtExport
(write)
preferences.digitsNumber);
@@ -396,11 +408,15 @@ public partial class ChronoJumpWindow
{
if(personID == -1)
selectedFile = checkFolder
(Constants.CheckFileOp.RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_YES_IMAGES);
+ else if (sessionID == -1)
+ selectedFile = checkFolder
(Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_YES_IMAGES);
else
selectedFile = checkFolder
(Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_YES_IMAGES);
} else {
if(personID == -1)
selectedFile = checkFile
(Constants.CheckFileOp.RUNS_SPRINT_EXPORT_GROUPAL_CURRENT_SESSION_NO_IMAGES);
+ else if (sessionID == -1)
+ selectedFile = checkFile
(Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_ALL_SESSIONS_NO_IMAGES);
else
selectedFile = checkFile
(Constants.CheckFileOp.RUNS_SPRINT_EXPORT_INDIVIDUAL_CURRENT_SESSION_NO_IMAGES);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]