forked from qt-creator/qt-creator
Help: Move viewer backend management from plugin to local help manager
which poses as a settings class. Change-Id: Icb01f0d4750c2d197875954a648ae7358c4c217a Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <coreplugin/helpmanager.h>
|
||||
#include <utils/optional.h>
|
||||
|
||||
#include <QMetaType>
|
||||
#include <QMutex>
|
||||
@@ -33,6 +34,8 @@
|
||||
#include <QUrl>
|
||||
#include <QStandardItemModel>
|
||||
|
||||
#include <functional>
|
||||
|
||||
QT_FORWARD_DECLARE_CLASS(QHelpEngine)
|
||||
|
||||
class BookmarkManager;
|
||||
@@ -40,6 +43,15 @@ class BookmarkManager;
|
||||
namespace Help {
|
||||
namespace Internal {
|
||||
|
||||
class HelpViewer;
|
||||
|
||||
struct HelpViewerFactory
|
||||
{
|
||||
QByteArray id;
|
||||
QString displayName;
|
||||
std::function<HelpViewer *()> create;
|
||||
};
|
||||
|
||||
class LocalHelpManager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -90,6 +102,10 @@ public:
|
||||
static int lastSelectedTab();
|
||||
static void setLastSelectedTab(int index);
|
||||
|
||||
static QByteArray defaultViewerBackend();
|
||||
static QVector<HelpViewerFactory> viewerBackends();
|
||||
static HelpViewerFactory viewerBackend();
|
||||
|
||||
static void setupGuiHelpEngine();
|
||||
static void setEngineNeedsUpdate();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user