main.py 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. # -*- coding: utf-8 -*-
  2. # Form implementation generated from reading ui file 'main.ui'
  3. #
  4. # Created by: PyQt5 UI code generator 5.5.1
  5. #
  6. # WARNING! All changes made in this file will be lost!
  7. from PyQt5 import QtCore, QtGui, QtWidgets
  8. class Ui_window(object):
  9. def setupUi(self, window):
  10. window.setObjectName("window")
  11. window.resize(910, 669)
  12. font = QtGui.QFont()
  13. font.setFamily("Verdana")
  14. font.setPointSize(8)
  15. window.setFont(font)
  16. self.centralwidget = QtWidgets.QWidget(window)
  17. self.centralwidget.setObjectName("centralwidget")
  18. self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget)
  19. self.horizontalLayout.setContentsMargins(3, 3, 3, 3)
  20. self.horizontalLayout.setSpacing(3)
  21. self.horizontalLayout.setObjectName("horizontalLayout")
  22. self.verticalLayout = QtWidgets.QVBoxLayout()
  23. self.verticalLayout.setSpacing(3)
  24. self.verticalLayout.setObjectName("verticalLayout")
  25. self.lbl_title = QtWidgets.QLabel(self.centralwidget)
  26. font = QtGui.QFont()
  27. font.setBold(True)
  28. font.setWeight(75)
  29. self.lbl_title.setFont(font)
  30. self.lbl_title.setFocusPolicy(QtCore.Qt.StrongFocus)
  31. self.lbl_title.setAlignment(QtCore.Qt.AlignCenter)
  32. self.lbl_title.setObjectName("lbl_title")
  33. self.verticalLayout.addWidget(self.lbl_title)
  34. self.view = QtWidgets.QGraphicsView(self.centralwidget)
  35. self.view.setObjectName("view")
  36. self.verticalLayout.addWidget(self.view)
  37. self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
  38. self.horizontalLayout_2.setContentsMargins(10, 0, 10, -1)
  39. self.horizontalLayout_2.setSpacing(10)
  40. self.horizontalLayout_2.setObjectName("horizontalLayout_2")
  41. self.label = QtWidgets.QLabel(self.centralwidget)
  42. self.label.setObjectName("label")
  43. self.horizontalLayout_2.addWidget(self.label)
  44. self.opt_hex = QtWidgets.QRadioButton(self.centralwidget)
  45. self.opt_hex.setMinimumSize(QtCore.QSize(0, 28))
  46. self.opt_hex.setMaximumSize(QtCore.QSize(140, 28))
  47. self.opt_hex.setChecked(True)
  48. self.opt_hex.setObjectName("opt_hex")
  49. self.horizontalLayout_2.addWidget(self.opt_hex)
  50. self.opt_square = QtWidgets.QRadioButton(self.centralwidget)
  51. self.opt_square.setMinimumSize(QtCore.QSize(0, 28))
  52. self.opt_square.setMaximumSize(QtCore.QSize(140, 28))
  53. self.opt_square.setObjectName("opt_square")
  54. self.horizontalLayout_2.addWidget(self.opt_square)
  55. self.spb_width = QtWidgets.QSpinBox(self.centralwidget)
  56. self.spb_width.setMinimumSize(QtCore.QSize(38, 28))
  57. self.spb_width.setMaximumSize(QtCore.QSize(80, 28))
  58. self.spb_width.setMinimum(1)
  59. self.spb_width.setMaximum(999)
  60. self.spb_width.setProperty("value", 30)
  61. self.spb_width.setObjectName("spb_width")
  62. self.horizontalLayout_2.addWidget(self.spb_width)
  63. self.label_2 = QtWidgets.QLabel(self.centralwidget)
  64. self.label_2.setMinimumSize(QtCore.QSize(10, 0))
  65. self.label_2.setMaximumSize(QtCore.QSize(10, 16777215))
  66. self.label_2.setObjectName("label_2")
  67. self.horizontalLayout_2.addWidget(self.label_2)
  68. self.spb_height = QtWidgets.QSpinBox(self.centralwidget)
  69. self.spb_height.setMinimumSize(QtCore.QSize(38, 28))
  70. self.spb_height.setMaximumSize(QtCore.QSize(80, 28))
  71. self.spb_height.setMinimum(1)
  72. self.spb_height.setMaximum(999)
  73. self.spb_height.setProperty("value", 30)
  74. self.spb_height.setObjectName("spb_height")
  75. self.horizontalLayout_2.addWidget(self.spb_height)
  76. self.btn_make = QtWidgets.QToolButton(self.centralwidget)
  77. self.btn_make.setMinimumSize(QtCore.QSize(35, 35))
  78. self.btn_make.setObjectName("btn_make")
  79. self.horizontalLayout_2.addWidget(self.btn_make)
  80. self.verticalLayout.addLayout(self.horizontalLayout_2)
  81. self.horizontalLayout.addLayout(self.verticalLayout)
  82. self.verticalLayout_2 = QtWidgets.QVBoxLayout()
  83. self.verticalLayout_2.setContentsMargins(0, -1, -1, -1)
  84. self.verticalLayout_2.setSpacing(2)
  85. self.verticalLayout_2.setObjectName("verticalLayout_2")
  86. self.txt_coords = QtWidgets.QTextEdit(self.centralwidget)
  87. self.txt_coords.setMinimumSize(QtCore.QSize(183, 0))
  88. self.txt_coords.setObjectName("txt_coords")
  89. self.verticalLayout_2.addWidget(self.txt_coords)
  90. self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
  91. self.horizontalLayout_3.setContentsMargins(-1, 10, -1, -1)
  92. self.horizontalLayout_3.setObjectName("horizontalLayout_3")
  93. spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
  94. self.horizontalLayout_3.addItem(spacerItem)
  95. self.btn_updateSelection = QtWidgets.QToolButton(self.centralwidget)
  96. self.btn_updateSelection.setMinimumSize(QtCore.QSize(132, 35))
  97. self.btn_updateSelection.setMaximumSize(QtCore.QSize(132, 1000))
  98. self.btn_updateSelection.setObjectName("btn_updateSelection")
  99. self.horizontalLayout_3.addWidget(self.btn_updateSelection)
  100. self.btn_toClipboard = QtWidgets.QToolButton(self.centralwidget)
  101. self.btn_toClipboard.setMinimumSize(QtCore.QSize(84, 35))
  102. self.btn_toClipboard.setMaximumSize(QtCore.QSize(84, 1000))
  103. self.btn_toClipboard.setObjectName("btn_toClipboard")
  104. self.horizontalLayout_3.addWidget(self.btn_toClipboard)
  105. self.verticalLayout_2.addLayout(self.horizontalLayout_3)
  106. self.horizontalLayout.addLayout(self.verticalLayout_2)
  107. self.horizontalLayout.setStretch(0, 2)
  108. window.setCentralWidget(self.centralwidget)
  109. self.menubar = QtWidgets.QMenuBar(window)
  110. self.menubar.setGeometry(QtCore.QRect(0, 0, 910, 21))
  111. self.menubar.setObjectName("menubar")
  112. self.menuFichier = QtWidgets.QMenu(self.menubar)
  113. self.menuFichier.setObjectName("menuFichier")
  114. window.setMenuBar(self.menubar)
  115. self.statusbar = QtWidgets.QStatusBar(window)
  116. self.statusbar.setObjectName("statusbar")
  117. window.setStatusBar(self.statusbar)
  118. self.actionQuitter = QtWidgets.QAction(window)
  119. self.actionQuitter.setObjectName("actionQuitter")
  120. self.menuFichier.addAction(self.actionQuitter)
  121. self.menubar.addAction(self.menuFichier.menuAction())
  122. self.retranslateUi(window)
  123. QtCore.QMetaObject.connectSlotsByName(window)
  124. def retranslateUi(self, window):
  125. _translate = QtCore.QCoreApplication.translate
  126. window.setWindowTitle(_translate("window", "MainWindow"))
  127. self.lbl_title.setText(_translate("window", "Grid Viewer"))
  128. self.label.setText(_translate("window", "Update Grid"))
  129. self.opt_hex.setText(_translate("window", "Hexagonal grid"))
  130. self.opt_square.setText(_translate("window", "Square grid"))
  131. self.label_2.setText(_translate("window", "X"))
  132. self.btn_make.setText(_translate("window", ">>"))
  133. self.btn_updateSelection.setText(_translate("window", "Update selection"))
  134. self.btn_toClipboard.setText(_translate("window", "To clipboard"))
  135. self.menuFichier.setTitle(_translate("window", "Fichier"))
  136. self.actionQuitter.setText(_translate("window", "Quitter"))