[chronojump] Encoder best n with number selection
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Encoder best n with number selection
- Date: Mon, 28 Oct 2019 18:33:13 +0000 (UTC)
commit bac2239334c091cad9bbd97e8ba6bab88669be4e
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Oct 28 19:33:03 2019 +0100
Encoder best n with number selection
glade/app1.glade | 33 +++++++++++++++++++++++++++++++++
src/gui/encoder.cs | 1 +
src/gui/encoderTreeviews.cs | 7 +++++--
3 files changed, 39 insertions(+), 2 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 3d9e2b8d..b4b598a2 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -24381,6 +24381,10 @@ Concentric</property>
</packing>
</child>
<child>
+ <widget class="GtkHBox" id="hbox288">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
<widget class="GtkButton"
id="button_encoder_capture_curves_best_n">
<property name="label" translatable="yes">Best
n</property>
<property name="visible">True</property>
@@ -24389,6 +24393,35 @@ Concentric</property>
<signal name="clicked"
handler="on_button_encoder_capture_curves_best_n_clicked" swapped="no"/>
</widget>
<packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton"
id="spin_encoder_capture_curves_best_n">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="max_length">2</property>
+ <property name="invisible_char">●</property>
+ <property name="width_chars">2</property>
+ <property
name="invisible_char_set">True</property>
+ <property
name="primary_icon_activatable">False</property>
+ <property
name="secondary_icon_activatable">False</property>
+ <property
name="primary_icon_sensitive">True</property>
+ <property
name="secondary_icon_sensitive">True</property>
+ <property name="adjustment">3 2 10 1 10
0</property>
+ <property name="climb_rate">1</property>
+ <property name="numeric">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index dc9663fc..a2c64174 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -128,6 +128,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.RadioButton radio_encoder_laterality_l;
[Widget] Gtk.Box hbox_encoder_capture_curves_save_all_none;
+ //used on guiTests
[Widget] Gtk.Button button_encoder_capture_curves_all;
[Widget] Gtk.Button button_encoder_capture_curves_best;
[Widget] Gtk.Button button_encoder_capture_curves_none;
diff --git a/src/gui/encoderTreeviews.cs b/src/gui/encoderTreeviews.cs
index 7cee8cf8..fd632720 100644
--- a/src/gui/encoderTreeviews.cs
+++ b/src/gui/encoderTreeviews.cs
@@ -31,6 +31,7 @@ using Mono.Unix;
public partial class ChronoJumpWindow
{
+ [Widget] Gtk.SpinButton spin_encoder_capture_curves_best_n;
/* TreeView stuff */
@@ -376,12 +377,14 @@ public partial class ChronoJumpWindow
EncoderSignal encoderSignal = new
EncoderSignal(treeviewEncoderCaptureCurvesGetCurves(AllEccCon.CON));
bestRow = encoderSignal.FindPosOfBest(inertialStart, mainVariable);
//this for BEST
numRows = encoderSignal.CurvesNum();
//this for FROM4TOPENULTIMATE
- list_bestN = encoderSignal.FindPosOfBestN(inertialStart, mainVariable, 3,
EncoderSignal.Contraction.C);
+ list_bestN = encoderSignal.FindPosOfBestN(inertialStart, mainVariable,
+ Convert.ToInt32(spin_encoder_capture_curves_best_n.Value),
EncoderSignal.Contraction.C);
} else {
EncoderSignal encoderSignal = new
EncoderSignal(treeviewEncoderCaptureCurvesGetCurves(AllEccCon.ALL));
bestRow = encoderSignal.FindPosOfBestEccCon(inertialStart, mainVariable);
//this for BEST //will be pos of the ecc
numRows = encoderSignal.CurvesNum();
//this for FROM4TOPENULTIMATE
- list_bestN = encoderSignal.FindPosOfBestN(inertialStart, mainVariable, 3,
EncoderSignal.Contraction.EC);
+ list_bestN = encoderSignal.FindPosOfBestN(inertialStart, mainVariable,
+ Convert.ToInt32(spin_encoder_capture_curves_best_n.Value),
EncoderSignal.Contraction.EC);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]