ctkTestWrappedQInvokable.h 505 B

12345678910111213141516171819202122232425262728
  1. #ifndef __ctkTestWrappedQInvokable_h
  2. #define __ctkTestWrappedQInvokable_h
  3. // Qt includes
  4. #include <QObject>
  5. class ctkTestWrappedQInvokable : public QObject
  6. {
  7. Q_OBJECT
  8. public:
  9. ctkTestWrappedQInvokable(QObject * newParent = 0) : QObject(newParent)
  10. {
  11. this->Value = 0;
  12. }
  13. /// Example of method wrapped using Q_INVOKABLE
  14. Q_INVOKABLE int value() const { return this->Value; }
  15. Q_INVOKABLE void setValue(int newValue){ this->Value = newValue; }
  16. private:
  17. int Value;
  18. };
  19. #endif