#ifndef PARAM_DETAILS_WIDGET_H
#define PARAM_DETAILS_WIDGET_H

#include <QtGui>
#include "ui_paramDetailsWidget.h"

class ParamDetailsWidget : public QWidget {
	Q_OBJECT

private:
	Ui::ParamDetailsWidget ui_;
public:
	ParamDetailsWidget(QWidget * parent) : QWidget(parent) {
		ui_.setupUi(this);
	}

	void setName(const std::wstring & name) {
		ui_.nameButton->setText(QString::fromUtf16(name.c_str()));
	}

	void setButtonIcon(const std::string & path, int width, int height) {
        QIcon icon;
		icon.addFile(QString::fromUtf8(path.c_str()), QSize(), QIcon::Normal, QIcon::Off);

        ui_.nameButton->setIcon(icon);
        ui_.nameButton->setIconSize(QSize(width, height));
	}

	void setDescription(const std::wstring & desc) {
		ui_.descriptionLabel->setText(QString::fromUtf16(desc.c_str()));
	}

	void setLimits(unsigned long long minimum, unsigned long long maximum) {
		ui_.valueSlider->setLimits(minimum, maximum);
	}

	void setValue(unsigned long long value) {
		ui_.valueSlider->setValue(value);
	}

	void setUnit(const std::wstring & unit) {
		ui_.valueSlider->setUnit(unit);
	}

	void setEnabledChanges(bool enabled) {
		ui_.valueSlider->setEnabled(enabled);
	}
};

#endif