class NewCharDialog(QDialog):
    def __init__(self):
        QDialog.__init__(self)
        self.ui = Ui_NewCharDialog()
        self.ui.setupUi(self)
        
    def getCharacter(self):
        name = str(self.ui.editChar.text())
        player = str(self.ui.editPlayer.text())
        classe = str(self.ui.cboxClass.currentText())
        
        char = Character(name, player, classe)
        
        char.hp = self.ui.spinHp.value()
        char.ca = self.ui.spinCa.value()
        char.hs = self.ui.spinHs.value()
        char.currHp = self.ui.spinHp.value()
        char.currHs = self.ui.spinHs.value()
        
        return char
 def __init__(self):
     QDialog.__init__(self)
     self.ui = Ui_NewCharDialog()
     self.ui.setupUi(self)