#ifndef PQWINDOW_H
#define PQWINDOW_H

#include <QWindow>
#include "classes/pqobject.h"

#define PQ_WINDOW\
    Q_PROPERTY( QString title READ title WRITE setTitle ) \
    Q_PROPERTY( QString icon READ icon WRITE setIcon ) \
    Q_PROPERTY( int flags READ flags WRITE setFlags ) \
    Q_PROPERTY( double opacity READ opacity WRITE setOpacity ) \
    Q_PROPERTY( int windowState READ windowState WRITE setWindowState ) \
    Q_PROPERTY( int modality READ modality WRITE setModality ) \
    Q_PROPERTY( QRect frameGeometry READ frameGeometry ) \
    Q_PROPERTY( QRect geometry READ geometry WRITE setGeometry ) \
public:\
    Q_INVOKABLE QString title();\
    Q_INVOKABLE QString windowIcon();\
    Q_INVOKABLE double opacity();\
    Q_INVOKABLE int windowState();\
    Q_INVOKABLE int modality();\
    Q_INVOKABLE int flags();\
    Q_INVOKABLE QRect frameGeometry();\
    Q_INVOKABLE QRect geometry();\
    Q_INVOKABLE void setGeometry(int x, int y, int w, int h);\
    Q_INVOKABLE void setGeometry(const QRect &rect);\
    Q_INVOKABLE QString icon();\
public Q_SLOTS:\
    Q_INVOKABLE void setOpacity(double val);\
    Q_INVOKABLE void setWindowState(int i);\
    Q_INVOKABLE void setModality(int i);\
    Q_INVOKABLE void setFlags(int i);\
    Q_INVOKABLE void setTitle(QString text);\
    Q_INVOKABLE void setIcon(QString iconPath);\
private: \
    QString mWindowIconPath = "";

class PQWindow : public QWindow {
    Q_OBJECT
    PQ_OBJECT_EX(QWindow)
    PQ_WINDOW

public:
    Q_INVOKABLE explicit PQWindow(QWindow *parent = 0);
    virtual ~PQWindow();

    PQ_ON_SIGNAL_DECL_START {
    } PQ_ON_SIGNAL_DECL_END

};

#endif // PQWINDOW_H
