<commit_before>#pragma once

#include <pajlada/settings/setting.hpp>

#include <QSpinBox>

namespace pajlada {
namespace Settings {

template <typename WidgetType, typename SettingType>
inline void
connectToWidget(WidgetType *widget, Setting<SettingType> &setting,
                bool setInitialValue = true)
{
}

template <typename SettingType>
inline void
connectToWidget(QSpinBox *widget, Setting<SettingType> &setting,
                bool setInitialValue = true)
{
    if (setInitialValue) {
        widget->setValue(setting.getValue());
    }

    // Connect widget onChange to setting<commit_msg>Add missing include directive in qt.hpp<commit_after>#pragma once

#include <pajlada/settings/setting.hpp>

#include <QComboBox>
#include <QSpinBox>

namespace pajlada {
namespace Settings {

template <typename WidgetType, typename SettingType>
inline void
connectToWidget(WidgetType *widget, Setting<SettingType> &setting,
                bool setInitialValue = true)
{
}

template <typename SettingType>
inline void
connectToWidget(QSpinBox *widget, Setting<SettingType> &setting,
                bool setInitialValue = true)
{
    if (setInitialValue) {
        widget->setValue(setting.getValue());
    }

    // Connect widget onChange to setting
{'fraction_non_alphanumeric': 0.09083665338645418, 'fraction_numerical': 0.0, 'mean_word_length': 4.126530612244898, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 18, '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': '1662142', 'n_tokens_mistral': 360, 'n_tokens_neox': 350, 'n_words': 94}