menugenerator.h

来自「c++的guiQt做的开发」· C头文件 代码 · 共 39 行

H
39
字号
#ifndef __MENUGENERATOR_H__#define __MENUGENERATOR_H__#include "staticsettings.h"#include <QMap>#include <QString>#include <QStringList>/** Generator, checker and translation generator of menu configuration<br> This is helper utility used to:<br>  - check menus for translatable strings and write them to .menu-trans.h,    so they will be found by lupdate utility<br>  - check menus for unreferenced items<br>  - generate initial menu (now obsolete)<br>*/class MenuGenerator {public: MenuGenerator(); ~MenuGenerator(); void check(); void translate(); static bool special(const QString &itemName);private: void addLocString(const QString &id,const QString &name); void setAvail(const QString &name);private: /** Settings object used to load configuration */ gui::StaticSettings *set; /** Installed toolbars */ QStringList tbs; /** Translation data */ QStringList trans; /** Reachable menu items */ QMap<QString,int> avail;};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?