[chronojump] Encoder capture tab has 4 views: bars, table, bars & table, bars table & signal
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder capture tab has 4 views: bars, table, bars & table, bars table & signal
- Date: Mon, 19 Jul 2021 12:10:38 +0000 (UTC)
commit 22f3af38b3964e357365bf0fa596627c7c5431cf
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Jul 19 11:13:11 2021 +0200
Encoder capture tab has 4 views: bars, table, bars & table, bars table & signal
glade/app1.glade | 362 +++++++++++++++++++++++++++++-------------------
src/gui/app1/encoder.cs | 55 +++++---
src/gui/networks.cs | 28 ----
3 files changed, 251 insertions(+), 194 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index e1ea3ca2d..3ecb4e9d0 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -25784,6 +25784,9 @@ Concentric</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -32095,18 +32098,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>
@@ -32143,6 +32134,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>
@@ -32280,7 +32283,109 @@ Concentric</property>
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<child>
- <widget class="GtkHPaned" id="hpaned_encoder">
+ <widget class="GtkVBox" id="vbox6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkAlignment" id="alignment84">
+ <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="hbox50">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label652">
+ <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="GtkRadioButton"
id="radio_encoder_capture_show_bars">
+ <property name="label">bars</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled"
handler="on_radio_encoder_capture_show_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_encoder_capture_show_table">
+ <property name="label">table</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property
name="group">radio_encoder_capture_show_bars</property>
+ <signal name="toggled"
handler="on_radio_encoder_capture_show_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_encoder_capture_show_bars_and_table">
+ <property name="label">bars, table</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <property
name="group">radio_encoder_capture_show_bars</property>
+ <signal name="toggled"
handler="on_radio_encoder_capture_show_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkRadioButton"
id="radio_encoder_capture_show_bars_table_and_signal">
+ <property name="label">bars, table,
signal</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ <property
name="group">radio_encoder_capture_show_bars</property>
+ <signal name="toggled"
handler="on_radio_encoder_capture_show_toggled" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHPaned" id="hpaned_encoder">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="position">400</property>
@@ -32289,18 +32394,15 @@ Concentric</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <widget class="GtkNotebook"
id="notebook_encoder_capture_main">
+ <widget class="GtkNotebook"
id="notebook_encoder_capture_or_inertial_instructions">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tab_pos">bottom</property>
<property name="show_tabs">False</property>
<property name="show_border">False</property>
<child>
- <widget class="GtkNotebook"
id="notebook_encoder_capture_or_inertial_instructions">
+ <widget class="GtkVBox" id="vbox105">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
<child>
<widget class="GtkVPaned"
id="vpaned_encoder_main">
<property name="visible">True</property>
@@ -32313,17 +32415,93 @@ Concentric</property>
<property name="can_focus">False</property>
<property name="border_width">4</property>
<child>
- <widget class="GtkVBox" id="vbox105">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">10</property>
- <child>
<widget class="GtkDrawingArea"
id="encoder_capture_curves_bars_drawingarea">
<property name="visible">True</property>
<property name="can_focus">False</property>
<signal name="button_press_event"
handler="on_encoder_capture_curves_bars_drawingarea_button_press_event" swapped="no"/>
<signal name="expose_event"
handler="on_encoder_capture_curves_bars_drawingarea_expose_event" swapped="no"/>
</widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="resize">True</property>
+ <property name="shrink">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment"
id="alignment_treeview_encoder_capture_curves">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">4</property>
+ <child>
+ <widget class="GtkVBox"
id="vbox_treview_encoder_capture_curves">
+ <property name="width_request">200</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox182">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkScrolledWindow"
id="scrolledwindow2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property
name="hscrollbar_policy">automatic</property>
+ <property
name="vscrollbar_policy">automatic</property>
+ <child>
+ <widget class="GtkTreeView"
id="treeview_encoder_capture_curves">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="rules_hint">True</property>
+ <property name="enable_search">False</property>
+ <property name="show_expanders">False</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkAlignment" id="alignment41">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="left_padding">4</property>
+ <child>
+ <widget class="GtkLabel"
id="label_gravitatory_vpf_propulsive">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">v,p,f
are averages of propulsive phase.</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ </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>
@@ -32520,87 +32698,6 @@ Concentric</property>
</child>
</widget>
</child>
- </widget>
- <packing>
- <property name="resize">True</property>
- <property name="shrink">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment"
id="alignment_treeview_encoder_capture_curves">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="border_width">4</property>
- <child>
- <widget class="GtkVBox"
id="vbox_treview_encoder_capture_curves">
- <property name="width_request">200</property>
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">2</property>
- <child>
- <widget class="GtkVBox" id="vbox118">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">4</property>
- <child>
- <widget class="GtkScrolledWindow"
id="scrolledwindow2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property
name="hscrollbar_policy">automatic</property>
- <property
name="vscrollbar_policy">automatic</property>
- <child>
- <widget class="GtkTreeView"
id="treeview_encoder_capture_curves">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="rules_hint">True</property>
- <property name="enable_search">False</property>
- <property name="show_expanders">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment41">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">4</property>
- <child>
- <widget class="GtkLabel"
id="label_gravitatory_vpf_propulsive">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">v,p,f
are averages of propulsive phase.</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="resize">True</property>
- <property name="shrink">False</property>
- </packing>
- </child>
- </widget>
- </child>
<child>
<widget class="GtkLabel" id="label158">
<property name="can_focus">False</property>
@@ -32850,43 +32947,6 @@ then click this button.</property>
</packing>
</child>
</widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label128">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Show
graph</property>
- </widget>
- <packing>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox"
id="vbox_treeview_encoder_at_second_page">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label131">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Show
table</property>
- </widget>
- <packing>
- <property name="position">1</property>
- <property name="tab_fill">False</property>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
@@ -32956,7 +33016,7 @@ then click this button.</property>
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox50">
+ <widget class="GtkHBox" id="hbox72">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -33421,11 +33481,11 @@ then click this button.</property>
<property name="top_padding">4</property>
<property name="left_padding">4</property>
<child>
- <widget class="GtkVBox" id="vbox6">
+ <widget class="GtkVBox" id="vbox73">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
- <widget class="GtkHBox" id="hbox72">
+ <widget class="GtkHBox" id="hbox87">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -33472,12 +33532,12 @@ then click this button.</property>
<property name="can_focus">False</property>
<property name="border_width">4</property>
<child>
- <widget class="GtkVBox" id="vbox73">
+ <widget class="GtkVBox" id="vbox153">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">2</property>
<child>
- <widget class="GtkHBox" id="hbox87">
+ <widget class="GtkHBox" id="hbox531">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
@@ -33580,6 +33640,13 @@ then click this button.</property>
<property name="shrink">False</property>
</packing>
</child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</widget>
</child>
<child>
@@ -41249,6 +41316,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index dc96d14c7..fa0caee6c 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -121,6 +121,12 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Notebook notebook_encoder_sup;
[Widget] Gtk.Notebook notebook_encoder_capture;
+ [Widget] Gtk.RadioButton radio_encoder_capture_show_bars;
+ [Widget] Gtk.RadioButton radio_encoder_capture_show_table;
+ [Widget] Gtk.RadioButton radio_encoder_capture_show_bars_and_table;
+ [Widget] Gtk.RadioButton radio_encoder_capture_show_bars_table_and_signal;
+ [Widget] Gtk.Alignment alignment_encoder_capture_curves_bars_drawingarea;
+
[Widget] Gtk.Box hbox_combo_encoder_exercise_capture;
[Widget] Gtk.ComboBox combo_encoder_exercise_capture;
[Widget] Gtk.RadioButton radio_encoder_eccon_concentric;
@@ -952,10 +958,6 @@ public partial class ChronoJumpWindow
saveEncoderExerciseOptionsToPreferences();
- //if seeing "show table" move to "show graph"
- if(notebook_encoder_capture_main.CurrentPage == 1)
- notebook_encoder_capture_main.CurrentPage = 0;
-
on_button_encoder_capture_clicked_do (true);
}
@@ -1332,6 +1334,33 @@ public partial class ChronoJumpWindow
}
+ private void on_radio_encoder_capture_show_toggled (object o, EventArgs args)
+ {
+ if(o == (object) radio_encoder_capture_show_bars)
+ {
+ alignment_encoder_capture_curves_bars_drawingarea.Visible = true;
+ alignment_treeview_encoder_capture_curves.Visible = false;
+ vpaned_encoder_capture_video_and_set_graph.Visible = false;
+ }
+ else if(o == (object) radio_encoder_capture_show_table)
+ {
+ alignment_encoder_capture_curves_bars_drawingarea.Visible = false;
+ alignment_treeview_encoder_capture_curves.Visible = true;
+ vpaned_encoder_capture_video_and_set_graph.Visible = false;
+ }
+ else if(o == (object) radio_encoder_capture_show_bars_and_table)
+ {
+ alignment_encoder_capture_curves_bars_drawingarea.Visible = true;
+ alignment_treeview_encoder_capture_curves.Visible = true;
+ vpaned_encoder_capture_video_and_set_graph.Visible = false;
+ }
+ else if(o == (object) radio_encoder_capture_show_bars_table_and_signal)
+ {
+ alignment_encoder_capture_curves_bars_drawingarea.Visible = true;
+ alignment_treeview_encoder_capture_curves.Visible = true;
+ vpaned_encoder_capture_video_and_set_graph.Visible = true;
+ }
+ }
private void encoderUpdateTreeViewCapture(List<string> contents)
@@ -5072,25 +5101,11 @@ public partial class ChronoJumpWindow
}
private void encoder_exercise_show_hide (bool show)
{
- if(show) {
+ if(show)
notebook_hpaned_encoder_or_exercise_config.Page = 1;
-
- //if seeing "show table" move to "show graph" (encoder exercise stuff is there)
- if(notebook_encoder_capture_main.CurrentPage == 1)
- notebook_encoder_capture_main.CurrentPage = 0;
-
- //don't show the page 'show table', while exercise or instructions is shown
- if(notebook_encoder_capture_main.NPages > 0)
- notebook_encoder_capture_main.GetNthPage(1).Hide();
- }
- else {
+ else
notebook_hpaned_encoder_or_exercise_config.Page = 0;
- //show againthe page 'show table', while exercise or instructions is shown
- if(notebook_encoder_capture_main.NPages > 0)
- notebook_encoder_capture_main.GetNthPage(1).Show();
- }
-
menus_and_mode_sensitive(! show);
hbox_encoder_sup_capture_analyze.Sensitive = ! show;
viewport_persons.Sensitive = ! show;
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index 33017e1b8..6727b9c6d 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -73,10 +73,6 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Button button_encoder_exercise_edit;
[Widget] Gtk.Button button_encoder_exercise_add;
- //config.EncoderCaptureShowOnlyBars
- [Widget] Gtk.Notebook notebook_encoder_capture_main;
- [Widget] Gtk.VBox vbox_treeview_encoder_at_second_page;
-
//encoder ...
[Widget] Gtk.Alignment alignment_check_encoder_networks_upload;
[Widget] Gtk.CheckButton check_encoder_networks_upload;
@@ -439,31 +435,7 @@ public partial class ChronoJumpWindow
on_button_selector_start_encoder_gravitatory_clicked(new object(), new EventArgs());
else if(configChronojump.OnlyEncoderInertial)
on_button_selector_start_encoder_inertial_clicked(new object(), new EventArgs());
-
- if(configChronojump.EncoderCaptureShowOnlyBars)
- {
- //attention: this makes encoder_capture_signal_drawingarea == null
- vpaned_encoder_capture_video_and_set_graph.Visible = false;
-
- vpaned_encoder_main.Remove(alignment_treeview_encoder_capture_curves);
-
vbox_treeview_encoder_at_second_page.PackStart(alignment_treeview_encoder_capture_curves);
- notebook_encoder_capture_main.ShowTabs = true;
- } else {
- /*
- * is good to do the else here because user can import a configuration at any time
- * and things need to be restored to default position in glade
- *
- * But note this has to be executed only if it has changed!!
- */
- /*
- notebook_encoder_capture_main.ShowTabs = false;
-
vbox_treeview_encoder_at_second_page.Remove(alignment_treeview_encoder_capture_curves);
- vpaned_encoder_main.PackStart(alignment_treeview_encoder_capture_curves);
- */
- //this change needs chronojump reload
- }
-
encoderUpdateTreeViewWhileCapturing = configChronojump.EncoderUpdateTreeViewWhileCapturing;
showPersonsOnTop(configChronojump.PersonWinHide);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]