Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenFlipper
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
9c0de0d5
Commit
9c0de0d5
authored
Mar 08, 2019
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split script widget for python
parent
4e4cbe13
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
136 additions
and
77 deletions
+136
-77
widgets/pythonWidget/pythonWidget.cc
widgets/pythonWidget/pythonWidget.cc
+3
-3
widgets/pythonWidget/pythonWidget.ui
widgets/pythonWidget/pythonWidget.ui
+133
-74
No files found.
widgets/pythonWidget/pythonWidget.cc
View file @
9c0de0d5
...
...
@@ -100,14 +100,14 @@ PythonWidget::PythonWidget(QWidget *parent )
QTextEdit
*
coreInfo
=
new
QTextEdit
(
infoTab
);
info
Tab
->
addTab
(
coreInfo
,
"Core"
);
module
Tab
->
addTab
(
coreInfo
,
"Core"
);
QString
coreDoc
=
interpreter
->
runScriptOutput
(
"import pydoc ;import openflipper;html = pydoc.HTMLDoc();object, name = pydoc.resolve(openflipper);page = html.page(pydoc.describe(object), html.document(object, name));print(page)"
);
coreInfo
->
setHtml
(
coreDoc
);
// Collect all Python Documentation for the OpenFlipper Plugin Modules
for
(
int
i
=
0
;
i
<
pythonPlugins
.
size
()
;
++
i
)
{
QTextEdit
*
edit
=
new
QTextEdit
(
info
Tab
);
info
Tab
->
addTab
(
edit
,
pythonPlugins
[
i
]);
QTextEdit
*
edit
=
new
QTextEdit
(
module
Tab
);
module
Tab
->
addTab
(
edit
,
pythonPlugins
[
i
]);
QString
data
=
interpreter
->
runScriptOutput
(
"import pydoc ;import "
+
pythonPlugins
[
i
]
+
";html = pydoc.HTMLDoc();object, name = pydoc.resolve("
+
pythonPlugins
[
i
]
+
");page = html.page(pydoc.describe(object), html.document(object, name));print(page)"
);
edit
->
setHtml
(
data
);
}
...
...
widgets/pythonWidget/pythonWidget.ui
View file @
9c0de0d5
...
...
@@ -6,14 +6,35 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
99
4
</width>
<height>
659
</height>
<width>
147
4
</width>
<height>
1004
</height>
</rect>
</property>
<property
name=
"windowTitle"
>
<string>
About OpenFlipper
</string>
</property>
<widget
class=
"QWidget"
name=
"centralwidget"
>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_4"
>
<item>
<widget
class=
"QSplitter"
name=
"splitter_4"
>
<property
name=
"orientation"
>
<enum>
Qt::Horizontal
</enum>
</property>
<widget
class=
"QFrame"
name=
"frame"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Preferred"
vsizetype=
"Preferred"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
<property
name=
"frameShape"
>
<enum>
QFrame::StyledPanel
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_3"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout"
>
<item>
<widget
class=
"QTabWidget"
name=
"infoTab"
>
...
...
@@ -26,18 +47,33 @@
</attribute>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_2"
>
<item>
<layout
class=
"QVBoxLayout"
name=
"verticalLayout_4"
>
<item>
<widget
class=
"QSplitter"
name=
"splitter"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"handleWidth"
>
<number>
4
</number>
</property>
<widget
class=
"QTextEdit"
name=
"scriptWidget"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
1
</verstretch>
</sizepolicy>
</property>
<property
name=
"readOnly"
>
<bool>
false
</bool>
</property>
</widget>
</item>
<item>
<widget
class=
"QTextEdit"
name=
"pythonOutput"
/>
</item>
</layout>
<widget
class=
"QTextEdit"
name=
"pythonOutput"
>
<property
name=
"sizePolicy"
>
<sizepolicy
hsizetype=
"Expanding"
vsizetype=
"Expanding"
>
<horstretch>
0
</horstretch>
<verstretch>
0
</verstretch>
</sizepolicy>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
...
...
@@ -108,6 +144,29 @@ p, li { white-space: pre-wrap; }
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget
class=
"QFrame"
name=
"frame_3"
>
<property
name=
"frameShape"
>
<enum>
QFrame::StyledPanel
</enum>
</property>
<property
name=
"frameShadow"
>
<enum>
QFrame::Raised
</enum>
</property>
<layout
class=
"QHBoxLayout"
name=
"horizontalLayout_3"
>
<item>
<widget
class=
"QTabWidget"
name=
"moduleTab"
>
<property
name=
"currentIndex"
>
<number>
-1
</number>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
<action
name=
"actionClose"
>
<property
name=
"text"
>
...
...
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