4#ifndef QV4SEQUENCEWRAPPER_P_H
5#define QV4SEQUENCEWRAPPER_P_H
18#include <QtCore/qglobal.h>
19#include <QtCore/qvariant.h>
20#include <QtQml/qqml.h>
22#include <private/qv4referenceobject_p.h>
23#include <private/qv4value_p.h>
24#include <private/qv4object_p.h>
56 void init(QMetaType listType, QMetaSequence metaSequence,
const void *container);
57 void init(QMetaType listType, QMetaSequence metaSequence,
const void *container,
58 Object *object,
int propertyIndex, Heap::ReferenceObject::Flags flags);
63 bool hasData()
const {
return m_container !=
nullptr; }
67 bool isReadOnly()
const {
return m_object && !canWriteBack(); }
77 void initTypes(QMetaType listType, QMetaSequence metaSequence);
80 const QtPrivate::QMetaTypeInterface *m_listType;
81 const QtMetaContainerPrivate::QMetaSequenceInterface *m_metaSequence;
121#define QT_DECLARE_SEQUENTIAL_CONTAINER(LOCAL, FOREIGN, VALUE)
126 QML_SEQUENTIAL_CONTAINER(VALUE)
128 QML_ADDED_IN_VERSION(2
, 0
)
135QT_DECLARE_SEQUENTIAL_CONTAINER(QStdRealVectorForeign, std::vector<qreal>, QT_COORD_TYPE);
136QT_DECLARE_SEQUENTIAL_CONTAINER(QRealListForeign, QList<qreal>, QT_COORD_TYPE);
149#undef QT_DECLARE_SEQUENTIAL_CONTAINER
Combined button and popup list for selecting options.
static void generateWarning(QV4::ExecutionEngine *v4, const QString &description)
static QV4::ReturnedValue method_set_length(const FunctionObject *f, const Value *thisObject, const Value *argv, int argc)
static QV4::ReturnedValue method_get_length(const FunctionObject *b, const Value *thisObject, const Value *, int)
static ReturnedValue doGetIndexed(const Sequence *s, qsizetype index)
void convertAndDo(const QVariant &item, const QMetaType v, Action action)
bool convertToIterable(QMetaType metaType, void *data, QV4::Object *sequence)
SequenceOwnPropertyKeyIterator * containerOwnPropertyKeys(const Object *m, Value *target)
#define QT_DECLARE_SEQUENTIAL_CONTAINER(LOCAL, FOREIGN, VALUE)
Sequence * detached() const
void init(QMetaType listType, QMetaSequence metaSequence, const void *container)
QVariant toVariant() const
void init(QMetaType listType, QMetaSequence metaSequence, const void *container, Object *object, int propertyIndex, Heap::ReferenceObject::Flags flags)
QMetaType valueMetaType() const
const void * storagePointer() const
QMetaType listType() const
bool setVariant(const QVariant &variant)
QMetaSequence metaSequence() const
PropertyKey next(const Object *o, Property *pd=nullptr, PropertyAttributes *attrs=nullptr) override
~SequenceOwnPropertyKeyIterator() override=default