fileconfigdecode.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef FILECONFIGDECODE_H
  2. #define FILECONFIGDECODE_H
  3. #include <QObject>
  4. #include <QStandardPaths>
  5. #include <QFile>
  6. #include <QSettings>
  7. #include <QFileInfo>
  8. #include <QTextCodec>
  9. class FileConfigDecode
  10. {
  11. public:
  12. FileConfigDecode();
  13. ~FileConfigDecode();
  14. QString getAddress();
  15. quint16 getPort();
  16. bool getAutoSetup();
  17. bool getRename();
  18. bool getTimeRename();
  19. bool getAutoCopy();
  20. void setAddress(QString value);
  21. void setPort(quint16 value);
  22. void setAutoSetup(bool value);
  23. void setRename(bool value);
  24. void setTimeRename(bool value);
  25. void setAutoCopy(bool value);
  26. private:
  27. QString address;
  28. quint16 port;
  29. bool autoSetup;
  30. bool rename;
  31. bool timeRename;
  32. bool autoCopy;
  33. bool firstCreate;
  34. void fileWrite(QString path, QString address, quint16 port, bool autosetup, bool rename, bool timerename, bool autocopy);
  35. private:
  36. void initFile();
  37. void checkConfig();
  38. void updateFile();
  39. // void initForm();
  40. };
  41. #endif // FILECONFIGDECODE_H