#include "CUDAMedianFilterWidget.h"

#include <iostream>

CUDAMedianFilterWidget::CUDAMedianFilterWidget(QWidget *parent) :
	QWidget(parent)
{
	setupUi(this);

	connect(this->m_RadiusSlider,	SIGNAL(sliderMoved(int)),	this,	SLOT(SliderValueChanged(int)));
	m_RadiusSlider->setMinimum(1);
	m_RadiusSlider->setMaximum(6);
	m_RadiusSlider->setValue(2);
	SliderValueChanged(2);

	connect(this->m_RangeCheckBox, SIGNAL(toggled(bool)), this, SIGNAL(RangeDataCheckBoxChanged(bool)));

	// Enabled by default
	this->m_RangeCheckBox->setChecked(true);
}


CUDAMedianFilterWidget::~CUDAMedianFilterWidget()
{
}


void
CUDAMedianFilterWidget::SliderValueChanged(int value)
{
	m_RadiusLabel->setText(QString::number(value*2+1)+" x "+QString::number(value*2+1));
	emit RadiusChanged((unsigned int)value);
}

