#ifndef GROUPSWIDGET_H
#define GROUPSWIDGET_H

#include "button.h"


class GroupsWidget: public QWidget {
	Q_OBJECT
public:
	explicit GroupsWidget(QWidget * parent = 0);
	~GroupsWidget();
	
	void setGroupsCount(int cnt);
	int groupsCount() const;
	void setGroupsU(ushort g);
	ushort groupsU() const;
	void setGroups(QByteArray d);
	PIBitArray groups() const;
	bool contains(int group) const;
	void setButton(int index, bool on);
	bool isNull() const;
	
private:
	QVector<SHSButton * > buttons;
	mutable PIBitArray bits;
	QStyle * fusion;
	
public slots:

private slots:

signals:
	void changed();
	
};

#endif // GROUPSWIDGET_H
