File chinchilla.h¶
File List > animal > chinchilla.h
Go to the documentation of this file
#include <QObject>
class CuteChinchilla : public QObject
{
Q_OBJECT
Q_PROPERTY(int weight READ weight WRITE setWeight NOTIFY weightChanged);
public:
enum class Species {
ChinchillaChinchilla,
ChinchillaLanigera
};
CuteChinchilla() { m_weight = 0; }
int weight() const { return m_weight; }
public slots:
void setWeight(int weight);
signals:
void weightChanged(int newWeight);
private slots:
void foo();
private:
int m_weight;
};