#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    Character* c = new Character();
    currentCharacter = c;
    characters.append(c);
    ui->ageLineEdit->setValidator(new QIntValidator(0, 999999, ui->ageLineEdit));
}

MainWindow::~MainWindow()
{
    delete ui;
    delete currentCharacter;

    for(Character* c : characters) {
        delete c;
    }
}

void MainWindow::on_actionEditer_triggered(){
    if(edition){
        //Mode edition
    }else{
        //Mode visualisation
    }
    edition=!edition;
}


void MainWindow::on_actionBlocNote_triggered(){
    if(notePad){
        //Menu notepad ouvert
    }else{
        //Menu notepad fermé
    }
    notePad=!notePad;
}

