//
// Created by Krad on 2021/11/19.
//

#ifndef GUI_APPGLOBALVALUES_H
#define GUI_APPGLOBALVALUES_H

#define APP_VALUES()\
ADD_APP_VALUE(InProcessing)\
ADD_APP_VALUE(LastOperationTime)\
ADD_APP_VALUE(LastOperation)

#include <QApplication>
#include <QVariant>
#include <QString>
class AppGlobalValues {
public:
    #define ADD_APP_VALUE(name)\
    static QVariant name(){\
        return qApp->property(#name);\
    }\
    static void set##name(QVariant val){\
        qApp->setProperty(#name, val);\
    }

    APP_VALUES()

    #undef ADD_APP_VALUE
};


#endif //GUI_APPGLOBALVALUES_H
