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
24
src/warchron/view/objective_dialog.py
Normal file
24
src/warchron/view/objective_dialog.py
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
from PyQt6.QtWidgets import QWidget, QDialog
|
||||
|
||||
from warchron.view.ui.ui_objective_dialog import Ui_objectiveDialog
|
||||
|
||||
|
||||
class ObjectiveDialog(QDialog):
|
||||
def __init__(
|
||||
self,
|
||||
parent: QWidget | None = None,
|
||||
*,
|
||||
default_name: str = "",
|
||||
default_description: str | None = "",
|
||||
) -> None:
|
||||
super().__init__(parent)
|
||||
self.ui: Ui_objectiveDialog = Ui_objectiveDialog()
|
||||
self.ui.setupUi(self) # type: ignore
|
||||
self.ui.objectiveName.setText(default_name)
|
||||
self.ui.objectiveDescription.setPlainText(default_description)
|
||||
|
||||
def get_objective_name(self) -> str:
|
||||
return self.ui.objectiveName.text().strip()
|
||||
|
||||
def get_objective_description(self) -> str:
|
||||
return self.ui.objectiveDescription.toPlainText().strip()
|
||||
Loading…
Add table
Add a link
Reference in a new issue