[chronojump] force sensor: reorganized graphs and removed vscale
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] force sensor: reorganized graphs and removed vscale
- Date: Tue, 24 Oct 2017 15:12:45 +0000 (UTC)
commit 0753e495026e147ccee580fc6ef8ed6b8bfe1c32
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Oct 24 17:12:15 2017 +0200
force sensor: reorganized graphs and removed vscale
glade/app1.glade | 204 ++++++++++++++++++++++++++---------------------
src/gui/forceSensor.cs | 12 ++-
2 files changed, 121 insertions(+), 95 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 9488ca9..a8b2f07 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -1399,6 +1399,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>
@@ -10858,110 +10861,148 @@ after time</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">20</property>
+ <property name="homogeneous">True</property>
<child>
- <widget class="GtkVScale"
id="vscale_force_sensor">
+ <widget class="GtkVBox" id="vbox110">
<property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">True</property>
- <property name="adjustment">0 -100 100 1 10
10</property>
- <property name="inverted">True</property>
- <property name="draw_value">False</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">4</property>
+ <child>
+ <widget class="GtkHBox" id="hbox232">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">20</property>
+ <child>
+ <widget class="GtkHBox" id="hbox233">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label265">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">Current:</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox72">
+ <widget class="GtkLabel"
id="label_force_sensor_value">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">20</property>
+ <property name="xalign">1</property>
+ <property name="width_chars">5</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
<child>
- <widget class="GtkLabel" id="label262">
+ <widget class="GtkLabel" id="label254">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label">Force sensor</property>
+ <property name="label">N</property>
</widget>
<packing>
- <property name="expand">False</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkTable" id="table10">
+ <widget class="GtkHBox" id="hbox234">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_rows">3</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">6</property>
- <property name="row_spacing">10</property>
+ <property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label264">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label">Max</property>
+ <property name="label">Max:</property>
</widget>
<packing>
- <property name="x_options">GTK_FILL</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label265">
+ <widget class="GtkLabel"
id="label_force_sensor_value_max">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">Current</property>
+ <property name="xalign">1</property>
+ <property name="width_chars">5</property>
</widget>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label269">
+ <widget class="GtkLabel" id="label266">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label">Min</property>
+ <property name="label">N</property>
</widget>
<packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label254">
+ <widget class="GtkHBox" id="hbox235">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label269">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
- <property name="label">N</property>
+ <property name="label">Min:</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="x_options"/>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label266">
+ <widget class="GtkLabel"
id="label_force_sensor_value_min">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">N</property>
+ <property name="xalign">1</property>
+ <property name="width_chars">5</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options"/>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
@@ -10972,61 +11013,52 @@ after time</property>
<property name="label">N</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options"/>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
</packing>
</child>
- <child>
- <widget class="GtkLabel"
id="label_force_sensor_value_max">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="width_chars">5</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
- <child>
- <widget class="GtkLabel"
id="label_force_sensor_value">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="width_chars">5</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkLabel"
id="label_force_sensor_value_min">
+ <widget class="GtkDrawingArea"
id="force_capture_drawingarea">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">1</property>
- <property name="width_chars">5</property>
+ <signal name="configure_event"
handler="on_force_capture_drawingarea_configure_event" swapped="no"/>
+ <signal name="expose_event"
handler="on_force_capture_drawingarea_expose_event" swapped="no"/>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
+ <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">1</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
</packing>
</child>
+ <child>
+ <widget class="GtkVScale"
id="vscale_force_sensor">
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">0 -100 100 1 10
10</property>
+ <property name="inverted">True</property>
+ <property name="draw_value">False</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -11132,19 +11164,6 @@ after time</property>
<property name="position">2</property>
</packing>
</child>
- <child>
- <widget class="GtkDrawingArea"
id="force_capture_drawingarea">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <signal name="configure_event"
handler="on_force_capture_drawingarea_configure_event" swapped="no"/>
- <signal name="expose_event"
handler="on_force_capture_drawingarea_expose_event" swapped="no"/>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">3</property>
- </packing>
- </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -21617,6 +21636,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/forceSensor.cs b/src/gui/forceSensor.cs
index 39c8b7a..9bf15bf 100644
--- a/src/gui/forceSensor.cs
+++ b/src/gui/forceSensor.cs
@@ -36,7 +36,7 @@ public partial class ChronoJumpWindow
[Widget] Gtk.Label label_force_sensor_value_max;
[Widget] Gtk.Label label_force_sensor_value;
[Widget] Gtk.Label label_force_sensor_value_min;
- [Widget] Gtk.VScale vscale_force_sensor;
+ //[Widget] Gtk.VScale vscale_force_sensor;
[Widget] Gtk.Viewport viewport_force_sensor_graph;
[Widget] Gtk.Image image_force_sensor_graph;
[Widget] Gtk.SpinButton spin_force_sensor_calibration_kg_value;
@@ -330,7 +330,7 @@ public partial class ChronoJumpWindow
event_execute_button_finish.Sensitive = true;
event_execute_button_cancel.Sensitive = true;
forceCaptureStartMark = false;
- vscale_force_sensor.Value = 0;
+ //vscale_force_sensor.Value = 0;
label_force_sensor_value_max.Text = "0";
label_force_sensor_value.Text = "0";
label_force_sensor_value_min.Text = "0";
@@ -511,6 +511,7 @@ public partial class ChronoJumpWindow
if(capturingForce == forceStatus.CAPTURING)
{
//------------------- vscale -----------------
+ /*
//A) resize vscale if needed
int upper = Convert.ToInt32(vscale_force_sensor.Adjustment.Upper);
int lower = Convert.ToInt32(vscale_force_sensor.Adjustment.Lower);
@@ -531,6 +532,7 @@ public partial class ChronoJumpWindow
//B) change the value
vscale_force_sensor.Value = forceSensorLast;
+ */
label_force_sensor_value.Text = forceSensorLast.ToString();
if(forceSensorLast > Convert.ToDouble(label_force_sensor_value_max.Text))
label_force_sensor_value_max.Text = forceSensorLast.ToString();
@@ -611,7 +613,8 @@ public partial class ChronoJumpWindow
{
force_capture_pixmap = new Gdk.Pixmap (window, allocation.Width, allocation.Height,
-1);
- if(forceCaptureThread != null) //&& capturingCsharp ==
encoderCaptureProcess.CAPTURING)
+ if(forceSensorOtherMode == forceSensorOtherModeEnum.CAPTURE_PRE)
+// if(forceCaptureThread != null) //&& capturingCsharp ==
encoderCaptureProcess.CAPTURING)
fscPoints.NumPainted = -1; //mark meaning screen should be erased and start
painting from the beginning
else
UtilGtk.ErasePaint(force_capture_drawingarea, force_capture_pixmap);
@@ -637,7 +640,8 @@ public partial class ChronoJumpWindow
force_capture_pixmap = new Gdk.Pixmap (force_capture_drawingarea.GdkWindow,
allocation.Width, allocation.Height, -1);
- if(forceCaptureThread != null) //&& capturingCsharp ==
encoderCaptureProcess.CAPTURING)
+ if(forceSensorOtherMode == forceSensorOtherModeEnum.CAPTURE_PRE)
+ //if(forceCaptureThread != null) //&& capturingCsharp ==
encoderCaptureProcess.CAPTURING)
fscPoints.NumPainted = -1; //mark meaning screen should be erased and start
painting from the beginning
else
UtilGtk.ErasePaint(force_capture_drawingarea, force_capture_pixmap);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]