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

32 lines
628 B
C
Raw Permalink Normal View History

2021-03-01 16:24:40 +08:00
#ifndef FLEXLAYOUTSERVICE_H
#define FLEXLAYOUTSERVICE_H
#include <QObject>
#include <QQmlContext>
#include <QVariant>
#include <QtDebug>
2021-05-18 16:15:28 +08:00
#include "DoricExport.h"
2021-03-01 16:24:40 +08:00
#include "FlexLayoutConfig.h"
#include "FlexLayout.h"
#include "yoga/Yoga.h"
2021-05-18 16:15:28 +08:00
class DORIC_EXPORT FlexLayoutService : public QObject {
2021-03-01 16:24:40 +08:00
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