#ifndef MULTIPARAM_DETAILS_WIDGET_H
#define MULTIPARAM_DETAILS_WIDGET_H

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

class MultiParamDetailsWidget : public QWidget {
	Q_OBJECT

private:
	Ui::MultiParamDetailsWidget ui_;

	QString unit1_;
	QString unit2_;
	QString unit3_;
	QString unit4_;
public:
	MultiParamDetailsWidget(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 setText1(const std::wstring & name) {
		ui_.param1Label->setText(QString::fromUtf16(name.c_str()));
	}

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

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

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

	void setValue1(unsigned long long value) {
		ui_.param1Value->setText(QString::number(value) + " " + unit1_);
	}

	void setValue1(unsigned long value) {
		ui_.param1Value->setText(QString::number(value) + " " + unit1_);
	}

	void setValue1(double value) {
		ui_.param1Value->setText(QString::number(value) + " " + unit1_);
	}

	void setValue2(unsigned long long value) {
		ui_.param2Value->setText(QString::number(value) + " " + unit2_);
	}

	void setValue2(unsigned long value) {
		ui_.param2Value->setText(QString::number(value) + " " + unit2_);
	}

	void setValue2(double value) {
		ui_.param2Value->setText(QString::number(value) + " " + unit2_);
	}

	void setValue3(unsigned long long value) {
		ui_.param3Value->setText(QString::number(value) + " " + unit3_);
	}

	void setValue3(unsigned long value) {
		ui_.param3Value->setText(QString::number(value) + " " + unit3_);
	}

	void setValue3(double value) {
		ui_.param3Value->setText(QString::number(value) + " " + unit3_);
	}

	void setValue4(unsigned long long value) {
		ui_.param4Value->setText(QString::number(value) + " " + unit4_);
	}

	void setValue4(unsigned long value) {
		ui_.param4Value->setText(QString::number(value) + " " + unit4_);
	}

	void setValue4(double value) {
		ui_.param4Value->setText(QString::number(value) + " " + unit4_);
	}

	void setUnit1(const std::wstring & unit) {
		unit1_ = QString::fromUtf16(unit.c_str());
	}

	void setUnit2(const std::wstring & unit) {
		unit2_ = QString::fromUtf16(unit.c_str());
	}

	void setUnit3(const std::wstring & unit) {
		unit3_ = QString::fromUtf16(unit.c_str());
	}

	void setUnit4(const std::wstring & unit) {
		unit4_ = QString::fromUtf16(unit.c_str());
	}
};

#endif