Crossfire Server, Trunk
HelpBrowser.cpp
Go to the documentation of this file.
1 /*
2  * Crossfire -- cooperative multi-player graphical RPG and adventure game
3  *
4  * Copyright (c) 2022 the Crossfire Development Team
5  *
6  * Crossfire is free software and comes with ABSOLUTELY NO WARRANTY. You are
7  * welcome to redistribute it under certain conditions. For details, please
8  * see COPYING and LICENSE.
9  *
10  * The authors can be reached via e-mail at <crossfire@metalforge.org>.
11  */
12 
13 #include "HelpBrowser.h"
14 #include <QHelpEngine>
15 
16 HelpBrowser::HelpBrowser(QHelpEngine* helpEngine, QWidget* parent) : QTextBrowser(parent), helpEngine(helpEngine) {
17 }
18 
19 QVariant HelpBrowser::loadResource(int, const QUrl &name) {
20  if (name.scheme() == "qthelp") {
21  return QVariant(helpEngine->fileData(name));
22  }
23  return QVariant();
24 }
HelpBrowser.h
HelpBrowser::HelpBrowser
HelpBrowser(QHelpEngine *helpEngine, QWidget *parent=0)
Definition: HelpBrowser.cpp:16
HelpBrowser::loadResource
virtual QVariant loadResource(int type, const QUrl &name) override
Definition: HelpBrowser.cpp:19
HelpBrowser::helpEngine
QHelpEngine * helpEngine
Definition: HelpBrowser.h:27
give.name
name
Definition: give.py:27