2021-09-28 20:47:01 +00:00
|
|
|
#ifndef SETUP_H
|
|
|
|
#define SETUP_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QQmlEngine>
|
|
|
|
#include <QQmlContext>
|
|
|
|
|
|
|
|
#include <QDebug>
|
|
|
|
|
|
|
|
#define STR(x) #x
|
|
|
|
|
|
|
|
#ifdef PROJECT_PATH
|
|
|
|
#define PWD(x) STR(x)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class Setup : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit Setup(QObject *parent = nullptr);
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void qmlEngineAvailable(QQmlEngine *engine)
|
|
|
|
{
|
|
|
|
engine->rootContext()->setContextProperty("myContextProperty", QVariant(true));
|
2021-10-08 11:55:05 +00:00
|
|
|
engine->addImportPath(QString(PWD(PROJECT_PATH)) + "/status-desktop/ui/StatusQ/src");
|
2021-09-28 20:47:01 +00:00
|
|
|
engine->addImportPath(QString(PWD(PROJECT_PATH)) + "/status-desktop/ui/imports");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SETUP_H
|