32 #ifndef pqHelpWindowNoWebKit_h 33 #define pqHelpWindowNoWebKit_h 40 #include <QTextBrowser> 48 class pqTextBrowser :
public QTextBrowser
51 pqTextBrowser(QHelpEngine* helpEngine, QWidget* _parent = 0)
53 this->HelpEngine = helpEngine;
54 this->setParent(_parent);
55 this->setOpenLinks(
false);
58 static pqTextBrowser* newInstance(QHelpEngine* engine,
pqHelpWindow*
self)
60 pqTextBrowser* instance =
new pqTextBrowser(engine,
self);
61 self->connect(instance, SIGNAL(anchorClicked(
const QUrl&)), SLOT(showPage(
const QUrl&)));
64 void setUrl(
const QUrl& url)
71 QVariant loadResource(
int type,
const QUrl &url)
73 if (url.scheme() ==
"qthelp")
75 return QVariant(this->HelpEngine->fileData(url));
79 return QTextBrowser::loadResource(type, url);
82 QPointer<QHelpEngine> HelpEngine;
pqHelpWindow provides a assistant-like window for showing help provided by a QHelpEngine.