📄 main.cpp
字号:
/****************************************************************************** * 光学字符识别程序 * 文件名:main.cpp * 功能 :主程序 * modified by PRTsinghua@hotmail.com******************************************************************************/#include <kcmdlineargs.h>#include <kaboutdata.h>#include <klocale.h>#include <kstandarddirs.h>#include "global.h"#include "kognition.h"static const char *description = I18N_NOOP("OCR");static KCmdLineOptions options[] ={ { "+[File]", I18N_NOOP("file to open"), 0 }, { 0, 0, 0 }};int main(int argc, char *argv[]){ KAboutData aboutData( "kognition", I18N_NOOP("Kognition"), VERSION, description, KAboutData::License_GPL, "PRTsinghua@hotmail.com", 0, "^_^", 0); aboutData.addAuthor("...",0, "..."); aboutData.addAuthor("...",0, "..."); KCmdLineArgs::init( argc, argv, &aboutData ); KCmdLineArgs::addCmdLineOptions( options ); KApplication app; char_db.read(locate("appdata", "char_data.dat")); // 加载模式数据库 word_dict.read(locate("appdata", "words_de.dat")); // 加载词表 if( app.isRestored() ) { RESTORE(KognitionApp); } else { KognitionApp *kognition = new KognitionApp(); kognition->show(); KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if( args->count() ) { kognition->openDocumentFile(args->arg(0)); } args->clear(); } return app.exec();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -