#ifndef PQDOCKWIDGET
#define PQDOCKWIDGET

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

class PQDockWidget;
class PQDockWidget : public QDockWidget {
    Q_OBJECT
    PQ_WIDGET_EX(QDockWidget)

    Q_PROPERTY( int allowedAreas READ allowedAreas WRITE setAllowedAreas)
    Q_PROPERTY( QWidget* widget READ widget WRITE setWidget)

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

    Q_INVOKABLE QWidget *widget();
    Q_INVOKABLE void setWidget(QWidget *widget);
    Q_INVOKABLE void setAllowedAreas(int areas);
    Q_INVOKABLE int allowedAreas();

public Q_SLOTS:
    void allowedAreasChanged_pslot(int allowedAreas);
    void dockLocationChanged_pslot(int area);
    void featuresChanged_pslot(int features);
    void topLevelChanged_pslot(bool topLevel);
    void visibilityChanged_pslot(bool visible);

    PQ_ON_SIGNAL_DECL_START
        PQ_ON_SIGNAL(allowedAreasChanged_pslot(int));
        PQ_ON_SIGNAL(dockLocationChanged_pslot(int));
        PQ_ON_SIGNAL(featuresChanged_pslot(int));
        PQ_ON_SIGNAL(topLevelChanged_pslot(bool));
        PQ_ON_SIGNAL(visibilityChanged_pslot(bool));
        PQWIDGET_ON_SIGNALS();
    PQ_ON_SIGNAL_DECL_END
};

#endif // PQDOCKWIDGET
