|
Rosetta
|
#include <HelixOptionWidget.h>

Signals | |
| void | control_has_changed () |
| Emitted when a control is changed. More... | |
Public Member Functions | |
| HelixOptionWidget (QWidget *parent=0) | |
| ~HelixOptionWidget () | |
| void | configure (std::string const &name, core::Real const &range_min, core::Real const &range_max, bool const show_pitch_option) |
| Set the options for this dialogue. More... | |
| void | set_value (core::Real const &value, bool const reset_mode=false) |
| Set the value of the slider and the spinner to some value. More... | |
| core::Real | value () const |
| Get the value of the slider and spinner. More... | |
| HOW_widget_mode | widget_mode () const |
| Get the current widget mode. More... | |
| core::Size | helix_to_copy () const |
| Get the value of the spinner that indicates which helix should be copied. More... | |
| void | set_copying_enabled (bool const setting, core::Size const max_index) |
| Set whether the "copy from helix" option is allowed or not. More... | |
| void | decrement_copy_from_helix () |
| If the "copy_from_helix" option is enabled, reduce the index of the helix from which to copy by one. More... | |
| void | set_copies_helix1 () |
| Set this widget to copy helix 1. More... | |
| void | set_copies_helix1_pitch () |
| Set this widget to copy pitch from helix 1. More... | |
Private Slots | |
| void | on_radioButton_1_clicked () |
| If the user has selected "set to value". More... | |
| void | on_radioButton_2_clicked () |
| If the user has selected "copy from helix". More... | |
| void | on_radioButton_3_clicked () |
| If the user has selected "copy pitch from helix". More... | |
| void | on_doubleSpinBox_valueChanged (double arg1) |
| The user has changed the value in the spin box. Update the corresponding slider. More... | |
| void | on_horizontalSlider_valueChanged (int value) |
| The user has moved the slider. Update the corresponding spin box. More... | |
| void | on_spinBox_valueChanged (int arg1) |
| The user has changed which helix we're copying from. Emit a control_has_changed() signal. More... | |
Private Member Functions | |
| void | update_slider_spinner_values () |
| Update the slider from the spinner or the spinner from the slider. More... | |
Private Attributes | |
| Ui::HelixOptionWidget * | ui |
| HOW_update_source | update_source_ |
| What is the source of a changed value – the slider or the spinner? More... | |
|
explicit |
| ui::ui_protocols::helical_bundle::HelixOptionWidget::~HelixOptionWidget | ( | ) |
References ui.
| void ui::ui_protocols::helical_bundle::HelixOptionWidget::configure | ( | std::string const & | name, |
| core::Real const & | range_min, | ||
| core::Real const & | range_max, | ||
| bool const | show_pitch_option | ||
| ) |
Set the options for this dialogue.
| [in] | name | The name of the option. |
| [in] | range_min | The min value of the range of allowed values. |
| [in] | range_max | The max value of the range of allowed values. |
| [in] | show_pitch_option | Iff true, the option to copy pitch from helix is shown. |
|
signal |
Emitted when a control is changed.
Referenced by on_radioButton_1_clicked(), and on_radioButton_2_clicked().
| void ui::ui_protocols::helical_bundle::HelixOptionWidget::decrement_copy_from_helix | ( | ) |
If the "copy_from_helix" option is enabled, reduce the index of the helix from which to copy by one.
| core::Size ui::ui_protocols::helical_bundle::HelixOptionWidget::helix_to_copy | ( | ) | const |
Get the value of the spinner that indicates which helix should be copied.
|
privateslot |
The user has changed the value in the spin box. Update the corresponding slider.
References ui::ui_protocols::helical_bundle::HOW_update_from_neither, and ui::ui_protocols::helical_bundle::HOW_update_from_spinner.
|
privateslot |
The user has moved the slider. Update the corresponding spin box.
References ui::ui_protocols::helical_bundle::HOW_update_from_neither, and ui::ui_protocols::helical_bundle::HOW_update_from_slider.
|
privateslot |
If the user has selected "set to value".
References control_has_changed().
Referenced by set_value().
|
privateslot |
If the user has selected "copy from helix".
References control_has_changed().
Referenced by set_copies_helix1().
|
privateslot |
If the user has selected "copy pitch from helix".
Referenced by set_copies_helix1_pitch().
|
privateslot |
The user has changed which helix we're copying from. Emit a control_has_changed() signal.
| void ui::ui_protocols::helical_bundle::HelixOptionWidget::set_copies_helix1 | ( | ) |
Set this widget to copy helix 1.
References on_radioButton_2_clicked().
| void ui::ui_protocols::helical_bundle::HelixOptionWidget::set_copies_helix1_pitch | ( | ) |
Set this widget to copy pitch from helix 1.
Assumes that this is an omega0 widget.
References on_radioButton_3_clicked().
| void ui::ui_protocols::helical_bundle::HelixOptionWidget::set_copying_enabled | ( | bool const | setting, |
| core::Size const | max_index | ||
| ) |
Set whether the "copy from helix" option is allowed or not.
| void ui::ui_protocols::helical_bundle::HelixOptionWidget::set_value | ( | core::Real const & | value, |
| bool const | reset_mode = false |
||
| ) |
Set the value of the slider and the spinner to some value.
If reset_mode is true, then the HelixOptionWidget is also reset so that it is in direct-setting mode.
References ui::ui_protocols::helical_bundle::HOW_update_from_spinner, on_radioButton_1_clicked(), update_slider_spinner_values(), update_source_, and value().
|
private |
Update the slider from the spinner or the spinner from the slider.
References ui::ui_protocols::helical_bundle::HOW_update_from_neither, ui::ui_protocols::helical_bundle::HOW_update_from_slider, ui::ui_protocols::helical_bundle::HOW_update_from_spinner, round(), and update_source_.
Referenced by set_value().
| core::Real ui::ui_protocols::helical_bundle::HelixOptionWidget::value | ( | ) | const |
Get the value of the slider and spinner.
Referenced by set_value().
| HOW_widget_mode ui::ui_protocols::helical_bundle::HelixOptionWidget::widget_mode | ( | ) | const |
Get the current widget mode.
References ui::ui_protocols::helical_bundle::HOW_copy_pitch, ui::ui_protocols::helical_bundle::HOW_copy_value, and ui::ui_protocols::helical_bundle::HOW_set_value.
|
private |
Referenced by ~HelixOptionWidget().
|
private |
What is the source of a changed value – the slider or the spinner?
Referenced by set_value(), and update_slider_spinner_values().