phonon/phonondefs.h File Reference

phonondefs.h File Reference
#include <QtCore/QtGlobal>
#include "phonon_export.h"

Macros

#define K_DECLARE_PRIVATE(Class)
 
#define PHONON_ABSTRACTBASE(classname)
 
#define PHONON_OBJECT(classname)
 
#define PHONON_HEIR(classname)
 

Macro Definition Documentation

#define K_DECLARE_PRIVATE (   Class)
Value:
inline Class##Private* k_func() { return reinterpret_cast<Class##Private *>(k_ptr); } \
inline const Class##Private* k_func() const { return reinterpret_cast<const Class##Private *>(k_ptr); } \
friend class Class##Private;

Definition at line 46 of file phonondefs.h.

#define PHONON_ABSTRACTBASE (   classname)
Value:
protected: \ \
classname(classname ## Private &dd, QObject *parent); \
private:

Used in class declarations to provide the needed functions. This is used for abstract base classes.

Parameters
classnameThe Name of the class this macro is used for.

Example:

1 class AbstractEffect : public QObject
2 {
3  Q _OBJECT
4  Q_PROPERTY(int propertyA READ propertyA WRITE setPropertyA)
5  PHONON_ABSTRACTBASE(AbstractEffect)
6  public:
7  int propertyA() const;
8  void setPropertyA(int);
9 };
See also
PHONON_OBJECT
PHONON_HEIR

Definition at line 74 of file phonondefs.h.

#define PHONON_OBJECT (   classname)
Value:
public: \ \
classname(QObject *parent = 0); \
private:

Used in class declarations to provide the needed functions. This is used for classes that inherit QObject directly.

Parameters
classnameThe Name of the class this macro is used for.

Example:

1 class EffectSettings : public QObject
2 {
3  Q _OBJECT
4  Q_PROPERTY(int propertyA READ propertyA WRITE setPropertyA)
5  PHONON_OBJECT(EffectSettings)
6  public:
7  int propertyA() const;
8  void setPropertyA(int);
9 };
See also
PHONON_ABSTRACTBASE
PHONON_HEIR

Definition at line 108 of file phonondefs.h.

#define PHONON_HEIR (   classname)
Value:
public: \ \
classname(QObject *parent = 0); \

Used in class declarations to provide the needed functions. This is used for classes that inherit another Phonon object.

Parameters
classnameThe Name of the class this macro is used for.

Example:

1 class ConcreteEffect : public AbstractEffect
2 {
3  Q _OBJECT
4  Q_PROPERTY(int propertyB READ propertyB WRITE setPropertyB)
5  PHONON_HEIR(ConcreteEffect)
6  public:
7  int propertyB() const;
8  void setPropertyB(int);
9 };
See also
PHONON_ABSTRACTBASE
PHONON_OBJECT

Definition at line 139 of file phonondefs.h.

Go to the source code of this file.