26 lines
912 B
C++
26 lines
912 B
C++
#ifndef QUICKHELPER_H
|
|
#define QUICKHELPER_H
|
|
|
|
#include "QObject"
|
|
|
|
class QQuickItem;
|
|
class QuickHelper
|
|
{
|
|
public:
|
|
QuickHelper();
|
|
|
|
static void updateElement(QObject *rootObject, const QString &elementName,
|
|
std::function<void(QObject*, std::function<void()>)> updateItemFunction,
|
|
std::function<void()> onClick);
|
|
|
|
static void clearChildren(QQuickItem *parentItem);
|
|
static void moveTextFiledX(QQuickItem *parentItem);
|
|
static QQuickItem * getQuickItem(QObject *rootObject, const QString &elementName);
|
|
static void addMouseArea(QObject *rootObject, std::function<void ()> onClickAction);
|
|
|
|
static void doFunction(QObject *rootObject, const QList<QVariant> &listItems, const QString &textFunction, const QString &functionName);
|
|
static void updateColor(QObject *rootObject, QColor disabledColor, QColor enabledColor);
|
|
};
|
|
|
|
#endif // QUICKHELPER_H
|