split dialogs and war/campaign/round classes to files
This commit is contained in:
parent
55abdccc64
commit
019e62565f
22 changed files with 562 additions and 502 deletions
16
src/warchron/view/player_dialog.py
Normal file
16
src/warchron/view/player_dialog.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
from PyQt6.QtWidgets import QWidget, QDialog
|
||||
|
||||
from warchron.view.ui.ui_player_dialog import Ui_playerDialog
|
||||
|
||||
|
||||
class PlayerDialog(QDialog):
|
||||
def __init__(
|
||||
self, parent: QWidget | None = None, *, default_name: str = ""
|
||||
) -> None:
|
||||
super().__init__(parent)
|
||||
self.ui: Ui_playerDialog = Ui_playerDialog()
|
||||
self.ui.setupUi(self) # type: ignore
|
||||
self.ui.playerName.setText(default_name)
|
||||
|
||||
def get_player_name(self) -> str:
|
||||
return self.ui.playerName.text().strip()
|
||||
Loading…
Add table
Add a link
Reference in a new issue