itom  3.0.0
ito::ConsoleWidget Class Reference
Inheritance diagram for ito::ConsoleWidget:
ito::AbstractPyScintillaWidget

Classes

struct  cmdQueueStruct
 

Public Slots

virtual void copy ()
 
virtual void paste ()
 
virtual void cut ()
 
void receiveStream (QString text, ito::QDebugStream::MsgStreamType msgType)
 
void pythonRunSelection (QString selectionText)
 
void pythonStateChanged (tPythonTransitions pyTransition)
 
void clearCommandLine ()
 
void startInputCommandLine (QSharedPointer< QByteArray > buffer, ItomSharedSemaphore *inputWaitCond)
 
- Public Slots inherited from ito::AbstractPyScintillaWidget
void selectionChanged ()
 
void reloadSettings ()
 

Signals

void wantToCopy ()
 
void pythonExecuteString (QString cmd)
 
void sendToLastCommand (QString cmd)
 
- Signals inherited from ito::AbstractPyScintillaWidget
void userSelectionChanged (int lineFrom, int indexFrom, int lineTo, int indexTo)
 

Public Member Functions

 ConsoleWidget (QWidget *parent=NULL)
 
- Public Member Functions inherited from ito::AbstractPyScintillaWidget
 AbstractPyScintillaWidget (QWidget *parent=NULL)
 
QString getWordAtPosition (const int &line, const int &index)
 

Static Public Attributes

static const QString lineBreak = QString("\n")
 < constants
 

Protected Member Functions

virtual void loadSettings ()
 
void autoAdaptLineNumberColumnWidth ()
 
void keyPressEvent (QKeyEvent *event)
 

reimplementation to process the keyReleaseEvent

More...
 
void dropEvent (QDropEvent *event)
 
void dragEnterEvent (QDragEnterEvent *event)
 
void dragMoveEvent (QDragMoveEvent *event)
 
void wheelEvent (QWheelEvent *event)
 
void contextMenuEvent (QContextMenuEvent *event)
 
bool canInsertFromMimeData (const QMimeData *source) const
 
- Protected Member Functions inherited from ito::AbstractPyScintillaWidget
void init ()
 
void checkUserSelectionState ()
 
QString formatPythonCodePart (const QString &text, int &lineCount)
 
QString formatConsoleCodePart (const QString &text)
 
QPixmap loadMarker (const QString &name, int sizeAt96dpi)
 

Private Slots

void selChanged ()
 
void textDoubleClicked (int position, int line, int modifiers)
 
void clearAndStartNewCommand ()
 

Private Member Functions

RetVal initEditor ()
 
RetVal clearEditor ()
 
RetVal startNewCommand (bool clearEditorFirst=false)
 < new command is a new line starting with ">>" More...
 
RetVal execCommand (int lineBegin, int lineEnd)
 
RetVal useCmdListCommand (int dir)
 
RetVal executeCmdQueue ()
 
void moveCursorToEnd ()
 
void moveCursorToValidRegion ()
 
int checkValidDropRegion (const QPoint &pos)
 

Private Attributes

int m_startLineBeginCmd
 zero-based, first-line of actual (not evaluated command), last line which starts with ">>", -1: no command active
 
DequeCommandListm_pCmdList
 
std::queue< cmdQueueStructm_cmdQueue
 upcoming events to handle
 
bool m_canCopy
 
bool m_canCut
 
QDebugStreamm_pQout
 
QDebugStreamm_pQerr
 
unsigned int m_markErrorLine
 
unsigned int m_markCurrentLine
 
unsigned int m_markInputLine
 
bool m_waitForCmdExecutionDone
 true: command in this console is being executed and sends a finish-event, when done.
 
bool m_pythonBusy
 true: python is executing or debugging a script, a command...
 
QString m_temporaryRemovedCommands
 removed text, if python busy, caused by another console instance or script.
 
ItomSharedSemaphorem_inputStreamWaitCond
 if this is != NULL, a input(...) command is currently running in Python and the command line is ready to receive inputs from the user.
 
QSharedPointer< QByteArray > m_inputStreamBuffer
 
int m_inputStartLine
 
int m_inputStartCol
 
bool m_autoWheel
 true if command line should automatically move to the last line if new lines are appended, this is set to false upon a wheel event and will be reset to true if the command line is cleared (clc) or if a new input is added
 

Additional Inherited Members

- Protected Types inherited from ito::AbstractPyScintillaWidget
enum  tUserSelectionState { selNo, selRange }
 
- Protected Attributes inherited from ito::AbstractPyScintillaWidget
tUserSelectionState m_userSelectionState
 

Constructor & Destructor Documentation

ito::ConsoleWidget::ConsoleWidget ( QWidget *  parent = NULL)

< empty queue

Member Function Documentation

int ito::ConsoleWidget::checkValidDropRegion ( const QPoint &  pos)
private

< pos is below last line

< mouse over margin left

< mouse at the end of this line

void ito::ConsoleWidget::dragMoveEvent ( QDragMoveEvent *  event)
protected

< if text selected in this widget, starting point before valid region and move action -> ignore

< check, that selections are only in valid area

void ito::ConsoleWidget::keyPressEvent ( QKeyEvent *  event)
protected

reimplementation to process the keyReleaseEvent

< no action necessary

return pressed

< new line for possible error or message

< do not emit keyPressEvent in QsciScintilla!!

< do not emit keyPressEvent in QsciScintilla!!

< do not emit keyPressEvent in QsciScintilla!!

< check that del and backspace is only pressed in valid cursor context

< no selection

< check that del and backspace is only pressed in valid cursor context

< no action necessary

void ito::ConsoleWidget::moveCursorToValidRegion ( )
private

< check, that selections are only in valid area

void ito::ConsoleWidget::receiveStream ( QString  text,
ito::QDebugStream::MsgStreamType  msgType 
)
slot

insert msg after last line

insert msg after last line

RetVal ito::ConsoleWidget::startNewCommand ( bool  clearEditorFirst = false)
private

< new command is a new line starting with ">>"

< empty editor, just start new command

< append at the end of the existing text


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