[chronojump] race encoder displays image after capture on analyze tab
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] race encoder displays image after capture on analyze tab
- Date: Mon, 18 Mar 2019 13:39:52 +0000 (UTC)
commit 223fad93ee2ef12e91b5bccab30f265771a16786
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Mar 18 14:39:16 2019 +0100
race encoder displays image after capture on analyze tab
glade/app1.glade | 87 +++++++++++++++++++++++++++++++++++++++++++++++++--
src/gui/chronojump.cs | 8 +++--
src/gui/runEncoder.cs | 13 ++++++++
3 files changed, 102 insertions(+), 6 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 8f431b0e..8de2f515 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -1875,6 +1875,9 @@
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkLabel"
id="label_start_selector_jumps">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -20473,9 +20476,6 @@ Concentric</property>
<placeholder/>
</child>
<child>
- <placeholder/>
- </child>
- <child>
<widget class="GtkCheckButton"
id="checkbutton_force_sensor_ai_b">
<property name="width_request">30</property>
<property name="visible">True</property>
@@ -20645,6 +20645,12 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -20808,6 +20814,78 @@ Concentric</property>
<property name="type">tab</property>
</packing>
</child>
+ <child>
+ <widget class="GtkVBox" id="vbox138">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel" id="label394">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">race encoder</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow9">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="hscrollbar_policy">automatic</property>
+ <property
name="vscrollbar_policy">automatic</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <widget class="GtkViewport"
id="viewport_race_encoder_graph">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <widget class="GtkVBox" id="vbox139">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkImage"
id="image_race_encoder_graph">
+ <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>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label393">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">raceencoder</property>
+ </widget>
+ <packing>
+ <property name="position">4</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="position">1</property>
@@ -29157,6 +29235,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 67ea96e5..b79ea6b8 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -476,7 +476,7 @@ public partial class ChronoJumpWindow
private string progVersion;
private string progName;
- private enum notebook_analyze_pages { STATISTICS, JUMPSPROFILE, SPRINT, FORCESENSOR }
+ private enum notebook_analyze_pages { STATISTICS, JUMPSPROFILE, SPRINT, FORCESENSOR, RACEENCODER }
private string runningFileName; //useful for knowing if there are two chronojump instances
@@ -3369,7 +3369,7 @@ public partial class ChronoJumpWindow
// on_extra_window_reaction_times_test_changed(new object(), new EventArgs());
//notebook_capture_analyze.ShowTabs = false; //only capture tab is shown (only valid
for "OTHER" tests)
- hbox_contacts_sup_capture_analyze_two_buttons.Visible = false;
+ hbox_contacts_sup_capture_analyze_two_buttons.Visible = true;
button_threshold.Visible = false;
button_force_sensor_adjust.Visible = false;
//notebook_capture_analyze.GetNthPage(2).Hide(); //hide jumpsProfile on other tests
@@ -7033,10 +7033,12 @@ LogB.Debug("mc finished 5");
}
else if(current_menuitem_mode == Constants.Menuitem_modes.FORCESENSOR)
notebook_analyze.CurrentPage = Convert.ToInt32(notebook_analyze_pages.FORCESENSOR);
+ else if(current_menuitem_mode == Constants.Menuitem_modes.RUNSENCODER)
+ notebook_analyze.CurrentPage = Convert.ToInt32(notebook_analyze_pages.RACEENCODER);
else
notebook_analyze.CurrentPage = Convert.ToInt32(notebook_analyze_pages.STATISTICS);
- notebook_capture_analyze.CurrentPage = Convert.ToInt32(notebook_analyze_pages.JUMPSPROFILE);
+ notebook_capture_analyze.CurrentPage = 1;
}
private void on_radio_mode_contacts_general_toggled (object o, EventArgs args)
diff --git a/src/gui/runEncoder.cs b/src/gui/runEncoder.cs
index 5b885160..f8f8936a 100644
--- a/src/gui/runEncoder.cs
+++ b/src/gui/runEncoder.cs
@@ -34,6 +34,7 @@ public partial class ChronoJumpWindow
{
[Widget] Gtk.SpinButton race_analyzer_spinbutton_distance;
[Widget] Gtk.SpinButton race_analyzer_spinbutton_temperature;
+ [Widget] Gtk.Image image_race_encoder_graph;
int race_analyzer_distance;
int race_analyzer_temperature;
@@ -463,6 +464,10 @@ LogB.Information(" fc C finish");
event_execute_label_message.Text = "Saved." + captureEndedMessage;
Thread.Sleep (250); //Wait a bit to ensure is copied
+ runEncoderAnalyzeOpenImage();
+ notebook_analyze.CurrentPage =
Convert.ToInt32(notebook_analyze_pages.RACEENCODER);
+ notebook_capture_analyze.CurrentPage = 1;
+
/*
fscPoints.InitRealWidthHeight();
forceSensorDoSignalGraphPlot();
@@ -571,4 +576,12 @@ LogB.Information(" fc R ");
hbox_chronopics_and_more.Sensitive = sensitive;
}
+ void runEncoderAnalyzeOpenImage()
+ {
+ string imagePath = UtilEncoder.GetSprintEncoderImage();
+ image_race_encoder_graph = UtilGtk.OpenImageSafe(
+ imagePath,
+ image_race_encoder_graph);
+ }
+
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]