#ifndef CLOAKING_WIDGET_H
#define CLOAKING_WIDGET_H

#include <QtGui>
#include "ui_cloakingWidget.h"
#include "softProj\clientServer\structs.h"
#include "softProj\Main\INotifyUpdate.h"

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

private:
	Ui::CloakingWidget ui_;

	QString weightUnit_;
	QString consumptionUnit_;

	cloaking_data 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:
	CloakingWidget(QWidget * parent);
	~CloakingWidget();

	void setState(const cloaking_data & details);
	void setAvailable(bool available);
	void notifyUpdate();
};

#endif