<commit_before>#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "QTextImage/qtextimage.h"


#include <QMessageBox>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QFont font("monospace");
    font.setStyleHint(QFont::Monospace);
    ui->editor->setFont(font);

    ui->colorEditor->setModel(&model);
    ui->colorEditor->horizontalHeader()->setSectionResizeMode(PenModel::Glyph, QHeaderView::ResizeToContents);
    ui->colorEditor->horizontalHeader()->setSectionResizeMode(PenModel::PenColor, QHeaderView::Fixed);
    ui->colorEditor->horizontalHeader()->setSectionResizeMode(PenModel::BrushColor, QHeaderView::Stretch);

    connect(&model, &PenModel::dataChanged, this, &MainWindow::draw);

    ui->editor->setPlainText(QString(
        ". . . . 1 1 1 . . . .\n"
        ". . 1 . . . . . 1 . .\n"
        ". 1 . . . . . . . 1 .\n"
        "1 . . 2 . . . 3 . . 1\n"
        "1 . . . # . # . . . 1\n"<commit_msg>Use new Qt way of retrieving a monospace font<commit_after>#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "QTextImage/qtextimage.h"


#include <QMessageBox>

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QFont font = QFontDatabase::systemFont(QFontDatabase::FixedFont);
    ui->editor->setFont(font);

    ui->colorEditor->setModel(&model);
    ui->colorEditor->horizontalHeader()->setSectionResizeMode(PenModel::Glyph, QHeaderView::ResizeToContents);
    ui->colorEditor->horizontalHeader()->setSectionResizeMode(PenModel::PenColor, QHeaderView::Fixed);
    ui->colorEditor->horizontalHeader()->setSectionResizeMode(PenModel::BrushColor, QHeaderView::Stretch);

    connect(&model, &PenModel::dataChanged, this, &MainWindow::draw);

    ui->editor->setPlainText(QString(
        ". . . . 1 1 1 . . . .\n"
        ". . 1 . . . . . 1 . .\n"
        ". 1 . . . . . . . 1 .\n"
        "1 . . 2 . . . 3 . . 1\n"
        "1 . . . # . # . . . 1\n"
{'fraction_non_alphanumeric': 0.183743842364532, 'fraction_numerical': 0.012807881773399015, 'mean_word_length': 3.086519114688129, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6223042', 'n_tokens_mistral': 727, 'n_tokens_neox': 690, 'n_words': 99}