Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
e94ff514
Commit
e94ff514
authored
Feb 02, 2010
by
kh1
Browse files
Move HelpManager it's own source files.
Reviewed-by: ck
parent
c859a721
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/plugins/help/help.pro
View file @
e94ff514
...
...
@@ -19,7 +19,8 @@ HEADERS += helpplugin.h \
help_global
.
h
\
helpindexfilter
.
h
\
generalsettingspage
.
h
\
xbelsupport
.
h
xbelsupport
.
h
\
helpmanager
.
h
SOURCES
+=
helpplugin
.
cpp
\
docsettingspage
.
cpp
\
...
...
@@ -30,7 +31,8 @@ SOURCES += helpplugin.cpp \
helpfindsupport
.
cpp
\
helpindexfilter
.
cpp
\
generalsettingspage
.
cpp
\
xbelsupport
.
cpp
xbelsupport
.
cpp
\
helpmanager
.
cpp
FORMS
+=
docsettingspage
.
ui
\
filtersettingspage
.
ui
\
...
...
src/plugins/help/helpmanager.cpp
0 → 100644
View file @
e94ff514
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** 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.
**
**************************************************************************/
#include
"helpmanager.h"
#include
"helpplugin.h"
#include
<QtCore/QUrl>
#include
<QtCore/QString>
using
namespace
Help
;
using
namespace
Help
::
Internal
;
HelpManager
::
HelpManager
(
HelpPlugin
*
plugin
)
:
m_plugin
(
plugin
)
{
}
void
HelpManager
::
openHelpPage
(
const
QString
&
url
)
{
m_plugin
->
handleHelpRequest
(
url
);
}
void
HelpManager
::
openContextHelpPage
(
const
QString
&
url
)
{
m_plugin
->
openContextHelpPage
(
url
);
}
void
HelpManager
::
registerDocumentation
(
const
QStringList
&
fileNames
)
{
if
(
m_plugin
)
{
m_plugin
->
setFilesToRegister
(
fileNames
);
emit
helpPluginUpdateDocumentation
();
}
}
src/plugins/help/helpmanager.h
0 → 100644
View file @
e94ff514
/**************************************************************************
**
** This file is part of Qt Creator
**
** Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
**
** 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.
**
**************************************************************************/
#ifndef HELPMANAGER_H
#define HELPMANAGER_H
#include
"help_global.h"
#include
<QtCore/QObject>
QT_FORWARD_DECLARE_CLASS
(
QString
)
QT_FORWARD_DECLARE_CLASS
(
QStringList
)
namespace
Help
{
namespace
Internal
{
class
HelpPlugin
;
}
// Internal
class
HELP_EXPORT
HelpManager
:
public
QObject
{
Q_OBJECT
public:
HelpManager
(
Internal
::
HelpPlugin
*
);
void
openHelpPage
(
const
QString
&
url
);
void
openContextHelpPage
(
const
QString
&
url
);
void
registerDocumentation
(
const
QStringList
&
fileNames
);
signals:
void
helpPluginUpdateDocumentation
();
private:
Internal
::
HelpPlugin
*
m_plugin
;
};
}
// Help
#endif // HELPMANAGER_H
src/plugins/help/helpplugin.cpp
View file @
e94ff514
...
...
@@ -26,7 +26,6 @@
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#include
"helpplugin.h"
#include
"bookmarkmanager.h"
...
...
@@ -37,13 +36,12 @@
#include
"generalsettingspage.h"
#include
"helpfindsupport.h"
#include
"helpindexfilter.h"
#include
"helpmanager.h"
#include
"helpmode.h"
#include
"helpviewer.h"
#include
"indexwindow.h"
#include
"searchwidget.h"
#include
<extensionsystem/pluginmanager.h>
#include
<coreplugin/actionmanager/actionmanager.h>
#include
<coreplugin/coreconstants.h>
#include
<coreplugin/editormanager/editormanager.h>
...
...
@@ -55,65 +53,38 @@
#include
<coreplugin/rightpane.h>
#include
<coreplugin/sidebar.h>
#include
<coreplugin/uniqueidmanager.h>
#include
<welcome/welcomemode.h>
#include
<extensionsystem/pluginmanager.h>
#include
<texteditor/texteditorconstants.h>
#include
<utils/styledbar.h>
#include
<welcome/welcomemode.h>
#include
<QtCore/QDebug>
#include
<QtCore/qplugin.h>
#include
<QtCore/QFileInfo>
#include
<QtCore/QSettings>
#include
<QtCore/QDir>
#include
<QtCore/Q
Resource
>
#include
<QtCore/Q
FileInfo
>
#include
<QtCore/QLibraryInfo>
#include
<QtCore/QTranslator>
#include
<QtCore/qplugin.h>
#include
<QtGui/QAction>
#include
<QtGui/QComboBox>
#include
<QtGui/QMessageBox>
#include
<QtGui/QDesktopServices>
#include
<QtGui/QShortcut>
#include
<QtGui/QSplitter>
#include
<QtGui/QStyle>
#include
<QtGui/QToolBar>
#include
<QtGui/QComboBox>
#include
<QtGui/QDesktopServices>
#include
<QtGui/QMessageBox>
#include
<QtHelp/QHelpEngine>
#if
n
def
QT_NO_WEBKIT
#include
<QtGui/QApplication>
#if
def
ined(
QT_NO_WEBKIT
)
#
include <QtGui/QApplication>
#else
#include
<QtWebKit/QWebSettings>
#
include <QtWebKit/QWebSettings>
#endif
using
namespace
Help
;
using
namespace
Help
::
Internal
;
HelpManager
::
HelpManager
(
Internal
::
HelpPlugin
*
plugin
)
:
m_plugin
(
plugin
)
{
}
void
HelpManager
::
registerDocumentation
(
const
QStringList
&
fileNames
)
{
if
(
m_plugin
)
{
m_plugin
->
setFilesToRegister
(
fileNames
);
emit
helpPluginUpdateDocumentation
();
}
}
void
HelpManager
::
openHelpPage
(
const
QString
&
url
)
{
m_plugin
->
handleHelpRequest
(
url
);
}
void
HelpManager
::
openContextHelpPage
(
const
QString
&
url
)
{
m_plugin
->
openContextHelpPage
(
url
);
}
HelpPlugin
::
HelpPlugin
()
:
m_core
(
0
),
HelpPlugin
::
HelpPlugin
()
:
m_core
(
0
),
m_helpEngine
(
0
),
m_contextHelpEngine
(
0
),
m_contentWidget
(
0
),
...
...
@@ -167,8 +138,8 @@ bool HelpPlugin::initialize(const QStringList &arguments, QString *error)
#endif
// FIXME shouldn't the help engine create the directory if it doesn't exist?
QFileInfo
fi
(
m_core
->
settings
()
->
fileName
());
QDir
directory
(
fi
.
absolutePath
()
+
"/qtcreator"
);
const
QFileInfo
&
fi
(
m_core
->
settings
()
->
fileName
());
const
QDir
&
directory
(
fi
.
absolutePath
()
+
"/qtcreator"
);
if
(
!
directory
.
exists
())
directory
.
mkpath
(
directory
.
absolutePath
());
m_helpEngine
=
new
QHelpEngine
(
directory
.
absolutePath
()
+
...
...
src/plugins/help/helpplugin.h
View file @
e94ff514
...
...
@@ -26,12 +26,9 @@
** contact the sales department at http://qt.nokia.com/contact.
**
**************************************************************************/
#ifndef HELPPLUGIN_H
#define HELPPLUGIN_H
#include
"help_global.h"
#include
<extensionsystem/iplugin.h>
#include
<QtCore/QMap>
...
...
@@ -40,9 +37,8 @@
QT_BEGIN_NAMESPACE
class
QAction
;
class
QComboBox
;
class
QHelpEngineCore
;
class
QHelpEngine
;
class
Q
Shortcut
;
class
Q
HelpEngineCore
;
class
QToolBar
;
class
QUrl
;
QT_END_NAMESPACE
...
...
@@ -53,50 +49,28 @@ class BookmarkManager;
class
BookmarkWidget
;
class
HelpViewer
;
namespace
Core
{
class
ICore
;
class
IMode
;
class
SideBar
;
class
SideBarItem
;
}
}
// Core
namespace
Help
{
namespace
Internal
{
class
CentralWidget
;
class
HelpPlugin
;
}
class
HelpManager
;
namespace
Constants
{
const
char
*
const
C_MODE_HELP
=
"Help Mode"
;
const
char
*
const
C_HELP_SIDEBAR
=
"Help Sidebar"
;
const
int
P_MODE_HELP
=
70
;
const
char
*
const
ID_MODE_HELP
=
"Help"
;
}
class
HELP_EXPORT
HelpManager
:
public
QObject
{
Q_OBJECT
public:
HelpManager
(
Internal
::
HelpPlugin
*
);
void
registerDocumentation
(
const
QStringList
&
fileNames
);
void
openHelpPage
(
const
QString
&
url
);
void
openContextHelpPage
(
const
QString
&
url
);
signals:
void
helpPluginUpdateDocumentation
();
private:
Internal
::
HelpPlugin
*
m_plugin
;
};
const
char
*
const
C_MODE_HELP
=
"Help Mode"
;
const
char
*
const
C_HELP_SIDEBAR
=
"Help Sidebar"
;
const
int
P_MODE_HELP
=
70
;
const
char
*
const
ID_MODE_HELP
=
"Help"
;
}
// Constants
namespace
Internal
{
class
HelpMode
;
class
HelpPluginEditorFactory
;
class
CentralWidget
;
class
DocSettingsPage
;
class
FilterSettingsPage
;
class
HelpMode
;
class
SearchWidget
;
class
HelpPlugin
:
public
ExtensionSystem
::
IPlugin
...
...
@@ -124,7 +98,7 @@ public:
public
slots
:
void
pluginUpdateDocumentation
();
void
handleHelpRequest
(
const
QUrl
&
url
);
void
handleHelpRequest
(
const
QUrl
&
url
);
private
slots
:
void
modeChanged
(
Core
::
IMode
*
mode
);
...
...
@@ -172,7 +146,7 @@ private:
BookmarkWidget
*
m_bookmarkWidget
;
BookmarkManager
*
m_bookmarkManager
;
SearchWidget
*
m_searchWidget
;
Help
::
Internal
::
CentralWidget
*
m_centralWidget
;
CentralWidget
*
m_centralWidget
;
HelpViewer
*
m_helpViewerForSideBar
;
HelpMode
*
m_mode
;
bool
m_shownLastPages
;
...
...
src/plugins/qmljseditor/qmljseditorplugin.cpp
View file @
e94ff514
...
...
@@ -51,7 +51,7 @@
#include
<texteditor/textfilewizard.h>
#include
<texteditor/texteditoractionhandler.h>
#include
<texteditor/completionsupport.h>
#include
<help/help
plugin
.h>
#include
<help/help
manager
.h>
#include
<utils/qtcassert.h>
#include
<QtCore/QtPlugin>
...
...
src/plugins/qt4projectmanager/gettingstartedwelcomepagewidget.cpp
View file @
e94ff514
...
...
@@ -37,7 +37,7 @@
#include
<extensionsystem/pluginmanager.h>
#include
<help/help
plugin
.h>
#include
<help/help
manager
.h>
#include
<QtCore/QDateTime>
#include
<QtCore/QDir>
...
...
src/plugins/qt4projectmanager/qtversionmanager.cpp
View file @
e94ff514
...
...
@@ -44,7 +44,7 @@
#include
<coreplugin/icore.h>
#include
<coreplugin/modemanager.h>
#include
<extensionsystem/pluginmanager.h>
#include
<help/help
plugin
.h>
#include
<help/help
manager
.h>
#include
<utils/qtcassert.h>
#include
<QtCore/QProcess>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment