This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/example/doric/widget/flex/FlexLayoutService.h
2021-05-20 18:27:45 +08:00

30 lines
589 B
C++

#ifndef FLEXLAYOUTSERVICE_H
#define FLEXLAYOUTSERVICE_H
#include <QObject>
#include <QQmlContext>
#include <QVariant>
#include <QtDebug>
#include "FlexLayoutConfig.h"
#include "FlexLayout.h"
#include "yoga/Yoga.h"
class FlexLayoutService : public QObject {
Q_OBJECT
private:
FlexLayoutConfig *config;
public:
explicit FlexLayoutService(QObject *parent = nullptr);
virtual ~FlexLayoutService();
public slots:
QVariant createConfig();
QVariant createNode();
QVariant createNode(QVariant config);
void collectGarbage(QVariant rootNode);
};
#endif // FLEXLAYOUTSERVICE_H