Commit 33f3a4ec authored by Jan Möbius's avatar Jan Möbius

Some cosmetics for the python widget

parent 0dc86631
...@@ -40,10 +40,12 @@ ...@@ -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 #ifdef PYTHON_ENABLED
#include <pybind11/include/pybind11/pybind11.h> #include <pybind11/include/pybind11/pybind11.h>
#include <pybind11/include/pybind11/embed.h> #include <pybind11/include/pybind11/embed.h>
#include <OpenFlipper/PythonInterpreter/PythonInterpreter.hh> #include <OpenFlipper/PythonInterpreter/PythonInterpreter.hh>
#endif #endif
#include "pythonWidget.hh" #include "pythonWidget.hh"
...@@ -52,11 +54,6 @@ ...@@ -52,11 +54,6 @@
#include <QObject> #include <QObject>
//#include <dlfcn.h>
PythonWidget::PythonWidget(QWidget *parent ) PythonWidget::PythonWidget(QWidget *parent )
: QMainWindow(parent) : QMainWindow(parent)
{ {
...@@ -66,28 +63,20 @@ PythonWidget::PythonWidget(QWidget *parent ) ...@@ -66,28 +63,20 @@ PythonWidget::PythonWidget(QWidget *parent )
connect (RunButton, SIGNAL( clicked() ), this, SLOT( runScript()) ); connect (RunButton, SIGNAL( clicked() ), this, SLOT( runScript()) );
// QIcon icon; QIcon icon;
// icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"window-close.png"); icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"window-close.png");
// actionClose->setIcon(icon); actionClose->setIcon(icon);
// closeButton->setIcon(icon);
// setWindowTitle(tr("About %1").arg(TOSTRING(PRODUCT_NAME)));
// const int idx = About->indexOf(tab_2); QIcon iconRun;
// About->setTabText(idx, tr(TOSTRING(PRODUCT_NAME), "about box tab title")); iconRun.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"arrow-right.png");
// RunButton->setIcon(iconRun);
// if (QFile::exists(":/branding/license_text.html")) {
// OpenFlipperLicense->setText(""); setWindowTitle(tr("%1 Python Interpreter").arg(TOSTRING(PRODUCT_NAME)));
// QFile licenseTextFile(":/branding/license_text.html");
// licenseTextFile.open(QFile::ReadOnly); connect( actionClose , SIGNAL(triggered() ) , this, SLOT(hide()) );
// QByteArray licenseTextBA = licenseTextFile.readAll(); connect( closeButton , SIGNAL(clicked() ) , this, SLOT(hide()) );
// QString licenseText = QString::fromUtf8(licenseTextBA.data(), licenseTextBA.size()); closeButton->setFocus();
// 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();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment