#ifndef FLAGS_EDIT_H
#define FLAGS_EDIT_H

#include <QCheckBox>
#include <QMetaEnum>


class FlagsEdit: public QWidget {
	Q_OBJECT
public:
	explicit FlagsEdit(QWidget * parent = 0);
	~FlagsEdit() {_delete();}
	
	void setEnum(const QMetaEnum & e);
	void setFlags(int f);
	void setToolTip(int e, const QString & tt);
	int flags() const;
	
protected:
	void _delete();
	
	QList<QCheckBox * > _checks;
	int _value;
	
private slots:
	void setChecks();
	
};

#endif // FLAGS_EDIT_H
