<commit_before>/***************************************************************************
 *   Copyright (C) 2003 by <NAME>                                      *
 *   <EMAIL>                                          *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/
#include "editbox.h"
#include <qlayout.h>
#include <iostream>
#include <klocale.h>
EditBox::EditBox(QWidget* parent):QWidget(parent)
{
QHBoxLayout *layout= new QHBoxLayout(this);
layout->setMargin(0);
editBox=new RatioInput(this);
editBox->setMinimumWidth(10);
layout->addWidget(editBox);
okButton=new QPushButton(i18n("&OK"),this);
okButton->setFixedWidth(okButton->fontMetrics().width(i18n("ok")));
okButton->setFlat(true);
layout->addWidget(okButton);
accepted=false;
connect(this->okButton,SIGNAL(clicked()),this,SLOT(acceptValue()));
connect(this->editBox,SIGNAL(valueAccepted()),this,SLOT(acceptValue()));
}

void EditBox::acceptValue(void)
{
accepted=true;
emit valueChanged(editBox->value());
}



EditBox::~EditBox()
{
}

double EditBox::value(void)
{
return editBox->value();
}

void EditBox::setValue(double newValue)
{
editBox->setValue(newValue);
}

void EditBox::setRange(double min,double max,double step,bool slider)
{
editBox->setRange(min,max,step,slider);
}

void EditBox::setPrecision(int dec)
{<commit_msg>no message<commit_after>/***************************************************************************
 *   Copyright (C) 2003 by <NAME>                                      *
 *   <EMAIL>                                          *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 ***************************************************************************/
#include "editbox.h"
#include <qlayout.h>
#include <iostream>
#include <klocale.h>
EditBox::EditBox(QWidget* parent):QWidget(parent)
{
QHBoxLayout *layout= new QHBoxLayout(this);
layout->setMargin(0);
editBox=new RatioInput(this);
editBox->setMinimumWidth(10);
layout->addWidget(editBox);
okButton=new QPushButton(i18n("&OK"),this);
okButton->setFixedWidth(okButton->fontMetrics().width(i18n("ok")));
okButton->setFlat(true);
layout->addWidget(okButton);
accepted=false;
connect(this->okButton,SIGNAL(clicked()),this,SLOT(acceptValue()));
connect(this->editBox,SIGNAL(valueAccepted()),this,SLOT(acceptValue()));
}

void EditBox::acceptValue(void)
{
accepted=true;
emit valueChanged(editBox->value());
}

EditBox::~EditBox()
{
}

double EditBox::value(void)
{
return editBox->value();
}

void EditBox::setValue(double newValue)
{
editBox->setValue(newValue);
}

void EditBox::setRange(double min,double max,double step,bool slider)
{
editBox->setRange(min,max,step,slider);
}

void EditBox::setPrecision(int dec)
{
{'fraction_non_alphanumeric': 0.21480831138425519, 'fraction_numerical': 0.007023705004389816, 'mean_word_length': 3.682191780821918, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '58772', 'n_tokens_mistral': 994, 'n_tokens_neox': 959, 'n_words': 199}