Skip to content

Commit

Permalink
Commented out part making compiler unhappy. This refs #5801
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux committed Nov 6, 2012
1 parent 9961a03 commit c734cf7
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 10 deletions.
27 changes: 27 additions & 0 deletions Code/Mantid/MantidQt/Python/mantidqt.sip
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,27 @@ namespace RefDetectorViewer
//*WIKI* Here follows a list of the classes exposed to python and the methods you can execute on them.



/***************************************************************************/
/***************************************************************************/
/***************************************************************************/

/*

class RefIVConnections: QWidget
{
%TypeHeaderCode
#include "MantidQtRefDetectorViewer/RefIVConnections.h"
%end

private:
RefIVConnections();

};


*/

/***************************************************************************/
/***************************************************************************/
/***************************************************************************/
Expand All @@ -1144,13 +1165,19 @@ class RefMatrixWSImageView

public:
RefMatrixWSImageView (QString wps_name);
/* MantidQt::RefDetectorViewer::RefIVConnections* getConnections(); */

};

}; // end namespace
}; // end namespace







namespace MantidQt
{
namespace MantidWidgets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ public slots:
signals:
void python_peak_back_tof_range_update(double, double, double, double, double, double);

private:
RefIVConnections() {}

private:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace MantidQt
namespace RefDetectorViewer
{


class RefIVConnections;
class EXPORT_OPT_MANTIDQT_IMAGEVIEWER RefImageView : public QMainWindow
{
public:
Expand All @@ -54,7 +54,7 @@ class EXPORT_OPT_MANTIDQT_IMAGEVIEWER RefImageView : public QMainWindow

~RefImageView();

void* getIVConnections();
RefIVConnections* getIVConnections();

private:
GraphDisplay* h_graph;
Expand All @@ -68,7 +68,8 @@ class EXPORT_OPT_MANTIDQT_IMAGEVIEWER RefImageView : public QMainWindow
void* saved_slider_handler; // SliderHandler*
void* saved_range_handler; // RangeHandler*
void* saved_image_display; // RefImageDisplay*
void* saved_iv_connections; // IVConnections*
// void* saved_iv_connections; // IVConnections*
RefIVConnections* saved_iv_connections; // IVConnections*
};

} // namespace MantidQt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ namespace MantidQt
namespace RefDetectorViewer
{

class EXPORT_OPT_MANTIDQT_IMAGEVIEWER RefMatrixWSImageView
class RefIVConnections;
class EXPORT_OPT_MANTIDQT_IMAGEVIEWER RefMatrixWSImageView
{
public:

/// Construct an image viewer for the specifed MatrixWorkspace
RefMatrixWSImageView ( Mantid::API::MatrixWorkspace_sptr mat_ws );

RefMatrixWSImageView( QString wps_name);

RefIVConnections* getConnections();

~RefMatrixWSImageView();

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ RefImageView::RefImageView( RefImageDataSource* data_source )
image_display->SetDataSource( data_source );
}

void* RefImageView::getIVConnections()
RefIVConnections* RefImageView::getIVConnections()
{
return saved_iv_connections;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "MantidQtRefDetectorViewer/RefMatrixWSImageView.h"
#include "MantidQtRefDetectorViewer/RefMatrixWSDataSource.h"
#include "MantidQtRefDetectorViewer/RefArrayDataSource.h"
#include "MantidQtRefDetectorViewer/RefIVConnections.h"
#include "MantidAPI/WorkspaceProperty.h"
#include "MantidAPI/Algorithm.h"
#include "MantidKernel/System.h"
Expand Down Expand Up @@ -66,13 +67,19 @@ RefMatrixWSImageView::RefMatrixWSImageView( QString wps_name)
total_rows, total_cols,
data);

std::cout << "ws->readX(0).size(): " << ws->readX(0).size() << std::endl;
// std::cout << "ws->readX(0).size(): " << ws->readX(0).size() << std::endl;
image_view = new RefImageView( source );

//void* iv_connections = image_view->getIVConnections();
}


RefIVConnections* RefMatrixWSImageView::getConnections()
{
return image_view->getIVConnections();

}


RefMatrixWSImageView::~RefMatrixWSImageView()
{
// nothing to do here, since image_view is deleted when the window closes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -909,11 +909,11 @@ def _plot_data_count_vs_tof_2d(self):

import mantidqtpython
self.ref_det_view = mantidqtpython.MantidQt.RefDetectorViewer.RefMatrixWSImageView(ws_output_base)
QtCore.QObject.connect(self.ref_det_view, QtCore.SIGNAL("python_peak_back_tof_range_update(double,double, double,double,double,double)"), self.call_back)
#QtCore.QObject.connect(self.ref_det_view.getConnections(), QtCore.SIGNAL("python_peak_back_tof_range_update(double,double, double,double,double,double)"), self.call_back)


def call_back(self, peakmin, peakmax, backmin, backmax, tofmin, tofmax):
print 'Inside the call_back on the python side'
print 'Inside the call_back in the python side'
# self._summary.data_peak_from_pixel.setText("%-d" % int(peakmin))
# self._summary.data_peak_to_pixel.setText("%-d" % int(peakmax))
# self._summary.data_background_from_pixel1.setText("%-d" % int(backmin))
Expand Down

0 comments on commit c734cf7

Please sign in to comment.