Crossfire Resources Editor
AssetWrapper.h File Reference
#include <QObject>
#include <QIcon>
+ Include dependency graph for AssetWrapper.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  AssetTWrapper< T >
 Base class for assets mapping to a native Crossfire structure. More...
 
class  AssetWrapper
 Base class for all assets that can be displayed or edited by CRE. More...
 

Macros

#define ATW_PROP(type_, name_, field_)
 Macro to add a read-write property from myWrappedItem. More...
 
#define ATW_RPROP(type_, name_, field_)
 Macro to add a read-only property from myWrappedItem. More...
 

Macro Definition Documentation

◆ ATW_PROP

#define ATW_PROP (   type_,
  name_,
  field_ 
)
Value:
public: \
type_ name_() const { return myWrappedItem->field_; } \
void name_(const type_ &val) { myWrappedItem->field_ = val; } \
Q_PROPERTY(type_ name_ READ name_ WRITE name_)

Macro to add a read-write property from myWrappedItem.

Will generate functions to get and set the property.

Parameters
type_property type.
name_property name.
field_field of myWrappedItem to use.

Definition at line 132 of file AssetWrapper.h.

◆ ATW_RPROP

#define ATW_RPROP (   type_,
  name_,
  field_ 
)
Value:
public: \
type_ name_() const { return myWrappedItem->field_; } \
Q_PROPERTY(type_ name_ READ name_)

Macro to add a read-only property from myWrappedItem.

Will generate a function to get the property.

Parameters
type_property type.
name_property name.
field_field of myWrappedItem to use.

Definition at line 120 of file AssetWrapper.h.