23#ifndef CONSOLEWIDGET_H
24#define CONSOLEWIDGET_H
28#include "common/sharedStructures.h"
29#include "common/sharedStructuresQt.h"
30#include "../python/qDebugStream.h"
33#include "abstractCodeEditorWidget.h"
34#include "../codeEditor/modes/lineBackgroundMarker.h"
35#include "../codeEditor/modes/pyGotoAssignment.h"
36#include "../codeEditor/panels/lineNumber.h"
42#include <qstringlist.h>
46#include <qelapsedtimer.h>
47#include <qregularexpression.h>
54class DequeCommandList;
65 static const QString newCommandPrefix;
67 virtual QString codeText(
int &line,
int &column)
const;
70 virtual void loadSettings();
71 virtual void contextMenuAboutToShow(
int contextMenuLine);
72 virtual int startLineOffset(
int lineIdx)
const;
80 void pythonRunSelection(QString selectionText);
81 void pythonStateChanged(tPythonTransitions pyTransition);
82 void clearCommandLine();
83 void interruptCommandInput();
84 void startInputCommandLine(QSharedPointer<QByteArray> buffer,
ItomSharedSemaphore *inputWaitCond);
88 void sendToLastCommand(QString cmd);
93 void dragEnterEvent (QDragEnterEvent *event);
95 void wheelEvent(QWheelEvent *event);
96 bool canInsertFromMimeData(
const QMimeData *source)
const;
97 void mouseDoubleClickEvent(QMouseEvent *e);
101 void textDoubleClicked(
int position,
int line,
int modifiers);
102 void clearAndStartNewCommand();
103 void toggleAutoWheel(
bool enable);
114 CmdQueueItem(
const QString &text,
int lineBegin,
int nrOfLines) :
116 m_lineBegin(lineBegin),
117 m_nrOfLines(nrOfLines)
120 QString m_singleLine;
133 bool inputModeEnabled;
134 bool calltipsModeCurrentState;
135 bool autoCompletionModeCurrentState;
141 RetVal execCommand(
int lineBegin,
int lineEnd);
142 RetVal useCmdListCommand(
int dir);
147 void moveCursorToEnd();
152 void enableInputTextMode();
153 void disableInputTextMode();
155 QList<ito::TextBlockUserData::AnsiTextCharFormat> parseReceiveStreamBufferForAnsiCodes(
const QString &inputText, QString &strippedText);
156 QList<QSharedPointer<QList<ito::TextBlockUserData::AnsiTextCharFormat>>> handleTextLinesAndSplitLongLines(
158 const QList<ito::TextBlockUserData::AnsiTextCharFormat> &ansiTextCharFormat,
159 bool smartSplitting);
160 QList<QSharedPointer<QList<ito::TextBlockUserData::AnsiTextCharFormat>>> splitLongLinesText(
162 const QSharedPointer<QList<ito::TextBlockUserData::AnsiTextCharFormat>> &ansiTextCharFormat,
163 bool smartSplitting);
175 QTimer m_receiveStreamBufferTimer;
176 bool m_splitLongLines;
177 int m_splitLongLinesMaxLength;
180 QSharedPointer<LineBackgroundMarkerMode> m_markErrorLineMode;
181 QSharedPointer<LineBackgroundMarkerMode> m_markCurrentLineMode;
182 QSharedPointer<LineBackgroundMarkerMode> m_markInputLineMode;
183 QSharedPointer<LineNumberPanel> m_lineNumberPanel;
191 QSharedPointer<QByteArray> m_inputStreamBuffer;
196 QMap<QString, QAction*> m_contextMenuActions;
201 QRegularExpression m_ansiEscapeSeqRegExp;
202 bool m_considerAnsiEscapeSequences;
204 static const QString longLineWrapPrefix;
214 RetVal add(
const QString &cmd);
216 QString getPrevious();
221 std::deque<QString> m_cmdList;
222 std::deque<QString>::reverse_iterator m_rit;
semaphore which can be used for asynchronous thread communication. By using this class it is possible...
Definition sharedStructuresQt.h:58
Definition consoleWidget.h:209
Class for managing status values (like errors or warning)
Definition retVal.h:54
Definition apiFunctionsGraph.cpp:40
tStreamMessageType
Definition typeDefs.h:77
Definition consoleWidget.h:132
Definition textBlockUserData.h:77