Skip to content
Snippets Groups Projects
Commit fd5b638f authored by Zhou, Wenduo's avatar Zhou, Wenduo
Browse files

Refs #29903. Exposed select tab method.

parent d19350e1
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,9 @@ qRegisterMetaType<Mantid::API::Workspace_sptr>("Workspace"); ...@@ -16,7 +16,9 @@ qRegisterMetaType<Mantid::API::Workspace_sptr>("Workspace");
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Tab //------------------------------------------------
// InstrumentWidgetTab
//-------------------------------------------------
class InstrumentWidgetTab: QFrame class InstrumentWidgetTab: QFrame
{ {
%TypeHeaderCode %TypeHeaderCode
...@@ -33,7 +35,9 @@ private: ...@@ -33,7 +35,9 @@ private:
}; };
//---------------------------------------------------
// InstrumentWidget
//---------------------------------------------------
class InstrumentWidget : QWidget { class InstrumentWidget : QWidget {
%TypeHeaderCode %TypeHeaderCode
#include "MantidQtWidgets/InstrumentView/InstrumentWidget.h" #include "MantidQtWidgets/InstrumentView/InstrumentWidget.h"
...@@ -92,6 +96,9 @@ public: ...@@ -92,6 +96,9 @@ public:
// get render tab // get render tab
InstrumentWidgetRenderTab *getRenderTab(const Tab tab) const; InstrumentWidgetRenderTab *getRenderTab(const Tab tab) const;
// select tab
void selectTab(Tab tab);
void setBinRange(double min_value, double max_value); void setBinRange(double min_value, double max_value);
%Docstring %Docstring
......
...@@ -68,6 +68,9 @@ class InstrumentView(QWidget, ObservingView): ...@@ -68,6 +68,9 @@ class InstrumentView(QWidget, ObservingView):
return self.widget.getRenderTab(0) return self.widget.getRenderTab(0)
def select_tab(self, tab_index):
self.widget.selectTab(tab_index)
@Slot() @Slot()
def _run_close(self): def _run_close(self):
......
...@@ -922,6 +922,7 @@ void InstrumentWidget::setIntegrationRange(double xmin, double xmax) { ...@@ -922,6 +922,7 @@ void InstrumentWidget::setIntegrationRange(double xmin, double xmax) {
* python. * python.
*/ */
void InstrumentWidget::setBinRange(double xmin, double xmax) { void InstrumentWidget::setBinRange(double xmin, double xmax) {
std::cout << "[DEBUG] set bin range: " << xmin << ", " << xmax << "\n";
if (m_isIntegrable) { if (m_isIntegrable) {
m_xIntegration->setRange(xmin, xmax); m_xIntegration->setRange(xmin, xmax);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment