<commit_before><commit_msg>Create trackmouse.cpp<commit_after>#include "trackmouse.h"
#include <QCursor>
#include <QDebug>

trackMouse::trackMouse(QObject *parent) :
    QThread(parent),
    delay(100),
    track(false),
    running(true)
{
}

void trackMouse::end() {
    running = false;
    wait();
    terminate();
}

void trackMouse::enable(const bool enable) {
    track = enable;
}

void trackMouse::setDelay(const int value) {
    delay = value;
}

void trackMouse::run() {
    while(running) {
        QThread::msleep(delay);
        if (track == true) {
            emit mousePos(QCursor::pos());
        }
    }
}
{'fraction_non_alphanumeric': 0.15064102564102563, 'fraction_numerical': 0.004807692307692308, 'mean_word_length': 3.280821917808219, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5365113', 'n_tokens_mistral': 210, 'n_tokens_neox': 207, 'n_words': 40}