fileconfigdecode.h 1.1 KB

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