Public Types | |
enum | KeyboardCursorType { BlockCursor , UnderlineCursor , IBeamCursor } |
Public Member Functions | |
QConsolePrivate (QWinTerminalImpl *parent, const QString &cmd=QString()) | |
~QConsolePrivate (void) | |
QColor | backgroundColor (void) const |
void | clearSelection (void) |
void | closeStandardIO (int fd, DWORD stdHandleId, const char *name) |
QColor | cursorColor (void) const |
QRect | cursorRect (void) |
void | drawCursor (QPainter &p) |
void | drawSelection (QPainter &p, int cx1, int cy1, int cx2, int cy2, int cw, int ch) |
void | drawText (QPainter &p, int cx1, int cy1, int cx2, int cy2, int cw, int ch) |
void | drawTextBackground (QPainter &p, int cx1, int cy1, int cx2, int cy2, int cw, int ch) |
QColor | foregroundColor (void) const |
QString | getSelection (void) |
void | grabConsoleBuffer (CHAR_INFO *buf=0) |
void | log (const char *fmt,...) |
void | monitorConsole (void) |
QPoint | posToCell (const QPoint &pt) |
void | selectAll () |
QColor | selectionColor (void) const |
void | selectLine (const QPoint &cellPos) |
void | selectWord (const QPoint &cellPos) |
void | sendConsoleText (const QString &s) |
void | setBackgroundColor (const QColor &color) |
void | setCursorColor (bool useForegroundColor, const QColor &color) |
void | setForegroundColor (const QColor &color) |
void | setHorizontalScrollValue (int value) |
void | setScrollBufferSize (int value) |
void | setSelectionColor (const QColor &color) |
void | setupStandardIO (DWORD stdHandleId, int fd, const char *name, const char *devName) |
void | setVerticalScrollValue (int value) |
void | startCommand (void) |
void | syncConsoleParameters (void) |
void | updateConsoleSize (bool sync=false, bool allow_smaller_width=false) |
void | updateConsoleView (bool grab=true) |
void | updateHorizontalScrollBar (void) |
void | updateSelection (void) |
void | updateVerticalScrollBar (void) |
Private Attributes | |
bool | m_auto_scroll |
QPoint | m_beginSelection |
QTimer * | m_blinkCursorTimer |
CHAR_INFO * | m_buffer |
QSize | m_bufferSize |
QSize | m_charSize |
QConsoleColors | m_colors |
QString | m_command |
QRect | m_consoleRect |
QConsoleThread * | m_consoleThread |
QConsoleView * | m_consoleView |
QTimer * | m_consoleWatcher |
HWND | m_consoleWindow |
bool | m_cursorBlinking |
QColor | m_cursorColor |
QPoint | m_cursorPos |
KeyboardCursorType | m_cursorType |
QPoint | m_endSelection |
QFont | m_font |
bool | m_hasBlinkingCursor |
QScrollBar * | m_horizontalScrollBar |
bool | m_inWheelEvent |
HANDLE | m_process |
QColor | m_selectionColor |
bool | m_settingSelection |
HANDLE | m_stdOut |
QString | m_title |
CHAR_INFO * | m_tmpBuffer |
QScrollBar * | m_verticalScrollBar |
QWinTerminalImpl * | q |
Static Private Attributes | |
static const int | BLINK_DELAY = 500 |
Friends | |
class | QWinTerminalImpl |
Definition at line 164 of file QWinTerminalImpl.cpp.
Enumerator | |
---|---|
BlockCursor | |
UnderlineCursor | |
IBeamCursor |
Definition at line 170 of file QWinTerminalImpl.cpp.
QConsolePrivate::QConsolePrivate | ( | QWinTerminalImpl * | parent, |
const QString & | cmd = QString () |
||
) |
Definition at line 281 of file QWinTerminalImpl.cpp.
References backgroundColor(), QWinTerminalImpl::blinkCursorEvent(), closeStandardIO(), QWinTerminalImpl::horizontalScrollValueChanged(), log(), m_blinkCursorTimer, m_buffer, m_bufferSize, m_command, m_consoleRect, m_consoleThread, m_consoleView, m_consoleWatcher, m_consoleWindow, m_cursorPos, m_font, m_horizontalScrollBar, m_stdOut, m_tmpBuffer, m_verticalScrollBar, monitorConsole(), q, QWinTerminalImpl::QConsoleThread, QWinTerminalImpl::QConsoleView, setBackgroundColor(), setCursorColor(), setForegroundColor(), setSelectionColor(), setupStandardIO(), QWinTerminalImpl::terminated(), updateHorizontalScrollBar(), updateVerticalScrollBar(), and QWinTerminalImpl::verticalScrollValueChanged().
QConsolePrivate::~QConsolePrivate | ( | void | ) |
Definition at line 450 of file QWinTerminalImpl.cpp.
References m_buffer, m_consoleThread, m_process, and m_tmpBuffer.
QColor QConsolePrivate::backgroundColor | ( | void | ) | const |
Definition at line 580 of file QWinTerminalImpl.cpp.
References m_colors.
Referenced by QConsolePrivate(), and QWinTerminalImpl::viewPaintEvent().
void QConsolePrivate::clearSelection | ( | void | ) |
Definition at line 573 of file QWinTerminalImpl.cpp.
References m_beginSelection, m_consoleView, and m_endSelection.
Referenced by sendConsoleText().
void QConsolePrivate::closeStandardIO | ( | int | fd, |
DWORD | stdHandleId, | ||
const char * | name | ||
) |
Definition at line 957 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate().
QColor QConsolePrivate::cursorColor | ( | void | ) | const |
Definition at line 595 of file QWinTerminalImpl.cpp.
References foregroundColor(), and m_cursorColor.
Referenced by drawCursor().
QRect QConsolePrivate::cursorRect | ( | void | ) |
Definition at line 1432 of file QWinTerminalImpl.cpp.
References m_charSize, m_consoleRect, and m_cursorPos.
Referenced by QWinTerminalImpl::blinkCursorEvent(), and drawCursor().
void QConsolePrivate::drawCursor | ( | QPainter & | p | ) |
Definition at line 849 of file QWinTerminalImpl.cpp.
References BlockCursor, cursorColor(), cursorRect(), IBeamCursor, m_cursorBlinking, m_cursorType, q, and UnderlineCursor.
Referenced by QWinTerminalImpl::viewPaintEvent().
void QConsolePrivate::drawSelection | ( | QPainter & | p, |
int | cx1, | ||
int | cy1, | ||
int | cx2, | ||
int | cy2, | ||
int | cw, | ||
int | ch | ||
) |
Definition at line 773 of file QWinTerminalImpl.cpp.
References len, m_beginSelection, m_buffer, m_consoleRect, m_endSelection, maybeSwapPoints(), and selectionColor().
Referenced by QWinTerminalImpl::viewPaintEvent().
void QConsolePrivate::drawText | ( | QPainter & | p, |
int | cx1, | ||
int | cy1, | ||
int | cx2, | ||
int | cy2, | ||
int | cw, | ||
int | ch | ||
) |
Definition at line 891 of file QWinTerminalImpl.cpp.
References foregroundColor(), m_buffer, m_colors, m_consoleRect, m_font, and x.
Referenced by QWinTerminalImpl::viewPaintEvent().
void QConsolePrivate::drawTextBackground | ( | QPainter & | p, |
int | cx1, | ||
int | cy1, | ||
int | cx2, | ||
int | cy2, | ||
int | cw, | ||
int | ch | ||
) |
Definition at line 635 of file QWinTerminalImpl.cpp.
References len, m_buffer, m_colors, m_consoleRect, and x.
Referenced by QWinTerminalImpl::viewPaintEvent().
QColor QConsolePrivate::foregroundColor | ( | void | ) | const |
Definition at line 585 of file QWinTerminalImpl.cpp.
References m_colors.
Referenced by cursorColor(), and drawText().
QString QConsolePrivate::getSelection | ( | void | ) |
Definition at line 499 of file QWinTerminalImpl.cpp.
References m_beginSelection, m_bufferSize, m_endSelection, m_stdOut, and maybeSwapPoints().
Referenced by QWinTerminalImpl::copyClipboard(), and QWinTerminalImpl::selectedText().
void QConsolePrivate::grabConsoleBuffer | ( | CHAR_INFO * | buf = 0 | ) |
Definition at line 1113 of file QWinTerminalImpl.cpp.
References log(), m_buffer, m_consoleRect, m_stdOut, and r.
Referenced by monitorConsole(), updateConsoleView(), and QWinTerminalImpl::viewResizeEvent().
void QConsolePrivate::log | ( | const char * | fmt, |
... | |||
) |
Definition at line 968 of file QWinTerminalImpl.cpp.
References octave::sys::fopen(), and LOGFILENAME.
Referenced by QConsolePrivate(), closeStandardIO(), grabConsoleBuffer(), monitorConsole(), setHorizontalScrollValue(), QWinTerminalImpl::setSize(), setupStandardIO(), setVerticalScrollValue(), syncConsoleParameters(), updateConsoleSize(), updateHorizontalScrollBar(), and updateVerticalScrollBar().
void QConsolePrivate::monitorConsole | ( | void | ) |
Definition at line 1247 of file QWinTerminalImpl.cpp.
References grabConsoleBuffer(), log(), m_auto_scroll, m_buffer, m_bufferSize, m_charSize, m_consoleRect, m_consoleView, m_cursorPos, m_title, m_tmpBuffer, q, QWinTerminalImpl::titleChanged(), updateConsoleView(), updateHorizontalScrollBar(), and updateVerticalScrollBar().
Referenced by QConsolePrivate(), and QWinTerminalImpl::monitorConsole().
QPoint QConsolePrivate::posToCell | ( | const QPoint & | pt | ) |
Definition at line 493 of file QWinTerminalImpl.cpp.
References m_charSize, and m_consoleRect.
Referenced by QWinTerminalImpl::mouseDoubleClickEvent(), QWinTerminalImpl::mouseMoveEvent(), QWinTerminalImpl::mousePressEvent(), QWinTerminalImpl::mouseReleaseEvent(), and QWinTerminalImpl::mouseTripleClickEvent().
void QConsolePrivate::selectAll | ( | void | ) |
Definition at line 696 of file QWinTerminalImpl.cpp.
References m_beginSelection, m_bufferSize, m_cursorPos, m_endSelection, and updateSelection().
Referenced by QWinTerminalImpl::selectAll().
QColor QConsolePrivate::selectionColor | ( | void | ) | const |
Definition at line 590 of file QWinTerminalImpl.cpp.
References m_selectionColor.
Referenced by drawSelection().
void QConsolePrivate::selectLine | ( | const QPoint & | cellPos | ) |
Definition at line 765 of file QWinTerminalImpl.cpp.
References m_beginSelection, m_bufferSize, m_endSelection, and updateSelection().
Referenced by QWinTerminalImpl::mouseTripleClickEvent().
void QConsolePrivate::selectWord | ( | const QPoint & | cellPos | ) |
Definition at line 704 of file QWinTerminalImpl.cpp.
References m_beginSelection, m_buffer, m_consoleRect, m_endSelection, and updateSelection().
Referenced by QWinTerminalImpl::mouseDoubleClickEvent().
void QConsolePrivate::sendConsoleText | ( | const QString & | s | ) |
Definition at line 1364 of file QWinTerminalImpl.cpp.
References clearSelection(), len, m_auto_scroll, and TEXT_CHUNK_SIZE.
Referenced by QWinTerminalImpl::sendText().
void QConsolePrivate::setBackgroundColor | ( | const QColor & | color | ) |
Definition at line 600 of file QWinTerminalImpl.cpp.
References m_colors, and m_consoleView.
Referenced by QConsolePrivate(), and QWinTerminalImpl::setBackgroundColor().
void QConsolePrivate::setCursorColor | ( | bool | useForegroundColor, |
const QColor & | color | ||
) |
Definition at line 619 of file QWinTerminalImpl.cpp.
References m_cursorColor.
Referenced by QConsolePrivate(), and QWinTerminalImpl::setCursorColor().
void QConsolePrivate::setForegroundColor | ( | const QColor & | color | ) |
Definition at line 609 of file QWinTerminalImpl.cpp.
References m_colors.
Referenced by QConsolePrivate(), and QWinTerminalImpl::setForegroundColor().
void QConsolePrivate::setHorizontalScrollValue | ( | int | value | ) |
Definition at line 1171 of file QWinTerminalImpl.cpp.
References log(), m_bufferSize, m_consoleRect, m_stdOut, r, and updateConsoleView().
Referenced by QWinTerminalImpl::horizontalScrollValueChanged().
void QConsolePrivate::setScrollBufferSize | ( | int | value | ) |
Definition at line 625 of file QWinTerminalImpl.cpp.
References m_bufferSize, m_stdOut, and updateConsoleSize().
Referenced by QWinTerminalImpl::setScrollBufferSize().
void QConsolePrivate::setSelectionColor | ( | const QColor & | color | ) |
Definition at line 614 of file QWinTerminalImpl.cpp.
References m_selectionColor.
Referenced by QConsolePrivate(), and QWinTerminalImpl::setSelectionColor().
void QConsolePrivate::setupStandardIO | ( | DWORD | stdHandleId, |
int | fd, | ||
const char * | name, | ||
const char * | devName | ||
) |
Definition at line 465 of file QWinTerminalImpl.cpp.
References octave::sys::dup2(), log(), and name.
Referenced by QConsolePrivate().
void QConsolePrivate::setVerticalScrollValue | ( | int | value | ) |
Definition at line 1198 of file QWinTerminalImpl.cpp.
References log(), m_auto_scroll, m_bufferSize, m_consoleRect, m_stdOut, r, and updateConsoleView().
Referenced by QWinTerminalImpl::verticalScrollValueChanged().
void QConsolePrivate::startCommand | ( | void | ) |
Definition at line 1326 of file QWinTerminalImpl.cpp.
References m_command, m_process, and octave::math::pi.
Referenced by QWinTerminalImpl::start().
void QConsolePrivate::syncConsoleParameters | ( | void | ) |
Definition at line 1052 of file QWinTerminalImpl.cpp.
References log(), m_buffer, m_bufferSize, m_consoleRect, m_stdOut, and m_tmpBuffer.
Referenced by updateConsoleSize().
void QConsolePrivate::updateConsoleSize | ( | bool | sync = false , |
bool | allow_smaller_width = false |
||
) |
Definition at line 994 of file QWinTerminalImpl.cpp.
References log(), m_bufferSize, m_charSize, m_consoleRect, m_consoleView, q, QWinTerminalImpl::setSize(), syncConsoleParameters(), updateHorizontalScrollBar(), and updateVerticalScrollBar().
Referenced by QWinTerminalImpl::init_terminal_size(), setScrollBufferSize(), QWinTerminalImpl::setTerminalFont(), and QWinTerminalImpl::viewResizeEvent().
void QConsolePrivate::updateConsoleView | ( | bool | grab = true | ) |
Definition at line 1237 of file QWinTerminalImpl.cpp.
References grabConsoleBuffer(), m_consoleView, and m_consoleWatcher.
Referenced by monitorConsole(), setHorizontalScrollValue(), and setVerticalScrollValue().
void QConsolePrivate::updateHorizontalScrollBar | ( | void | ) |
Definition at line 1135 of file QWinTerminalImpl.cpp.
References log(), m_bufferSize, m_consoleRect, and m_horizontalScrollBar.
Referenced by QConsolePrivate(), monitorConsole(), and updateConsoleSize().
void QConsolePrivate::updateSelection | ( | void | ) |
Definition at line 560 of file QWinTerminalImpl.cpp.
References m_beginSelection, m_consoleRect, m_consoleView, m_endSelection, and maybeSwapPoints().
Referenced by selectAll(), selectLine(), selectWord(), and QWinTerminalImpl::updateSelection().
void QConsolePrivate::updateVerticalScrollBar | ( | void | ) |
Definition at line 1153 of file QWinTerminalImpl.cpp.
References log(), m_bufferSize, m_consoleRect, and m_verticalScrollBar.
Referenced by QConsolePrivate(), monitorConsole(), and updateConsoleSize().
|
friend |
Definition at line 166 of file QWinTerminalImpl.cpp.
|
staticprivate |
Definition at line 269 of file QWinTerminalImpl.cpp.
Referenced by QWinTerminalImpl::keyPressEvent(), and QWinTerminalImpl::setBlinkingCursorState().
|
private |
Definition at line 242 of file QWinTerminalImpl.cpp.
Referenced by monitorConsole(), sendConsoleText(), and setVerticalScrollValue().
|
private |
Definition at line 249 of file QWinTerminalImpl.cpp.
Referenced by clearSelection(), drawSelection(), getSelection(), QWinTerminalImpl::mousePressEvent(), selectAll(), selectLine(), selectWord(), and updateSelection().
|
private |
Definition at line 246 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), QWinTerminalImpl::keyPressEvent(), and QWinTerminalImpl::setBlinkingCursorState().
|
private |
Definition at line 258 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), ~QConsolePrivate(), drawSelection(), drawText(), drawTextBackground(), grabConsoleBuffer(), monitorConsole(), selectWord(), and syncConsoleParameters().
|
private |
Definition at line 240 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), getSelection(), monitorConsole(), selectAll(), selectLine(), setHorizontalScrollValue(), setScrollBufferSize(), setVerticalScrollValue(), syncConsoleParameters(), updateConsoleSize(), updateHorizontalScrollBar(), and updateVerticalScrollBar().
|
private |
Definition at line 239 of file QWinTerminalImpl.cpp.
Referenced by cursorRect(), monitorConsole(), posToCell(), updateConsoleSize(), and QWinTerminalImpl::viewPaintEvent().
|
private |
Definition at line 235 of file QWinTerminalImpl.cpp.
Referenced by backgroundColor(), drawText(), drawTextBackground(), foregroundColor(), setBackgroundColor(), and setForegroundColor().
|
private |
Definition at line 234 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), and startCommand().
|
private |
Definition at line 241 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), cursorRect(), drawSelection(), drawText(), drawTextBackground(), grabConsoleBuffer(), monitorConsole(), posToCell(), selectWord(), setHorizontalScrollValue(), setVerticalScrollValue(), syncConsoleParameters(), updateConsoleSize(), updateHorizontalScrollBar(), updateSelection(), updateVerticalScrollBar(), and QWinTerminalImpl::viewPaintEvent().
|
private |
Definition at line 266 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), and ~QConsolePrivate().
|
private |
Definition at line 262 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), QWinTerminalImpl::blinkCursorEvent(), clearSelection(), monitorConsole(), setBackgroundColor(), QWinTerminalImpl::setTerminalFont(), updateConsoleSize(), updateConsoleView(), and updateSelection().
|
private |
Definition at line 265 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), and updateConsoleView().
|
private |
Definition at line 257 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate().
|
private |
Definition at line 244 of file QWinTerminalImpl.cpp.
Referenced by QWinTerminalImpl::blinkCursorEvent(), drawCursor(), QWinTerminalImpl::focusOutEvent(), QWinTerminalImpl::keyPressEvent(), and QWinTerminalImpl::setBlinkingCursorState().
|
private |
Definition at line 254 of file QWinTerminalImpl.cpp.
Referenced by cursorColor(), and setCursorColor().
|
private |
Definition at line 243 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), cursorRect(), monitorConsole(), and selectAll().
|
private |
Definition at line 247 of file QWinTerminalImpl.cpp.
Referenced by drawCursor(), and QWinTerminalImpl::setCursorType().
|
private |
Definition at line 250 of file QWinTerminalImpl.cpp.
Referenced by clearSelection(), drawSelection(), getSelection(), QWinTerminalImpl::mouseMoveEvent(), QWinTerminalImpl::mouseReleaseEvent(), selectAll(), selectLine(), selectWord(), and updateSelection().
|
private |
Definition at line 233 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), drawText(), and QWinTerminalImpl::setTerminalFont().
|
private |
Definition at line 245 of file QWinTerminalImpl.cpp.
Referenced by QWinTerminalImpl::blinkCursorEvent(), QWinTerminalImpl::keyPressEvent(), and QWinTerminalImpl::setBlinkingCursor().
|
private |
Definition at line 263 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), and updateHorizontalScrollBar().
|
private |
Definition at line 236 of file QWinTerminalImpl.cpp.
Referenced by QWinTerminalImpl::wheelEvent().
|
private |
Definition at line 260 of file QWinTerminalImpl.cpp.
Referenced by ~QConsolePrivate(), and startCommand().
|
private |
Definition at line 253 of file QWinTerminalImpl.cpp.
Referenced by selectionColor(), and setSelectionColor().
|
private |
Definition at line 251 of file QWinTerminalImpl.cpp.
Referenced by QWinTerminalImpl::mouseDoubleClickEvent(), QWinTerminalImpl::mouseMoveEvent(), QWinTerminalImpl::mousePressEvent(), and QWinTerminalImpl::mouseReleaseEvent().
|
private |
Definition at line 256 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), getSelection(), grabConsoleBuffer(), setHorizontalScrollValue(), setScrollBufferSize(), setVerticalScrollValue(), and syncConsoleParameters().
|
private |
Definition at line 237 of file QWinTerminalImpl.cpp.
Referenced by monitorConsole().
|
private |
Definition at line 259 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), ~QConsolePrivate(), monitorConsole(), and syncConsoleParameters().
|
private |
Definition at line 264 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), updateVerticalScrollBar(), and QWinTerminalImpl::wheelEvent().
|
private |
Definition at line 230 of file QWinTerminalImpl.cpp.
Referenced by QConsolePrivate(), drawCursor(), monitorConsole(), and updateConsoleSize().