From 81a91faea2b8ff965dd87a80ac0e320f9b2375ea Mon Sep 17 00:00:00 2001 From: Conor Finn <conor.finn@stfc.ac.uk> Date: Tue, 15 Oct 2019 16:45:17 +0100 Subject: [PATCH] RE #27012 Add focus tab framework --- .../tabs/calibration/calibration_tab.ui | 6 +- .../tabs/focus/__init__.py | 0 .../tabs/focus/focus_tab.ui | 215 ++++++++++++++++++ .../tabs/focus/model.py | 13 ++ .../tabs/focus/test/__init__.py | 0 .../tabs/focus/test/test_model.py | 0 6 files changed, 231 insertions(+), 3 deletions(-) create mode 100644 scripts/Engineering/gui/engineering_diffraction/tabs/focus/__init__.py create mode 100644 scripts/Engineering/gui/engineering_diffraction/tabs/focus/focus_tab.ui create mode 100644 scripts/Engineering/gui/engineering_diffraction/tabs/focus/model.py create mode 100644 scripts/Engineering/gui/engineering_diffraction/tabs/focus/test/__init__.py create mode 100644 scripts/Engineering/gui/engineering_diffraction/tabs/focus/test/test_model.py diff --git a/scripts/Engineering/gui/engineering_diffraction/tabs/calibration/calibration_tab.ui b/scripts/Engineering/gui/engineering_diffraction/tabs/calibration/calibration_tab.ui index 094c72c1906..f896e5b6123 100644 --- a/scripts/Engineering/gui/engineering_diffraction/tabs/calibration/calibration_tab.ui +++ b/scripts/Engineering/gui/engineering_diffraction/tabs/calibration/calibration_tab.ui @@ -9,8 +9,8 @@ <rect> <x>0</x> <y>0</y> - <width>619</width> - <height>187</height> + <width>618</width> + <height>157</height> </rect> </property> <property name="sizePolicy"> @@ -172,7 +172,7 @@ QGroupBox:title { <property name="sizeHint" stdset="0"> <size> <width>20</width> - <height>40</height> + <height>10</height> </size> </property> </spacer> diff --git a/scripts/Engineering/gui/engineering_diffraction/tabs/focus/__init__.py b/scripts/Engineering/gui/engineering_diffraction/tabs/focus/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/scripts/Engineering/gui/engineering_diffraction/tabs/focus/focus_tab.ui b/scripts/Engineering/gui/engineering_diffraction/tabs/focus/focus_tab.ui new file mode 100644 index 00000000000..db2ba0f622d --- /dev/null +++ b/scripts/Engineering/gui/engineering_diffraction/tabs/focus/focus_tab.ui @@ -0,0 +1,215 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>CalibTab</class> + <widget class="QWidget" name="CalibTab"> + <property name="windowModality"> + <enum>Qt::NonModal</enum> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>617</width> + <height>153</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <property name="styleSheet"> + <string notr="true">QGroupBox { +border: 1px solid grey;border-radius: 10px;margin-top: 1ex; margin-right: 0ex +} +QGroupBox:title { + subcontrol-origin: margin; + padding: 0 3px; + subcontrol-position: top center; + padding-top: 0px; + padding-bottom: 0px; + padding-right: 10px; + color: rgb(56, 56, 56) +}</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <layout class="QVBoxLayout" name="verticalLayout" stretch="1,0"> + <property name="sizeConstraint"> + <enum>QLayout::SetDefaultConstraint</enum> + </property> + <item> + <widget class="QGroupBox" name="group_focus"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="layoutDirection"> + <enum>Qt::LeftToRight</enum> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="title"> + <string>Focus Run</string> + </property> + <property name="alignment"> + <set>Qt::AlignBottom|Qt::AlignHCenter</set> + </property> + <property name="flat"> + <bool>false</bool> + </property> + <property name="checkable"> + <bool>false</bool> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="1" column="0"> + <layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0" columnstretch="0,0,0"> + <property name="sizeConstraint"> + <enum>QLayout::SetDefaultConstraint</enum> + </property> + <property name="verticalSpacing"> + <number>6</number> + </property> + <item row="4" column="2"> + <widget class="QPushButton" name="button_focus"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Focus</string> + </property> + </widget> + </item> + <item row="4" column="0" colspan="2"> + <widget class="QCheckBox" name="check_plotOutput"> + <property name="enabled"> + <bool>true</bool> + </property> + <property name="text"> + <string>Plot Focused Workspace</string> + </property> + </widget> + </item> + <item row="3" column="0" colspan="3"> + <widget class="Line" name="line"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> + <item row="0" column="0" colspan="3"> + <widget class="FileFinder" name="finder_focusRun" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + </widget> + </item> + <item row="2" column="0" colspan="3"> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>10</height> + </size> + </property> + </spacer> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_banks"> + <property name="text"> + <string>Select Banks:</string> + </property> + </widget> + </item> + <item row="1" column="1" colspan="2"> + <layout class="QHBoxLayout" name="layout_banks"> + <item> + <widget class="QCheckBox" name="check_northBank"> + <property name="text"> + <string>North - 1</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="tristate"> + <bool>false</bool> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="check_southBank"> + <property name="text"> + <string>South - 2</string> + </property> + <property name="checked"> + <bool>true</bool> + </property> + <property name="tristate"> + <bool>false</bool> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="verticalSpacer_2"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>10</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </widget> + <customwidgets> + <customwidget> + <class>FileFinder</class> + <extends>QWidget</extends> + <header>mantidqt.widgets.filefinder</header> + <container>1</container> + </customwidget> + </customwidgets> + <tabstops> + <tabstop>check_plotOutput</tabstop> + <tabstop>button_focus</tabstop> + </tabstops> + <resources/> + <connections/> +</ui> diff --git a/scripts/Engineering/gui/engineering_diffraction/tabs/focus/model.py b/scripts/Engineering/gui/engineering_diffraction/tabs/focus/model.py new file mode 100644 index 00000000000..be536df1f75 --- /dev/null +++ b/scripts/Engineering/gui/engineering_diffraction/tabs/focus/model.py @@ -0,0 +1,13 @@ +# Mantid Repository : https://github.com/mantidproject/mantid +# +# Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI, +# NScD Oak Ridge National Laboratory, European Spallation Source +# & Institut Laue - Langevin +# SPDX - License - Identifier: GPL - 3.0 + + +from __future__ import (absolute_import, division, print_function) + + +class FocusModel(object): + def focus_run(self, run_number, banks, plot_output, instrument, rb_number): + pass diff --git a/scripts/Engineering/gui/engineering_diffraction/tabs/focus/test/__init__.py b/scripts/Engineering/gui/engineering_diffraction/tabs/focus/test/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/scripts/Engineering/gui/engineering_diffraction/tabs/focus/test/test_model.py b/scripts/Engineering/gui/engineering_diffraction/tabs/focus/test/test_model.py new file mode 100644 index 00000000000..e69de29bb2d -- GitLab