# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'design.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
#
# WARNING! All changes made in this file will be lost!


#from PyQt5 import QtCore, QtGui, QtWidgets
from silx.gui import qt as QtCore
QtGui = QtCore
QtWidgets = QtCore


class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1082, 758)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/logos/icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.browseButton = QtWidgets.QPushButton(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.browseButton.sizePolicy().hasHeightForWidth())
        self.browseButton.setSizePolicy(sizePolicy)
        self.browseButton.setMaximumSize(QtCore.QSize(1000000, 16777215))
        self.browseButton.setObjectName("browseButton")
        self.gridLayout.addWidget(self.browseButton, 0, 1, 1, 1)
        self.filenameBox = QtWidgets.QLineEdit(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.filenameBox.sizePolicy().hasHeightForWidth())
        self.filenameBox.setSizePolicy(sizePolicy)
        self.filenameBox.setMinimumSize(QtCore.QSize(100, 0))
        self.filenameBox.setBaseSize(QtCore.QSize(200, 0))
        self.filenameBox.setPlaceholderText("")
        self.filenameBox.setObjectName("filenameBox")
        self.gridLayout.addWidget(self.filenameBox, 0, 0, 1, 1)
        self.loadButton = QtWidgets.QPushButton(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.loadButton.sizePolicy().hasHeightForWidth())
        self.loadButton.setSizePolicy(sizePolicy)
        self.loadButton.setMaximumSize(QtCore.QSize(10000, 16777215))
        self.loadButton.setAutoDefault(True)
        self.loadButton.setDefault(True)
        self.loadButton.setObjectName("loadButton")
        self.gridLayout.addWidget(self.loadButton, 0, 2, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
        self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
        self.tabWidget.setFocusPolicy(QtCore.Qt.TabFocus)
        self.tabWidget.setObjectName("tabWidget")
        self.object = QtWidgets.QWidget()
        self.object.setObjectName("object")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.object)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.objectWidget = ObjectView(self.object)
        self.objectWidget.setObjectName("objectWidget")
        self.horizontalLayout.addWidget(self.objectWidget)
        self.tabWidget.addTab(self.object, "")
        self.probe = QtWidgets.QWidget()
        self.probe.setObjectName("probe")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.probe)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.splitter_2 = QtWidgets.QSplitter(self.probe)
        self.splitter_2.setOrientation(QtCore.Qt.Horizontal)
        self.splitter_2.setObjectName("splitter_2")
        self.splitter = QtWidgets.QSplitter(self.splitter_2)
        self.splitter.setOrientation(QtCore.Qt.Vertical)
        self.splitter.setObjectName("splitter")
        self.probeHist = Histogram(self.splitter)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.probeHist.sizePolicy().hasHeightForWidth())
        self.probeHist.setSizePolicy(sizePolicy)
        self.probeHist.setMinimumSize(QtCore.QSize(200, 200))
        self.probeHist.setMaximumSize(QtCore.QSize(500, 16777215))
        self.probeHist.setBaseSize(QtCore.QSize(0, 0))
        self.probeHist.setObjectName("probeHist")
        self.layoutWidget = QtWidgets.QWidget(self.splitter)
        self.layoutWidget.setObjectName("layoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.probePlot = ProbeView(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(2)
        sizePolicy.setHeightForWidth(self.probePlot.sizePolicy().hasHeightForWidth())
        self.probePlot.setSizePolicy(sizePolicy)
        self.probePlot.setMinimumSize(QtCore.QSize(0, 200))
        self.probePlot.setMaximumSize(QtCore.QSize(500, 16777215))
        self.probePlot.setObjectName("probePlot")
        self.verticalLayout.addWidget(self.probePlot)
        self.probePlot2 = ProbeView(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(2)
        sizePolicy.setHeightForWidth(self.probePlot2.sizePolicy().hasHeightForWidth())
        self.probePlot2.setSizePolicy(sizePolicy)
        self.probePlot2.setMinimumSize(QtCore.QSize(0, 200))
        self.probePlot2.setMaximumSize(QtCore.QSize(500, 16777215))
        self.probePlot2.setObjectName("probePlot2")
        self.verticalLayout.addWidget(self.probePlot2)
        self.layoutWidget1 = QtWidgets.QWidget(self.splitter_2)
        self.layoutWidget1.setObjectName("layoutWidget1")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.layoutWidget1)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.gridLayout_3 = QtWidgets.QGridLayout()
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.label = QtWidgets.QLabel(self.layoutWidget1)
        self.label.setObjectName("label")
        self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1)
        self.backwardBox = QtWidgets.QSpinBox(self.layoutWidget1)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.backwardBox.sizePolicy().hasHeightForWidth())
        self.backwardBox.setSizePolicy(sizePolicy)
        self.backwardBox.setMaximum(10000)
        self.backwardBox.setProperty("value", 1000)
        self.backwardBox.setObjectName("backwardBox")
        self.gridLayout_3.addWidget(self.backwardBox, 0, 1, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.layoutWidget1)
        self.label_3.setObjectName("label_3")
        self.gridLayout_3.addWidget(self.label_3, 0, 3, 1, 1)
        self.forwardBox = QtWidgets.QSpinBox(self.layoutWidget1)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.forwardBox.sizePolicy().hasHeightForWidth())
        self.forwardBox.setSizePolicy(sizePolicy)
        self.forwardBox.setMaximum(10000)
        self.forwardBox.setProperty("value", 1000)
        self.forwardBox.setObjectName("forwardBox")
        self.gridLayout_3.addWidget(self.forwardBox, 0, 4, 1, 1)
        self.propagateButton = QtWidgets.QPushButton(self.layoutWidget1)
        self.propagateButton.setObjectName("propagateButton")
        self.gridLayout_3.addWidget(self.propagateButton, 0, 9, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.layoutWidget1)
        self.label_2.setObjectName("label_2")
        self.gridLayout_3.addWidget(self.label_2, 1, 0, 1, 1)
        self.focusButton = QtWidgets.QPushButton(self.layoutWidget1)
        self.focusButton.setObjectName("focusButton")
        self.gridLayout_3.addWidget(self.focusButton, 1, 9, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(60, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_3.addItem(spacerItem, 0, 2, 1, 1)
        spacerItem1 = QtWidgets.QSpacerItem(60, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_3.addItem(spacerItem1, 0, 5, 1, 1)
        self.numberBox = QtWidgets.QSpinBox(self.layoutWidget1)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.numberBox.sizePolicy().hasHeightForWidth())
        self.numberBox.setSizePolicy(sizePolicy)
        self.numberBox.setMaximum(1000)
        self.numberBox.setProperty("value", 200)
        self.numberBox.setObjectName("numberBox")
        self.gridLayout_3.addWidget(self.numberBox, 0, 7, 1, 1)
        self.label_4 = QtWidgets.QLabel(self.layoutWidget1)
        self.label_4.setObjectName("label_4")
        self.gridLayout_3.addWidget(self.label_4, 0, 6, 1, 1)
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_3.addItem(spacerItem2, 0, 8, 1, 1)
        self.focusSlider = QtWidgets.QSlider(self.layoutWidget1)
        self.focusSlider.setOrientation(QtCore.Qt.Horizontal)
        self.focusSlider.setObjectName("focusSlider")
        self.gridLayout_3.addWidget(self.focusSlider, 1, 1, 1, 7)
        spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_3.addItem(spacerItem3, 1, 8, 1, 1)
        self.verticalLayout_2.addLayout(self.gridLayout_3)
        self.verticalFocusView = PropagationView(self.layoutWidget1)
        self.verticalFocusView.setMinimumSize(QtCore.QSize(200, 0))
        self.verticalFocusView.setObjectName("verticalFocusView")
        self.verticalLayout_2.addWidget(self.verticalFocusView)
        self.horizontalFocusView = PropagationView(self.layoutWidget1)
        self.horizontalFocusView.setObjectName("horizontalFocusView")
        self.verticalLayout_2.addWidget(self.horizontalFocusView)
        self.horizontalLayout_2.addWidget(self.splitter_2)
        self.tabWidget.addTab(self.probe, "")
        self.modes = QtWidgets.QWidget()
        self.modes.setObjectName("modes")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.modes)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.modeWidget = ModeView(self.modes)
        self.modeWidget.setObjectName("modeWidget")
        self.horizontalLayout_3.addWidget(self.modeWidget)
        self.tabWidget.addTab(self.modes, "")
        self.gridLayout_2.addWidget(self.tabWidget, 1, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1082, 20))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
        MainWindow.setTabOrder(self.filenameBox, self.browseButton)
        MainWindow.setTabOrder(self.browseButton, self.loadButton)
        MainWindow.setTabOrder(self.loadButton, self.tabWidget)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "NanoMAX Ptycho Viewer"))
        self.browseButton.setToolTip(_translate("MainWindow", "<html><head/><body><p>Browse for data files</p></body></html>"))
        self.browseButton.setText(_translate("MainWindow", "Browse..."))
        self.filenameBox.setText(_translate("MainWindow", "<input file>"))
        self.loadButton.setToolTip(_translate("MainWindow", "<html><head/><body><p>Go!</p></body></html>"))
        self.loadButton.setText(_translate("MainWindow", "Load"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.object), _translate("MainWindow", "Object"))
        self.label.setText(_translate("MainWindow", "Backward"))
        self.label_3.setText(_translate("MainWindow", "Forward"))
        self.propagateButton.setText(_translate("MainWindow", "Propagate"))
        self.label_2.setText(_translate("MainWindow", "Plane of interest"))
        self.focusButton.setText(_translate("MainWindow", "Autofocus"))
        self.label_4.setText(_translate("MainWindow", "Steps"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.probe), _translate("MainWindow", "Probe"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.modes), _translate("MainWindow", "Modes"))
