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
OpenFlipper-Free
OpenFlipper
Commits
33f3a4ec
Commit
33f3a4ec
authored
Jan 31, 2019
by
Jan Möbius
Browse files
Some cosmetics for the python widget
parent
0dc86631
Changes
1
Hide whitespace changes
Inline
Side-by-side
widgets/pythonWidget/pythonWidget.cc
View file @
33f3a4ec
...
...
@@ -40,10 +40,12 @@
\*===========================================================================*/
// If OpenFlipper builds with python support, we can integrate the interpreter.
// Otherwise we build only a dummy widget with no interpreter backend.
#ifdef PYTHON_ENABLED
#include
<pybind11/include/pybind11/pybind11.h>
#include
<pybind11/include/pybind11/embed.h>
#include
<OpenFlipper/PythonInterpreter/PythonInterpreter.hh>
#include
<pybind11/include/pybind11/pybind11.h>
#include
<pybind11/include/pybind11/embed.h>
#include
<OpenFlipper/PythonInterpreter/PythonInterpreter.hh>
#endif
#include
"pythonWidget.hh"
...
...
@@ -52,11 +54,6 @@
#include
<QObject>
//#include <dlfcn.h>
PythonWidget
::
PythonWidget
(
QWidget
*
parent
)
:
QMainWindow
(
parent
)
{
...
...
@@ -66,28 +63,20 @@ PythonWidget::PythonWidget(QWidget *parent )
connect
(
RunButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
runScript
())
);
// QIcon icon;
// icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"window-close.png");
// actionClose->setIcon(icon);
//
// setWindowTitle(tr("About %1").arg(TOSTRING(PRODUCT_NAME)));
// const int idx = About->indexOf(tab_2);
// About->setTabText(idx, tr(TOSTRING(PRODUCT_NAME), "about box tab title"));
//
// if (QFile::exists(":/branding/license_text.html")) {
// OpenFlipperLicense->setText("");
// QFile licenseTextFile(":/branding/license_text.html");
// licenseTextFile.open(QFile::ReadOnly);
// QByteArray licenseTextBA = licenseTextFile.readAll();
// QString licenseText = QString::fromUtf8(licenseTextBA.data(), licenseTextBA.size());
// OpenFlipperLicense->setHtml(licenseText.arg(TOSTRING(PRODUCT_NAME)));
// } else {
// OpenFlipperLicense->setHtml(OpenFlipperLicense->toHtml().arg(TOSTRING(PRODUCT_NAME)));
// }
//
// connect( actionClose , SIGNAL(triggered() ) , this, SLOT(hide()) );
// connect( closeButton , SIGNAL(clicked() ) , this, SLOT(hide()) );
// closeButton->setFocus();
QIcon
icon
;
icon
.
addFile
(
OpenFlipper
::
Options
::
iconDirStr
()
+
OpenFlipper
::
Options
::
dirSeparator
()
+
"window-close.png"
);
actionClose
->
setIcon
(
icon
);
closeButton
->
setIcon
(
icon
);
QIcon
iconRun
;
iconRun
.
addFile
(
OpenFlipper
::
Options
::
iconDirStr
()
+
OpenFlipper
::
Options
::
dirSeparator
()
+
"arrow-right.png"
);
RunButton
->
setIcon
(
iconRun
);
setWindowTitle
(
tr
(
"%1 Python Interpreter"
).
arg
(
TOSTRING
(
PRODUCT_NAME
)));
connect
(
actionClose
,
SIGNAL
(
triggered
()
)
,
this
,
SLOT
(
hide
())
);
connect
(
closeButton
,
SIGNAL
(
clicked
()
)
,
this
,
SLOT
(
hide
())
);
closeButton
->
setFocus
();
}
...
...
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