Rosetta
Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
ui::ui_protocols::helical_bundle::HelixOptionWidget Class Reference

#include <HelixOptionWidget.h>

Inheritance diagram for ui::ui_protocols::helical_bundle::HelixOptionWidget:
Inheritance graph
[legend]

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...
 

Constructor & Destructor Documentation

◆ HelixOptionWidget()

ui::ui_protocols::helical_bundle::HelixOptionWidget::HelixOptionWidget ( QWidget parent = 0)
explicit

◆ ~HelixOptionWidget()

ui::ui_protocols::helical_bundle::HelixOptionWidget::~HelixOptionWidget ( )

References ui.

Member Function Documentation

◆ configure()

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.

Parameters
[in]nameThe name of the option.
[in]range_minThe min value of the range of allowed values.
[in]range_maxThe max value of the range of allowed values.
[in]show_pitch_optionIff true, the option to copy pitch from helix is shown.

◆ control_has_changed

void ui::ui_protocols::helical_bundle::HelixOptionWidget::control_has_changed ( )
signal

Emitted when a control is changed.

Referenced by on_radioButton_1_clicked(), and on_radioButton_2_clicked().

◆ decrement_copy_from_helix()

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.

◆ helix_to_copy()

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.

◆ on_doubleSpinBox_valueChanged

void ui::ui_protocols::helical_bundle::HelixOptionWidget::on_doubleSpinBox_valueChanged ( double  arg1)
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.

◆ on_horizontalSlider_valueChanged

void ui::ui_protocols::helical_bundle::HelixOptionWidget::on_horizontalSlider_valueChanged ( int  value)
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.

◆ on_radioButton_1_clicked

void ui::ui_protocols::helical_bundle::HelixOptionWidget::on_radioButton_1_clicked ( )
privateslot

If the user has selected "set to value".

References control_has_changed().

Referenced by set_value().

◆ on_radioButton_2_clicked

void ui::ui_protocols::helical_bundle::HelixOptionWidget::on_radioButton_2_clicked ( )
privateslot

If the user has selected "copy from helix".

References control_has_changed().

Referenced by set_copies_helix1().

◆ on_radioButton_3_clicked

void ui::ui_protocols::helical_bundle::HelixOptionWidget::on_radioButton_3_clicked ( )
privateslot

If the user has selected "copy pitch from helix".

Referenced by set_copies_helix1_pitch().

◆ on_spinBox_valueChanged

void ui::ui_protocols::helical_bundle::HelixOptionWidget::on_spinBox_valueChanged ( int  arg1)
privateslot

The user has changed which helix we're copying from. Emit a control_has_changed() signal.

◆ set_copies_helix1()

void ui::ui_protocols::helical_bundle::HelixOptionWidget::set_copies_helix1 ( )

Set this widget to copy helix 1.

References on_radioButton_2_clicked().

◆ set_copies_helix1_pitch()

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().

◆ set_copying_enabled()

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.

◆ set_value()

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().

◆ update_slider_spinner_values()

void ui::ui_protocols::helical_bundle::HelixOptionWidget::update_slider_spinner_values ( )
private

◆ value()

core::Real ui::ui_protocols::helical_bundle::HelixOptionWidget::value ( ) const

Get the value of the slider and spinner.

Referenced by set_value().

◆ widget_mode()

HOW_widget_mode ui::ui_protocols::helical_bundle::HelixOptionWidget::widget_mode ( ) const

Member Data Documentation

◆ ui

Ui::HelixOptionWidget* ui::ui_protocols::helical_bundle::HelixOptionWidget::ui
private

Referenced by ~HelixOptionWidget().

◆ update_source_

HOW_update_source ui::ui_protocols::helical_bundle::HelixOptionWidget::update_source_
private

What is the source of a changed value – the slider or the spinner?

Referenced by set_value(), and update_slider_spinner_values().


The documentation for this class was generated from the following files: