You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

randommanager.cpp 282B

12345678910111213141516171819
  1. #include <time.h>
  2. #include "randommanager.h"
  3. RandomManager::RandomManager(QObject *parent) : InputManager(parent)
  4. {
  5. }
  6. bool RandomManager::init(const QVariant &)
  7. {
  8. srand(time(nullptr));
  9. return true;
  10. }
  11. QVariant RandomManager::read(const QVariant&)
  12. {
  13. return rand();
  14. }