<commit_before>#include "TimeLimitConfiguration.hpp"

#include <QEvent>
#include <QFormLayout>
#include <QLabel>
#include <QSpinBox>
#include <QRadioButton>

#include <algorithm>

namespace GUI
{
namespace Widgets
{

using TimeoutAction = ::GameLogic::FourInALine::Game::TimeoutAction;

const unsigned int TimeLimitConfiguration::MINIMUM_TIME_LIMIT = 5;
const unsigned int TimeLimitConfiguration::MAXIMUM_TIME_LIMIT = 86400;
const TimeoutAction TimeLimitConfiguration::DEFAULT_TIMEOUT_ACTION = TimeoutAction::DRAW_GAME;

/**
 * Creates a new time limit configuration widget.
 *
 * @param parent Parent widget.
 */
TimeLimitConfiguration::TimeLimitConfiguration(QWidget *parent) :
    QGroupBox(parent)
{
	this->setCheckable(true);

	this->formLayout = new QFormLayout(this);
	this->setLayout(this->formLayout);

	this->timeLimitLabel = new QLabel(this);
	this->timeLimitSpinBox = new QSpinBox(this);
	this->timeLimitSpinBox->setMinimum(TimeLimitConfiguration::MINIMUM_TIME_LIMIT);
	this->timeLimitSpinBox->setMaximum(TimeLimitConfiguration::MAXIMUM_TIME_LIMIT);
	this->formLayout->addRow(this->timeLimitLabel, this->timeLimitSpinBox);<commit_msg>Set default time limit to 60 seconds.<commit_after>#include "TimeLimitConfiguration.hpp"

#include <QEvent>
#include <QFormLayout>
#include <QLabel>
#include <QSpinBox>
#include <QRadioButton>

#include <algorithm>

namespace GUI
{
namespace Widgets
{

using TimeoutAction = ::GameLogic::FourInALine::Game::TimeoutAction;

const unsigned int TimeLimitConfiguration::MINIMUM_TIME_LIMIT = 5;
const unsigned int TimeLimitConfiguration::MAXIMUM_TIME_LIMIT = 86400;
const TimeoutAction TimeLimitConfiguration::DEFAULT_TIMEOUT_ACTION = TimeoutAction::DRAW_GAME;

/**
 * Creates a new time limit configuration widget.
 *
 * @param parent Parent widget.
 */
TimeLimitConfiguration::TimeLimitConfiguration(QWidget *parent) :
    QGroupBox(parent)
{
	this->setCheckable(true);

	this->formLayout = new QFormLayout(this);
	this->setLayout(this->formLayout);

	this->timeLimitLabel = new QLabel(this);
	this->timeLimitSpinBox = new QSpinBox(this);
	this->timeLimitSpinBox->setValue(60);
	this->timeLimitSpinBox->setMinimum(TimeLimitConfiguration::MINIMUM_TIME_LIMIT);
	this->timeLimitSpinBox->setMaximum(TimeLimitConfiguration::MAXIMUM_TIME_LIMIT);
	this->formLayout->addRow(this->timeLimitLabel, this->timeLimitSpinBox);
{'fraction_non_alphanumeric': 0.11464968152866242, 'fraction_numerical': 0.006794055201698514, 'mean_word_length': 8.203125, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 45, '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': '1203549', 'n_tokens_mistral': 752, 'n_tokens_neox': 728, 'n_words': 134}