2020-12-21 18:50:54 +08:00
|
|
|
#ifndef FILEUTILS_H
|
|
|
|
#define FILEUTILS_H
|
2020-12-24 11:06:19 +08:00
|
|
|
#include "gobject-template.h"
|
2020-12-21 18:50:54 +08:00
|
|
|
#include <QString>
|
|
|
|
#include <QCryptographicHash>
|
2020-12-24 11:06:19 +08:00
|
|
|
#include <QIcon>
|
2020-12-26 12:45:28 +08:00
|
|
|
#include <QMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-21 18:50:54 +08:00
|
|
|
|
|
|
|
class FileUtils
|
|
|
|
{
|
|
|
|
public:
|
2020-12-26 08:56:38 +08:00
|
|
|
static std::string makeDocUterm(QString );
|
2020-12-24 11:06:19 +08:00
|
|
|
|
|
|
|
static QIcon getFileIcon(const QString &, bool checkValid = true);
|
|
|
|
static QIcon getAppIcon(const QString &);
|
2020-12-25 19:16:44 +08:00
|
|
|
static QIcon getSettingIcon(const QString &, const bool&);
|
2020-12-24 11:06:19 +08:00
|
|
|
|
|
|
|
static QString getFileName(const QString &);
|
|
|
|
static QString getAppName(const QString &);
|
|
|
|
static QString getSettingName(const QString &);
|
2020-12-26 12:45:28 +08:00
|
|
|
|
|
|
|
static QMap<QString, QStringList> map_chinese2pinyin;
|
|
|
|
|
|
|
|
//chinese character to pinyin
|
|
|
|
static QString find(const QString&);
|
|
|
|
static void loadHanziTable(const QString&);
|
|
|
|
|
2020-12-21 18:50:54 +08:00
|
|
|
private:
|
|
|
|
FileUtils();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FILEUTILS_H
|