yhkylin-backup-tools/kybackup/functypeconverter.h

53 lines
1.1 KiB
C
Raw Normal View History

2021-09-16 16:05:46 +08:00
#ifndef FUNCTYPECONVERTER_H
#define FUNCTYPECONVERTER_H
#include <QObject>
#include <QMetaEnum>
class FuncTypeConverter : public QObject
{
Q_OBJECT
public:
explicit FuncTypeConverter();
~FuncTypeConverter();
public:
// 枚举值对应的枚举变量名
QString keycodeTokeystring(int code);
// 枚举变量名对应的枚举值
int keystringTokeycode(QString string);
/**
* @brief
* @param code
* @return
*/
QString keycodeTokeyi18nstring(int code);
/**
* @brief
* @param code
* @return
*/
QString keycodeToThemeIconString(int code);
public:
QMetaEnum m_metaModule;
/**
* @brief
*/
enum FunType{
BACKUP_SYSTEM,
RESTORE_SYSTEM,
BACKUP_DATA,
RESTORE_DATA,
OPERATION_LOG,
GHOST_IMAGE,
TOTALMODULES,
};
Q_ENUM(FunType)
};
#endif // FUNCTYPECONVERTER_H