cppbrowser.cpp
来自「qt-x11-free-3.0.3.tar.gz minigui图形界面工具」· C++ 代码 · 共 45 行
CPP
45 行
#include "cppbrowser.h"#include <qrichtext_p.h>#include <qprocess.h>#include <qmainwindow.h>#include <qstatusbar.h>#include <editor.h>CppEditorBrowser::CppEditorBrowser( Editor *e ) : EditorBrowser( e ){}void CppEditorBrowser::showHelp( const QString &w ){ QString word( w ); if ( word[ 0 ] == 'Q' ) { if ( word[ (int)word.length() - 1 ] == '&' || word[ (int)word.length() - 1 ] == '*' ) word.remove( word.length() - 1, 1 ); word = word.lower() + ".html"; QStringList lst; lst << "assistant" << word; QProcess proc( lst ); proc.start(); return; } if ( word.find( '(' ) != -1 ) { QString txt = "::" + word.left( word.find( '(' ) ); QTextDocument *doc = curEditor->document(); QTextParag *p = doc->firstParag(); while ( p ) { if ( p->string()->toString().find( txt ) != -1 ) { curEditor->setCursorPosition( p->paragId(), 0 ); return; } p = p->next(); } } QWidget *wid = curEditor->topLevelWidget(); if ( wid->inherits( "QMainWindow" ) ) ( (QMainWindow*)wid )->statusBar()->message( tr( "Nothing available for '%1'" ).arg( w ), 1500 );}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?