war add & display
This commit is contained in:
parent
cfa65a41f0
commit
9e966baf9b
4 changed files with 223 additions and 30 deletions
50
src/warchron/view/ui/ui_war_dialog.py
Normal file
50
src/warchron/view/ui/ui_war_dialog.py
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Form implementation generated from reading ui file '.\src\warchron\view\ui\ui_war_dialog.ui'
|
||||
#
|
||||
# Created by: PyQt6 UI code generator 6.7.1
|
||||
#
|
||||
# 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 import QtCore, QtGui, QtWidgets
|
||||
|
||||
|
||||
class Ui_warDialog(object):
|
||||
def setupUi(self, warDialog):
|
||||
warDialog.setObjectName("warDialog")
|
||||
warDialog.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
|
||||
warDialog.resize(378, 98)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(".\\src\\warchron\\view\\ui\\../resources/warchron_logo.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||
warDialog.setWindowIcon(icon)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=warDialog)
|
||||
self.buttonBox.setGeometry(QtCore.QRect(10, 60, 341, 32))
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.label = QtWidgets.QLabel(parent=warDialog)
|
||||
self.label.setGeometry(QtCore.QRect(10, 20, 47, 14))
|
||||
self.label.setObjectName("label")
|
||||
self.warName = QtWidgets.QLineEdit(parent=warDialog)
|
||||
self.warName.setGeometry(QtCore.QRect(60, 20, 113, 20))
|
||||
self.warName.setObjectName("warName")
|
||||
|
||||
self.retranslateUi(warDialog)
|
||||
self.buttonBox.accepted.connect(warDialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(warDialog.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(warDialog)
|
||||
|
||||
def retranslateUi(self, warDialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
warDialog.setWindowTitle(_translate("warDialog", "War"))
|
||||
self.label.setText(_translate("warDialog", "Name:"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
warDialog = QtWidgets.QDialog()
|
||||
ui = Ui_warDialog()
|
||||
ui.setupUi(warDialog)
|
||||
warDialog.show()
|
||||
sys.exit(app.exec())
|
||||
98
src/warchron/view/ui/ui_war_dialog.ui
Normal file
98
src/warchron/view/ui/ui_war_dialog.ui
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>warDialog</class>
|
||||
<widget class="QDialog" name="warDialog">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>378</width>
|
||||
<height>98</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>War</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<normaloff>../resources/warchron_logo.png</normaloff>../resources/warchron_logo.png</iconset>
|
||||
</property>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>60</y>
|
||||
<width>341</width>
|
||||
<height>32</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>20</y>
|
||||
<width>47</width>
|
||||
<height>14</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="warName">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>20</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>warDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>warDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
Loading…
Add table
Add a link
Reference in a new issue