2010-02-02 14:25:22 +01:00
|
|
|
/**************************************************************************
|
|
|
|
|
**
|
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
|
**
|
2010-03-05 11:25:49 +01:00
|
|
|
** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
2010-02-02 14:25:22 +01:00
|
|
|
**
|
|
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
|
|
|
|
**
|
|
|
|
|
** Commercial Usage
|
|
|
|
|
**
|
|
|
|
|
** Licensees holding valid Qt Commercial licenses may use this file in
|
|
|
|
|
** accordance with the Qt Commercial License Agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
|
|
|
|
** a written agreement between you and Nokia.
|
|
|
|
|
**
|
|
|
|
|
** GNU Lesser General Public License Usage
|
|
|
|
|
**
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
|
|
|
** General Public License version 2.1 as published by the Free Software
|
|
|
|
|
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
|
|
|
** packaging of this file. Please review the following information to
|
|
|
|
|
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
|
|
|
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
|
|
|
**
|
|
|
|
|
** If you are unsure which license is appropriate for your use, please
|
|
|
|
|
** contact the sales department at http://qt.nokia.com/contact.
|
|
|
|
|
**
|
|
|
|
|
**************************************************************************/
|
2010-03-29 13:53:25 +02:00
|
|
|
|
2010-02-02 14:25:22 +01:00
|
|
|
#ifndef HELPMANAGER_H
|
|
|
|
|
#define HELPMANAGER_H
|
|
|
|
|
|
|
|
|
|
#include "help_global.h"
|
|
|
|
|
|
2010-03-23 17:21:48 +01:00
|
|
|
#include <QtCore/QMutex>
|
2010-02-02 14:25:22 +01:00
|
|
|
#include <QtCore/QObject>
|
|
|
|
|
|
2010-03-23 17:21:48 +01:00
|
|
|
QT_FORWARD_DECLARE_CLASS(QHelpEngine)
|
2010-03-16 14:42:09 +01:00
|
|
|
QT_FORWARD_DECLARE_CLASS(QHelpEngineCore)
|
2010-02-02 14:25:22 +01:00
|
|
|
QT_FORWARD_DECLARE_CLASS(QString)
|
|
|
|
|
QT_FORWARD_DECLARE_CLASS(QStringList)
|
2010-04-28 15:04:39 +02:00
|
|
|
QT_FORWARD_DECLARE_CLASS(QUrl)
|
2010-02-02 14:25:22 +01:00
|
|
|
|
2010-03-23 17:21:48 +01:00
|
|
|
class BookmarkManager;
|
|
|
|
|
|
2010-02-02 14:25:22 +01:00
|
|
|
namespace Help {
|
|
|
|
|
|
|
|
|
|
class HELP_EXPORT HelpManager : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2010-03-23 17:21:48 +01:00
|
|
|
HelpManager(QObject *parent = 0);
|
2010-03-16 14:42:09 +01:00
|
|
|
~HelpManager();
|
2010-02-02 14:25:22 +01:00
|
|
|
|
2010-03-23 17:21:48 +01:00
|
|
|
static HelpManager& instance();
|
|
|
|
|
|
|
|
|
|
void setupGuiHelpEngine();
|
|
|
|
|
bool guiEngineNeedsUpdate() const;
|
|
|
|
|
|
|
|
|
|
void verifyDocumenation();
|
2010-02-02 14:25:22 +01:00
|
|
|
void registerDocumentation(const QStringList &fileNames);
|
2010-03-23 17:21:48 +01:00
|
|
|
void unregisterDocumentation(const QStringList &nameSpaces);
|
2010-02-02 14:25:22 +01:00
|
|
|
|
2010-03-23 17:21:48 +01:00
|
|
|
static QHelpEngine& helpEngine();
|
2010-03-16 14:42:09 +01:00
|
|
|
static QString collectionFilePath();
|
|
|
|
|
static QHelpEngineCore& helpEngineCore();
|
|
|
|
|
|
2010-03-23 17:21:48 +01:00
|
|
|
static BookmarkManager& bookmarkManager();
|
|
|
|
|
|
2010-05-28 15:58:55 +02:00
|
|
|
public slots:
|
|
|
|
|
void handleHelpRequest(const QString &url);
|
|
|
|
|
|
2010-02-02 14:25:22 +01:00
|
|
|
signals:
|
2010-04-28 15:04:39 +02:00
|
|
|
void helpRequested(const QUrl &url);
|
2010-02-02 14:25:22 +01:00
|
|
|
|
|
|
|
|
private:
|
2010-03-23 17:21:48 +01:00
|
|
|
static bool m_guiNeedsSetup;
|
|
|
|
|
static bool m_needsCollectionFile;
|
|
|
|
|
|
|
|
|
|
static QMutex m_guiMutex;
|
|
|
|
|
static QHelpEngine *m_guiEngine;
|
|
|
|
|
|
|
|
|
|
static QMutex m_coreMutex;
|
|
|
|
|
static QHelpEngineCore *m_coreEngine;
|
2010-03-16 14:42:09 +01:00
|
|
|
|
2010-03-23 17:21:48 +01:00
|
|
|
static HelpManager *m_helpManager;
|
|
|
|
|
static BookmarkManager *m_bookmarkManager;
|
2010-02-02 14:25:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // Help
|
|
|
|
|
|
|
|
|
|
#endif // HELPMANAGER_H
|