Skip to content
GitLab
Menu
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
d8cca2b7
Commit
d8cca2b7
authored
Jun 02, 2009
by
kh
Browse files
As on request, let the side pane help open and follow help mode.
Reviewed-by: Daniel Molkentin
parent
e9b2613d
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/plugins/help/helpplugin.cpp
View file @
d8cca2b7
...
...
@@ -407,6 +407,11 @@ void HelpPlugin::createRightPaneSideBar()
<<
m_core
->
uniqueIDManager
()
->
uniqueIdentifier
(
Constants
::
C_HELP_SIDEBAR
),
this
));
connect
(
m_centralWidget
,
SIGNAL
(
sourceChanged
(
QUrl
)),
this
,
SLOT
(
updateSideBarSource
(
QUrl
)));
connect
(
m_centralWidget
,
SIGNAL
(
currentViewerChanged
()),
this
,
SLOT
(
updateSideBarSource
()));
QAction
*
copyActionSideBar
=
new
QAction
(
this
);
Core
::
Command
*
cmd
=
m_core
->
actionManager
()
->
registerAction
(
copyActionSideBar
,
Core
::
Constants
::
COPY
,
QList
<
int
>
()
...
...
@@ -565,6 +570,19 @@ void HelpPlugin::openContextHelpPage(const QString &url)
m_helpViewerForSideBar
->
setSource
(
QUrl
(
url
));
}
void
HelpPlugin
::
updateSideBarSource
()
{
const
QUrl
&
url
=
m_centralWidget
->
currentSource
();
if
(
url
.
isValid
())
updateSideBarSource
(
url
);
}
void
HelpPlugin
::
updateSideBarSource
(
const
QUrl
&
newUrl
)
{
if
(
m_helpViewerForSideBar
)
m_helpViewerForSideBar
->
setSource
(
newUrl
);
}
void
HelpPlugin
::
activateContext
()
{
using
namespace
Core
;
...
...
src/plugins/help/helpplugin.h
View file @
d8cca2b7
...
...
@@ -132,6 +132,9 @@ private slots:
void
openHelpPage
(
const
QString
&
url
);
void
openContextHelpPage
(
const
QString
&
url
);
void
updateSideBarSource
();
void
updateSideBarSource
(
const
QUrl
&
newUrl
);
private:
QToolBar
*
createToolBar
();
void
createRightPaneSideBar
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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