1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- # Form implementation generated from reading ui file 'takeFiles.ui'
- #
- # Created by: PyQt6 UI code generator 6.0.3
- #
- # WARNING: Any manual changes made to this file will be lost when pyuic6 is
- # run again. Do not edit this file unless you know what you are doing.
- from PyQt6.QtWidgets import QFileDialog
- from PyQt6 import QtCore, QtGui, QtWidgets
- # Забей, этот код описывает интерфейс формы выбора папки откуда брать файлы, кроме последней функции EE НЕ УДАЛЯТЬ
- class Ui_takeFiles(object):
- def setupUi(self, takeFiles):
- takeFiles.setObjectName("takeFiles")
- takeFiles.resize(745, 163)
- takeFiles.setStyleSheet("background-color: rgb(51, 252, 255);")
- self.label = QtWidgets.QLabel(takeFiles)
- self.label.setGeometry(QtCore.QRect(20, 40, 91, 21))
- font = QtGui.QFont()
- font.setFamily("Calibri")
- font.setPointSize(12)
- font.setBold(True)
- font.setWeight(75)
- self.label.setFont(font)
- self.label.setObjectName("label")
- self.lineEdit = QtWidgets.QLineEdit(takeFiles)
- self.lineEdit.setGeometry(QtCore.QRect(130, 30, 481, 41))
- font = QtGui.QFont()
- font.setPointSize(10)
- self.lineEdit.setFont(font)
- self.lineEdit.setStyleSheet("background-color: rgb(255, 255, 255);\n"
- "color: rgb(0, 0, 0);")
- self.lineEdit.setText("")
- self.lineEdit.setObjectName("lineEdit")
- self.pushButton = QtWidgets.QPushButton(takeFiles)
- self.pushButton.setGeometry(QtCore.QRect(630, 35, 93, 31))
- font = QtGui.QFont()
- font.setFamily("Calibri")
- font.setPointSize(12)
- font.setBold(True)
- font.setWeight(75)
- self.pushButton.setFont(font)
- self.pushButton.setStyleSheet("background-color: rgb(255, 255, 255);")
- self.pushButton.setObjectName("pushButton")
- self.label_2 = QtWidgets.QLabel(takeFiles)
- self.label_2.setGeometry(QtCore.QRect(20, 110, 91, 21))
- font = QtGui.QFont()
- font.setFamily("Calibri")
- font.setPointSize(12)
- font.setBold(True)
- font.setWeight(75)
- self.label_2.setFont(font)
- self.label_2.setObjectName("label_2")
- self.lineEdit_2 = QtWidgets.QLineEdit(takeFiles)
- self.lineEdit_2.setGeometry(QtCore.QRect(130, 100, 481, 41))
- font = QtGui.QFont()
- font.setPointSize(10)
- self.lineEdit_2.setFont(font)
- self.lineEdit_2.setStyleSheet("background-color: rgb(255, 255, 255);\n"
- "color: rgb(0, 0, 0);")
- self.lineEdit_2.setText("")
- self.lineEdit_2.setObjectName("lineEdit_2")
- self.pushButton_2 = QtWidgets.QPushButton(takeFiles)
- self.pushButton_2.setGeometry(QtCore.QRect(630, 105, 93, 31))
- font = QtGui.QFont()
- font.setFamily("Calibri")
- font.setPointSize(12)
- font.setBold(True)
- font.setWeight(75)
- self.pushButton_2.setFont(font)
- self.pushButton_2.setStyleSheet("background-color: rgb(255, 255, 255);")
- self.pushButton_2.setObjectName("pushButton_2")
- self.retranslateUi(takeFiles)
- QtCore.QMetaObject.connectSlotsByName(takeFiles)
- def retranslateUi(self, takeFiles):
- _translate = QtCore.QCoreApplication.translate
- takeFiles.setWindowTitle(_translate("takeFiles", "Выберите папку с файлами PRISMA"))
- self.label.setText(_translate("takeFiles", "1-кластер"))
- self.lineEdit.setPlaceholderText(_translate("takeFiles", "Введите папку c нужными файлами"))
- self.pushButton.setText(_translate("takeFiles", "Обзор"))
- self.label_2.setText(_translate("takeFiles", "2-кластер"))
- self.lineEdit_2.setPlaceholderText(_translate("takeFiles", "Введите папку c нужными файлами"))
- self.pushButton_2.setText(_translate("takeFiles", "Обзор"))
- def get_file_directory(self, filename):
- dirlist = QFileDialog.getExistingDirectory()
- if filename == 'path_prisma_1cl_files':
- self.lineEdit.setText(dirlist)
- else:
- self.lineEdit_2.setText(dirlist)
- with open(filename + '.txt', 'w') as f:
- f.write(dirlist)
- print(dirlist)
|