ui_MainWindow.py 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. # -*- coding: utf-8 -*-
  2. ################################################################################
  3. # Form generated from reading UI file 'MainWindow.ui'
  4. ##
  5. # Created by: Qt User Interface Compiler version 6.4.1
  6. ##
  7. # WARNING! All changes made in this file will be lost when recompiling UI file!
  8. ################################################################################
  9. from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale,
  10. QMetaObject, QObject, QPoint, QRect,
  11. QSize, QTime, Qt)
  12. from PySide6.QtGui import (QAction, QActionGroup)
  13. from PySide6.QtMultimediaWidgets import QVideoWidget
  14. from PySide6.QtWidgets import (QApplication, QComboBox, QDateTimeEdit, QFrame,
  15. QGridLayout, QGroupBox, QHBoxLayout, QLabel,
  16. QLayout, QLineEdit, QMainWindow, QMenu,
  17. QMenuBar, QPushButton, QSizePolicy, QStackedWidget,
  18. QStatusBar, QTabWidget, QTextEdit, QVBoxLayout,
  19. QWidget)
  20. from widgets import PLineEdit, PStackedWidget
  21. from module import translate
  22. class Ui_MainWindow(object):
  23. def setupUi(self, MainWindow):
  24. if not MainWindow.objectName():
  25. MainWindow.setObjectName(u"MainWindow")
  26. MainWindow.setWindowModality(Qt.WindowModal)
  27. MainWindow.resize(920, 588)
  28. sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
  29. sizePolicy.setHorizontalStretch(0)
  30. sizePolicy.setVerticalStretch(0)
  31. sizePolicy.setHeightForWidth(
  32. MainWindow.sizePolicy().hasHeightForWidth())
  33. MainWindow.setSizePolicy(sizePolicy)
  34. MainWindow.setBaseSize(QSize(864, 430))
  35. self.actionExit = QAction(MainWindow)
  36. self.actionExit.setObjectName(u"actionExit")
  37. self.actionSave = QAction(MainWindow)
  38. self.actionSave.setObjectName(u"actionSave")
  39. self.actionLoad = QAction(MainWindow)
  40. self.actionLoad.setObjectName(u"actionLoad")
  41. self.actionExit_2 = QAction(MainWindow)
  42. self.actionExit_2.setObjectName(u"actionExit_2")
  43. self.setting_cam = QAction(MainWindow)
  44. self.setting_cam.setObjectName(u"setting_cam")
  45. self.btn_show_personal_window = QAction(MainWindow)
  46. self.btn_show_personal_window.setObjectName(
  47. u"btn_show_personal_window")
  48. self.btn_show_place_window = QAction(MainWindow)
  49. self.btn_show_place_window.setObjectName(u"btn_show_place_window")
  50. self.update_list = QAction(MainWindow)
  51. self.update_list.setObjectName(u"update_list")
  52. self.btn_show_about = QAction(MainWindow)
  53. self.btn_show_about.setObjectName(u"btn_show_about")
  54. self.exit = QAction(MainWindow)
  55. self.exit.setObjectName(u"exit")
  56. self.action_open_history = QAction(MainWindow)
  57. self.action_open_history.setObjectName(u"action_open_history")
  58. self.centralwidget = QWidget(MainWindow)
  59. self.centralwidget.setObjectName(u"centralwidget")
  60. self.centralwidget.setEnabled(True)
  61. sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
  62. sizePolicy1.setHorizontalStretch(0)
  63. sizePolicy1.setVerticalStretch(0)
  64. sizePolicy1.setHeightForWidth(
  65. self.centralwidget.sizePolicy().hasHeightForWidth())
  66. self.centralwidget.setSizePolicy(sizePolicy1)
  67. self.centralwidget.setFocusPolicy(Qt.NoFocus)
  68. self.centralwidget.setAutoFillBackground(False)
  69. self.verticalLayout_6 = QVBoxLayout(self.centralwidget)
  70. self.verticalLayout_6.setObjectName(u"verticalLayout_6")
  71. self.horizontalLayout_7 = QHBoxLayout()
  72. self.horizontalLayout_7.setObjectName(u"horizontalLayout_7")
  73. self.groupBox = QGroupBox(self.centralwidget)
  74. self.groupBox.setObjectName(u"groupBox")
  75. self.groupBox.setMinimumSize(QSize(400, 0))
  76. self.groupBox.setMaximumWidth(600)
  77. self.verticalLayout_3 = QVBoxLayout(self.groupBox)
  78. self.verticalLayout_3.setObjectName(u"verticalLayout_3")
  79. self.horizontalLayout = QHBoxLayout()
  80. self.horizontalLayout.setSpacing(0)
  81. self.horizontalLayout.setObjectName(u"horizontalLayout")
  82. self.horizontalLayout.setSizeConstraint(QLayout.SetFixedSize)
  83. self.label = QLabel(self.groupBox)
  84. self.label.setObjectName(u"label")
  85. sizePolicy.setHeightForWidth(
  86. self.label.sizePolicy().hasHeightForWidth())
  87. self.label.setSizePolicy(sizePolicy)
  88. self.horizontalLayout.addWidget(self.label)
  89. self.number_propusk = PLineEdit(self.groupBox)
  90. self.number_propusk.setObjectName(u"number_propusk")
  91. self.horizontalLayout.addWidget(self.number_propusk)
  92. self.verticalLayout_3.addLayout(self.horizontalLayout)
  93. self.horizontalLayout_2 = QHBoxLayout()
  94. self.horizontalLayout_2.setSpacing(0)
  95. self.horizontalLayout_2.setObjectName(u"horizontalLayout_2")
  96. self.label_2 = QLabel(self.groupBox)
  97. self.label_2.setObjectName(u"label_2")
  98. self.horizontalLayout_2.addWidget(self.label_2)
  99. self.date_from = QDateTimeEdit(self.groupBox)
  100. self.date_from.setObjectName(u"date_from")
  101. # self.date_from.setDateTime(QDateTime(QDate(1999, 12, 31), QTime(9, 0, 0)))
  102. self.date_from.setTimeSpec(Qt.UTC)
  103. self.horizontalLayout_2.addWidget(self.date_from)
  104. self.verticalLayout_3.addLayout(self.horizontalLayout_2)
  105. self.horizontalLayout_3 = QHBoxLayout()
  106. self.horizontalLayout_3.setObjectName(u"horizontalLayout_3")
  107. self.label_4 = QLabel(self.groupBox)
  108. self.label_4.setObjectName(u"label_4")
  109. self.horizontalLayout_3.addWidget(self.label_4)
  110. self.date_to = QDateTimeEdit(self.groupBox)
  111. self.date_to.setObjectName(u"date_to")
  112. self.horizontalLayout_3.addWidget(self.date_to)
  113. self.verticalLayout_3.addLayout(self.horizontalLayout_3)
  114. self.horizontalLayout_4 = QHBoxLayout()
  115. self.horizontalLayout_4.setObjectName(u"horizontalLayout_4")
  116. self.label_3 = QLabel(self.groupBox)
  117. self.label_3.setObjectName(u"label_3")
  118. self.horizontalLayout_4.addWidget(self.label_3)
  119. self.personal_combobox = QComboBox(self.groupBox)
  120. self.personal_combobox.setObjectName(u"personal_combobox")
  121. self.horizontalLayout_4.addWidget(self.personal_combobox)
  122. self.verticalLayout_3.addLayout(self.horizontalLayout_4)
  123. self.horizontalLayout_5 = QHBoxLayout()
  124. self.horizontalLayout_5.setObjectName(u"horizontalLayout_5")
  125. self.label_5 = QLabel(self.groupBox)
  126. self.label_5.setObjectName(u"label_5")
  127. self.horizontalLayout_5.addWidget(self.label_5)
  128. self.place_combobox = QComboBox(self.groupBox)
  129. self.place_combobox.setObjectName(u"place_combobox")
  130. self.horizontalLayout_5.addWidget(self.place_combobox)
  131. self.verticalLayout_3.addLayout(self.horizontalLayout_5)
  132. self.verticalLayout = QVBoxLayout()
  133. self.verticalLayout.setObjectName(u"verticalLayout")
  134. self.label_6 = QLabel(self.groupBox)
  135. self.label_6.setObjectName(u"label_6")
  136. self.verticalLayout.addWidget(self.label_6)
  137. self.receiving_man = QTextEdit(self.groupBox)
  138. self.receiving_man.setObjectName(u"receiving_man")
  139. self.verticalLayout.addWidget(self.receiving_man)
  140. self.verticalLayout_3.addLayout(self.verticalLayout)
  141. self.verticalLayout_2 = QVBoxLayout()
  142. self.verticalLayout_2.setObjectName(u"verticalLayout_2")
  143. self.label_7 = QLabel(self.groupBox)
  144. self.label_7.setObjectName(u"label_7")
  145. self.verticalLayout_2.addWidget(self.label_7)
  146. self.purpose_visite = QTextEdit(self.groupBox)
  147. self.purpose_visite.setObjectName(u"purpose_visite")
  148. self.verticalLayout_2.addWidget(self.purpose_visite)
  149. self.verticalLayout_3.addLayout(self.verticalLayout_2)
  150. self.horizontalLayout_7.addWidget(self.groupBox, alignment=Qt.AlignTop)
  151. self.verticalLayout_5 = QVBoxLayout()
  152. self.verticalLayout_5.setObjectName(u"verticalLayout_5")
  153. self.tabWidget = QTabWidget(self.centralwidget)
  154. self.tabWidget.setObjectName(u"tabWidget")
  155. self.tab = QWidget()
  156. self.tab.setObjectName(u"tab")
  157. self.gridLayout = QGridLayout(self.tab)
  158. self.gridLayout.setObjectName(u"gridLayout")
  159. self.tabWidget.addTab(self.tab, "")
  160. self.tab_2 = QWidget()
  161. self.tab_2.setObjectName(u"tab_2")
  162. self.gridLayout_2 = QGridLayout(self.tab_2)
  163. self.gridLayout_2.setObjectName(u"gridLayout")
  164. self.stacked_document = PStackedWidget(self.tab_2)
  165. self.stacked_document.setObjectName(u'stacked_document')
  166. self.gridLayout_2.addWidget(self.stacked_document, 0, 0, 1, 1)
  167. self.tabWidget.addTab(self.tab_2, "")
  168. self.verticalLayout_5.addWidget(self.tabWidget)
  169. self.horizontalLayout_6 = QHBoxLayout()
  170. self.horizontalLayout_6.setObjectName(u"horizontalLayout_6")
  171. self.btn_start_cam = QPushButton(self.centralwidget)
  172. self.btn_start_cam.setObjectName(u"btn_start_cam")
  173. self.horizontalLayout_6.addWidget(self.btn_start_cam)
  174. self.capturePhoto = QPushButton(self.centralwidget)
  175. self.capturePhoto.setObjectName(u"capturePhoto")
  176. self.horizontalLayout_6.addWidget(self.capturePhoto)
  177. self.verticalLayout_5.addLayout(self.horizontalLayout_6)
  178. self.horizontalLayout_7.addLayout(self.verticalLayout_5)
  179. self.verticalLayout_6.addLayout(self.horizontalLayout_7)
  180. self.horizontalLayout_8 = QHBoxLayout()
  181. self.horizontalLayout_8.setObjectName(u"horizontalLayout_8")
  182. self.btn_clear = QPushButton(self.centralwidget)
  183. self.btn_clear.setObjectName(u"btn_clear")
  184. sizePolicy.setHeightForWidth(
  185. self.btn_clear.sizePolicy().hasHeightForWidth())
  186. self.btn_clear.setSizePolicy(sizePolicy)
  187. self.btn_clear.setMaximumSize(QSize(16777215, 25))
  188. self.horizontalLayout_8.addWidget(self.btn_clear)
  189. self.btn_save = QPushButton(self.centralwidget)
  190. self.btn_save.setObjectName(u"btn_save")
  191. sizePolicy.setHeightForWidth(
  192. self.btn_save.sizePolicy().hasHeightForWidth())
  193. self.btn_save.setSizePolicy(sizePolicy)
  194. self.btn_save.setMaximumSize(QSize(16777215, 25))
  195. self.horizontalLayout_8.addWidget(self.btn_save)
  196. self.btn_print = QPushButton(self.centralwidget)
  197. self.btn_print.setObjectName(u"btn_print")
  198. sizePolicy.setHeightForWidth(
  199. self.btn_print.sizePolicy().hasHeightForWidth())
  200. self.btn_print.setSizePolicy(sizePolicy)
  201. self.btn_print.setMaximumSize(QSize(16777215, 25))
  202. self.horizontalLayout_8.addWidget(self.btn_print)
  203. self.verticalLayout_6.addLayout(self.horizontalLayout_8)
  204. self.rotate_image_document = QAction(MainWindow)
  205. self.rotate_image_document.setObjectName(u"rotate_image_document")
  206. self.rotate_image_document.setCheckable(True)
  207. self.rotate_image_document.setChecked(True)
  208. self.no_rotate_image_document = QAction(MainWindow)
  209. self.no_rotate_image_document.setObjectName(
  210. u"no_rotate_image_document")
  211. self.no_rotate_image_document.setCheckable(True)
  212. self.check_rotate = QActionGroup(MainWindow)
  213. self.check_rotate.setObjectName(u"check_rotate")
  214. self.check_rotate.addAction(self.rotate_image_document)
  215. self.check_rotate.addAction(self.no_rotate_image_document)
  216. MainWindow.setCentralWidget(self.centralwidget)
  217. self.menubar = QMenuBar(MainWindow)
  218. self.menubar.setObjectName(u"menubar")
  219. self.menubar.setGeometry(QRect(0, 0, 920, 28))
  220. self.menubar.setMouseTracking(True)
  221. self.menubar.setAcceptDrops(True)
  222. self.menubar.setNativeMenuBar(True)
  223. self.menuFile = QMenu(self.menubar)
  224. self.menuFile.setObjectName(u"menuFile")
  225. self.menu = QMenu(self.menubar)
  226. self.menu.setObjectName(u"menu")
  227. self.menu_3 = QMenu(self.menu)
  228. self.menu_3.setObjectName(u"menu_3")
  229. self.menu_2 = QMenu(self.menubar)
  230. self.menu_2.setObjectName(u"menu_2")
  231. MainWindow.setMenuBar(self.menubar)
  232. self.statusbar = QStatusBar(MainWindow)
  233. self.statusbar.setObjectName(u"statusbar")
  234. MainWindow.setStatusBar(self.statusbar)
  235. self.menubar.addAction(self.menuFile.menuAction())
  236. self.menubar.addAction(self.menu.menuAction())
  237. self.menubar.addAction(self.menu_2.menuAction())
  238. self.menuFile.addSeparator()
  239. self.menuFile.addAction(self.actionSave)
  240. self.menuFile.addAction(self.actionLoad)
  241. self.menuFile.addAction(self.btn_show_about)
  242. self.menuFile.addSeparator()
  243. self.menuFile.addAction(self.exit)
  244. self.menu.addAction(self.setting_cam)
  245. self.menu.addAction(self.menu_3.menuAction())
  246. self.menu.addSeparator()
  247. self.menu.addAction(self.rotate_image_document)
  248. self.menu.addAction(self.no_rotate_image_document)
  249. self.menu_3.addSeparator()
  250. self.menu_3.addSeparator()
  251. self.menu_3.addAction(self.btn_show_personal_window)
  252. self.menu_3.addAction(self.btn_show_place_window)
  253. self.menu_3.addSeparator()
  254. self.menu_3.addAction(self.update_list)
  255. self.menu_2.addAction(self.action_open_history)
  256. # self.menu_3.addActions(self.check_rotate)
  257. self.retranslateUi(MainWindow)
  258. QMetaObject.connectSlotsByName(MainWindow)
  259. # setupUi
  260. def retranslateUi(self, MainWindow):
  261. MainWindow.setWindowTitle(translate('Temporary pass'))
  262. self.actionExit.setText(translate('Exit'))
  263. self.actionSave.setText(translate('Save'))
  264. self.actionLoad.setText(translate('Load'))
  265. self.actionExit_2.setText(translate('Exit'))
  266. self.setting_cam.setText(translate('Camera settings'))
  267. self.rotate_image_document.setText(translate('Flip document'))
  268. self.no_rotate_image_document.setText(
  269. translate('Do not flip the document'))
  270. self.btn_show_personal_window.setText(translate('Employees'))
  271. self.btn_show_place_window.setText(translate('Place of issue'))
  272. self.update_list.setText(translate('Update lists'))
  273. self.btn_show_about.setText(translate('About'))
  274. self.exit.setText(translate('Exit'))
  275. self.action_open_history.setText(translate('Pass history'))
  276. self.groupBox.setTitle(F"{translate('Information')}:")
  277. self.label.setText(F"{translate('Temporary pass')} №:")
  278. self.label_2.setText(F"{translate('Date and time of issue')}:")
  279. self.label_4.setText(F"{translate('Valid until')}:")
  280. self.label_3.setText(F"{translate('Who issued')}:")
  281. self.label_5.setText(F"{translate('Place of issue')}:")
  282. self.label_6.setText(F"{translate('Receiving')}:")
  283. self.label_7.setText(F"{translate('Purpose of the visit')}")
  284. self.tabWidget.setTabText(self.tabWidget.indexOf(
  285. self.tab), translate('Face camera'))
  286. self.tabWidget.setTabText(self.tabWidget.indexOf(
  287. self.tab_2), translate('Document camera'))
  288. self.btn_start_cam.setText(translate('Launch сamera'))
  289. self.capturePhoto.setText(translate('Take photo'))
  290. self.btn_clear.setText(translate('Clear'))
  291. self.btn_save.setText(translate('Save'))
  292. self.btn_print.setText(translate('Print'))
  293. self.menuFile.setTitle(translate('File'))
  294. self.menu.setTitle(translate('Settings'))
  295. self.menu_3.setTitle(translate('Lists'))
  296. self.menu_2.setTitle(translate('History'))
  297. # retranslateUi