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
Education
Cantor
Commits
4a640796
Commit
4a640796
authored
Jun 19, 2020
by
Shubham .
Browse files
Remove extra fucntion
parent
4d62fc55
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/panelplugins/documentationpanel/documentationpanelwidget.cpp
View file @
4a640796
...
...
@@ -40,23 +40,6 @@
#include <QUrl>
DocumentationPanelWidget
::
DocumentationPanelWidget
(
Cantor
::
Session
*
session
,
QWidget
*
parent
)
:
QWidget
(
parent
),
m_engine
(
nullptr
),
m_path
(
QString
())
{
addWidgets
();
setSession
(
session
);
}
void
DocumentationPanelWidget
::
setSession
(
Cantor
::
Session
*
session
)
{
m_session
=
session
;
/*if(session)
{
m_model=session->variableDataModel();
if(m_table)
m_table->setModel(m_model);
}*/
}
void
DocumentationPanelWidget
::
addWidgets
()
{
//QPointer<QSplitter> m_splitter;
m_engine
=
new
QHelpEngine
(
QLatin1String
(
"documentation/maxima/maxima_help_collection.qhc"
),
this
);
...
...
@@ -77,7 +60,7 @@ void DocumentationPanelWidget::addWidgets()
m_tabWidget
->
addTab
(
m_engine
->
contentWidget
(),
i18n
(
"Contents"
));
QPointer
<
QTextBrowser
>
m_textBrowser
=
new
QTextBrowser
(
this
);
QPointer
<
QTextBrowser
>
m_textBrowser
=
new
QTextBrowser
(
parentWidget
()
);
m_textBrowser
->
setSource
(
QUrl
(
QLatin1String
(
"qthelp://org.kde.cantor/doc/maxima.html#SEC_Top"
)),
QTextDocument
::
HtmlResource
);
connect
(
m_engine
->
contentWidget
(),
SIGNAL
(
linkActivated
(
QUrl
)),
m_textBrowser
,
SLOT
(
setSource
(
QUrl
)));
...
...
@@ -88,6 +71,19 @@ void DocumentationPanelWidget::addWidgets()
layout
->
addWidget
(
m_textBrowser
,
2
);
// Connect to various signals and slots
setSession
(
session
);
}
void
DocumentationPanelWidget
::
setSession
(
Cantor
::
Session
*
session
)
{
m_session
=
session
;
/*if(session)
{
m_model=session->variableDataModel();
if(m_table)
m_table->setModel(m_model);
}*/
}
void
DocumentationPanelWidget
::
loadDocumentation
()
...
...
src/panelplugins/documentationpanel/documentationpanelwidget.h
View file @
4a640796
...
...
@@ -38,7 +38,6 @@ class DocumentationPanelWidget : public QWidget
~
DocumentationPanelWidget
()
override
=
default
;
void
setSession
(
Cantor
::
Session
*
session
);
void
addWidgets
();
/** @return icon of the current backend **/
QIcon
icon
()
const
;
...
...
Write
Preview
Markdown
is supported
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