#ifndef PQMENUBAR_H
#define PQMENUBAR_H

#include <QMenuBar>
#include "classes/pqwidget.h"
#include "classes/pqmenu.h"

class PQMenuBar;
class PQMenuBar : public QMenuBar {
    Q_OBJECT
    PQ_WIDGET_EX(QMenuBar)

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

    Q_INVOKABLE QMenu *addMenu(const QString &title);
    Q_INVOKABLE QMenu *addMenu(const QString &iconPath, const QString &title);
    Q_INVOKABLE void addMenu(PQMenu *menu);

public Q_SLOTS:
    void hovered_pslot(QAction *action);
    void triggered_pslot(QAction *action);

    PQ_ON_SIGNAL_DECL_START {
        PQ_ON_SIGNAL(hovered_pslot(QAction*));
        PQ_ON_SIGNAL(triggered_pslot(QAction*));
        PQWIDGET_ON_SIGNALS();
    } PQ_ON_SIGNAL_DECL_END
};

Q_DECLARE_METATYPE(QMenuBar*)
Q_DECLARE_METATYPE(PQMenuBar*)

#endif // PQMENUBAR_H
