Files
picpanel/core_support/fileconfigdecode/fileconfigdecode.h
2025-03-24 02:04:00 +08:00

54 lines
1.1 KiB
C++

#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