#ifndef SHOWHIDEWIDGET_H
#define SHOWHIDEWIDGET_H

#include <QWidget>
class QHBoxLayout;
class QPushButton;
class QCheckBox;

class ShowHideWidget : public QWidget
{
    Q_OBJECT
public:
    explicit ShowHideWidget(QWidget *parent = 0);

    void setCategories(QStringList c);
    QStringList categories() const;

signals:
    void buttonToggled(int id, bool isChecked);

private slots:
    void showAll();
    void hideAll();
    void checkBoxClicked(bool isChecked);

private:
    void createButtons();
    void clearList();
    void setupList();
    void layoutInterface();

    QStringList myCategories;

    QList<QHBoxLayout*> rows;
    QHBoxLayout *buttonLayout;
    QPushButton *showAllButton;
    QPushButton *hideAllButton;

    QList<QCheckBox*> categoryCheckBoxList;
    QList<QCheckBox*> checkBoxList;
};

#endif // SHOWHIDEWIDGET_H
