#ifndef CAT_H
#define CAT_H
#include <QObject>
#define ENUM_NAME(o,e,v) (o::staticMetaObject.enumerator(o::staticMetaObject.indexOfEnumerator(#e)).valueToKey((v)))
{
Q_OBJECT
Q_ENUMS(CatType)
public:
enum CatType{MAIDANEZA,CHARTREUX,PERSIAN};
CatType Kind;
{
qDebug()<<QString("THIS IS A CAT TAG");
strTag += ENUM_NAME(Cat,Cat::CatType,this->Kind);
return strTag;
};
};
#endif // CAT_H
#ifndef CAT_H
#define CAT_H
#include <QObject>
#define ENUM_NAME(o,e,v) (o::staticMetaObject.enumerator(o::staticMetaObject.indexOfEnumerator(#e)).valueToKey((v)))
class Cat:public QObject
{
Q_OBJECT
Q_ENUMS(CatType)
public:
enum CatType{MAIDANEZA,CHARTREUX,PERSIAN};
explicit Cat(QString name,CatType type,QObject *parent = 0):QObject(parent),Name(name),Kind(type){};
CatType Kind;
QString Name;
QString GetTag()
{
qDebug()<<QString("THIS IS A CAT TAG");
QString strTag = this->Name;
strTag += ENUM_NAME(Cat,Cat::CatType,this->Kind);
return strTag;
};
};
#endif // CAT_H
To copy to clipboard, switch view to plain text mode
Bookmarks