ustfile.h 546 B

123456789101112131415161718192021222324252627282930
  1. #ifndef USTFILE_H
  2. #define USTFILE_H
  3. #include "INIFile.h"
  4. #include <QJsonArray>
  5. #include <QJsonObject>
  6. class USTFile : public INIFile
  7. {
  8. public:
  9. USTFile();
  10. QJsonArray json(){return _ust;}
  11. protected:
  12. void handleKey(QString key,QString value);
  13. void handleSection(QString section);
  14. bool writeOutputToStream();
  15. private:
  16. bool _isSetting=false;
  17. bool _isNote=false;
  18. int _noteCounter=-1;
  19. int _posPulses=0;
  20. float _tempo=120;
  21. QJsonArray _ust;
  22. QJsonObject _note;
  23. void genSetup();
  24. };
  25. #endif // USTFILE_H