<commit_before>#include "mainwindow.h"
#include "ui_mainwindow.h"

#include "addcomputer.h"
#include "addcomputerscientist.h"
#include "addtype.h"
#include "showlist.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    fall();

}

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

void MainWindow::fall()
{
    // Display scientists
    vector<CSPerson> compScientists = _service.getComputerScientistList();

    /*
    ui->table_computerScientist->setRowCount(compScientists.size());
    ui->table_computerScientist->setColumnCount(4);
    for(size_t i = 0; i < compScientists.size(); i++)
    {

        ui->table_computerScientist->setItem(i, 0, new QTableWidgetItem(QString::fromStdString(compScientists[i].getName())));
        ui->table_computerScientist->setItem(i, 1, new QTableWidgetItem(QString::number(compScientists[i].getAge())));
        ui->table_computerScientist->setItem(i, 2, new QTableWidgetItem(QString::number(compScientists[i].getBirthYear())));
        ui->table_computerScientist->setItem(i, 3, new QTableWidgetItem(QString::number(compScientists[i].getPassedAwayYear())));
    }

    // Display computers
    vector<Computer> computerList = _service.getComputerList();
    ui->table_computer->setRowCount(computerList.size());
    ui->table_computer->setColumnCount(4);
    for(size_t j = 0; j < computerList.size(); j++)
    {

        ui->table_computer->setItem(j, 0, new QTableWidgetItem(QString::fromStdString(computerList[j].getName())));
        ui->table_computer->setItem(j, 1, new QTableWidgetItem(QString::fromStdString(computerList[j].getType())));
        ui->table_computer->setItem(j, 2, new QTableWidgetItem(QString::number(computerList[j].getDesignYear())));
        ui->table_computer->setItem(j, 3, new QTableWidgetItem(QString::number(computerList[j].getBuildYear())));
    }

*/




}

void MainWindow::on_button_quitProgram_clicked()
{
    QCoreApplication::quit();
}

void MainWindow::on_action_Add_Computer_Scientist_triggered()
{
    qDebug() << "Computer scientist pressed";

}

//Toolbar
void MainWindow::on_actionAdd_Computer_Scientist_clicked()
{
    qDebug() << "Toolbar Computer Scientist pressed";
}

void MainWindow::on_pushButton_home_clicked()
{
    //mainWindow.show();
    qDebug() << "ET go home";
}<commit_msg>functions for main window buttons added<commit_after>#include "mainwindow.h"
#include "ui_mainwindow.h"

#include "addcomputer.h"
#include "addcomputerscientist.h"
#include "addtype.h"
#include "showlist.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    fall();

}

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

void MainWindow::fall()
{
    // Display scientists
    vector<CSPerson> compScientists = _service.getComputerScientistList();

    /*
    ui->table_computerScientist->setRowCount(compScientists.size());
    ui->table_computerScientist->setColumnCount(4);
    for(size_t i = 0; i < compScientists.size(); i++)
    {

        ui->table_computerScientist->setItem(i, 0, new QTableWidgetItem(QString::fromStdString(compScientists[i].getName())));
        ui->table_computerScientist->setItem(i, 1, new QTableWidgetItem(QString::number(compScientists[i].getAge())));
        ui->table_computerScientist->setItem(i, 2, new QTableWidgetItem(QString::number(compScientists[i].getBirthYear())));
        ui->table_computerScientist->setItem(i, 3, new QTableWidgetItem(QString::number(compScientists[i].getPassedAwayYear())));
    }

    // Display computers
    vector<Computer> computerList = _service.getComputerList();
    ui->table_computer->setRowCount(computerList.size());
    ui->table_computer->setColumnCount(4);
    for(size_t j = 0; j < computerList.size(); j++)
    {

        ui->table_computer->setItem(j, 0, new QTableWidgetItem(QString::fromStdString(computerList[j].getName())));
        ui->table_computer->setItem(j, 1, new QTableWidgetItem(QString::fromStdString(computerList[j].getType())));
        ui->table_computer->setItem(j, 2, new QTableWidgetItem(QString::number(computerList[j].getDesignYear())));
        ui->table_computer->setItem(j, 3, new QTableWidgetItem(QString::number(computerList[j].getBuildYear())));
    }

*/




}

void MainWindow::on_button_quitProgram_clicked()
{
    QCoreApplication::quit();
}

void MainWindow::on_action_Add_Computer_Scientist_triggered()
{
    qDebug() << "Computer scientist pressed";

}

//Toolbar
void MainWindow::on_actionAdd_Computer_Scientist_clicked()
{
    qDebug() << "Toolbar Computer Scientist pressed";
}

void MainWindow::on_pushButton_home_clicked()
{
    //mainWindow.show();
    qDebug() << "ET go home";
}

void MainWindow::on_pushButton_add_clicked()
{
    qDebug() << "Add a computer scientist";
}

void MainWindow::on_pushButton_show_list_clicked()
{
    qDebug() << "Show list";
}

void MainWindow::on_pushButton_trash_clicked()
{
    qDebug() << "Trash";
}
{'fraction_non_alphanumeric': 0.15426387771520514, 'fraction_numerical': 0.004827031375703942, 'mean_word_length': 5.231829573934837, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4665939', 'n_tokens_mistral': 1755, 'n_tokens_neox': 1639, 'n_words': 233}