#ifndef PQPROGRESSBAR
#define PQPROGRESSBAR

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

class PQProgressBar;
class PQProgressBar : public QProgressBar {
    Q_OBJECT
    PQ_WIDGET_EX(QProgressBar)

    Q_PROPERTY(int minimum READ minimum WRITE setMinimum)
    Q_PROPERTY(int maximum READ maximum WRITE setMaximum)
    Q_PROPERTY(int value READ value WRITE setValue)
    Q_PROPERTY(bool textVisible READ isTextVisible WRITE setTextVisible)
    Q_PROPERTY(int orientation READ orientation WRITE setOrientation)

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

    Q_INVOKABLE int minimum();
    Q_INVOKABLE int maximum();
    Q_INVOKABLE int value();
    Q_INVOKABLE bool isTextVisible();
    Q_INVOKABLE int orientation();

public Q_SLOTS:
    Q_INVOKABLE void setMinimum(int i);
    Q_INVOKABLE void setMaximum(int i);
    Q_INVOKABLE void setValue(int i);
    Q_INVOKABLE void setTextVisible(bool b);
    Q_INVOKABLE void setRange(int min, int max);
    Q_INVOKABLE void setOrientation(int i);

    void valueChanged_pslot(int value);

    PQ_ON_SIGNAL_DECL_START {
        PQ_ON_SIGNAL(valueChanged_pslot(int));
        PQWIDGET_ON_SIGNALS();
    } PQ_ON_SIGNAL_DECL_END
};

#endif // PQPROGRESSBAR

