53 lines
1.1 KiB
C
53 lines
1.1 KiB
C
|
#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
|