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
Marco Bubke
flatpak-qt-creator
Commits
e8161ebd
Commit
e8161ebd
authored
Mar 13, 2009
by
con
Browse files
Fixes: Copy from help sidebar doesn't work
parent
fcc271b6
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/icontext.h
View file @
e8161ebd
...
...
@@ -51,6 +51,25 @@ public:
virtual
QString
contextHelpId
()
const
{
return
QString
();
}
};
class
BaseContext
:
public
Core
::
IContext
{
public:
BaseContext
(
QWidget
*
widget
,
const
QList
<
int
>
&
context
,
QObject
*
parent
=
0
)
:
Core
::
IContext
(
parent
),
m_widget
(
widget
),
m_context
(
context
)
{
}
QList
<
int
>
context
()
const
{
return
m_context
;
}
QWidget
*
widget
()
{
return
m_widget
;
}
private:
QWidget
*
m_widget
;
QList
<
int
>
m_context
;
};
}
// namespace Core
#endif //ICONTEXT_H
src/plugins/help/helpplugin.cpp
View file @
e8161ebd
...
...
@@ -374,6 +374,17 @@ void HelpPlugin::createRightPaneSideBar()
m_helpViewerForSideBar
=
new
HelpViewer
(
m_helpEngine
,
0
);
rightPaneLayout
->
addWidget
(
m_helpViewerForSideBar
);
m_core
->
addContextObject
(
new
Core
::
BaseContext
(
m_helpViewerForSideBar
,
QList
<
int
>
()
<<
m_core
->
uniqueIDManager
()
->
uniqueIdentifier
(
Constants
::
C_HELP_SIDEBAR
),
this
));
QAction
*
copyActionSideBar
=
new
QAction
(
this
);
Core
::
Command
*
cmd
=
m_core
->
actionManager
()
->
registerAction
(
copyActionSideBar
,
Core
::
Constants
::
COPY
,
QList
<
int
>
()
<<
m_core
->
uniqueIDManager
()
->
uniqueIdentifier
(
Constants
::
C_HELP_SIDEBAR
));
connect
(
copyActionSideBar
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
copyFromSideBar
()));
copyActionSideBar
->
setText
(
cmd
->
action
()
->
text
());
copyActionSideBar
->
setIcon
(
cmd
->
action
()
->
icon
());
m_rightPaneSideBar
=
new
QWidget
;
m_rightPaneSideBar
->
setLayout
(
rightPaneLayout
);
...
...
@@ -381,6 +392,11 @@ void HelpPlugin::createRightPaneSideBar()
addAutoReleasedObject
(
new
Core
::
BaseRightPaneWidget
(
m_rightPaneSideBar
));
}
void
HelpPlugin
::
copyFromSideBar
()
{
m_helpViewerForSideBar
->
copy
();
}
void
HelpPlugin
::
rightPaneBackward
()
{
m_helpViewerForSideBar
->
backward
();
...
...
src/plugins/help/helpplugin.h
View file @
e8161ebd
...
...
@@ -64,10 +64,10 @@ class SideBarItem;
namespace
Help
{
namespace
Constants
{
const
char
*
const
HELPVIEWER_KIND
=
"
Qt
Help
Viewer
"
;
const
char
*
const
C_
MODE_HELP
=
"Help
Mode
"
;
const
int
P_MODE_HELP
=
70
;
const
char
*
const
ID_MODE_HELP
=
"Help"
;
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
...
...
@@ -124,6 +124,7 @@ private slots:
void
switchToHelpMode
(
const
QUrl
&
source
);
void
switchToHelpMode
(
const
QMap
<
QString
,
QUrl
>
&
urls
,
const
QString
&
keyword
);
void
slotHideRightPane
();
void
copyFromSideBar
();
void
openGettingStarted
();
...
...
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