#ifndef PQDIALOG_H
#define PQDIALOG_H

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

class PQDialog;
class PQDialog : public QDialog {
    Q_OBJECT
    PQ_WIDGET_EX(QDialog)

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

    Q_INVOKABLE int exec();
    Q_INVOKABLE void open();
    Q_INVOKABLE void done(int result);
    Q_INVOKABLE void accept();
    Q_INVOKABLE void reject();

public Q_SLOTS:
    void accepted_pslot();
    void finished_pslot(int result);
    void rejected_pslot();

    PQ_ON_SIGNAL_DECL_START
        PQ_ON_SIGNAL(accepted_pslot());
        PQ_ON_SIGNAL(finished_pslot(int));
        PQ_ON_SIGNAL(rejected_pslot());
        PQWIDGET_ON_SIGNALS();
    PQ_ON_SIGNAL_DECL_END
};

#endif // PQDIALOG_H
