#ifndef PARAM_DETAILS_WIDGET_NO_MAXIMUM_H
#define PARAM_DETAILS_WIDGET_NO_MAXIMUM_H

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

class ParamDetailsWidgetNoMaximum : public QWidget {
	Q_OBJECT

private:
	Ui::ParamDetailsWidgetNoMaximum ui_;

	QString unit_;
public:
	ParamDetailsWidgetNoMaximum(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 setUnit(const std::wstring & unit) {
		unit_ = " " + QString::fromUtf16(unit.c_str());
	}

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

	void setValue(unsigned long long value) {
		ui_.valueLabel->setText(QString::number(value) + unit_);
	}

	void setValue(unsigned long value) {
		ui_.valueLabel->setText(QString::number(value) + unit_);
	}

	void setValue(double value) {
		ui_.valueLabel->setText(QString::number(value) + unit_);
	}
};

#endif