from .widgets.ModeView import ModeView
from .widgets.ObjectView import ObjectView
from .widgets.Probe import Histogram, ProbeView, PropagationView
from . import design_rc

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'design.ui'
#
# Created by: PyQt5 UI code generator 5.12.3
#
# WARNING! All changes made in this file will be lost!


#from PyQt5 import QtCore, QtGui, QtWidgets
from silx.gui import qt as QtCore
QtGui = QtCore
QtWidgets = QtCore


class Ui_MainWindow(object):
    def setupUi(self, MainWindow):
        MainWindow.setObjectName("MainWindow")
        MainWindow.resize(1082, 758)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/logos/icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        MainWindow.setWindowIcon(icon)
        self.centralwidget = QtWidgets.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.browseButton = QtWidgets.QPushButton(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.browseButton.sizePolicy().hasHeightForWidth())
        self.browseButton.setSizePolicy(sizePolicy)
        self.browseButton.setMaximumSize(QtCore.QSize(1000000, 16777215))
        self.browseButton.setObjectName("browseButton")
        self.gridLayout.addWidget(self.browseButton, 0, 1, 1, 1)
        self.filenameBox = QtWidgets.QLineEdit(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.filenameBox.sizePolicy().hasHeightForWidth())
        self.filenameBox.setSizePolicy(sizePolicy)
        self.filenameBox.setMinimumSize(QtCore.QSize(100, 0))
        self.filenameBox.setBaseSize(QtCore.QSize(200, 0))
        self.filenameBox.setPlaceholderText("")
        self.filenameBox.setObjectName("filenameBox")
        self.gridLayout.addWidget(self.filenameBox, 0, 0, 1, 1)
        self.loadButton = QtWidgets.QPushButton(self.centralwidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.loadButton.sizePolicy().hasHeightForWidth())
        self.loadButton.setSizePolicy(sizePolicy)
        self.loadButton.setMaximumSize(QtCore.QSize(10000, 16777215))
        self.loadButton.setAutoDefault(True)
        self.loadButton.setDefault(True)
        self.loadButton.setObjectName("loadButton")
        self.gridLayout.addWidget(self.loadButton, 0, 2, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 0, 0, 1, 1)
        self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
        self.tabWidget.setFocusPolicy(QtCore.Qt.TabFocus)
        self.tabWidget.setObjectName("tabWidget")
        self.object = QtWidgets.QWidget()
        self.object.setObjectName("object")
        self.horizontalLayout = QtWidgets.QHBoxLayout(self.object)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.objectWidget = ObjectView(self.object)
        self.objectWidget.setObjectName("objectWidget")
        self.horizontalLayout.addWidget(self.objectWidget)
        self.tabWidget.addTab(self.object, "")
        self.probe = QtWidgets.QWidget()
        self.probe.setObjectName("probe")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.probe)
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.splitter_2 = QtWidgets.QSplitter(self.probe)
        self.splitter_2.setOrientation(QtCore.Qt.Horizontal)
        self.splitter_2.setObjectName("splitter_2")
        self.splitter = QtWidgets.QSplitter(self.splitter_2)
        self.splitter.setOrientation(QtCore.Qt.Vertical)
        self.splitter.setObjectName("splitter")
        self.probeHist = Histogram(self.splitter)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(1)
        sizePolicy.setHeightForWidth(self.probeHist.sizePolicy().hasHeightForWidth())
        self.probeHist.setSizePolicy(sizePolicy)
        self.probeHist.setMinimumSize(QtCore.QSize(200, 200))
        self.probeHist.setMaximumSize(QtCore.QSize(500, 16777215))
        self.probeHist.setBaseSize(QtCore.QSize(0, 0))
        self.probeHist.setObjectName("probeHist")
        self.layoutWidget = QtWidgets.QWidget(self.splitter)
        self.layoutWidget.setObjectName("layoutWidget")
        self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.probePlot = ProbeView(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(2)
        sizePolicy.setHeightForWidth(self.probePlot.sizePolicy().hasHeightForWidth())
        self.probePlot.setSizePolicy(sizePolicy)
        self.probePlot.setMinimumSize(QtCore.QSize(0, 200))
        self.probePlot.setMaximumSize(QtCore.QSize(500, 16777215))
        self.probePlot.setObjectName("probePlot")
        self.verticalLayout.addWidget(self.probePlot)
        self.probePlot2 = ProbeView(self.layoutWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(2)
        sizePolicy.setHeightForWidth(self.probePlot2.sizePolicy().hasHeightForWidth())
        self.probePlot2.setSizePolicy(sizePolicy)
        self.probePlot2.setMinimumSize(QtCore.QSize(0, 200))
        self.probePlot2.setMaximumSize(QtCore.QSize(500, 16777215))
        self.probePlot2.setObjectName("probePlot2")
        self.verticalLayout.addWidget(self.probePlot2)
        self.layoutWidget1 = QtWidgets.QWidget(self.splitter_2)
        self.layoutWidget1.setObjectName("layoutWidget1")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.layoutWidget1)
        self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.gridLayout_3 = QtWidgets.QGridLayout()
        self.gridLayout_3.setObjectName("gridLayout_3")
        self.label = QtWidgets.QLabel(self.layoutWidget1)
        self.label.setObjectName("label")
        self.gridLayout_3.addWidget(self.label, 0, 0, 1, 1)
        self.backwardBox = QtWidgets.QSpinBox(self.layoutWidget1)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.backwardBox.sizePolicy().hasHeightForWidth())
        self.backwardBox.setSizePolicy(sizePolicy)
        self.backwardBox.setMaximum(10000)
        self.backwardBox.setProperty("value", 1000)
        self.backwardBox.setObjectName("backwardBox")
        self.gridLayout_3.addWidget(self.backwardBox, 0, 1, 1, 1)
        self.label_3 = QtWidgets.QLabel(self.layoutWidget1)
        self.label_3.setObjectName("label_3")
        self.gridLayout_3.addWidget(self.label_3, 0, 3, 1, 1)
        self.forwardBox = QtWidgets.QSpinBox(self.layoutWidget1)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.forwardBox.sizePolicy().hasHeightForWidth())
        self.forwardBox.setSizePolicy(sizePolicy)
        self.forwardBox.setMaximum(10000)
        self.forwardBox.setProperty("value", 1000)
        self.forwardBox.setObjectName("forwardBox")
        self.gridLayout_3.addWidget(self.forwardBox, 0, 4, 1, 1)
        self.propagateButton = QtWidgets.QPushButton(self.layoutWidget1)
        self.propagateButton.setObjectName("propagateButton")
        self.gridLayout_3.addWidget(self.propagateButton, 0, 9, 1, 1)
        self.label_2 = QtWidgets.QLabel(self.layoutWidget1)
        self.label_2.setObjectName("label_2")
        self.gridLayout_3.addWidget(self.label_2, 1, 0, 1, 1)
        self.focusButton = QtWidgets.QPushButton(self.layoutWidget1)
        self.focusButton.setObjectName("focusButton")
        self.gridLayout_3.addWidget(self.focusButton, 1, 9, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(60, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_3.addItem(spacerItem, 0, 2, 1, 1)
        spacerItem1 = QtWidgets.QSpacerItem(60, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_3.addItem(spacerItem1, 0, 5, 1, 1)
        self.numberBox = QtWidgets.QSpinBox(self.layoutWidget1)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.numberBox.sizePolicy().hasHeightForWidth())
        self.numberBox.setSizePolicy(sizePolicy)
        self.numberBox.setMaximum(1000)
        self.numberBox.setProperty("value", 200)
        self.numberBox.setObjectName("numberBox")
        self.gridLayout_3.addWidget(self.numberBox, 0, 7, 1, 1)
        self.label_4 = QtWidgets.QLabel(self.layoutWidget1)
        self.label_4.setObjectName("label_4")
        self.gridLayout_3.addWidget(self.label_4, 0, 6, 1, 1)
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_3.addItem(spacerItem2, 0, 8, 1, 1)
        self.focusSlider = QtWidgets.QSlider(self.layoutWidget1)
        self.focusSlider.setOrientation(QtCore.Qt.Horizontal)
        self.focusSlider.setObjectName("focusSlider")
        self.gridLayout_3.addWidget(self.focusSlider, 1, 1, 1, 7)
        spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_3.addItem(spacerItem3, 1, 8, 1, 1)
        self.verticalLayout_2.addLayout(self.gridLayout_3)
        self.verticalFocusView = PropagationView(self.layoutWidget1)
        self.verticalFocusView.setMinimumSize(QtCore.QSize(200, 0))
        self.verticalFocusView.setObjectName("verticalFocusView")
        self.verticalLayout_2.addWidget(self.verticalFocusView)
        self.horizontalFocusView = PropagationView(self.layoutWidget1)
        self.horizontalFocusView.setObjectName("horizontalFocusView")
        self.verticalLayout_2.addWidget(self.horizontalFocusView)
        self.horizontalLayout_2.addWidget(self.splitter_2)
        self.tabWidget.addTab(self.probe, "")
        self.modes = QtWidgets.QWidget()
        self.modes.setObjectName("modes")
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.modes)
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        self.modeWidget = ModeView(self.modes)
        self.modeWidget.setObjectName("modeWidget")
        self.horizontalLayout_3.addWidget(self.modeWidget)
        self.tabWidget.addTab(self.modes, "")
        self.gridLayout_2.addWidget(self.tabWidget, 1, 0, 1, 1)
        MainWindow.setCentralWidget(self.centralwidget)
        self.menubar = QtWidgets.QMenuBar(MainWindow)
        self.menubar.setGeometry(QtCore.QRect(0, 0, 1082, 20))
        self.menubar.setObjectName("menubar")
        MainWindow.setMenuBar(self.menubar)
        self.statusbar = QtWidgets.QStatusBar(MainWindow)
        self.statusbar.setObjectName("statusbar")
        MainWindow.setStatusBar(self.statusbar)

        self.retranslateUi(MainWindow)
        self.tabWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(MainWindow)
        MainWindow.setTabOrder(self.filenameBox, self.browseButton)
        MainWindow.setTabOrder(self.browseButton, self.loadButton)
        MainWindow.setTabOrder(self.loadButton, self.tabWidget)

    def retranslateUi(self, MainWindow):
        _translate = QtCore.QCoreApplication.translate
        MainWindow.setWindowTitle(_translate("MainWindow", "NanoMAX Ptycho Viewer"))
        self.browseButton.setToolTip(_translate("MainWindow", "<html><head/><body><p>Browse for data files</p></body></html>"))
        self.browseButton.setText(_translate("MainWindow", "Browse..."))
        self.filenameBox.setText(_translate("MainWindow", "<input file>"))
        self.loadButton.setToolTip(_translate("MainWindow", "<html><head/><body><p>Go!</p></body></html>"))
        self.loadButton.setText(_translate("MainWindow", "Load"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.object), _translate("MainWindow", "Object"))
        self.label.setText(_translate("MainWindow", "Backward"))
        self.label_3.setText(_translate("MainWindow", "Forward"))
        self.propagateButton.setText(_translate("MainWindow", "Propagate"))
        self.label_2.setText(_translate("MainWindow", "Plane of interest"))
        self.focusButton.setText(_translate("MainWindow", "Autofocus"))
        self.label_4.setText(_translate("MainWindow", "Steps"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.probe), _translate("MainWindow", "Probe"))
        self.tabWidget.setTabText(self.tabWidget.indexOf(self.modes), _translate("MainWindow", "Modes"))
from .widgets.ModeView import ModeView
from .widgets.ObjectView import ObjectView
from .widgets.Probe import Histogram, ProbeView, PropagationView
from . import design_rc

# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'design.ui' # # Created by: PyQt5 UI code generator 5.12.3 # # WARNING! All changes made in this file will be lost! #from PyQt5 import QtCore, QtGui, QtWidgets