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

# Form implementation generated from reading ui file 'D:\works\ZD\phylosuite\PhyloSuite\uifiles\NCBI_db.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_NCBI_DB(object):
    def setupUi(self, NCBI_DB):
        NCBI_DB.setObjectName("NCBI_DB")
        NCBI_DB.resize(650, 344)
        NCBI_DB.setMinimumSize(QtCore.QSize(650, 0))
        NCBI_DB.setMaximumSize(QtCore.QSize(16777215, 16777215))
        NCBI_DB.setSizeGripEnabled(True)
        self.verticalLayout = QtWidgets.QVBoxLayout(NCBI_DB)
        self.verticalLayout.setObjectName("verticalLayout")
        self.groupBox_2 = QtWidgets.QGroupBox(NCBI_DB)
        self.groupBox_2.setCheckable(False)
        self.groupBox_2.setChecked(False)
        self.groupBox_2.setObjectName("groupBox_2")
        self.gridLayout = QtWidgets.QGridLayout(self.groupBox_2)
        self.gridLayout.setObjectName("gridLayout")
        self.label_3 = QtWidgets.QLabel(self.groupBox_2)
        self.label_3.setScaledContents(False)
        self.label_3.setWordWrap(True)
        self.label_3.setOpenExternalLinks(True)
        self.label_3.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 0, 0, 1, 3)
        self.label = QtWidgets.QLabel(self.groupBox_2)
        self.label.setObjectName("label")
        self.gridLayout.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.addWidget(self.lineEdit, 1, 1, 1, 1)
        self.toolButton_3 = QtWidgets.QToolButton(self.groupBox_2)
        self.toolButton_3.setStyleSheet("")
        self.toolButton_3.setText("")
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(":/picture/resourses/Open_folder_add_512px_1186192_easyicon.net.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButton_3.setIcon(icon)
        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.addWidget(self.toolButton_3, 1, 2, 1, 1)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.pushButton = QtWidgets.QPushButton(self.groupBox_2)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(":/picture/resourses/btn_ok.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton.setIcon(icon1)
        self.pushButton.setObjectName("pushButton")
        self.horizontalLayout.addWidget(self.pushButton)
        self.pushButton_2 = QtWidgets.QPushButton(self.groupBox_2)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/picture/resourses/btn_close.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushButton_2.setIcon(icon2)
        self.pushButton_2.setObjectName("pushButton_2")
        self.horizontalLayout.addWidget(self.pushButton_2)
        self.gridLayout.addLayout(self.horizontalLayout, 2, 0, 1, 3)
        self.label_4 = QtWidgets.QLabel(self.groupBox_2)
        self.label_4.setObjectName("label_4")
        self.gridLayout.addWidget(self.label_4, 3, 0, 1, 2)
        self.verticalLayout.addWidget(self.groupBox_2)
        self.groupBox = QtWidgets.QGroupBox(NCBI_DB)
        self.groupBox.setCheckable(False)
        self.groupBox.setObjectName("groupBox")
        self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.groupBox)
        self.verticalLayout_2.setObjectName("verticalLayout_2")
        self.label_6 = QtWidgets.QLabel(self.groupBox)
        self.label_6.setScaledContents(False)
        self.label_6.setWordWrap(True)
        self.label_6.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
        self.label_6.setObjectName("label_6")
        self.verticalLayout_2.addWidget(self.label_6)
        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.verticalLayout_2.addWidget(self.pushButton_5)
        self.label_2 = QtWidgets.QLabel(self.groupBox)
        self.label_2.setScaledContents(False)
        self.label_2.setWordWrap(True)
        self.label_2.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
        self.label_2.setObjectName("label_2")
        self.verticalLayout_2.addWidget(self.label_2)
        self.verticalLayout.addWidget(self.groupBox)
        self.label_5 = QtWidgets.QLabel(NCBI_DB)
        self.label_5.setScaledContents(False)
        self.label_5.setOpenExternalLinks(True)
        self.label_5.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
        self.label_5.setObjectName("label_5")
        self.verticalLayout.addWidget(self.label_5)

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

    def retranslateUi(self, NCBI_DB):
        _translate = QtCore.QCoreApplication.translate
        NCBI_DB.setWindowTitle(_translate("NCBI_DB", "Configure NCBI taxonomy database"))
        self.groupBox_2.setTitle(_translate("NCBI_DB", "Specify database file"))
        self.label_3.setText(_translate("NCBI_DB", "<html><head/><body><p>You can download the latest NCBI taxonomy database from <a href=\"https://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz\"><span style=\" text-decoration: underline; color:#0000ff;\">https://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz</span></a>, and then specify the path below.</p></body></html>"))
        self.label.setText(_translate("NCBI_DB", "Database path:"))
        self.lineEdit.setPlaceholderText(_translate("NCBI_DB", "~/db/taxdump.tar.gz"))
        self.pushButton.setText(_translate("NCBI_DB", "Ok"))
        self.pushButton_2.setText(_translate("NCBI_DB", "Cancel"))
        self.label_4.setText(_translate("NCBI_DB", "<html><head/><body><p><span style=\" color:#ff0000;\">Note that this method may be faster for Chinese users.</span></p></body></html>"))
        self.groupBox.setTitle(_translate("NCBI_DB", "Download database file"))
        self.label_6.setText(_translate("NCBI_DB", "Automatically download and configure the NCBI taxonomy database in PhyloSuite."))
        self.pushButton_5.setText(_translate("NCBI_DB", "Download"))
        self.label_2.setText(_translate("NCBI_DB", "Note that if PhyloSuite already has a database file in the \"db/NCBI\" folder, it will first check if the database is up-to-date. If not, PhyloSuite will download the newest database and configure it. Otherwise PhyloSuite will skip this step. "))
        self.label_5.setText(_translate("NCBI_DB", "<html><head/><body><p>If you use this function, please cite <a href=\"https://academic.oup.com/mbe/article/33/6/1635/2579822\"><span style=\" text-decoration: underline; color:#0000ff;\">ete3</span></a>.</p></body></html>"))

from uifiles import myRes_rc

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

