ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
PythonRepl Class Referencefinal

Homemade REPL (Read Print Eval Loop) More...

#include <PythonRepl.h>

Inheritance diagram for PythonRepl:
[legend]
Collaboration diagram for PythonRepl:
[legend]

Public Member Functions

 PythonRepl (PythonInterpreter *interpreter, QMainWindow *parent=nullptr)
 
void executeCode (const QString &pythonCode)
 
 PythonRepl (const PythonRepl &)=delete
 
 PythonRepl (PythonRepl &&)=delete
 
PythonRepl & operator= (const PythonRepl &)=delete
 
PythonRepl & operator= (PythonRepl &&)=delete
 
 ~PythonRepl () noexcept override
 

Protected Member Functions

QPlainTextEdit * codeEdit ()
 
QListWidget * outputDisplay ()
 
void reset ()
 
void importNeededPackages ()
 
void setupUI ()
 

Detailed Description

Homemade REPL (Read Print Eval Loop)

Constructor & Destructor Documentation

◆ PythonRepl() [1/3]

PythonRepl::PythonRepl ( PythonInterpreter *  interpreter,
QMainWindow *  parent = nullptr 
)
explicit

◆ PythonRepl() [2/3]

PythonRepl::PythonRepl ( const PythonRepl &  )
delete

◆ PythonRepl() [3/3]

PythonRepl::PythonRepl ( PythonRepl &&  )
delete

◆ ~PythonRepl()

PythonRepl::~PythonRepl ( )
overridenoexcept

Member Function Documentation

◆ codeEdit()

QPlainTextEdit * PythonRepl::codeEdit ( )
protected

◆ executeCode()

void PythonRepl::executeCode ( const QString &  pythonCode)

Our raw input contains the ">>> " and "... " and is a QString convert it to std::string while filtering out non needed chars

References codeEdit(), continuationDots(), PythonInterpreter::executeStatementWithState(), outputDisplay(), and replArrows().

Referenced by KeyPressEater::eventFilter(), and importNeededPackages().

◆ importNeededPackages()

void PythonRepl::importNeededPackages ( )
protected

References executeCode(), and replArrows().

Referenced by PythonRepl(), and reset().

◆ operator=() [1/2]

PythonRepl& PythonRepl::operator= ( const PythonRepl &  )
delete

◆ operator=() [2/2]

PythonRepl& PythonRepl::operator= ( PythonRepl &&  )
delete

◆ outputDisplay()

QListWidget * PythonRepl::outputDisplay ( )
protected

Referenced by executeCode().

◆ reset()

void PythonRepl::reset ( )
protected

References importNeededPackages().

Referenced by setupUI().

◆ setupUI()

void PythonRepl::setupUI ( )
protected

The documentation for this class was generated from the following files: