[chronojump] JumpRj has new event_execute_drawingarea_realtime_capture_cairo on top (vpaned)
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] JumpRj has new event_execute_drawingarea_realtime_capture_cairo on top (vpaned)
- Date: Mon, 6 Sep 2021 09:32:22 +0000 (UTC)
commit c8c96db34eb5aa9e8e8acf2f0b2e4f3ed7935759
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Sep 6 11:32:05 2021 +0200
JumpRj has new event_execute_drawingarea_realtime_capture_cairo on top (vpaned)
glade/app1.glade | 21 +++++++++++++++++++++
src/gui/app1/chronojump.cs | 4 +++-
src/gui/eventExecute.cs | 42 +++++++++++++++++++++++++-----------------
3 files changed, 49 insertions(+), 18 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 966ce927e..7923d908c 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -7708,6 +7708,21 @@ EncoderInertialCapture</property>
</packing>
</child>
<child>
+ <widget class="GtkVPaned" id="vpaned2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <widget class="GtkDrawingArea"
id="event_execute_drawingarea_realtime_capture_cairo">
+ <property name="height_request">150</property>
+ <property name="can_focus">False</property>
+ <signal name="expose_event"
handler="on_event_execute_drawingarea_realtime_capture_cairo_expose_event" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="resize">True</property>
+ <property name="shrink">False</property>
+ </packing>
+ </child>
+ <child>
<widget class="GtkFrame"
id="frame_contacts_graph_table">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -10912,6 +10927,12 @@ EncoderInertialCapture</property>
</child>
</widget>
<packing>
+ <property name="resize">True</property>
+ <property name="shrink">False</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index e23c3260d..542ea591e 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -3484,6 +3484,7 @@ public partial class ChronoJumpWindow
event_execute_label_message.Text = "";
event_execute_drawingarea.Visible = false;
+ event_execute_drawingarea_realtime_capture_cairo.Visible = false;
//blank exercise options: useful for changing from jumps or runs to forceSensor, runEncoder,
reaction time, other
label_contacts_exercise_selected_name.Visible = true; //will not be visible when all the
contacts_top combo is implemented
@@ -3546,8 +3547,9 @@ public partial class ChronoJumpWindow
notebooks_change(m);
button_contacts_bells.Sensitive = true;
on_extra_window_jumps_rj_test_changed(new object(), new EventArgs());
+ event_execute_drawingarea_realtime_capture_cairo.Visible = true;
- event_graph_label_graph_test.Visible = true;
+ event_graph_label_graph_test.Visible = false;
vbox_contacts_simple_graph_controls.Visible = false;
//align_check_vbox_contacts_graph_legend.Visible = false;
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index 0e0d97567..6afa8825a 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -105,6 +105,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Notebook notebook_results_data;
[Widget] Gtk.DrawingArea event_execute_drawingarea;
+ [Widget] Gtk.DrawingArea event_execute_drawingarea_realtime_capture_cairo;
[Widget] Gtk.DrawingArea event_execute_drawingarea_cairo;
[Widget] Gtk.Frame frame_run_simple_double_contacts;
[Widget] Gtk.DrawingArea event_execute_drawingarea_run_simple_double_contacts;
@@ -297,7 +298,7 @@ public partial class ChronoJumpWindow
private void showJumpReactiveLabels()
{
- event_graph_label_graph_test.Visible = true;
+ event_graph_label_graph_test.Visible = false;
vbox_contacts_simple_graph_controls.Visible = false;
// align_check_vbox_contacts_graph_legend.Visible = false;
@@ -515,26 +516,15 @@ public partial class ChronoJumpWindow
//LogB.Information("EXPOSE END");
}
- public void on_event_execute_drawingarea_cairo_expose_event(object o, ExposeEventArgs args)
+ //realtime capture graph for jumpRj and runInterval
+ public void on_event_execute_drawingarea_realtime_capture_cairo_expose_event (object o,
ExposeEventArgs args)
{
- //right now only for jumps/runs simple
- if(current_mode != Constants.Modes.JUMPSSIMPLE &&
- current_mode != Constants.Modes.JUMPSREACTIVE &&
- current_mode != Constants.Modes.RUNSSIMPLE)
+ //right now only for jump reactive
+ if(current_mode != Constants.Modes.JUMPSREACTIVE)
return;
- //if object not defined or not defined fo this mode, return
- if(cairoPaintBarsPre == null || ! cairoPaintBarsPre.ModeMatches (current_mode))
- return;
-
- //cairoPaintBarsPre.Prepare();
- if(current_mode == Constants.Modes.JUMPSSIMPLE)
- PrepareJumpSimpleGraph(cairoPaintBarsPre.eventGraphJumpsStored, false);
if(current_mode == Constants.Modes.JUMPSREACTIVE)
{
- LogB.Information(string.Format("on_event_execute_drawingarea_cairo_expose_event, A:
{0}, B: {1}",
- currentEventExecute == null,
currentEventExecute.PrepareEventGraphJumpReactiveObject == null));
-
if(currentEventExecute == null ||
currentEventExecute.PrepareEventGraphJumpReactiveObject == null)
return;
@@ -546,6 +536,24 @@ public partial class ChronoJumpWindow
currentEventExecute.PrepareEventGraphJumpReactiveObject.type,
preferences.volumeOn, preferences.gstreamer, repetitiveConditionsWin);
}
+ }
+
+ //barplot of tests in session
+ public void on_event_execute_drawingarea_cairo_expose_event(object o, ExposeEventArgs args)
+ {
+ //right now only for jumps/runs simple
+ if(current_mode != Constants.Modes.JUMPSSIMPLE &&
+// current_mode != Constants.Modes.JUMPSREACTIVE &&
+ current_mode != Constants.Modes.RUNSSIMPLE)
+ return;
+
+ //if object not defined or not defined fo this mode, return
+ if(cairoPaintBarsPre == null || ! cairoPaintBarsPre.ModeMatches (current_mode))
+ return;
+
+ //cairoPaintBarsPre.Prepare();
+ if(current_mode == Constants.Modes.JUMPSSIMPLE)
+ PrepareJumpSimpleGraph(cairoPaintBarsPre.eventGraphJumpsStored, false);
else if (current_mode == Constants.Modes.RUNSSIMPLE)
PrepareRunSimpleGraph(cairoPaintBarsPre.eventGraphRunsStored, false);
}
@@ -678,7 +686,7 @@ public partial class ChronoJumpWindow
bool volumeOn, Preferences.GstreamerTypes gstreamer, RepetitiveConditionsWindow
repetitiveConditionsWin)
{
cairoPaintBarsPre = new CairoPaintBarsPreJumpReactiveCapture(
- event_execute_drawingarea_cairo, preferences.fontType.ToString(),
current_mode,
+ event_execute_drawingarea_realtime_capture_cairo,
preferences.fontType.ToString(), current_mode,
currentPerson.Name, type, preferences.digitsNumber,//
preferences.heightPreferred,
lastTv, lastTc, tvString, tcString);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]