##// END OF EJS Templates
Now Works with Python 2 & 3, Qt 4 & 5....
Now Works with Python 2 & 3, Qt 4 & 5. CMake now generates different librariy files depending on the linked Qt/Python versions: PythonQt - Qt 4.x + Python 2.x PythonQt_3 - Qt 4.x + Python 3.x PythonQt5 - Qt 5.x + Python 2.x PythonQt5_3 - Qt 5.x + Python 3.x Fix Qt 4 build.

File last commit:

r205:706df4355685
r208:1476f2d2cf46
Show More
NicePyConsole.h
44 lines | 1.3 KiB | text/x-c | CLexer
/*! \file NicePyConsole.h
* \brief defines NicePyConsole
* \author "Melven Zoellner" <melven@topen.org>
*
*/
// include guard
#ifndef NICEPYCONSOLE_H
#define NICEPYCONSOLE_H
// PythonQt-includes
#include <PythonQt.h>
// local includes
#include "SimpleConsole.h"
// forward declarations
class PygmentsHighlighter;
class PythonCompleter;
//! a nice console (e.g. terminal) for python, with history, autocompletion and syntax-highlightning
class NicePyConsole : public SimpleConsole
{
Q_OBJECT
public:
explicit NicePyConsole(QWidget *parent,
const PythonQtObjectPtr& context); //!< constructor
~NicePyConsole(); //!< destructor
PythonQtObjectPtr context() const {return _context;} //!< get the python context of this console
protected slots:
int executePythonCommand(QString cmd); //!< slot to run python code
protected:
PythonQtObjectPtr _context; //!< the python context of this console
PygmentsHighlighter *_highlighter; //!< for syntax highlightning
PythonCompleter *_completer; //!< for autocompletion
};
#endif /* NICEPYCONSOLE_H */