Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QDesignerMetaPropertyInterface Class Referenceabstract

QDesignerMetaPropertyInterface is part of \QD's introspection interface and represents a property. More...

#include <abstractintrospection_p.h>

+ Collaboration diagram for QDesignerMetaPropertyInterface:

Public Types

enum  Kind { EnumKind , FlagKind , OtherKind }
 This enum indicates whether the property is of a special type. More...
 
enum  AccessFlag { ReadAccess = 0x0001 , WriteAccess = 0x0002 , ResetAccess = 0x0004 }
 These flags specify the access the property provides. More...
 
enum  Attribute { DesignableAttribute = 0x0001 , ScriptableAttribute = 0x0002 , StoredAttribute = 0x0004 , UserAttribute = 0x0008 }
 Various attributes of the property. More...
 

Public Member Functions

 QDesignerMetaPropertyInterface ()
 Constructs a QDesignerMetaPropertyInterface object.
 
virtual ~QDesignerMetaPropertyInterface ()
 Destroys the QDesignerMetaPropertyInterface object.
 
virtual const QDesignerMetaEnumInterfaceenumerator () const =0
 Returns the enumerator if this property's type is an enumerator type;.
 
virtual Kind kind () const =0
 Returns the type of the property.
 
virtual AccessFlags accessFlags () const =0
 Returns a combination of access flags.
 
virtual Attributes attributes () const =0
 Returns the attributes of the property.
 
virtual int type () const =0
 Returns the type of the property.
 
virtual QString name () const =0
 Returns the name of the property.
 
virtual QString typeName () const =0
 Returns the name of this property's type.
 
virtual int userType () const =0
 Returns this property's user type.
 
virtual bool hasSetter () const =0
 Returns whether getter and setter methods exist for this property.
 
virtual QVariant read (const QObject *object) const =0
 Reads the property's value from the given object.
 
virtual bool reset (QObject *object) const =0
 Resets the property for the given object with a reset method.
 
virtual bool write (QObject *object, const QVariant &value) const =0
 Writes value as the property's value to the given object.
 

Detailed Description

QDesignerMetaPropertyInterface is part of \QD's introspection interface and represents a property.

Since
4.4

\inmodule QtDesigner

The QDesignerMetaPropertyInterface class provides meta-data about a property.

See also
QDesignerMetaObjectInterface

Definition at line 45 of file abstractintrospection_p.h.

Member Enumeration Documentation

◆ AccessFlag

These flags specify the access the property provides.

\value ReadAccess Property can be read \value WriteAccess Property can be written \value ResetAccess Property can be reset to a default value

Enumerator
ReadAccess 
WriteAccess 
ResetAccess 

Definition at line 51 of file abstractintrospection_p.h.

◆ Attribute

Various attributes of the property.

\value DesignableAttribute Property is designable (visible in \QD) \value ScriptableAttribute Property is scriptable \value StoredAttribute Property is stored, that is, not calculated \value UserAttribute Property is the property that the user can edit for the QObject

Enumerator
DesignableAttribute 
ScriptableAttribute 
StoredAttribute 
UserAttribute 

Definition at line 52 of file abstractintrospection_p.h.

◆ Kind

This enum indicates whether the property is of a special type.

\value EnumKind The property is of an enumeration type \value FlagKind The property is of an flag type \value OtherKind The property is of another type

Enumerator
EnumKind 
FlagKind 
OtherKind 

Definition at line 50 of file abstractintrospection_p.h.

Constructor & Destructor Documentation

◆ QDesignerMetaPropertyInterface()

QDesignerMetaPropertyInterface::QDesignerMetaPropertyInterface ( )
default

Constructs a QDesignerMetaPropertyInterface object.

◆ ~QDesignerMetaPropertyInterface()

QDesignerMetaPropertyInterface::~QDesignerMetaPropertyInterface ( )
virtualdefault

Destroys the QDesignerMetaPropertyInterface object.

Member Function Documentation

◆ accessFlags()

virtual AccessFlags QDesignerMetaPropertyInterface::accessFlags ( ) const
pure virtual

Returns a combination of access flags.

◆ attributes()

virtual Attributes QDesignerMetaPropertyInterface::attributes ( ) const
pure virtual

Returns the attributes of the property.

◆ enumerator()

virtual const QDesignerMetaEnumInterface * QDesignerMetaPropertyInterface::enumerator ( ) const
pure virtual

Returns the enumerator if this property's type is an enumerator type;.

◆ hasSetter()

virtual bool QDesignerMetaPropertyInterface::hasSetter ( ) const
pure virtual

Returns whether getter and setter methods exist for this property.

◆ kind()

virtual Kind QDesignerMetaPropertyInterface::kind ( ) const
pure virtual

Returns the type of the property.

◆ name()

virtual QString QDesignerMetaPropertyInterface::name ( ) const
pure virtual

Returns the name of the property.

Referenced by testing.tools.encode_pdf_filter._PdfStream::RegisterByName().

+ Here is the caller graph for this function:

◆ read()

virtual QVariant QDesignerMetaPropertyInterface::read ( const QObject * object) const
pure virtual

Reads the property's value from the given object.

Returns the value if it was able to read it; otherwise returns an invalid variant.

◆ reset()

virtual bool QDesignerMetaPropertyInterface::reset ( QObject * object) const
pure virtual

Resets the property for the given object with a reset method.

Returns true if the reset worked; otherwise returns false.

◆ type()

virtual int QDesignerMetaPropertyInterface::type ( ) const
pure virtual

Returns the type of the property.

See also
QMetaType::Type

◆ typeName()

virtual QString QDesignerMetaPropertyInterface::typeName ( ) const
pure virtual

Returns the name of this property's type.

◆ userType()

virtual int QDesignerMetaPropertyInterface::userType ( ) const
pure virtual

Returns this property's user type.

◆ write()

virtual bool QDesignerMetaPropertyInterface::write ( QObject * object,
const QVariant & value ) const
pure virtual

Writes value as the property's value to the given object.

Returns true if the write succeeded; otherwise returns false.


The documentation for this class was generated from the following files: