add async result

This commit is contained in:
王劲鹏
2019-12-19 19:54:58 +08:00
parent 001eb4a963
commit 3b287974ab
8 changed files with 100 additions and 54 deletions

View File

@@ -1,10 +1,33 @@
#ifndef LAYER_H
#define LAYER_H
#include "QWidget"
#include <QPainter>
#include <QWidget>
class Layer : public QWidget {
void paintEvent(QPaintEvent *event) override {
QPainter painter(this);
QWidget::paintEvent(event);
}
public:
void setShadow(int sdColor, int sdOpacity, int sdRadius, int offsetX, int offsetY) {
}
void setBorder(int borderWidth, int borderColor) {
}
void setCornerRadius(int corner) {
}
void setCornerRadius(int leftTop, int rightTop, int rightBottom, int leftBottom) {
}
};
#endif // LAYER_H

View File

@@ -1,25 +0,0 @@
#ifndef SUPER_NODE_H
#define SUPER_NODE_H
#include <QJSValue>
#include <QMap>
#include <QtPlugin>
#include "view_node.h"
template <typename V>
class SuperNode : public ViewNode<V> {
private:
QMap<QString, QJSValue> subNodes;
protected:
bool reusable = false;
public:
virtual ~SuperNode() = default;
virtual ViewNode<V> *getSubNodeById(QString *id) = 0;
};
#endif // SUPER_NODE_H

View File

@@ -1,24 +0,0 @@
#ifndef VIEW_NODE_H
#define VIEW_NODE_H
#include <QDebug>
#include "context_holder.h"
class SuperNode;
template <class T>
class ViewNode : public ContextHolder {
protected:
T view;
private:
SuperNode *superNode;
QString *id;
public:
ViewNode(Context *context) : ContextHolder(context) {}
};
#endif // VIEW_NODE_H