add/edit/delete sectors and participants in campaign
This commit is contained in:
parent
495a5adb98
commit
2816da010c
22 changed files with 1799 additions and 923 deletions
|
|
@ -17,25 +17,27 @@ class Ui_campaignDialog(object):
|
|||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(".\\src\\warchron\\view\\ui\\../resources/warchron_logo.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||
campaignDialog.setWindowIcon(icon)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=campaignDialog)
|
||||
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.formLayout = QtWidgets.QFormLayout(campaignDialog)
|
||||
self.formLayout.setObjectName("formLayout")
|
||||
self.label = QtWidgets.QLabel(parent=campaignDialog)
|
||||
self.label.setGeometry(QtCore.QRect(10, 20, 47, 14))
|
||||
self.label.setObjectName("label")
|
||||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label)
|
||||
self.campaignName = QtWidgets.QLineEdit(parent=campaignDialog)
|
||||
self.campaignName.setGeometry(QtCore.QRect(60, 20, 113, 20))
|
||||
self.campaignName.setObjectName("campaignName")
|
||||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.campaignName)
|
||||
self.label_2 = QtWidgets.QLabel(parent=campaignDialog)
|
||||
self.label_2.setGeometry(QtCore.QRect(10, 50, 47, 14))
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_2)
|
||||
self.campaignMonth = QtWidgets.QSpinBox(parent=campaignDialog)
|
||||
self.campaignMonth.setGeometry(QtCore.QRect(60, 50, 71, 22))
|
||||
self.campaignMonth.setMinimum(1)
|
||||
self.campaignMonth.setMaximum(12)
|
||||
self.campaignMonth.setObjectName("campaignMonth")
|
||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.campaignMonth)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=campaignDialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.buttonBox)
|
||||
|
||||
self.retranslateUi(campaignDialog)
|
||||
self.buttonBox.accepted.connect(campaignDialog.accept) # type: ignore
|
||||
|
|
|
|||
|
|
@ -20,74 +20,45 @@
|
|||
<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="campaignName">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>20</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>50</y>
|
||||
<width>47</width>
|
||||
<height>14</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Month:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSpinBox" name="campaignMonth">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>50</y>
|
||||
<width>71</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>12</number>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="campaignName"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Month:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="campaignMonth">
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>12</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
|
|
|||
72
src/warchron/view/ui/ui_campaign_participant_dialog.py
Normal file
72
src/warchron/view/ui/ui_campaign_participant_dialog.py
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# Form implementation generated from reading ui file '.\src\warchron\view\ui\ui_campaign_participant_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_campaignParticipantDialog(object):
|
||||
def setupUi(self, campaignParticipantDialog):
|
||||
campaignParticipantDialog.setObjectName("campaignParticipantDialog")
|
||||
campaignParticipantDialog.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
|
||||
campaignParticipantDialog.resize(394, 124)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(".\\src\\warchron\\view\\ui\\../resources/warchron_logo.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||
campaignParticipantDialog.setWindowIcon(icon)
|
||||
self.formLayout = QtWidgets.QFormLayout(campaignParticipantDialog)
|
||||
self.formLayout.setObjectName("formLayout")
|
||||
self.label = QtWidgets.QLabel(parent=campaignParticipantDialog)
|
||||
self.label.setObjectName("label")
|
||||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label)
|
||||
self.playerComboBox = QtWidgets.QComboBox(parent=campaignParticipantDialog)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.playerComboBox.sizePolicy().hasHeightForWidth())
|
||||
self.playerComboBox.setSizePolicy(sizePolicy)
|
||||
self.playerComboBox.setObjectName("playerComboBox")
|
||||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.playerComboBox)
|
||||
self.label_2 = QtWidgets.QLabel(parent=campaignParticipantDialog)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_2)
|
||||
self.leader = QtWidgets.QLineEdit(parent=campaignParticipantDialog)
|
||||
self.leader.setObjectName("leader")
|
||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.leader)
|
||||
self.label_3 = QtWidgets.QLabel(parent=campaignParticipantDialog)
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_3)
|
||||
self.theme = QtWidgets.QLineEdit(parent=campaignParticipantDialog)
|
||||
self.theme.setText("")
|
||||
self.theme.setObjectName("theme")
|
||||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.FieldRole, self.theme)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=campaignParticipantDialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.formLayout.setWidget(3, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.buttonBox)
|
||||
|
||||
self.retranslateUi(campaignParticipantDialog)
|
||||
self.buttonBox.accepted.connect(campaignParticipantDialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(campaignParticipantDialog.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(campaignParticipantDialog)
|
||||
|
||||
def retranslateUi(self, campaignParticipantDialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
campaignParticipantDialog.setWindowTitle(_translate("campaignParticipantDialog", "Campaign participant"))
|
||||
self.label.setText(_translate("campaignParticipantDialog", "Player"))
|
||||
self.label_2.setText(_translate("campaignParticipantDialog", "Leader"))
|
||||
self.label_3.setText(_translate("campaignParticipantDialog", "Theme"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
campaignParticipantDialog = QtWidgets.QDialog()
|
||||
ui = Ui_campaignParticipantDialog()
|
||||
ui.setupUi(campaignParticipantDialog)
|
||||
campaignParticipantDialog.show()
|
||||
sys.exit(app.exec())
|
||||
112
src/warchron/view/ui/ui_campaign_participant_dialog.ui
Normal file
112
src/warchron/view/ui/ui_campaign_participant_dialog.ui
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>campaignParticipantDialog</class>
|
||||
<widget class="QDialog" name="campaignParticipantDialog">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>394</width>
|
||||
<height>124</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Campaign participant</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<normaloff>../resources/warchron_logo.png</normaloff>../resources/warchron_logo.png</iconset>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Player</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="playerComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Leader</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="leader"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Theme</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLineEdit" name="theme">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>campaignParticipantDialog</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>campaignParticipantDialog</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>
|
||||
|
|
@ -147,12 +147,12 @@ class Ui_MainWindow(object):
|
|||
self.campaignMonth.setFont(font)
|
||||
self.campaignMonth.setObjectName("campaignMonth")
|
||||
self.labelParticipants_2 = QtWidgets.QLabel(parent=self.pageCampaign)
|
||||
self.labelParticipants_2.setGeometry(QtCore.QRect(10, 180, 47, 13))
|
||||
self.labelParticipants_2.setGeometry(QtCore.QRect(10, 180, 61, 16))
|
||||
self.labelParticipants_2.setObjectName("labelParticipants_2")
|
||||
self.campaignParticipantsTable = QtWidgets.QTableWidget(parent=self.pageCampaign)
|
||||
self.campaignParticipantsTable.setGeometry(QtCore.QRect(10, 200, 401, 181))
|
||||
self.campaignParticipantsTable.setObjectName("campaignParticipantsTable")
|
||||
self.campaignParticipantsTable.setColumnCount(4)
|
||||
self.campaignParticipantsTable.setColumnCount(5)
|
||||
self.campaignParticipantsTable.setRowCount(0)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.campaignParticipantsTable.setHorizontalHeaderItem(0, item)
|
||||
|
|
@ -162,6 +162,8 @@ class Ui_MainWindow(object):
|
|||
self.campaignParticipantsTable.setHorizontalHeaderItem(2, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.campaignParticipantsTable.setHorizontalHeaderItem(3, item)
|
||||
item = QtWidgets.QTableWidgetItem()
|
||||
self.campaignParticipantsTable.setHorizontalHeaderItem(4, item)
|
||||
self.sectorsTable = QtWidgets.QTableWidget(parent=self.pageCampaign)
|
||||
self.sectorsTable.setGeometry(QtCore.QRect(10, 60, 401, 101))
|
||||
self.sectorsTable.setObjectName("sectorsTable")
|
||||
|
|
@ -315,7 +317,7 @@ class Ui_MainWindow(object):
|
|||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.tabWidget.setCurrentIndex(1)
|
||||
self.selectedDetailsStack.setCurrentIndex(0)
|
||||
self.selectedDetailsStack.setCurrentIndex(2)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
|
|
@ -366,8 +368,10 @@ class Ui_MainWindow(object):
|
|||
item = self.campaignParticipantsTable.horizontalHeaderItem(1)
|
||||
item.setText(_translate("MainWindow", "Leader"))
|
||||
item = self.campaignParticipantsTable.horizontalHeaderItem(2)
|
||||
item.setText(_translate("MainWindow", "Victory pts."))
|
||||
item.setText(_translate("MainWindow", "Theme"))
|
||||
item = self.campaignParticipantsTable.horizontalHeaderItem(3)
|
||||
item.setText(_translate("MainWindow", "Victory pts."))
|
||||
item = self.campaignParticipantsTable.horizontalHeaderItem(4)
|
||||
item.setText(_translate("MainWindow", "Theme pts."))
|
||||
item = self.sectorsTable.horizontalHeaderItem(0)
|
||||
item.setText(_translate("MainWindow", "Name"))
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,64 +0,0 @@
|
|||
# Form implementation generated from reading ui file '.\src\warchron\view\ui\ui_participant_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_participantDialog(object):
|
||||
def setupUi(self, participantDialog):
|
||||
participantDialog.setObjectName("participantDialog")
|
||||
participantDialog.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
|
||||
participantDialog.resize(394, 148)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(".\\src\\warchron\\view\\ui\\../resources/warchron_logo.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||
participantDialog.setWindowIcon(icon)
|
||||
self.gridLayout = QtWidgets.QGridLayout(participantDialog)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.label = QtWidgets.QLabel(parent=participantDialog)
|
||||
self.label.setObjectName("label")
|
||||
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
|
||||
self.playerComboBox = QtWidgets.QComboBox(parent=participantDialog)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.playerComboBox.sizePolicy().hasHeightForWidth())
|
||||
self.playerComboBox.setSizePolicy(sizePolicy)
|
||||
self.playerComboBox.setObjectName("playerComboBox")
|
||||
self.gridLayout.addWidget(self.playerComboBox, 0, 1, 1, 1)
|
||||
self.label_2 = QtWidgets.QLabel(parent=participantDialog)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
|
||||
self.faction = QtWidgets.QLineEdit(parent=participantDialog)
|
||||
self.faction.setObjectName("faction")
|
||||
self.gridLayout.addWidget(self.faction, 1, 1, 1, 1)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=participantDialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 2)
|
||||
|
||||
self.retranslateUi(participantDialog)
|
||||
self.buttonBox.accepted.connect(participantDialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(participantDialog.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(participantDialog)
|
||||
|
||||
def retranslateUi(self, participantDialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
participantDialog.setWindowTitle(_translate("participantDialog", "Participant"))
|
||||
self.label.setText(_translate("participantDialog", "Player"))
|
||||
self.label_2.setText(_translate("participantDialog", "Faction"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
participantDialog = QtWidgets.QDialog()
|
||||
ui = Ui_participantDialog()
|
||||
ui.setupUi(participantDialog)
|
||||
participantDialog.show()
|
||||
sys.exit(app.exec())
|
||||
|
|
@ -13,21 +13,23 @@ class Ui_playerDialog(object):
|
|||
def setupUi(self, playerDialog):
|
||||
playerDialog.setObjectName("playerDialog")
|
||||
playerDialog.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
|
||||
playerDialog.resize(378, 98)
|
||||
playerDialog.resize(378, 67)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(".\\src\\warchron\\view\\ui\\../resources/warchron_logo.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||
playerDialog.setWindowIcon(icon)
|
||||
self.formLayout = QtWidgets.QFormLayout(playerDialog)
|
||||
self.formLayout.setObjectName("formLayout")
|
||||
self.label = QtWidgets.QLabel(parent=playerDialog)
|
||||
self.label.setObjectName("label")
|
||||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label)
|
||||
self.playerName = QtWidgets.QLineEdit(parent=playerDialog)
|
||||
self.playerName.setObjectName("playerName")
|
||||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.playerName)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=playerDialog)
|
||||
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=playerDialog)
|
||||
self.label.setGeometry(QtCore.QRect(10, 20, 47, 14))
|
||||
self.label.setObjectName("label")
|
||||
self.playerName = QtWidgets.QLineEdit(parent=playerDialog)
|
||||
self.playerName.setGeometry(QtCore.QRect(60, 20, 113, 20))
|
||||
self.playerName.setObjectName("playerName")
|
||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.buttonBox)
|
||||
|
||||
self.retranslateUi(playerDialog)
|
||||
self.buttonBox.accepted.connect(playerDialog.accept) # type: ignore
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>378</width>
|
||||
<height>98</height>
|
||||
<height>67</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
|
@ -20,45 +20,28 @@
|
|||
<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="playerName">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>20</y>
|
||||
<width>113</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="playerName"/>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
|
|
|||
101
src/warchron/view/ui/ui_sector_dialog.py
Normal file
101
src/warchron/view/ui/ui_sector_dialog.py
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
# Form implementation generated from reading ui file '.\src\warchron\view\ui\ui_sector_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_sectorDialog(object):
|
||||
def setupUi(self, sectorDialog):
|
||||
sectorDialog.setObjectName("sectorDialog")
|
||||
sectorDialog.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
|
||||
sectorDialog.resize(514, 129)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(".\\src\\warchron\\view\\ui\\../resources/warchron_logo.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||
sectorDialog.setWindowIcon(icon)
|
||||
self.gridLayout = QtWidgets.QGridLayout(sectorDialog)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.label_2 = QtWidgets.QLabel(parent=sectorDialog)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.gridLayout.addWidget(self.label_2, 0, 0, 1, 1)
|
||||
self.sectorName = QtWidgets.QLineEdit(parent=sectorDialog)
|
||||
self.sectorName.setText("")
|
||||
self.sectorName.setObjectName("sectorName")
|
||||
self.gridLayout.addWidget(self.sectorName, 0, 1, 1, 1)
|
||||
self.label_3 = QtWidgets.QLabel(parent=sectorDialog)
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.gridLayout.addWidget(self.label_3, 0, 2, 1, 1)
|
||||
self.majorComboBox = QtWidgets.QComboBox(parent=sectorDialog)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.majorComboBox.sizePolicy().hasHeightForWidth())
|
||||
self.majorComboBox.setSizePolicy(sizePolicy)
|
||||
self.majorComboBox.setObjectName("majorComboBox")
|
||||
self.gridLayout.addWidget(self.majorComboBox, 0, 3, 1, 1)
|
||||
self.label = QtWidgets.QLabel(parent=sectorDialog)
|
||||
self.label.setObjectName("label")
|
||||
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
|
||||
self.roundComboBox = QtWidgets.QComboBox(parent=sectorDialog)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.roundComboBox.sizePolicy().hasHeightForWidth())
|
||||
self.roundComboBox.setSizePolicy(sizePolicy)
|
||||
self.roundComboBox.setObjectName("roundComboBox")
|
||||
self.gridLayout.addWidget(self.roundComboBox, 1, 1, 1, 1)
|
||||
self.label_4 = QtWidgets.QLabel(parent=sectorDialog)
|
||||
self.label_4.setObjectName("label_4")
|
||||
self.gridLayout.addWidget(self.label_4, 1, 2, 1, 1)
|
||||
self.minorComboBox = QtWidgets.QComboBox(parent=sectorDialog)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.minorComboBox.sizePolicy().hasHeightForWidth())
|
||||
self.minorComboBox.setSizePolicy(sizePolicy)
|
||||
self.minorComboBox.setObjectName("minorComboBox")
|
||||
self.gridLayout.addWidget(self.minorComboBox, 1, 3, 1, 1)
|
||||
self.label_5 = QtWidgets.QLabel(parent=sectorDialog)
|
||||
self.label_5.setObjectName("label_5")
|
||||
self.gridLayout.addWidget(self.label_5, 2, 2, 1, 1)
|
||||
self.influenceComboBox = QtWidgets.QComboBox(parent=sectorDialog)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.influenceComboBox.sizePolicy().hasHeightForWidth())
|
||||
self.influenceComboBox.setSizePolicy(sizePolicy)
|
||||
self.influenceComboBox.setObjectName("influenceComboBox")
|
||||
self.gridLayout.addWidget(self.influenceComboBox, 2, 3, 1, 1)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=sectorDialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.gridLayout.addWidget(self.buttonBox, 3, 2, 1, 2)
|
||||
|
||||
self.retranslateUi(sectorDialog)
|
||||
self.buttonBox.accepted.connect(sectorDialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(sectorDialog.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(sectorDialog)
|
||||
|
||||
def retranslateUi(self, sectorDialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
sectorDialog.setWindowTitle(_translate("sectorDialog", "Sector"))
|
||||
self.label_2.setText(_translate("sectorDialog", "Name"))
|
||||
self.label_3.setText(_translate("sectorDialog", "Major objective"))
|
||||
self.label.setText(_translate("sectorDialog", "Round"))
|
||||
self.label_4.setText(_translate("sectorDialog", "Minor opportunity"))
|
||||
self.label_5.setText(_translate("sectorDialog", "Influence"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
sectorDialog = QtWidgets.QDialog()
|
||||
ui = Ui_sectorDialog()
|
||||
ui.setupUi(sectorDialog)
|
||||
sectorDialog.show()
|
||||
sys.exit(app.exec())
|
||||
153
src/warchron/view/ui/ui_sector_dialog.ui
Normal file
153
src/warchron/view/ui/ui_sector_dialog.ui
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>sectorDialog</class>
|
||||
<widget class="QDialog" name="sectorDialog">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>514</width>
|
||||
<height>129</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Sector</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<normaloff>../resources/warchron_logo.png</normaloff>../resources/warchron_logo.png</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="sectorName">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Major objective</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QComboBox" name="majorComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Round</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="roundComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Minor opportunity</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QComboBox" name="minorComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Influence</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QComboBox" name="influenceComboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>sectorDialog</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>sectorDialog</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>
|
||||
|
|
@ -17,25 +17,27 @@ class Ui_warDialog(object):
|
|||
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, 80, 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.gridLayout = QtWidgets.QGridLayout(warDialog)
|
||||
self.gridLayout.setObjectName("gridLayout")
|
||||
self.label = QtWidgets.QLabel(parent=warDialog)
|
||||
self.label.setGeometry(QtCore.QRect(10, 20, 47, 14))
|
||||
self.label.setObjectName("label")
|
||||
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
|
||||
self.warName = QtWidgets.QLineEdit(parent=warDialog)
|
||||
self.warName.setGeometry(QtCore.QRect(60, 20, 113, 20))
|
||||
self.warName.setObjectName("warName")
|
||||
self.gridLayout.addWidget(self.warName, 0, 1, 1, 1)
|
||||
self.label_2 = QtWidgets.QLabel(parent=warDialog)
|
||||
self.label_2.setGeometry(QtCore.QRect(10, 50, 47, 14))
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
|
||||
self.warYear = QtWidgets.QSpinBox(parent=warDialog)
|
||||
self.warYear.setGeometry(QtCore.QRect(60, 50, 71, 22))
|
||||
self.warYear.setMinimum(1970)
|
||||
self.warYear.setMaximum(3000)
|
||||
self.warYear.setObjectName("warYear")
|
||||
self.gridLayout.addWidget(self.warYear, 1, 1, 1, 1)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=warDialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 2)
|
||||
|
||||
self.retranslateUi(warDialog)
|
||||
self.buttonBox.accepted.connect(warDialog.accept) # type: ignore
|
||||
|
|
|
|||
|
|
@ -20,74 +20,45 @@
|
|||
<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>80</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 class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>50</y>
|
||||
<width>47</width>
|
||||
<height>14</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Year:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QSpinBox" name="warYear">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>60</x>
|
||||
<y>50</y>
|
||||
<width>71</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1970</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>3000</number>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Name:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="warName"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Year:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="warYear">
|
||||
<property name="minimum">
|
||||
<number>1970</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>3000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
|
|
|||
64
src/warchron/view/ui/ui_war_participant_dialog.py
Normal file
64
src/warchron/view/ui/ui_war_participant_dialog.py
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
# Form implementation generated from reading ui file '.\src\warchron\view\ui\ui_war_participant_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_warParticipantDialog(object):
|
||||
def setupUi(self, warParticipantDialog):
|
||||
warParticipantDialog.setObjectName("warParticipantDialog")
|
||||
warParticipantDialog.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
|
||||
warParticipantDialog.resize(394, 96)
|
||||
icon = QtGui.QIcon()
|
||||
icon.addPixmap(QtGui.QPixmap(".\\src\\warchron\\view\\ui\\../resources/warchron_logo.png"), QtGui.QIcon.Mode.Normal, QtGui.QIcon.State.Off)
|
||||
warParticipantDialog.setWindowIcon(icon)
|
||||
self.formLayout = QtWidgets.QFormLayout(warParticipantDialog)
|
||||
self.formLayout.setObjectName("formLayout")
|
||||
self.label = QtWidgets.QLabel(parent=warParticipantDialog)
|
||||
self.label.setObjectName("label")
|
||||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label)
|
||||
self.playerComboBox = QtWidgets.QComboBox(parent=warParticipantDialog)
|
||||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Fixed)
|
||||
sizePolicy.setHorizontalStretch(0)
|
||||
sizePolicy.setVerticalStretch(0)
|
||||
sizePolicy.setHeightForWidth(self.playerComboBox.sizePolicy().hasHeightForWidth())
|
||||
self.playerComboBox.setSizePolicy(sizePolicy)
|
||||
self.playerComboBox.setObjectName("playerComboBox")
|
||||
self.formLayout.setWidget(0, QtWidgets.QFormLayout.ItemRole.FieldRole, self.playerComboBox)
|
||||
self.label_2 = QtWidgets.QLabel(parent=warParticipantDialog)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.LabelRole, self.label_2)
|
||||
self.faction = QtWidgets.QLineEdit(parent=warParticipantDialog)
|
||||
self.faction.setObjectName("faction")
|
||||
self.formLayout.setWidget(1, QtWidgets.QFormLayout.ItemRole.FieldRole, self.faction)
|
||||
self.buttonBox = QtWidgets.QDialogButtonBox(parent=warParticipantDialog)
|
||||
self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal)
|
||||
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok)
|
||||
self.buttonBox.setObjectName("buttonBox")
|
||||
self.formLayout.setWidget(2, QtWidgets.QFormLayout.ItemRole.SpanningRole, self.buttonBox)
|
||||
|
||||
self.retranslateUi(warParticipantDialog)
|
||||
self.buttonBox.accepted.connect(warParticipantDialog.accept) # type: ignore
|
||||
self.buttonBox.rejected.connect(warParticipantDialog.reject) # type: ignore
|
||||
QtCore.QMetaObject.connectSlotsByName(warParticipantDialog)
|
||||
|
||||
def retranslateUi(self, warParticipantDialog):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
warParticipantDialog.setWindowTitle(_translate("warParticipantDialog", "War participant"))
|
||||
self.label.setText(_translate("warParticipantDialog", "Player"))
|
||||
self.label_2.setText(_translate("warParticipantDialog", "Faction"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
warParticipantDialog = QtWidgets.QDialog()
|
||||
ui = Ui_warParticipantDialog()
|
||||
ui.setupUi(warParticipantDialog)
|
||||
warParticipantDialog.show()
|
||||
sys.exit(app.exec())
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>participantDialog</class>
|
||||
<widget class="QDialog" name="participantDialog">
|
||||
<class>warParticipantDialog</class>
|
||||
<widget class="QDialog" name="warParticipantDialog">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
|
|
@ -10,17 +10,17 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>394</width>
|
||||
<height>148</height>
|
||||
<height>96</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Participant</string>
|
||||
<string>War participant</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset>
|
||||
<normaloff>../resources/warchron_logo.png</normaloff>../resources/warchron_logo.png</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<layout class="QFormLayout" name="formLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>participantDialog</receiver>
|
||||
<receiver>warParticipantDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
|
|
@ -81,7 +81,7 @@
|
|||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>participantDialog</receiver>
|
||||
<receiver>warParticipantDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
Loading…
Add table
Add a link
Reference in a new issue