<commit_before>#ifndef ALPHA_SCREENGLWIDGET_HEADER
#define ALPHA_SCREENGLWIDGET_HEADER

#include <QGLWidget>
#include "../Box2.hpp"
#include "Screen.hpp"

namespace nt {
namespace gl {

/**
 * A Qt-specific wrapper of a Screen.
 *
 * ScreenGLWidget takes care of the Qt-specific setup and behavior
 * necessary to render an OpenGL scene. As such, it is a relatively
 * light class. Most of the heavyweight behavior is contained within
 * the screen and the render layers themselves.
 *
 * @see Screen
 * @see RenderLayer
 */
class ScreenGLWidget : public QGLWidget
{
    Q_OBJECT

    const Screen* _screen;
    Box2<int> _screenArea;

protected:
    void paintGL();
    void initializeGL();
    void resizeGL(int width, int height);

public:
    ScreenGLWidget(QWidget* const parent = 0) :
        QGLWidget(parent),
        _screen(nullptr)
    {
    }

    void setScreen(const Screen* const screen);
    const Screen* getScreen() const;
};

} // namespace gl
} // namespace nt

#endif // ALPHA_SCREENGLWIDGET_HEADER
<commit_msg>Allow QGLFormat to be passed to ScreenGLWidget<commit_after>#ifndef ALPHA_SCREENGLWIDGET_HEADER
#define ALPHA_SCREENGLWIDGET_HEADER

#include <QGLWidget>
#include "../Box2.hpp"
#include "Screen.hpp"

namespace nt {
namespace gl {

/**
 * A Qt-specific wrapper of a Screen.
 *
 * ScreenGLWidget takes care of the Qt-specific setup and behavior
 * necessary to render an OpenGL scene. As such, it is a relatively
 * light class. Most of the heavyweight behavior is contained within
 * the screen and the render layers themselves.
 *
 * @see Screen
 * @see RenderLayer
 */
class ScreenGLWidget : public QGLWidget
{
    Q_OBJECT

    const Screen* _screen;
    Box2<int> _screenArea;

protected:
    void paintGL();
    void initializeGL();
    void resizeGL(int width, int height);

public:
    ScreenGLWidget(const QGLFormat& format, QWidget* const parent = 0) :
        QGLWidget(format, parent),
        _screen(nullptr)
    {
    }

    ScreenGLWidget(QWidget* const parent = 0) :
        QGLWidget(parent),
        _screen(nullptr)
    {
    }

    void setScreen(const Screen* const screen);
    const Screen* getScreen() const;
};

} // namespace gl
} // namespace nt

#endif // ALPHA_SCREENGLWIDGET_HEADER

{'fraction_non_alphanumeric': 0.09050378956754347, 'fraction_numerical': 0.003120820329915292, 'mean_word_length': 3.4523809523809526, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6619635', 'n_tokens_mistral': 696, 'n_tokens_neox': 692, 'n_words': 224}