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

# Form implementation generated from reading ui file 'D:\works\ZD\phylosuite\PhyloSuite\uifiles\exe_path.ui'
#
# Created by: PyQt5 UI code generator 5.10.1
#
# WARNING! All changes made in this file will be lost!

from PyQt5 import QtCore, QtGui, QtWidgets

class Ui_ExePath(object):
    def setupUi(self, ExePath):
        ExePath.setObjectName("ExePath")
        ExePath.resize(440, 313)
        ExePath.setMinimumSize(QtCore.QSize(0, 0))
        ExePath.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.verticalLayout = QtWidgets.QVBoxLayout(ExePath)
        self.verticalLayout.setObjectName("verticalLayout")
        self.groupBox_2 = QtWidgets.QGroupBox(ExePath)
        self.groupBox_2.setObjectName("groupBox_2")
        self.gridLayout_2 = QtWidgets.QGridLayout(self.groupBox_2)
        self.gridLayout_2.setHorizontalSpacing(2)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.label_3 = QtWidgets.QLabel(self.groupBox_2)
        self.label_3.setWordWrap(True)
        self.label_3.setObjectName("label_3")
        self.gridLayout_2.addWidget(self.label_3, 0, 0, 1, 3)
        self.label = QtWidgets.QLabel(self.groupBox_2)
        self.label.setObjectName("label")
        self.gridLayout_2.addWidget(self.label, 1, 0, 1, 1)
        self.lineEdit = QtWidgets.QLineEdit(self.groupBox_2)
        self.lineEdit.setDragEnabled(True)
        self.lineEdit.setReadOnly(True)
        self.lineEdit.setObjectName("lineEdit")
        self.gridLayout_2.addWidget(self.lineEdit, 1, 1, 1, 1)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.pushButton = QtWidgets.QPushButton(self.groupBox_2)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/picture/resourses/btn_ok.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton.setIcon(icon)
        self.pushButton.setObjectName("pushButton")
        self.horizontalLayout.addWidget(self.pushButton)
        self.pushButton_2 = QtWidgets.QPushButton(self.groupBox_2)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/picture/resourses/btn_close.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton_2.setIcon(icon1)
        self.pushButton_2.setObjectName("pushButton_2")
        self.horizontalLayout.addWidget(self.pushButton_2)
        self.gridLayout_2.addLayout(self.horizontalLayout, 2, 0, 1, 3)
        self.toolButton_3 = QtWidgets.QToolButton(self.groupBox_2)
        self.toolButton_3.setStyleSheet("")
        self.toolButton_3.setText("")
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/picture/resourses/Open_folder_add_512px_1186192_easyicon.net.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButton_3.setIcon(icon2)
        self.toolButton_3.setIconSize(QtCore.QSize(30, 30))
        self.toolButton_3.setCheckable(False)
        self.toolButton_3.setChecked(False)
        self.toolButton_3.setAutoRaise(True)
        self.toolButton_3.setObjectName("toolButton_3")
        self.gridLayout_2.addWidget(self.toolButton_3, 1, 2, 1, 1)
        self.verticalLayout.addWidget(self.groupBox_2)
        self.groupBox = QtWidgets.QGroupBox(ExePath)
        self.groupBox.setObjectName("groupBox")
        self.gridLayout = QtWidgets.QGridLayout(self.groupBox)
        self.gridLayout.setObjectName("gridLayout")
        self.label_2 = QtWidgets.QLabel(self.groupBox)
        self.label_2.setWordWrap(True)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 0, 0, 1, 2)
        self.label_7 = QtWidgets.QLabel(self.groupBox)
        self.label_7.setObjectName("label_7")
        self.gridLayout.addWidget(self.label_7, 1, 0, 1, 1)
        self.comboBox = QtWidgets.QComboBox(self.groupBox)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.comboBox.sizePolicy().hasHeightForWidth())
        self.comboBox.setSizePolicy(sizePolicy)
        self.comboBox.setObjectName("comboBox")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.comboBox.addItem("")
        self.gridLayout.addWidget(self.comboBox, 1, 1, 1, 1)
        self.pushButton_5 = QtWidgets.QPushButton(self.groupBox)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(":/picture/resourses/Install.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton_5.setIcon(icon3)
        self.pushButton_5.setObjectName("pushButton_5")
        self.gridLayout.addWidget(self.pushButton_5, 2, 0, 1, 2)
        self.label_4 = QtWidgets.QLabel(self.groupBox)
        self.label_4.setOpenExternalLinks(False)
        self.label_4.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 3, 0, 1, 2)
        self.verticalLayout.addWidget(self.groupBox)
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.label_5 = QtWidgets.QLabel(ExePath)
        self.label_5.setObjectName("label_5")
        self.horizontalLayout_2.addWidget(self.label_5)
        self.label_6 = ClickedLableGif(ExePath)
        self.label_6.setText("")
        self.label_6.setObjectName("label_6")
        self.horizontalLayout_2.addWidget(self.label_6)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem)
        self.verticalLayout.addLayout(self.horizontalLayout_2)

        self.retranslateUi(ExePath)
        QtCore.QMetaObject.connectSlotsByName(ExePath)
        ExePath.setTabOrder(self.pushButton, self.toolButton_3)
        ExePath.setTabOrder(self.toolButton_3, self.pushButton_5)
        ExePath.setTabOrder(self.pushButton_5, self.lineEdit)
        ExePath.setTabOrder(self.lineEdit, self.pushButton_2)

    def retranslateUi(self, ExePath):
        _translate = QtCore.QCoreApplication.translate
        ExePath.setWindowTitle(_translate("ExePath", "Specify executable path"))
        self.groupBox_2.setTitle(_translate("ExePath", "Specify"))
        self.label_3.setText(_translate("ExePath", "<html><head/><body><p>If you have Rscript, please <span style=\" font-weight:600; color:#ff0000;\">specify</span>.</p></body></html>"))
        self.label.setText(_translate("ExePath", "Rscript Path:"))
        self.lineEdit.setPlaceholderText(_translate("ExePath", "C:\\R-3.4.4\\bin\\Rscript.exe"))
        self.pushButton.setText(_translate("ExePath", "Ok"))
        self.pushButton_2.setText(_translate("ExePath", "Cancel"))
        self.groupBox.setTitle(_translate("ExePath", "Download"))
        self.label_2.setText(_translate("ExePath", "<html><head/><body><p>If you don\'t have Rscript, please <span style=\" font-weight:600; color:#ff0000;\">download</span>.</p></body></html>"))
        self.label_7.setText(_translate("ExePath", "Source:"))
        self.comboBox.setItemText(0, _translate("ExePath", "Chinese resource"))
        self.comboBox.setItemText(1, _translate("ExePath", "Github"))
        self.comboBox.setItemText(2, _translate("ExePath", "Gitlab"))
        self.comboBox.setItemText(3, _translate("ExePath", "Coding"))
        self.pushButton_5.setText(_translate("ExePath", "Download"))
        self.label_4.setText(_translate("ExePath", "<html><head/><body><p><a href=\"https://cran.r-project.org/src/base/R-3/\"><span style=\" text-decoration: underline; color:#0000ff;\">https://cran.r-project.org/src/base/R-3/</span></a></p></body></html>"))
        self.label_5.setText(_translate("ExePath", "Don\'t know how to configure? Please see"))
        self.label_6.setToolTip(_translate("ExePath", "Brief example"))

from src.CustomWidget import ClickedLableGif
from uifiles import myRes_rc

if __name__ == "__main__":
    import sys
    app = QtWidgets.QApplication(sys.argv)
    ExePath = QtWidgets.QDialog()
    ui = Ui_ExePath()
    ui.setupUi(ExePath)
    ExePath.show()
    sys.exit(app.exec_())

