Skip to content

Commit

Permalink
Fix sip code for image display. Refs #5801
Browse files Browse the repository at this point in the history
  • Loading branch information
martyngigg committed Nov 21, 2012
1 parent 05f7ea0 commit 669bfba
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 26 deletions.
63 changes: 38 additions & 25 deletions Code/Mantid/MantidQt/Python/mantidqt.sip
Original file line number Diff line number Diff line change
Expand Up @@ -1119,10 +1119,6 @@ WidgetFactory::WidgetFactory()
}; // end namespace
}; // end namespace





namespace MantidQt
{
namespace RefDetectorViewer
Expand All @@ -1132,50 +1128,67 @@ namespace RefDetectorViewer
//*WIKI* == Classes ==
//*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();
%End

};
%Docstring

RefIVConnections
================
A RefIVConnections object is responsible for emitting signals about
changes in the state of the image view.
%End

*/
private:
RefIVConnections();
};

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

class RefMatrixWSImageView
{
%TypeHeaderCode
#include "MantidQtRefDetectorViewer/RefMatrixWSImageView.h"
%End

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

};
%Docstring

}; // end namespace
}; // end namespace
RefMatrixWSImageView
====================

A RefMatrixWSImageView is the gateway to the image view display. To
bring up an image display simply construct an object of this type, i.e.
image_view = RefMatrixWSImageView("test_ws")

See the methods for RefMatrixWSImageView, below.
%End


public:
RefMatrixWSImageView(QString wsname);

MantidQt::RefDetectorViewer::RefIVConnections * getConnections();
%Docstring
MantidQt::RefDetectorViewer::RefIVConnections* RefMatrixWSImageView::getConnections()
-------------------------------------------------------------------------------------
Get the connections widget inside the image view. This object is responsible for
emitting signals about changes in the state of the image view.

Returns:
a pointer to the RefIVConnections object.

%End


};

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


namespace MantidQt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,8 @@ 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.getConnections(), 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):
Expand Down

0 comments on commit 669bfba

Please sign in to comment.