KJSEmbed::VariantBinding

Search for usage in LXR

KJSEmbed::VariantBinding Class Reference

#include <variant_binding.h>

Inheritance diagram for KJSEmbed::VariantBinding:

Public Member Functions

 VariantBinding (KJS::ExecState *exec, const QVariant &value)
 
QGenericArgument arg (const char *type) const
 
KJS::UString className () const override
 
void * pointer ()
 
void setValue (const QVariant &val)
 
KJS::UString toString (KJS::ExecState *) const override
 
template<typename T >
value () const
 
QVariant variant () const
 

Static Public Attributes

static const KJS::ClassInfo info = { "VariantBinding", nullptr, nullptr, nullptr }
 

Detailed Description

QVariant based binding.

This class wraps the implementation. You should never have to use this class directly instead use KJSEmbed::createVariant. QVariant bindinging implementation.

Definition at line 86 of file variant_binding.h.

Constructor & Destructor Documentation

◆ VariantBinding()

VariantBinding::VariantBinding ( KJS::ExecState exec,
const QVariant value 
)

Create a new binding implementation with a QVariant to wrap.

Definition at line 46 of file variant_binding.cpp.

Member Function Documentation

◆ arg()

QGenericArgument VariantBinding::arg ( const char *  type) const

Constructs a QGenericArgument that is used with QMetaObject::invokeMember.

Definition at line 77 of file variant_binding.cpp.

◆ setValue()

void VariantBinding::setValue ( const QVariant val)

Set the internal value of the QVariant.

Definition at line 72 of file variant_binding.cpp.

◆ value()

template<typename T >
T KJSEmbed::VariantBinding::value ( ) const
inline

Extract the actual value from the wrapper.

This method wraps QVariant::value, so it will support some aspects of casting. If the cast fails a default value of T will be returned.

Definition at line 110 of file variant_binding.h.

◆ variant()

QVariant VariantBinding::variant ( ) const

Return the wrapped QVariant.

Definition at line 67 of file variant_binding.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Nov 29 2023 04:01:06 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.