[chronojump] EncoderConfiguration load/save gui 20%
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] EncoderConfiguration load/save gui 20%
- Date: Fri, 30 Dec 2016 07:06:51 +0000 (UTC)
commit 25160e3505b5d68476aeeb05ad3469ee77e5f3e5
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Dec 30 08:03:31 2016 +0100
EncoderConfiguration load/save gui 20%
glade/encoder_configuration.glade | 679 +++++++++++++++++++++++--------------
src/gui/encoderConfiguration.cs | 91 ++++--
2 files changed, 488 insertions(+), 282 deletions(-)
---
diff --git a/glade/encoder_configuration.glade b/glade/encoder_configuration.glade
index 33ba25c..42c63d3 100644
--- a/glade/encoder_configuration.glade
+++ b/glade/encoder_configuration.glade
@@ -25,9 +25,10 @@
<property name="can_focus">False</property>
<property name="spacing">12</property>
<child>
- <widget class="GtkHBox" id="hbox_encoder_types">
+ <widget class="GtkHBox" id="hbox_top">
<property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="spacing">20</property>
<child>
<widget class="GtkHBox" id="hbox8">
<property name="visible">True</property>
@@ -223,6 +224,86 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkVBox" id="vbox9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkButton" id="button_load_save_show">
+ <property name="height_request">80</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="on_button_load_save_show_clicked" swapped="no"/>
+ <child>
+ <widget class="GtkHBox" id="hbox9">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="border_width">4</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkVBox" id="vbox11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <widget class="GtkLabel" id="label24">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Load</property>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label27">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Save</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">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkImage" id="image4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-go-forward</property>
+ </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">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
@@ -1022,7 +1103,7 @@ Eg. value = 2, means person does twice force at half speed.</property>
<widget class="GtkHBox" id="hbox5">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="spacing">10</property>
<child>
<widget class="GtkLabel" id="label14">
<property name="visible">True</property>
@@ -1145,7 +1226,7 @@ Eg. value = 2, means person does twice force at half speed.</property>
</packing>
</child>
<child>
- <widget class="GtkVSeparator" id="vseparator_im">
+ <widget class="GtkVSeparator" id="vseparator">
<property name="can_focus">False</property>
</widget>
<packing>
@@ -1155,369 +1236,443 @@ Eg. value = 2, means person does twice force at half speed.</property>
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox_calcule_im">
- <property name="can_focus">False</property>
- <property name="spacing">8</property>
- <child>
- <widget class="GtkLabel" id="label15">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">Calcule IM</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <widget class="GtkImage" id="image_encoder_calcule_im">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-missing-image</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkTextView" id="textview_calcule_im">
- <property name="width_request">180</property>
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_focus">False</property>
- <property name="editable">False</property>
- <property name="wrap_mode">word</property>
- <property name="cursor_visible">False</property>
- <property name="accepts_tab">False</property>
- <property name="text">Put a weight near the top and "sided". Record pendulum movement
with encoder.</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
+ <widget class="GtkNotebook" id="notebook_side">
+ <property name="can_focus">True</property>
+ <property name="show_tabs">False</property>
<child>
- <widget class="GtkTable" id="table1">
+ <widget class="GtkVBox" id="vbox12">
<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">6</property>
- <child>
- <widget class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">Weight</property>
- </widget>
- <packing>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
+ <property name="spacing">10</property>
<child>
- <widget class="GtkLabel" id="label12">
+ <widget class="GtkLabel" id="label33">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">Distance</property>
- </widget>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label16">
- <property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label">Duration</property>
+ <property name="label" translatable="yes">Load configuration</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">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="spin_im_weight_calcule">
+ <widget class="GtkScrolledWindow" id="scr_treeview_load">
<property name="visible">True</property>
<property name="can_focus">True</property>
- <property name="invisible_char">●</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">30 10 4000 1 10 0</property>
- <property name="climb_rate">1</property>
- <property name="snap_to_ticks">True</property>
- <property name="numeric">True</property>
- <property name="update_policy">if-valid</property>
+ <property name="border_width">4</property>
+ <property name="shadow_type">in</property>
+ <child>
+ <widget class="GtkTreeView" id="treeview_load">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ </widget>
+ </child>
</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">True</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkSpinButton" id="spin_im_length_calcule">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">●</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">15 1 200 0.10000000000000001 10 0</property>
- <property name="climb_rate">1</property>
- <property name="digits">1</property>
- <property name="snap_to_ticks">True</property>
- <property name="numeric">True</property>
- <property name="update_policy">if-valid</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="x_options">GTK_FILL</property>
- </packing>
+ <placeholder/>
</child>
+ </widget>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label25">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label">page 1</property>
+ </widget>
+ <packing>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkVBox" id="vbox_calcule_im">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">8</property>
<child>
- <widget class="GtkSpinButton" id="spin_im_duration_calcule">
- <property name="can_focus">True</property>
- <property name="invisible_char">●</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">20 1 100 1 10 0</property>
- <property name="climb_rate">1</property>
- <property name="snap_to_ticks">True</property>
- <property name="numeric">True</property>
- <property name="update_policy">if-valid</property>
+ <widget class="GtkLabel" id="label15">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Calcule IM</property>
</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="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="label11">
+ <widget class="GtkImage" id="image_encoder_calcule_im">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tooltip" translatable="yes">grams</property>
- <property name="xalign">0</property>
- <property name="label">g</property>
+ <property name="stock">gtk-missing-image</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label13">
+ <widget class="GtkTextView" id="textview_calcule_im">
+ <property name="width_request">180</property>
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">False</property>
- <property name="tooltip" translatable="yes">grams</property>
- <property name="xalign">0</property>
- <property name="label">cm</property>
+ <property name="editable">False</property>
+ <property name="wrap_mode">word</property>
+ <property name="cursor_visible">False</property>
+ <property name="accepts_tab">False</property>
+ <property name="text">Put a weight near the top and "sided". Record pendulum
movement with encoder.</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">GTK_FILL</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label17">
+ <widget class="GtkTable" id="table1">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tooltip" translatable="yes">grams</property>
- <property name="xalign">0</property>
- <property name="label">s</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">Weight</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label12">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">Distance</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label16">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label">Duration</property>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="spin_im_weight_calcule">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</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">30 10 4000 1 10 0</property>
+ <property name="climb_rate">1</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">if-valid</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="spin_im_length_calcule">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</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">15 1 200 0.10000000000000001 10 0</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">1</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">if-valid</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="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="spin_im_duration_calcule">
+ <property name="can_focus">True</property>
+ <property name="invisible_char">●</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">20 1 100 1 10 0</property>
+ <property name="climb_rate">1</property>
+ <property name="snap_to_ticks">True</property>
+ <property name="numeric">True</property>
+ <property name="update_policy">if-valid</property>
+ </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="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip" translatable="yes">grams</property>
+ <property name="xalign">0</property>
+ <property name="label">g</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label13">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip" translatable="yes">grams</property>
+ <property name="xalign">0</property>
+ <property name="label">cm</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">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label17">
+ <property name="can_focus">False</property>
+ <property name="tooltip" translatable="yes">grams</property>
+ <property name="xalign">0</property>
+ <property name="label">s</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">GTK_FILL</property>
+ </packing>
+ </child>
</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">GTK_FILL</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">3</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
<child>
- <widget class="GtkHBox" id="hbox6">
+ <widget class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
- <widget class="GtkButton" id="button_encoder_capture_inertial_do">
+ <widget class="GtkHBox" id="hbox6">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <signal name="clicked" handler="on_button_encoder_capture_inertial_do_clicked"
swapped="no"/>
+ <property name="can_focus">False</property>
+ <property name="spacing">6</property>
<child>
- <widget class="GtkHBox" id="hbox85">
+ <widget class="GtkButton" id="button_encoder_capture_inertial_do">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <signal name="clicked"
handler="on_button_encoder_capture_inertial_do_clicked" swapped="no"/>
<child>
- <widget class="GtkImage" id="image10">
+ <widget class="GtkHBox" id="hbox85">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-apply</property>
+ <property name="spacing">6</property>
+ <child>
+ <widget class="GtkImage" id="image10">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="stock">gtk-apply</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_button_encoder_capture_inertial_do">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Capture</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>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button_encoder_capture_inertial_cancel">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="has_tooltip">True</property>
+ <signal name="clicked"
handler="on_button_encoder_capture_inertial_cancel_clicked" swapped="no"/>
<child>
- <widget class="GtkLabel" id="label_button_encoder_capture_inertial_do">
+ <widget class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Capture</property>
+ <property name="stock">gtk-cancel</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">1</property>
+ </packing>
</child>
</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="GtkButton" id="button_encoder_capture_inertial_cancel">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="has_tooltip">True</property>
- <signal name="clicked"
handler="on_button_encoder_capture_inertial_cancel_clicked" swapped="no"/>
+ <widget class="GtkTable" id="table_im_machine_result">
+ <property name="can_focus">False</property>
+ <property name="n_columns">3</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label28">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip" translatable="yes">Number of weights</property>
+ <property name="xalign">0</property>
+ <property name="label">IM machine</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label30">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="tooltip" translatable="yes">Number of weights</property>
+ <property name="xalign">0</property>
+ <property name="label">Kg*cm^2</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ </packing>
+ </child>
<child>
- <widget class="GtkImage" id="image3">
+ <widget class="GtkLabel" id="label_im_result_disc">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="stock">gtk-cancel</property>
</widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
</child>
</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">1</property>
</packing>
</child>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">4</property>
</packing>
</child>
<child>
- <widget class="GtkTable" id="table_im_machine_result">
+ <widget class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="n_columns">3</property>
- <property name="column_spacing">6</property>
- <property name="row_spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label28">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="tooltip" translatable="yes">Number of weights</property>
- <property name="xalign">0</property>
- <property name="label">IM machine</property>
- </widget>
- <packing>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
+ <property name="top_padding">12</property>
<child>
- <widget class="GtkLabel" id="label30">
+ <widget class="GtkLabel" id="label_im_feedback">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="tooltip" translatable="yes">Number of weights</property>
- <property name="xalign">0</property>
- <property name="label">Kg*cm^2</property>
</widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label_im_result_disc">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
</child>
</widget>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">5</property>
</packing>
</child>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">4</property>
+ <property name="position">1</property>
</packing>
</child>
<child>
- <widget class="GtkAlignment" id="alignment3">
+ <widget class="GtkLabel" id="label26">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="top_padding">12</property>
- <child>
- <widget class="GtkLabel" id="label_im_feedback">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- </widget>
- </child>
+ <property name="label">page 2</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">5</property>
+ <property name="position">1</property>
+ <property name="tab_fill">False</property>
+ <property name="type">tab</property>
</packing>
</child>
</widget>
diff --git a/src/gui/encoderConfiguration.cs b/src/gui/encoderConfiguration.cs
index ba26cdf..011ed6a 100644
--- a/src/gui/encoderConfiguration.cs
+++ b/src/gui/encoderConfiguration.cs
@@ -43,7 +43,7 @@ public class EncoderConfigurationWindow
[Widget] Gtk.RadioButton radio_inertia;
[Widget] Gtk.CheckButton check_rotary_friction_inertia_on_axis;
- [Widget] Gtk.HBox hbox_encoder_types;
+ [Widget] Gtk.HBox hbox_top;
[Widget] Gtk.Alignment alignment_options;
[Widget] Gtk.Button button_previous;
@@ -91,8 +91,8 @@ public class EncoderConfigurationWindow
[Widget] Gtk.ComboBox combo_gearedUp;
[Widget] Gtk.Box vbox_select_encoder;
- [Widget] Gtk.VSeparator vseparator_im;
- [Widget] Gtk.Box vbox_calcule_im;
+ [Widget] Gtk.VSeparator vseparator;
+ [Widget] Gtk.Notebook notebook_side;
[Widget] Gtk.SpinButton spin_im_weight_calcule;
[Widget] Gtk.SpinButton spin_im_length_calcule;
//[Widget] Gtk.SpinButton spin_im_duration_calcule;
@@ -183,7 +183,7 @@ public class EncoderConfigurationWindow
//id definedInConfig then only few things can change
if(definedInConfig) {
- EncoderConfigurationWindowBox.hbox_encoder_types.Visible = false;
+ EncoderConfigurationWindowBox.hbox_top.Visible = false;
EncoderConfigurationWindowBox.check_rotary_friction_inertia_on_axis.Visible = false;
EncoderConfigurationWindowBox.alignment_options.Visible = false;
EncoderConfigurationWindowBox.vbox_inertia_calcule.Visible = false;
@@ -304,8 +304,8 @@ public class EncoderConfigurationWindow
label_count.Text = (listCurrent + 1).ToString() + " / " + list.Count.ToString();
//hide inertia moment calculation options when change mode
- if(show_calcule_im)
- on_button_encoder_capture_inertial_show_clicked (new object(), new EventArgs());
+ if(sideMode == sideModes.CAPTUREINERTIAL)
+ showHideSide(sideModes.HIDDEN);
}
private void putValuesStoredPreviously(double d, List<double> list_d, double D, int anglePush, int
angleWeight,
@@ -476,37 +476,83 @@ public class EncoderConfigurationWindow
Catalog.GetString("Calculation of dynamic variables like power in conical
machines is not very accurate because current method is not using the variation of the cone diameter as a
variable.") + "\n\n" +
Catalog.GetString("Future versions will include a better way to calcule this.
Sorry for the inconvenience."));
}
-
- bool show_calcule_im = false;
+
+
+ /*
+ * ------------------- side content stuff ----------------->
+ */
+
+ private enum sideModes { HIDDEN, LOADSAVE, CAPTUREINERTIAL }
+ private sideModes sideMode = sideModes.HIDDEN;
+
+ void on_button_load_save_show_clicked (object o, EventArgs args)
+ {
+ if(sideMode == sideModes.LOADSAVE)
+ showHideSide(sideModes.HIDDEN);
+ else
+ showHideSide(sideModes.LOADSAVE);
+ }
+ void on_button_encoder_capture_inertial_show_clicked (object o, EventArgs args)
+ {
+ if(sideMode == sideModes.CAPTUREINERTIAL)
+ showHideSide(sideModes.HIDDEN);
+ else
+ showHideSide(sideModes.CAPTUREINERTIAL);
+ }
+
int windowWidth;
int windowHeight;
- void on_button_encoder_capture_inertial_show_clicked (object o, EventArgs args)
+ void showHideSide (sideModes newSideMode)
{
/*
* Window size A
* Store window size just before showing side content store gui size.
*/
- if(! show_calcule_im)
+ if(sideMode == sideModes.HIDDEN)
encoder_configuration.GetSize(out windowWidth, out windowHeight);
- //invert show_calcule_im value
- show_calcule_im = ! show_calcule_im;
+ //update sideMode value
+ sideMode = newSideMode;
//change gui
- vseparator_im.Visible = show_calcule_im;
- vbox_calcule_im.Visible = show_calcule_im;
+ vseparator.Visible = (sideMode != sideModes.HIDDEN);
- button_encoder_capture_inertial_cancel.Sensitive = ! show_calcule_im;
- //button_encoder_capture_inertial_finish.Sensitive = ! show_calcule_im;
+ if(sideMode == sideModes.LOADSAVE)
+ notebook_side.CurrentPage = 0;
+ else if(sideMode == sideModes.CAPTUREINERTIAL)
+ notebook_side.CurrentPage = 1;
+
+ notebook_side.Visible = (sideMode != sideModes.HIDDEN);
+
+ button_encoder_capture_inertial_cancel.Sensitive = (sideMode != sideModes.CAPTUREINERTIAL);
+ //button_encoder_capture_inertial_finish.Sensitive = (sideMode != sideModes.CAPTUREINERTIAL);
/*
* Window size B
* Retrieve window size when side content is hided again
*/
- if(! show_calcule_im)
+ if(sideMode == sideModes.HIDDEN)
encoder_configuration.Resize(windowWidth, windowHeight);
}
-
+
+ /*
+ * <------------------- end of side content stuff -----------------
+ */
+
+
+ /*
+ * <--------------- side content area / load-save ---->
+ */
+
+ /*
+ * <--------------- end of side content area / load-save ----
+ */
+
+
+ /*
+ * ------------------- side content area / capture inertial - ---->
+ */
+
void on_button_encoder_capture_inertial_do_clicked (object o, EventArgs args)
{
//signal is raised and managed in gui/encoder.cs
@@ -516,7 +562,7 @@ public class EncoderConfigurationWindow
public void Button_encoder_capture_inertial_do_chronopic_ok ()
{
vbox_select_encoder.Visible = false;
- vseparator_im.Visible = false;
+ vseparator.Visible = false;
button_encoder_capture_inertial_do.Sensitive = false;
//adapt capture, cancel and finish
@@ -534,7 +580,7 @@ public class EncoderConfigurationWindow
public void Button_encoder_capture_inertial_do_ended (double imResult, string message)
{
vbox_select_encoder.Visible = true;
- vseparator_im.Visible = true;
+ vseparator.Visible = true;
button_encoder_capture_inertial_do.Sensitive = true;
//adapt capture, cancel and finish
@@ -568,6 +614,11 @@ public class EncoderConfigurationWindow
}
*/
+ /*
+ * <--------------- end of side content area / capture inertial ----
+ */
+
+
private void on_button_cancel_clicked (object o, EventArgs args)
{
EncoderConfigurationWindowBox.encoder_configuration.Hide();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]