Mercurial > octave-nkf
comparison libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp @ 19628:fe689210525c gui-release
maint: Periodic merge of stable to gui-release.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 20 Jan 2015 10:05:42 -0500 |
parents | 9c719c504e8d 446c46af4b42 |
children | be7ac98fab43 |
comparison
equal
deleted
inserted
replaced
19624:6d75f1683ce8 | 19628:fe689210525c |
---|---|
277 | 277 |
278 ////////////////////////////////////////////////////////////////////////////// | 278 ////////////////////////////////////////////////////////////////////////////// |
279 | 279 |
280 QConsolePrivate::QConsolePrivate (QWinTerminalImpl* parent, const QString& cmd) | 280 QConsolePrivate::QConsolePrivate (QWinTerminalImpl* parent, const QString& cmd) |
281 : q (parent), m_command (cmd), m_cursorBlinking (false), | 281 : q (parent), m_command (cmd), m_cursorBlinking (false), |
282 m_hasBlinkingCursor (true), m_cursorType (BlockCursor), | 282 m_hasBlinkingCursor (true), m_cursorType (BlockCursor), |
283 m_beginSelection (0, 0), m_endSelection (0, 0), m_settingSelection (false), | 283 m_beginSelection (0, 0), m_endSelection (0, 0), m_settingSelection (false), |
284 m_process (NULL), m_inWheelEvent (false) | 284 m_process (NULL), m_inWheelEvent (false) |
285 { | 285 { |
286 log (NULL); | 286 log (NULL); |
287 | 287 |
414 m_consoleWatcher->setInterval (10); | 414 m_consoleWatcher->setInterval (10); |
415 m_consoleWatcher->setSingleShot (false); | 415 m_consoleWatcher->setSingleShot (false); |
416 | 416 |
417 m_blinkCursorTimer = new QTimer (parent); | 417 m_blinkCursorTimer = new QTimer (parent); |
418 QObject::connect (m_blinkCursorTimer, SIGNAL (timeout()), | 418 QObject::connect (m_blinkCursorTimer, SIGNAL (timeout()), |
419 q, SLOT (blinkCursorEvent ())); | 419 q, SLOT (blinkCursorEvent ())); |
420 | 420 |
421 QObject::connect (m_horizontalScrollBar, SIGNAL (valueChanged (int)), | 421 QObject::connect (m_horizontalScrollBar, SIGNAL (valueChanged (int)), |
422 q, SLOT (horizontalScrollValueChanged (int))); | 422 q, SLOT (horizontalScrollValueChanged (int))); |
423 | 423 |
424 QObject::connect (m_verticalScrollBar, SIGNAL (valueChanged (int)), | 424 QObject::connect (m_verticalScrollBar, SIGNAL (valueChanged (int)), |
855 p.fillRect (rect, color); | 855 p.fillRect (rect, color); |
856 else | 856 else |
857 { | 857 { |
858 // draw the cursor outline, adjusting the area so that | 858 // draw the cursor outline, adjusting the area so that |
859 // it is draw entirely inside 'rect' | 859 // it is draw entirely inside 'rect' |
860 | 860 |
861 int penWidth = qMax (1, p.pen().width()); | 861 int penWidth = qMax (1, p.pen().width()); |
862 | 862 |
863 p.drawRect (rect.adjusted (penWidth/2, penWidth/2, | 863 p.drawRect (rect.adjusted (penWidth/2, penWidth/2, |
864 - penWidth/2 - penWidth%2, | 864 - penWidth/2 - penWidth%2, |
865 - penWidth/2 - penWidth%2)); | 865 - penWidth/2 - penWidth%2)); |
866 } | 866 } |
867 } | 867 } |
1374 VK_RETURN; | 1374 VK_RETURN; |
1375 events[nEvents].Event.KeyEvent.wVirtualScanCode = 0; | 1375 events[nEvents].Event.KeyEvent.wVirtualScanCode = 0; |
1376 events[nEvents].Event.KeyEvent.uChar.UnicodeChar = c.unicode (); | 1376 events[nEvents].Event.KeyEvent.uChar.UnicodeChar = c.unicode (); |
1377 events[nEvents].Event.KeyEvent.dwControlKeyState = 0; | 1377 events[nEvents].Event.KeyEvent.dwControlKeyState = 0; |
1378 nEvents++; | 1378 nEvents++; |
1379 | 1379 |
1380 WriteConsoleInput (hStdIn, events, nEvents, &written); | 1380 WriteConsoleInput (hStdIn, events, nEvents, &written); |
1381 nEvents = 0; | 1381 nEvents = 0; |
1382 ZeroMemory (events, sizeof (events)); | 1382 ZeroMemory (events, sizeof (events)); |
1383 | 1383 |
1384 } | 1384 } |
1385 else | 1385 else |
1386 { | 1386 { |
1387 events[nEvents].EventType = KEY_EVENT; | 1387 events[nEvents].EventType = KEY_EVENT; |
1388 events[nEvents].Event.KeyEvent.bKeyDown = TRUE; | 1388 events[nEvents].Event.KeyEvent.bKeyDown = TRUE; |