itom
1.0.13
|
Public Slots | |
void | pythonRunString (QString cmd) |
void | pythonDebugString (QString cmd) |
void | pythonExecStringFromCommandLine (QString cmd) |
void | pythonRunFile (QString filename) |
void | pythonDebugFile (QString filename) |
void | pythonRunStringOrFunction (QString cmdOrFctHash) |
void | pythonDebugStringOrFunction (QString cmdOrFctHash) |
void | pythonInterruptExecution () const |
void | pythonDebugCommand (tPythonDbgCmd cmd) |
void | pythonGenericSlot (PyObject *callable, PyObject *argumentTuple) |
these slots are only connected if python in debug-mode; while waiting these slots will be treated due to progressEvents-call in PythonEngine::PyDbgCommandLoop | |
void | breakPointAdded (BreakPointItem bp, int row) |
void | breakPointDeleted (QString filename, int lineNo, int pyBpNumber) |
void | breakPointChanged (BreakPointItem oldBp, BreakPointItem newBp) |
RetVal | setupBreakPointDebugConnections () |
RetVal | shutdownBreakPointDebugConnections () |
bool | renameVariable (bool globalNotLocal, QString oldKey, QString newKey, ItomSharedSemaphore *semaphore=NULL) |
bool | deleteVariable (bool globalNotLocal, QStringList keys, ItomSharedSemaphore *semaphore=NULL) |
RetVal | pickleVariables (bool globalNotLocal, QString filename, QStringList varNames, ItomSharedSemaphore *semaphore=NULL) |
RetVal | unpickleVariables (bool globalNotLocal, QString filename, ItomSharedSemaphore *semaphore=NULL) |
RetVal | saveMatlabVariables (bool globalNotLocal, QString filename, QStringList varNames, ItomSharedSemaphore *semaphore=NULL) |
RetVal | loadMatlabVariables (bool globalNotLocal, QString filename, ItomSharedSemaphore *semaphore=NULL) |
RetVal | registerAddInInstance (QString varname, ito::AddInBase *instance, ItomSharedSemaphore *semaphore=NULL) |
RetVal | getSysModules (QSharedPointer< QStringList > modNames, QSharedPointer< QStringList > modFilenames, QSharedPointer< IntList > modTypes, ItomSharedSemaphore *semaphore=NULL) |
RetVal | reloadSysModules (QSharedPointer< QStringList > modNames, ItomSharedSemaphore *semaphore=NULL) |
void | registerWorkspaceContainer (PyWorkspaceContainer *container, bool registerNotUnregister, bool globalNotLocal) |
void | workspaceGetChildNode (ito::PyWorkspaceContainer *container, QString fullNameParentItem) |
void | workspaceGetValueInformation (PyWorkspaceContainer *container, QString fullItemName, QSharedPointer< QString > extendedValue, ItomSharedSemaphore *semaphore=NULL) |
void | putParamsToWorkspace (bool globalNotLocal, QStringList names, QVector< SharedParamBasePointer > values, ItomSharedSemaphore *semaphore=NULL) |
void | getParamsFromWorkspace (bool globalNotLocal, QStringList names, QVector< int > paramBaseTypes, QSharedPointer< SharedParamBasePointerVector > values, ItomSharedSemaphore *semaphore=NULL) |
Signals | |
void | pythonDebugPositionChanged (QString filename, int lineNo) |
void | pythonStateChanged (tPythonTransitions pyTransition) |
void | pythonModifyLocalDict (PyObject *localDict, ItomSharedSemaphore *semaphore) |
void | pythonModifyGlobalDict (PyObject *globalDict, ItomSharedSemaphore *semaphore) |
void | pythonAddToolbarButton (QString toolbarName, QString buttonName, QString buttonIconFilename, QString pythonCode) |
void | pythonRemoveToolbarButton (QString toolbarName, QString buttonName) |
void | pythonAddMenuElement (int typeID, QString key, QString name, QString code, QString icon) |
void | pythonRemoveMenuElement (QString key) |
void | pythonCurrentDirChanged () |
void | updateCallStack (QStringList filenames, IntList lines, QStringList methods) |
void | deleteCallStack () |
void | pythonSetCursor (const Qt::CursorShape cursor) |
void | pythonResetCursor () |
Public Member Functions | |
Q_INVOKABLE void | pythonSetup (ito::RetVal *retValue) |
Q_INVOKABLE ito::RetVal | scanAndRunAutostartFolder (QString currentDirAfterScan=QString()) |
Q_INVOKABLE ito::RetVal | pythonShutdown (ItomSharedSemaphore *aimWait=NULL) |
Q_INVOKABLE ito::RetVal | stringEncodingChanged () |
BreakPointModel * | getBreakPointModel () const |
bool | isPythonBusy () const |
bool | isPythonDebugging () const |
bool | isPythonDebuggingAndWaiting () const |
bool | execInternalCodeByDebugger () const |
void | setExecInternalCodeByDebugger (bool value) |
ito::RetVal | checkForPyExceptions () |
void | printPythonErrorWithoutTraceback () |
void | pythonDebugFunction (PyObject *callable, PyObject *argTuple) |
void | pythonRunFunction (PyObject *callable, PyObject *argTuple) |
PyObject * | getGlobalDictionary () |
QList< int > | parseAndSplitCommandInMainComponents (const char *str, QByteArray &encoding) const |
Static Public Member Functions | |
static const PythonEngine * | getInstance () |
Protected Member Functions | |
RetVal | syntaxCheck (char *pythonFileName) |
RetVal | runPyFile (char *pythonFileName) |
RetVal | debugFile (char *pythonFileName) |
RetVal | runString (const char *command) |
RetVal | debugString (const char *command) |
RetVal | debugFunction (PyObject *callable, PyObject *argTuple) |
RetVal | runFunction (PyObject *callable, PyObject *argTuple) |
RetVal | modifyTracebackDepth (int NrOfLevelsToPopAtFront=-1, bool showTraceback=true) |
Private Member Functions | |
PyObject * | getLocalDictionary () |
PyObject * | getPyObjectByFullName (bool globalNotLocal, QStringList &fullName) |
void | setGlobalDictionary (PyObject *mainDict=NULL) |
void | setLocalDictionary (PyObject *localDict) |
void | emitPythonDictionary (bool emitGlobal, bool emitLocal, PyObject *globalDict, PyObject *localDict) |
RetVal | pickleDictionary (PyObject *dict, QString filename) |
RetVal | unpickleDictionary (PyObject *destinationDict, QString filename, bool overwrite) |
RetVal | saveDictAsMatlab (PyObject *dict, QString filename) |
RetVal | loadMatlabToDict (PyObject *destinationDict, QString filename) |
RetVal | addMethodToModule (PyMethodDef *def) |
RetVal | delMethodFromModule (const char *ml_name) |
RetVal | pythonAddBuiltinMethods () |
void | enqueueDbgCmd (tPythonDbgCmd dbgCmd) |
tPythonDbgCmd | dequeueDbgCmd () |
bool | DbgCommandsAvailable () |
void | clearDbgCmdLoop () |
RetVal | pythonStateTransition (tPythonTransitions transition) |
RetVal | pythonAddBreakpoint (const QString &filename, const int lineno, const bool enabled, const bool temporary, const QString &condition, const int ignoreCount, int &pyBpNumber) |
RetVal | pythonEditBreakpoint (const int pyBpNumber, const QString &filename, const int lineno, const bool enabled, const bool temporary, const QString &condition, const int ignoreCount) |
RetVal | pythonDeleteBreakpoint (const int pyBpNumber) |
Static Private Member Functions | |
static PythonEngine * | getInstanceInternal () |
static PyObject * | PyInitItomDbg (void) |
static PyObject * | PyDbgCommandLoop (PyObject *pSelf, PyObject *pArgs) |
Private Attributes | |
bool | started |
QMutex | dbgCmdMutex |
QMutex | pythonStateChangeMutex |
QMutex | dictChangeMutex |
QDesktopWidget * | m_pDesktopWidget |
QQueue< tPythonDbgCmd > | debugCommandQueue |
tPythonDbgCmd | debugCommand |
tPythonState | pythonState |
BreakPointModel * | bpModel |
PyObject * | mainModule |
main module of python (builtin) [borrowed] | |
PyObject * | mainDictionary |
main dictionary of python [borrowed] | |
PyObject * | localDictionary |
local dictionary of python [borrowed], usually NULL unless if debugger is in "interaction-mode", then globalDictionary is equal to the local dictionary of the current frame | |
PyObject * | globalDictionary |
global dictionary of python [borrowed], equals to mainDictionary unless if debugger is in "interaction-mode", then globalDictionary is equal to the global dictionary of the current frame | |
PyObject * | itomDbgModule |
debugger module | |
PyObject * | itomDbgInstance |
debugger instance | |
PyObject * | itomModule |
itom module [new ref] | |
PyObject * | itomFunctions |
ito functions [additional python methods] [new ref] | |
PyObject * | gcModule |
PyObject * | dictUnicode |
QSet< PyWorkspaceContainer * > | m_mainWorkspaceContainer |
QSet< PyWorkspaceContainer * > | m_localWorkspaceContainer |
QHash< QString, QPair < PyObject *, PyObject * > > | m_pyFuncWeakRefHashes |
hash table containing weak reference to callable python methods or functions and as second, optional PyObject* an tuple, passed as argument to that function. These functions are for example executed by menu-clicks in the main window. | |
int | m_pyFuncWeakRefHashesAutoInc |
bool | m_executeInternalPythonCodeInDebugMode |
if true, button events, user interface connections to python methods... will be executed by debugger | |
PyMethodDef * | PythonAdditionalModuleITOM |
debugger functionality | |
Static Private Attributes | |
static PyMethodDef | PyMethodItomDbg [] |
static PyModuleDef | PyModuleItomDbg |
static QMutex | instatiated |
static QMutex | instancePtrProtection |
static PythonEngine * | instance = NULL |
Friends | |
class | PythonDataObject |
class | ito::PythonItom |
RetVal PythonEngine::addMethodToModule | ( | PyMethodDef * | def | ) | [private] |
< module-dictionary (borrowed)
< function object for new dynamic function call (new reference)
RetVal PythonEngine::debugFile | ( | char * | pythonFileName | ) | [protected] |
< first, clear all existing breakpoints
< syntax error
< disconnect connections for live-changes in breakpoints
RetVal PythonEngine::debugFunction | ( | PyObject * | callable, |
PyObject * | argTuple | ||
) | [protected] |
< first, clear all existing breakpoints
< syntax error
< disconnect connections for live-changes in breakpoints
RetVal PythonEngine::debugString | ( | const char * | command | ) | [protected] |
< first, clear all existing breakpoints
< syntax error
< disconnect connections for live-changes in breakpoints
RetVal PythonEngine::delMethodFromModule | ( | const char * | ml_name | ) | [private] |
< module-dictionary (borrowed)
PyObject* PythonEngine::getGlobalDictionary | ( | ) | [inline] |
returns reference to main dictionary (main workspace)
PyObject* PythonEngine::getLocalDictionary | ( | ) | [inline, private] |
returns reference to local dictionary (workspace of method, which is handled right now). Is NULL if no method is executed right now.
PyObject * PythonEngine::PyDbgCommandLoop | ( | PyObject * | pSelf, |
PyObject * | pArgs | ||
) | [static, private] |
< check if key interrupt occurred
< do_quit instead of set_quit, since one member-variable is set in itoDebugger.py
RetVal PythonEngine::pythonAddBreakpoint | ( | const QString & | filename, |
const int | lineno, | ||
const bool | enabled, | ||
const bool | temporary, | ||
const QString & | condition, | ||
const int | ignoreCount, | ||
int & | pyBpNumber | ||
) | [private] |
> retNumber is new pyBpNumber, must now be added to BreakPointModel
RetVal PythonEngine::pythonAddBuiltinMethods | ( | ) | [private] |
< insert all dynamic function calls to PythonAdditionalModuleITOM, which must be "alive" until Py_Finalize()
void PythonEngine::pythonSetup | ( | ito::RetVal * | retValue | ) |
< add all static, known function calls to python-module itom
< add all static, known function calls to python-module itomdbg
< must be called after any PyImport_AppendInittab-call
< borrowed reference
< http://bytes.com/topic/python/answers/649229-_pyobject_new-pyobject_init-pyinstance_new-etc, new reference
RetVal PythonEngine::syntaxCheck | ( | char * | pythonFileName | ) | [protected] |
checks syntax of python-file.
pythonFileName | Name of Python-File |
< syntax error
PyMethodDef PythonEngine::PyMethodItomDbg [static, private] |
{ {"pyDbgCommandLoop", PythonEngine::PyDbgCommandLoop, METH_VARARGS, "will be invoked if debugger stopped at the given filename and line"}, {NULL, NULL, 0, NULL} }
PyModuleDef PythonEngine::PyModuleItomDbg [static, private] |
{
PyModuleDef_HEAD_INIT, "itomDbgWrapper", NULL, -1, PythonEngine::PyMethodItomDbg,
NULL, NULL, NULL, NULL
}