tool.h 716 B

1234567891011121314151617181920212223242526
  1. #ifndef TOOL_H
  2. #define TOOL_H
  3. #include <QDialog>
  4. #include<QAbstractButton>
  5. #include <QFile>
  6. #include <QJsonDocument>
  7. #include <QJsonObject>
  8. #include "QtCore/qjsonarray.h"
  9. class tool
  10. {
  11. public:
  12. static QJsonArray getJsanArra(const QString& filePath);
  13. static void generateFolderJsonFile(const QString& folderPath, const QString& jsonFilePath);
  14. static QJsonObject generateFolderJson(const QString& folderPath);
  15. static QJsonObject readJsonFile(const QString& filePath);
  16. static QStringList getFilesInFolder(const QString& folderPath);
  17. static const QString dir_path;
  18. tool(){}
  19. static bool writeJsonFile(const QString& fileName, const QJsonObject& jsonObject);
  20. private:
  21. };
  22. #endif // TOOL_H