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

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

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_MotorItemWidget(object):
    def setupUi(self, MotorItemWidget):
        MotorItemWidget.setObjectName("MotorItemWidget")
        MotorItemWidget.resize(700, 173)
        MotorItemWidget.setMinimumSize(QtCore.QSize(700, 0))
        MotorItemWidget.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(MotorItemWidget)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem)
        self.tb_status = QtWidgets.QToolButton(MotorItemWidget)
        self.tb_status.setEnabled(False)
        self.tb_status.setMaximumSize(QtCore.QSize(18, 14))
        self.tb_status.setStyleSheet("background-color: rgb(85, 170, 0);")
        self.tb_status.setText("")
        self.tb_status.setObjectName("tb_status")
        self.horizontalLayout_2.addWidget(self.tb_status)
        self.lb_name = ClickableLabel(MotorItemWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.lb_name.sizePolicy().hasHeightForWidth())
        self.lb_name.setSizePolicy(sizePolicy)
        self.lb_name.setMinimumSize(QtCore.QSize(160, 0))
        self.lb_name.setMaximumSize(QtCore.QSize(1000, 16777215))
        font = QtGui.QFont()
        font.setPointSize(16)
        font.setBold(True)
        font.setWeight(75)
        self.lb_name.setFont(font)
        self.lb_name.setObjectName("lb_name")
        self.horizontalLayout_2.addWidget(self.lb_name)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem1)
        self.verticalLayout_2.addLayout(self.horizontalLayout_2)
        self.horizontalLayout_5 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_5.setObjectName("horizontalLayout_5")
        self.but_move_down = QtWidgets.QToolButton(MotorItemWidget)
        self.but_move_down.setMinimumSize(QtCore.QSize(90, 120))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/icons/left_arrow.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.but_move_down.setIcon(icon)
        self.but_move_down.setIconSize(QtCore.QSize(65, 65))
        self.but_move_down.setObjectName("but_move_down")
        self.horizontalLayout_5.addWidget(self.but_move_down)
        self.verticalLayout = QtWidgets.QVBoxLayout()
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_4.setObjectName("horizontalLayout_4")
        spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_4.addItem(spacerItem2)
        self.label = QtWidgets.QLabel(MotorItemWidget)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.label.setFont(font)
        self.label.setObjectName("label")
        self.horizontalLayout_4.addWidget(self.label)
        self.but_decrease_step = QtWidgets.QToolButton(MotorItemWidget)
        self.but_decrease_step.setMinimumSize(QtCore.QSize(75, 50))
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/icons/minus.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.but_decrease_step.setIcon(icon1)
        self.but_decrease_step.setIconSize(QtCore.QSize(45, 45))
        self.but_decrease_step.setObjectName("but_decrease_step")
        self.horizontalLayout_4.addWidget(self.but_decrease_step)
        self.sb_step = QtWidgets.QDoubleSpinBox(MotorItemWidget)
        self.sb_step.setMaximumSize(QtCore.QSize(110, 16777215))
        font = QtGui.QFont()
        font.setPointSize(14)
        self.sb_step.setFont(font)
        self.sb_step.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.sb_step.setDecimals(3)
        self.sb_step.setMaximum(999.0)
        self.sb_step.setSingleStep(0.1)
        self.sb_step.setProperty("value", 0.1)
        self.sb_step.setObjectName("sb_step")
        self.horizontalLayout_4.addWidget(self.sb_step)
        self.but_increase_step = QtWidgets.QToolButton(MotorItemWidget)
        self.but_increase_step.setMinimumSize(QtCore.QSize(75, 50))
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/icons/plus.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.but_increase_step.setIcon(icon2)
        self.but_increase_step.setIconSize(QtCore.QSize(45, 45))
        self.but_increase_step.setObjectName("but_increase_step")
        self.horizontalLayout_4.addWidget(self.but_increase_step)
        spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_4.addItem(spacerItem3)
        self.verticalLayout.addLayout(self.horizontalLayout_4)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.le_low_limit = QtWidgets.QLineEdit(MotorItemWidget)
        self.le_low_limit.setEnabled(False)
        self.le_low_limit.setMaximumSize(QtCore.QSize(110, 16777215))
        self.le_low_limit.setStyleSheet("background-color: rgb(218, 221, 224);")
        self.le_low_limit.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.le_low_limit.setReadOnly(True)
        self.le_low_limit.setObjectName("le_low_limit")
        self.horizontalLayout.addWidget(self.le_low_limit)
        self.tb_low_limit = QtWidgets.QToolButton(MotorItemWidget)
        self.tb_low_limit.setEnabled(False)
        self.tb_low_limit.setMaximumSize(QtCore.QSize(18, 14))
        self.tb_low_limit.setStyleSheet("background-color: rgb(85, 170, 0);")
        self.tb_low_limit.setText("")
        self.tb_low_limit.setObjectName("tb_low_limit")
        self.horizontalLayout.addWidget(self.tb_low_limit)
        self.sl_position = RangeSlider(MotorItemWidget)
        self.sl_position.setEnabled(True)
        self.sl_position.setOrientation(QtCore.Qt.Horizontal)
        self.sl_position.setObjectName("sl_position")
        self.horizontalLayout.addWidget(self.sl_position)
        self.tb_high_limit = QtWidgets.QToolButton(MotorItemWidget)
        self.tb_high_limit.setEnabled(False)
        self.tb_high_limit.setMaximumSize(QtCore.QSize(18, 14))
        self.tb_high_limit.setStyleSheet("background-color: rgb(85, 170, 0);")
        self.tb_high_limit.setText("")
        self.tb_high_limit.setObjectName("tb_high_limit")
        self.horizontalLayout.addWidget(self.tb_high_limit)
        self.le_high_limit = QtWidgets.QLineEdit(MotorItemWidget)
        self.le_high_limit.setEnabled(False)
        self.le_high_limit.setMaximumSize(QtCore.QSize(110, 16777215))
        self.le_high_limit.setStyleSheet("background-color: rgb(218, 221, 224);")
        self.le_high_limit.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.le_high_limit.setReadOnly(True)
        self.le_high_limit.setObjectName("le_high_limit")
        self.horizontalLayout.addWidget(self.le_high_limit)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
        spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem4)
        self.label_2 = QtWidgets.QLabel(MotorItemWidget)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.label_2.setFont(font)
        self.label_2.setObjectName("label_2")
        self.horizontalLayout_3.addWidget(self.label_2)
        self.lb_pos = ClickableLabel(MotorItemWidget)
        font = QtGui.QFont()
        font.setPointSize(14)
        self.lb_pos.setFont(font)
        self.lb_pos.setObjectName("lb_pos")
        self.horizontalLayout_3.addWidget(self.lb_pos)
        spacerItem5 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_3.addItem(spacerItem5)
        self.verticalLayout.addLayout(self.horizontalLayout_3)
        self.horizontalLayout_5.addLayout(self.verticalLayout)
        self.but_move_up = QtWidgets.QToolButton(MotorItemWidget)
        self.but_move_up.setMinimumSize(QtCore.QSize(90, 120))
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(":/icons/rigth_arrow.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.but_move_up.setIcon(icon3)
        self.but_move_up.setIconSize(QtCore.QSize(65, 65))
        self.but_move_up.setObjectName("but_move_up")
        self.horizontalLayout_5.addWidget(self.but_move_up)
        self.verticalLayout_2.addLayout(self.horizontalLayout_5)

        self.retranslateUi(MotorItemWidget)
        QtCore.QMetaObject.connectSlotsByName(MotorItemWidget)

    def retranslateUi(self, MotorItemWidget):
        _translate = QtCore.QCoreApplication.translate
        MotorItemWidget.setWindowTitle(_translate("MotorItemWidget", "Form"))
        self.tb_status.setToolTip(_translate("MotorItemWidget", "Motor ON"))
        self.lb_name.setText(_translate("MotorItemWidget", "Motor name:"))
        self.but_move_down.setToolTip(_translate("MotorItemWidget", "Move by (-) Delta"))
        self.but_move_down.setText(_translate("MotorItemWidget", "<"))
        self.label.setText(_translate("MotorItemWidget", "step:"))
        self.but_decrease_step.setToolTip(_translate("MotorItemWidget", "Move by (-) Delta"))
        self.but_decrease_step.setText(_translate("MotorItemWidget", "<"))
        self.sb_step.setToolTip(_translate("MotorItemWidget", "Delta"))
        self.but_increase_step.setToolTip(_translate("MotorItemWidget", "Move by (+) Delta"))
        self.but_increase_step.setText(_translate("MotorItemWidget", ">"))
        self.le_low_limit.setToolTip(_translate("MotorItemWidget", "Low Limit "))
        self.tb_low_limit.setToolTip(_translate("MotorItemWidget", "Low limit OK"))
        self.tb_high_limit.setToolTip(_translate("MotorItemWidget", "High limit OK"))
        self.le_high_limit.setToolTip(_translate("MotorItemWidget", "High Limit"))
        self.label_2.setText(_translate("MotorItemWidget", "position: "))
        self.lb_pos.setText(_translate("MotorItemWidget", "0.001"))
        self.but_move_up.setToolTip(_translate("MotorItemWidget", "Move by (+) Delta"))
        self.but_move_up.setText(_translate("MotorItemWidget", ">"))

from beamline_console.utils.clickablelabel import ClickableLabel
from beamline_console.utils.range_slider import RangeSlider
import beamline_console.gui.icons_rc
