libdrmconf  0.11.3
A library to program DMR radios.
Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
ConfigObjectReference Class Reference

Implements a reference to a config object. More...

#include <configreference.hh>

Inheritance diagram for ConfigObjectReference:
Inheritance graph
[legend]
Collaboration diagram for ConfigObjectReference:
Collaboration graph
[legend]

Signals

void modified ()
 Gets emitted if the reference is changed. More...
 

Public Member Functions

bool isNull () const
 Returns true if the reference is null. More...
 
virtual void clear ()
 Resets the reference. More...
 
virtual bool set (ConfigObject *object)
 Sets the reference. More...
 
virtual bool copy (const ConfigObjectReference *ref)
 Copies the reference from another reference.
 
virtual bool allow (const QMetaObject *elementType)
 Adds a possible type to this reference.
 
const QStringList & elementTypeNames () const
 Returns the type names of allowed objects.
 
template<class Type >
Type * as () const
 Returns the reference as the specified type.
 
template<class Type >
bool is () const
 Returns true if the reference is of the specified type.
 
int compare (const ConfigObjectReference &other) const
 Compares the references.
 

Protected Slots

void onReferenceDeleted (QObject *obj)
 Internal call back whenever the referenced object gets deleted.
 

Protected Member Functions

 ConfigObjectReference (const QMetaObject &elementType=ConfigObject::staticMetaObject, QObject *parent=nullptr)
 Hidden constructor.
 

Protected Attributes

QStringList _elementTypes
 Holds the static QMetaObject of the possible element types.
 
ConfigObject_object
 The reference to the object.
 

Detailed Description

Implements a reference to a config object.

This class is only used to implement the automatic generation/parsing of the YAML codeplug files.

Member Function Documentation

◆ clear()

void ConfigObjectReference::clear ( )
virtual

Resets the reference.

Same as set(nullptr).

◆ isNull()

bool ConfigObjectReference::isNull ( ) const

Returns true if the reference is null.

That is, if there is no object referenced.

◆ modified

void ConfigObjectReference::modified ( )
signal

Gets emitted if the reference is changed.

This signal is not emitted if the referenced object is modified.

◆ set()

bool ConfigObjectReference::set ( ConfigObject object)
virtual

Sets the reference.

If set to nullptr, the reference gets cleared.


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