Skip to content

Commit

Permalink
Ui-QT: added moving endpoints to parameters widget
Browse files Browse the repository at this point in the history
  • Loading branch information
M. Sallermann authored and M. Sallermann committed Mar 17, 2022
1 parent cfe8fd8 commit 5dee3d9
Show file tree
Hide file tree
Showing 2 changed files with 464 additions and 364 deletions.
27 changes: 27 additions & 0 deletions ui-cpp/ui-qt/src/ParametersWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,16 @@ void ParametersWidget::Load_Parameters_Contents()
else if( image_type == 3 )
this->radioButton_Stationary->setChecked( true );

// Moving endpoints
bool moving_endpoints = Parameters_GNEB_Get_Moving_Endpoints( state.get() );
this->checkBox_moving_endpoints->setChecked( moving_endpoints );
bool translating_endpoints = Parameters_GNEB_Get_Translating_Endpoints( state.get() );
this->checkBox_translating_endpoints->setChecked( translating_endpoints );
float delta_Rx_left, delta_Rx_right;
Parameters_GNEB_Get_Equilibrium_Delta_Rx( state.get(), &delta_Rx_left, &delta_Rx_right);
this->doubleSpinBox_delta_Rx_left->setValue( delta_Rx_left );
this->doubleSpinBox_delta_Rx_right->setValue( delta_Rx_right );

// EMA
// modes to calculate and visualize
i1 = Parameters_EMA_Get_N_Modes( state.get() );
Expand Down Expand Up @@ -445,6 +455,16 @@ void ParametersWidget::set_parameters_gneb()
Parameters_GNEB_Set_N_Iterations( state.get(), i1, i2 );
std::string folder = this->lineEdit_gneb_output_folder->text().toStdString();
Parameters_GNEB_Set_Output_Folder( state.get(), folder.c_str() );

// Moving endpoints
bool moving_endpoints = this->checkBox_moving_endpoints->isChecked();
bool translating_endpoints = this->checkBox_translating_endpoints->isChecked();
float delta_Rx_left = this->doubleSpinBox_delta_Rx_left->value();
float delta_Rx_right = this->doubleSpinBox_delta_Rx_right->value();

Parameters_GNEB_Set_Moving_Endpoints(state.get(), moving_endpoints);
Parameters_GNEB_Set_Translating_Endpoints(state.get(), translating_endpoints);
Parameters_GNEB_Set_Equilibrium_Delta_Rx(state.get(), delta_Rx_left, delta_Rx_right);
}

void ParametersWidget::set_gneb_auto_image_type()
Expand Down Expand Up @@ -691,6 +711,7 @@ void ParametersWidget::Setup_Parameters_Slots()
connect( this->checkBox_gneb_output_any, SIGNAL( stateChanged( int ) ), this, SLOT( set_parameters_gneb() ) );
connect( this->checkBox_gneb_output_initial, SIGNAL( stateChanged( int ) ), this, SLOT( set_parameters_gneb() ) );
connect( this->checkBox_gneb_output_final, SIGNAL( stateChanged( int ) ), this, SLOT( set_parameters_gneb() ) );

connect(
this->checkBox_gneb_output_energies_step, SIGNAL( stateChanged( int ) ), this, SLOT( set_parameters_gneb() ) );
connect(
Expand All @@ -699,6 +720,12 @@ void ParametersWidget::Setup_Parameters_Slots()
connect(
this->checkBox_gneb_output_chain_step, SIGNAL( stateChanged( int ) ), this, SLOT( set_parameters_gneb() ) );

// Endpoints
connect( this->checkBox_moving_endpoints, SIGNAL( stateChanged( int ) ), this, SLOT( set_parameters_gneb() ) );
connect( this->checkBox_translating_endpoints, SIGNAL( stateChanged( int ) ), this, SLOT( set_parameters_gneb() ) );
connect( this->doubleSpinBox_delta_Rx_left, SIGNAL( editingFinished() ), this, SLOT( set_parameters_gneb() ) );
connect( this->doubleSpinBox_delta_Rx_right, SIGNAL( editingFinished() ), this, SLOT( set_parameters_gneb() ) );

// EMA
connect( this->spinBox_ema_n_modes, SIGNAL( editingFinished() ), this, SLOT( set_parameters_ema() ) );
connect( this->spinBox_ema_n_mode_follow, SIGNAL( editingFinished() ), this, SLOT( set_parameters_ema() ) );
Expand Down
Loading

0 comments on commit 5dee3d9

Please sign in to comment.