[chronojump] ForceSensorExport: current person or all persons
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensorExport: current person or all persons
- Date: Wed, 3 Feb 2021 18:07:43 +0000 (UTC)
commit 372a53bc67ff0eb205bfedea07bf1f7f74e8a323
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Feb 3 19:07:15 2021 +0100
ForceSensorExport: current person or all persons
glade/app1.glade | 86 +++++++++++++++++++++++++++++++-------
src/forceSensor.cs | 6 ++-
src/gui/app1/forceSensorAnalyze.cs | 19 ++++++++-
src/gui/app1/icons.cs | 7 ++++
4 files changed, 99 insertions(+), 19 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 018bd514..5501b401 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -21745,12 +21745,62 @@ Concentric</property>
</packing>
</child>
<child>
- <widget class="GtkButton"
id="button_force_sensor_export_session">
- <property name="label">Export session</property>
+ <widget class="GtkHBox" id="hbox454">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkLabel" id="label185">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">Export</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_force_sensor_export_currentperson_in_session">
<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_session_clicked" swapped="no"/>
+ <signal name="clicked"
handler="on_button_force_sensor_export_currentperson_in_session_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkImage"
id="image_force_sensor_export_currentperson_in_session">
+ <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">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton"
id="button_force_sensor_export_all_persons_in_session">
+ <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_all_persons_in_session_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkImage"
id="image_force_sensor_export_all_persons_in_session">
+ <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">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="top_attach">1</property>
@@ -23625,6 +23675,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -28471,18 +28524,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>
@@ -28519,6 +28560,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>
@@ -36798,6 +36851,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/forceSensor.cs b/src/forceSensor.cs
index a2723653..322dc395 100644
--- a/src/forceSensor.cs
+++ b/src/forceSensor.cs
@@ -2127,6 +2127,7 @@ public class ForceSensorExport
{
//passed variables
private bool isWindows;
+ private int personID; // -1: all
private int sessionID;
private List<ForceSensorRFD> rfdList;
private ForceSensorImpulse impulse;
@@ -2148,7 +2149,7 @@ public class ForceSensorExport
//constructor
public ForceSensorExport (
- bool isWindows, int sessionID,
+ bool isWindows, int personID, int sessionID,
List<ForceSensorRFD> rfdList, ForceSensorImpulse impulse,
int duration, int durationPercent,
double forceSensorElasticEccMinDispl,
@@ -2160,6 +2161,7 @@ public class ForceSensorExport
{
this.isWindows = isWindows;
+ this.personID = personID;
this.sessionID = sessionID;
this.rfdList = rfdList;
this.impulse = impulse;
@@ -2183,7 +2185,7 @@ public class ForceSensorExport
private void getData ()
{
- fs_l = SqliteForceSensor.Select(false, -1, -1, sessionID);
+ fs_l = SqliteForceSensor.Select(false, -1, personID, sessionID);
personSession_l = SqlitePersonSession.SelectCurrentSessionPersons(sessionID, true);
fsEx_l = SqliteForceSensorExercise.Select (false, -1, false);
exportedRFDs = new List<string>();
diff --git a/src/gui/app1/forceSensorAnalyze.cs b/src/gui/app1/forceSensorAnalyze.cs
index 1fff15ca..1108a3af 100644
--- a/src/gui/app1/forceSensorAnalyze.cs
+++ b/src/gui/app1/forceSensorAnalyze.cs
@@ -680,14 +680,29 @@ public partial class ChronoJumpWindow
bool force_sensor_ai_drawingareaShown = false;
- private void on_button_force_sensor_export_session_clicked (object o, EventArgs args)
+ private void on_button_force_sensor_export_currentperson_in_session_clicked (object o, EventArgs args)
+ {
+ if(currentPerson == null || currentSession == null)
+ return;
+
+ button_force_sensor_export_session (currentPerson.UniqueID);
+ }
+ private void on_button_force_sensor_export_all_persons_in_session_clicked (object o, EventArgs args)
+ {
+ if(currentSession == null)
+ return;
+
+ button_force_sensor_export_session (-1);
+ }
+
+ private void button_force_sensor_export_session (int personID)
{
int duration = -1;
if(radio_force_duration_seconds.Active)
duration = Convert.ToInt32(spin_force_duration_seconds.Value);
ForceSensorExport fse = new ForceSensorExport (
- UtilAll.IsWindows(), currentSession.UniqueID,
+ UtilAll.IsWindows(), personID, currentSession.UniqueID,
rfdList, impulse,//getImpulseValue(),
duration, Convert.ToInt32(spin_force_rfd_duration_percent.Value),
preferences.forceSensorElasticEccMinDispl,
diff --git a/src/gui/app1/icons.cs b/src/gui/app1/icons.cs
index 4d8762b9..8750fad5 100644
--- a/src/gui/app1/icons.cs
+++ b/src/gui/app1/icons.cs
@@ -180,6 +180,8 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Image image_force_sensor_laterality_both;
[Widget] Gtk.Image image_force_sensor_laterality_r;
[Widget] Gtk.Image image_force_sensor_laterality_l;
+ [Widget] Gtk.Image image_force_sensor_export_currentperson_in_session;
+ [Widget] Gtk.Image image_force_sensor_export_all_persons_in_session;
//race encoder
[Widget] Gtk.Image image_run_encoder_exercise_edit;
@@ -801,13 +803,18 @@ public partial class ChronoJumpWindow
pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
Constants.FileNameEncoderAnalyzeIndividualCurrentSetIcon);
image_encoder_analyze_individual_current_set.Pixbuf = pixbuf;
+
pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
Constants.FileNameEncoderAnalyzeIndividualCurrentSessionIcon);
image_encoder_analyze_individual_current_session.Pixbuf = pixbuf;
+ image_force_sensor_export_currentperson_in_session.Pixbuf = pixbuf;
+
pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
Constants.FileNameEncoderAnalyzeIndividualAllSessionsIcon);
image_encoder_analyze_individual_all_sessions.Pixbuf = pixbuf;
image_tab_jumps_evolution.Pixbuf = pixbuf;
+
pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
Constants.FileNameEncoderAnalyzeGroupalCurrentSessionIcon);
image_encoder_analyze_groupal_current_session.Pixbuf = pixbuf;
+ image_force_sensor_export_all_persons_in_session.Pixbuf = pixbuf;
pixbuf = new Pixbuf (null, Util.GetImagePath(false) +
Constants.FileNameEncoderAnalyzePowerbarsIcon);
image_encoder_analyze_powerbars.Pixbuf = pixbuf;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]