1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #ifndef FILECONFIGDECODE_H
- #define FILECONFIGDECODE_H
- #include <QObject>
- #include <QStandardPaths>
- #include <QFile>
- #include <QSettings>
- #include <QFileInfo>
- #if (QT_VERSION <= QT_VERSION_CHECK(6, 0, 0))
- #include <QTextCodec>
- #endif
- class FileConfigDecode
- {
- public:
- FileConfigDecode();
- ~FileConfigDecode();
- QString getAddress();
- quint16 getPort();
- bool getAutoSetup();
- bool getRename();
- bool getTimeRename();
- bool getAutoCopy();
- void setAddress(QString value);
- void setPort(quint16 value);
- void setAutoSetup(bool value);
- void setRename(bool value);
- void setTimeRename(bool value);
- void setAutoCopy(bool value);
- private:
- QString address;
- quint16 port;
- bool autoSetup;
- bool rename;
- bool timeRename;
- bool autoCopy;
- bool firstCreate;
- void fileWrite(QString path, QString address, quint16 port, bool autosetup, bool rename, bool timerename, bool autocopy);
- private:
- void initFile();
- void checkConfig();
- void updateFile();
- // void initForm();
- };
- #endif // FILECONFIGDECODE_H
|