<commit_before>#ifndef CLIENT_H
#define CLIENT_H

#include "testfactory.h"
#include "testscheduler.h"
#include "types.h"

#include <QObject>
#include <QLocale>
#include <QHostAddress>
#include <QStringList>

class QNetworkAccessManager;

////////////////////////////////////////////////////////////

class Client : public QObject
{
    Q_OBJECT
    Q_ENUMS(Status)
    Q_PROPERTY(int status READ status NOTIFY statusChanged)

    explicit Client(QObject *parent = 0);
    ~Client();

public:
    /// Receives the main client instance
    static Client* instance();

    enum Status
    {
        Unregistered,
        Registered
    };

    bool init();

    /// Get the current status
    Status status() const;

    QNetworkAccessManager* networkAccessManager() const;

    QAbstractSocket* managerSocket() const;

    TestScheduler* scheduler() const;

public slots:
    void requestTest();

signals:
    void statusChanged();

private:<commit_msg>Init should be callable from scripting.<commit_after>#ifndef CLIENT_H
#define CLIENT_H

#include "testfactory.h"
#include "testscheduler.h"
#include "types.h"

#include <QObject>
#include <QLocale>
#include <QHostAddress>
#include <QStringList>

class QNetworkAccessManager;

////////////////////////////////////////////////////////////

class Client : public QObject
{
    Q_OBJECT
    Q_ENUMS(Status)
    Q_PROPERTY(int status READ status NOTIFY statusChanged)

    explicit Client(QObject *parent = 0);
    ~Client();

public:
    /// Receives the main client instance
    static Client* instance();

    enum Status
    {
        Unregistered,
        Registered
    };

    /// Get the current status
    Status status() const;

    QNetworkAccessManager* networkAccessManager() const;

    QAbstractSocket* managerSocket() const;

    TestScheduler* scheduler() const;

public slots:
    bool init();
    void requestTest();

signals:
    void statusChanged();

private:
{'fraction_non_alphanumeric': 0.15308770108977685, 'fraction_numerical': 0.0010378827192527244, 'mean_word_length': 2.722007722007722, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3357690', 'n_tokens_mistral': 563, 'n_tokens_neox': 549, 'n_words': 156}