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

Some cosmetics for the python widget

parent 0dc86631
......@@ -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();
}
......
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