Skip to content

Commit

Permalink
Fixed issue with name of python function. Compiler seems happy now. T…
Browse files Browse the repository at this point in the history
…his refs #5801
  • Loading branch information
JeanBilheux committed Oct 16, 2012
1 parent da7b0bb commit cf6fe45
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ public slots:
void multi_color_scale();
void spectrum_color_scale();
void edit_manual_input();

public signals:
void peak_back_tof_range_update();

public:
signals:
void python_peak_back_tof_range_update(double, double, double, double, double, double);


private:
Expand Down
31 changes: 22 additions & 9 deletions Code/Mantid/MantidQt/RefDetectorViewer/src/RefIVConnections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,17 +340,30 @@ void RefIVConnections::graph_range_changed()
// v_graph_display->SetRangeScale( range_scale );
}

void RefImageView::peak_back_tof_range_update ()
void RefIVConnections::peak_back_tof_range_update()
{
std::cout << "Inside RefImageView::peak_back_tof_range_update"<< std::endl;
double peakmin = iv_ui->lineEdit_peakLeft->text()->toDouble();
double peakmax = iv_ui->lineEdit_peakRight->text()->toDouble();
double backmin = iv_ui->lineEdit_backLeft->text()->toDouble();
double backmax = iv_ui->lineEdit_backright->text()->toDouble();
double tofmin = iv_ui->lineEdit_TOFmin->text()->toDouble();
double tofmax = iv_ui->lineEdit_TOFmax->text()->toDouble();
std::cout << "peakmin: " << peakmin << std::endl;
emit peak_back_tof_range_update(peakmin, peakmax, backmin, backmax, tofmin, tofmax);

QLineEdit * peak_left_control = iv_ui->lineEdit_peakLeft;
std::cout << peak_left_control->text().toStdString();

// double peakmin = iv_ui->lineEdit_peakLeft->text()->toDouble();
// double peakmax = iv_ui->lineEdit_peakRight->text()->toDouble();
// double backmin = iv_ui->lineEdit_backLeft->text()->toDouble();
// double backmax = iv_ui->lineEdit_backright->text()->toDouble();
// double tofmin = iv_ui->lineEdit_TOFmin->text()->toDouble();
// double tofmax = iv_ui->lineEdit_TOFmax->text()->toDouble();
// std::cout << "peakmin: " << peakmin << std::endl;


double peakmin = 1;
double peakmax = 1;
double backmin = 1;
double backmax = 1;
double tofmin = 1;
double tofmax = 1;

emit python_peak_back_tof_range_update(peakmin, peakmax, backmin, backmax, tofmin, tofmax);
}

void RefIVConnections::edit_manual_input()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ def call_back(peakmin, peakmax, backmin, backmax, tofmin, tofmax):
# self._summary.x_max_edit.setText("%-d" % int(tofmax))

import _qti
_qti.app.connect(_qti.app.mantidUI, QtCore.SIGNAL("peak_back_tof_range_update(double,double,double,double,double,double)"), call_back)
_qti.app.connect(_qti.app.mantidUI, QtCore.SIGNAL("python_peak_back_tof_range_update(double,double,double,double,double,double)"), call_back)

import mantidqtpython
mantidqtpython.MantidQt.RefDetectorViewer.RefMatrixWSImageView(ws_output_base)
Expand Down

0 comments on commit cf6fe45

Please sign in to comment.