drctryChoice.py 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Form implementation generated from reading ui file 'drctryChoice.ui'
  2. #
  3. # Created by: PyQt6 UI code generator 6.0.3
  4. #
  5. # WARNING: Any manual changes made to this file will be lost when pyuic6 is
  6. # run again. Do not edit this file unless you know what you are doing.
  7. # Забей, этот код описывает интерфейс формы выбора папки сохранения картинок, паспорта и т.д.
  8. from PyQt6 import QtCore, QtGui, QtWidgets
  9. from PyQt6.QtWidgets import QFileDialog
  10. class Ui_drctryChoice(object):
  11. def setupUi(self, drctryChoice):
  12. drctryChoice.setObjectName("drctryChoice")
  13. drctryChoice.resize(706, 95)
  14. font = QtGui.QFont()
  15. font.setFamily("Calibri")
  16. font.setPointSize(10)
  17. font.setBold(True)
  18. font.setWeight(75)
  19. drctryChoice.setFont(font)
  20. drctryChoice.setStyleSheet("background-color: rgb(61, 255, 200);\n"
  21. "border-color: rgb(7, 7, 7);")
  22. self.lineEdit = QtWidgets.QLineEdit(drctryChoice)
  23. self.lineEdit.setGeometry(QtCore.QRect(200, 27, 381, 41))
  24. font = QtGui.QFont()
  25. font.setPointSize(10)
  26. self.lineEdit.setFont(font)
  27. self.lineEdit.setStyleSheet("background-color: rgb(255, 255, 255);\n"
  28. "color: rgb(0, 0, 0);")
  29. self.lineEdit.setText("")
  30. self.lineEdit.setObjectName("lineEdit")
  31. self.pushButton = QtWidgets.QPushButton(drctryChoice)
  32. self.pushButton.setGeometry(QtCore.QRect(600, 33, 93, 29))
  33. font = QtGui.QFont()
  34. font.setFamily("Calibri")
  35. font.setPointSize(12)
  36. font.setBold(True)
  37. font.setWeight(75)
  38. self.pushButton.setFont(font)
  39. self.pushButton.setStyleSheet("background-color: rgb(255, 255, 255);")
  40. self.pushButton.setObjectName("pushButton")
  41. self.label = QtWidgets.QLabel(drctryChoice)
  42. self.label.setGeometry(QtCore.QRect(10, 37, 161, 21))
  43. font = QtGui.QFont()
  44. font.setFamily("Calibri")
  45. font.setPointSize(12)
  46. font.setBold(True)
  47. font.setWeight(75)
  48. self.label.setFont(font)
  49. self.label.setObjectName("label")
  50. self.retranslateUi(drctryChoice)
  51. QtCore.QMetaObject.connectSlotsByName(drctryChoice)
  52. def retranslateUi(self, drctryChoice):
  53. _translate = QtCore.QCoreApplication.translate
  54. drctryChoice.setWindowTitle(_translate("drctryChoice", "Выберите папку для сохранения паспорта"))
  55. self.lineEdit.setPlaceholderText(_translate("drctryChoice", "Введите папку для сохранения паспорта"))
  56. self.pushButton.setText(_translate("drctryChoice", "Обзор"))
  57. self.label.setText(_translate("drctryChoice", "Папка для отчета"))
  58. def get_report_directory(self):
  59. dirlist = QFileDialog.getExistingDirectory()
  60. self.lineEdit.setText(dirlist)
  61. with open('path_prisma_report.txt', 'w') as f:
  62. f.write(dirlist)
  63. print(dirlist)