#include <QtGui>
#include "ui_shieldsWidget.h"
#include "softProj\DetailsWidget\ParamDetailsWidget.h"
#include "softProj\clientServer\structs.h"
#include "softProj\Main\INotifyUpdate.h"

///This widget is used for shield managment.
class ShieldsWidget : public NotifyWidget {
	Q_OBJECT

private:
	Ui::ShieldsWidget ui_;

	QString chargingSpeedUnit_;
	QString chargingLimitUnit_;
	QString leakUnit_;
	QString consumptionUnit_;

	ShieldsDetails state_;

	QString availableButtonStyle_;
	QString unavailableButtonStyle_;

	QString availableDamageStyle_;
	QString unavailableDamageStyle_;
signals:
	/** Signals that user wants to unmount item
	@param patternName Name of pattern for device to unmount
	*/
	void unmountSignal(const std::string & patternName);

	/** Signals that widget wants to show dialog */
	void showDialogSignal();

	/** Signals that widget wants to hide dialog */
	void hideDialogSignal();
private slots:
	/** Slot informing that user clicked button for unmounting */
	void unmountButtonClickedSlot(bool checked);
public:
	ShieldsWidget(QWidget * parent);
	~ShieldsWidget();

	void setState(const ShieldsDetails & details);

	void setAvailable(bool available);

	void notifyUpdate();
};