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
Education
Cantor
Commits
b45bc45f
Commit
b45bc45f
authored
Jul 24, 2020
by
Shubham .
Browse files
Fix the signal slot connection
parent
7ef01c64
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/panelplugins/documentationpanel/documentationpanelplugin.cpp
View file @
b45bc45f
...
...
@@ -41,6 +41,7 @@ QWidget* DocumentationPanelPlugin::widget()
{
// find the default backend and then load it, currently hardcoding the values
m_widget
=
new
DocumentationPanelWidget
(
QLatin1String
(
"Maxima"
),
QLatin1String
(
"maximabackend"
),
parentWidget
());
connect
(
m_cantorShell
,
SIGNAL
(
requestDocumentation
(
QString
)),
m_widget
,
SLOT
(
contextSensitiveHelp
(
QString
)));
}
return
m_widget
;
...
...
@@ -63,7 +64,7 @@ QString DocumentationPanelPlugin::backendName() const
void
DocumentationPanelPlugin
::
connectToShell
(
QObject
*
cantorShell
)
{
connect
(
cantorShell
,
SIGNAL
(
requestDocumentation
(
QString
)),
m_widget
,
SLOT
(
contextSensitiveHelp
(
QString
)))
;
m_
cantorShell
=
cantorShell
;
connect
(
cantorShell
,
SIGNAL
(
requestDocumentation
(
QString
)),
this
,
SIGNAL
(
visibilityRequested
()));
}
...
...
src/panelplugins/documentationpanel/documentationpanelplugin.h
View file @
b45bc45f
...
...
@@ -53,6 +53,8 @@ class DocumentationPanelPlugin : public Cantor::PanelPlugin
QPointer
<
DocumentationPanelWidget
>
m_widget
;
QString
m_backendName
;
QString
m_backendIcon
;
QObject
*
m_cantorShell
=
nullptr
;
};
#endif
/* _DOCUMENTATIONPANELPLUGIN_H */
src/panelplugins/documentationpanel/documentationpanelwidget.cpp
View file @
b45bc45f
...
...
@@ -327,6 +327,7 @@ void DocumentationPanelWidget::updateBackend(const QString& backendName, const Q
// update the QComboBox to display all the docs for newly changed backend worksheet
m_documentationSelector
->
addItem
(
QIcon
::
fromTheme
(
m_icon
),
m_backend
);
// Since new documentation files have been loaded, now add the widgets again and refresh the display
m_displayArea
->
addWidget
(
m_engine
->
contentWidget
());
m_displayArea
->
addWidget
(
m_textBrowser
);
m_displayArea
->
addWidget
(
m_index
);
...
...
@@ -382,6 +383,7 @@ void DocumentationPanelWidget::returnPressed()
void
DocumentationPanelWidget
::
contextSensitiveHelp
(
const
QString
&
keyword
)
{
qDebug
()
<<
keyword
;
// First make sure we have display browser as the current widget on the QStackedWidget
emit
activateBrowser
();
...
...
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