[chronojump] Contacts capture tab can select to show grap/table or both
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Contacts capture tab can select to show grap/table or both
- Date: Mon, 2 Aug 2021 13:43:37 +0000 (UTC)
commit d1c80de34d99f313eef10a147c0d5bc60faa95bf
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Aug 2 15:43:08 2021 +0200
Contacts capture tab can select to show grap/table or both
glade/app1.glade | 113 ++++++++++++++++++++++++++++++++++++++++++++-
src/gui/app1/chronojump.cs | 50 +++++++++++++++++---
2 files changed, 154 insertions(+), 9 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 84cc4903c..128a5edef 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -7681,6 +7681,115 @@ EncoderInertialCapture</property>
</packing>
</child>
<child>
+ <widget class="GtkAlignment"
id="alignment_contacts_show_graph_table">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="xscale">0</property>
+ <property name="bottom_padding">8</property>
+ <child>
+ <widget class="GtkHBox" id="hbox553">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">40</property>
+ <child>
+ <widget class="GtkHBox"
id="hbox_contacts_capture_show_need_one">
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkLabel"
id="label_contacts_capture_show_need_one">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Please, select at least one of the options</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkArrow" id="arrow46">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox554">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label"
translatable="yes">Show</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton"
id="check_contacts_capture_graph">
+ <property name="label"
translatable="yes">Graph</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="draw_indicator">False</property>
+ <signal name="clicked"
handler="on_check_contacts_capture_show_modes_clicked" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkCheckButton"
id="check_contacts_capture_table">
+ <property name="label"
translatable="yes">Table</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="draw_indicator">False</property>
+ <signal name="clicked"
handler="on_check_contacts_capture_show_modes_clicked" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </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>
+ <child>
<widget class="GtkHPaned" id="hpaned1">
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -11850,7 +11959,7 @@ EncoderInertialCapture</property>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
</widget>
@@ -18691,7 +18800,7 @@ Resisted race analyzer</property>
<widget class="GtkLabel" id="label79">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label"
translatable="yes">Graph</property>
+ <property name="label" translatable="yes">Create
graph</property>
<property name="use_underline">True</property>
</widget>
<packing>
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index b6aacec70..75e1a2aa5 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -92,6 +92,11 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Image image_change_modes_encoder_gravitatory;
[Widget] Gtk.Image image_change_modes_encoder_inertial;
+ [Widget] Gtk.Alignment alignment_contacts_show_graph_table;
+ [Widget] Gtk.HBox hbox_contacts_capture_show_need_one;
+ [Widget] Gtk.CheckButton check_contacts_capture_graph;
+ [Widget] Gtk.CheckButton check_contacts_capture_table;
+
[Widget] Gtk.EventBox eventbox_button_show_modes_contacts;
[Widget] Gtk.EventBox eventbox_change_modes_contacts_jumps_simple;
[Widget] Gtk.EventBox eventbox_change_modes_contacts_jumps_reactive;
@@ -3429,7 +3434,20 @@ public partial class ChronoJumpWindow
hbox_other.Visible = false;
sensitiveLastTestButtons(false);
- vbox_contacts_capture_graph.Visible = true;
+ //show capture graph and/or table
+ if(m != Constants.Modes.POWERGRAVITATORY && m != Constants.Modes.POWERINERTIAL)
+ {
+ if(m == Constants.Modes.FORCESENSOR || m == Constants.Modes.RUNSENCODER)
+ {
+ alignment_contacts_show_graph_table.Visible = false;
+ //force sensor & race analyzer do not show graph. graphs are on right
notebook: notebook_results
+ vbox_contacts_capture_graph.Visible = false;
+ notebook_results.Visible = true;
+ } else {
+ alignment_contacts_show_graph_table.Visible = true;
+ on_check_contacts_capture_show_modes_clicked (new object(), new EventArgs());
+ }
+ }
//cancel force capture process if mode is changed
if(capturingForce == arduinoCaptureStatus.STARTING || capturingForce ==
arduinoCaptureStatus.CAPTURING)
@@ -3752,9 +3770,6 @@ public partial class ChronoJumpWindow
check_vbox_contacts_graph_legend.Visible = false;
vbox_contacts_graph_legend.Visible = false;
- //force sensor does not show graph. Its graph it's on right notebook: notebook_results
- vbox_contacts_capture_graph.Visible = false;
-
setLabelContactsExerciseSelected(m);
//better use the followin so we will have the Elastic/not elastic display on mode
change
on_combo_force_sensor_exercise_changed (new object(), new EventArgs ());
@@ -3797,9 +3812,6 @@ public partial class ChronoJumpWindow
check_vbox_contacts_graph_legend.Visible = false;
vbox_contacts_graph_legend.Visible = false;
- //Race Analyzer does not show graph. Its graphs are on right notebook:
notebook_results
- vbox_contacts_capture_graph.Visible = false;
-
combo_race_analyzer_device.Active = 0;
forceSensorImageTestChange();
setLabelContactsExerciseSelected(m);
@@ -3927,6 +3939,30 @@ public partial class ChronoJumpWindow
}
+ private void on_check_contacts_capture_show_modes_clicked (object o, EventArgs args)
+ {
+ if(! followSignals) //TODO: check if has to be this boolean
+ return;
+
+ vbox_contacts_capture_graph.Visible = check_contacts_capture_graph.Active;
+ notebook_results.Visible = check_contacts_capture_table.Active;
+
+ hbox_contacts_capture_show_need_one.Visible =
+ ! (check_contacts_capture_graph.Active || check_contacts_capture_table.Active);
+
+ /*
+ update the preferences variable
+ note as can be changed while capturing, it will be saved to SQL on exit
+ to not have problems with SQL while capturing
+ */
+ /* TODO:
+ preferences.encoderCaptureShowOnlyBars = new EncoderCaptureDisplay(
+ check_encoder_capture_signal.Active,
+ check_encoder_capture_table.Active,
+ check_encoder_capture_bars.Active);
+ */
+ }
+
private void radio_mode_contacts_analyze_buttons_visible (Constants.Modes m)
{
if(m == Constants.Modes.JUMPSSIMPLE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]