add slider, slider node & pure call response
This commit is contained in:
@@ -0,0 +1 @@
|
||||
#include "DoricSlideItemNode.h"
|
11
doric-Qt/example/doric/shader/slider/DoricSlideItemNode.h
Normal file
11
doric-Qt/example/doric/shader/slider/DoricSlideItemNode.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef DORICSLIDEITEMNODE_H
|
||||
#define DORICSLIDEITEMNODE_H
|
||||
|
||||
#include "shader/DoricStackNode.h"
|
||||
|
||||
class DoricSlideItemNode : public DoricStackNode {
|
||||
public:
|
||||
using DoricStackNode::DoricStackNode;
|
||||
};
|
||||
|
||||
#endif // DORICSLIDEITEMNODE_H
|
@@ -35,3 +35,12 @@ void DoricSliderNode::blendSubNode(QJsonValue subProperties) {
|
||||
void DoricSliderNode::blend(QJsonValue jsValue) {}
|
||||
|
||||
void DoricSliderNode::blend(QQuickItem *view, QString name, QJsonValue prop) {}
|
||||
|
||||
void DoricSliderNode::afterBlended(QJsonValue prop) {
|
||||
if (this->childNodes.length() != this->itemCount) {
|
||||
QVariantList args;
|
||||
args.append(this->childNodes.length());
|
||||
args.append(this->itemCount);
|
||||
this->pureCallJSResponse("renderBunchedItems", args);
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,19 @@
|
||||
#ifndef DORICSLIDERNODE_H
|
||||
#define DORICSLIDERNODE_H
|
||||
|
||||
#include "DoricSlideItemNode.h"
|
||||
#include "shader/DoricSuperNode.h"
|
||||
|
||||
class DoricSliderNode : public DoricSuperNode {
|
||||
|
||||
private:
|
||||
int itemCount = 0;
|
||||
QString renderPageFuncId;
|
||||
int batchCount = 15;
|
||||
QString onPageSelectedFuncId;
|
||||
bool loop = false;
|
||||
QList<DoricSlideItemNode *> childNodes;
|
||||
|
||||
public:
|
||||
using DoricSuperNode::DoricSuperNode;
|
||||
|
||||
@@ -17,6 +26,8 @@ public:
|
||||
virtual void blend(QJsonValue jsValue) override;
|
||||
|
||||
virtual void blend(QQuickItem *view, QString name, QJsonValue prop) override;
|
||||
|
||||
virtual void afterBlended(QJsonValue prop) override;
|
||||
};
|
||||
|
||||
#endif // DORICSLIDERNODE_H
|
||||
|
Reference in New Issue
Block a user