#ifndef PQGROUPBOX_H
#define PQGROUPBOX_H

#include <QGroupBox>
#include "classes/pqwidget.h"

class PQGroupBox;
class PQGroupBox : public QGroupBox {
    Q_OBJECT
    PQ_WIDGET_EX(QGroupBox)

    Q_PROPERTY( QString title READ title WRITE setTitle )
    Q_PROPERTY( bool checked READ isChecked WRITE setChecked )
    Q_PROPERTY( bool checkable READ isCheckable WRITE setCheckable )
    Q_PROPERTY( bool flat READ isFlat WRITE setFlat )

public:
    Q_INVOKABLE explicit PQGroupBox(QWidget * parent=0);
    virtual ~PQGroupBox();

    Q_INVOKABLE QString title();
    Q_INVOKABLE bool isChecked();
    Q_INVOKABLE bool isCheckable();
    Q_INVOKABLE bool isFlat();

public Q_SLOTS:
    Q_INVOKABLE void setTitle(QString title);
    Q_INVOKABLE void setChecked(bool b);
    Q_INVOKABLE void setCheckable(bool b);
    Q_INVOKABLE void setFlat(bool b);

    void clicked_pslot(bool checked);
    void clicked_pslot();
    void toggled_pslot(bool on);

    PQ_ON_SIGNAL_DECL_START
        PQ_ON_SIGNAL(clicked_pslot(bool));
        PQ_ON_SIGNAL(toggled_pslot(bool));
        PQWIDGET_ON_SIGNALS();
    PQ_ON_SIGNAL_DECL_END
};


#endif // PQGROUPBOX_H
