comparison libgui/qterminal/libqterminal/win32/QWinTerminalImpl.h @ 16608:739d7eb97b85

make blinking cursor and different cursor styles for Windows GUI terminal * QWinTerminalImpl.h, QWinTerminalImpl.cpp (QConsolePrivate::KeyboardCursorType): New enum. (QConsolePrivate::cursorRect): New function. (QConsolePrivate::BLINK_DELAY, QConsolePrivate::m_cursorBlinking, QConsolePrivate::m_blinkCursorTimer, QConsolePrivate::m_cursorType, QConsolePrivate::m_hasBlinkingCursor): New data members. (QConsolePrivate::QConsolePrivate): Initialize m_hasBlinkingCursor and m_cursorType. Create m_blinkCursorTimer. Connect m_blinkCursorTimer::timeout to parent::blinkCursorEvent. (QWinTerminalImpl::viewPaintEvent): Draw new cursor types. Handle blinking cursor. (QWinTerminalImpl::blinkCursorEvent, QWinTerminalImpl::setBlinkingCursor, QWinTerminalImpl::setBlinkingCursorState, QWinTerminalImpl::focusInEvent, QWinTerminalImpl::keyPressEvent, QWinTerminalImpl::setCursorType): New functions. (QWinTerminalImpl::focusInEvent): Call setBlinkingCursorState.
author John W. Eaton <jwe@octave.org>
date Sat, 04 May 2013 00:49:34 -0400
parents 018c46ef8a0c
children dae674adf045
comparison
equal deleted inserted replaced
16607:1eeeb2599870 16608:739d7eb97b85
24 24
25 #include <QWidget> 25 #include <QWidget>
26 #include "QTerminalInterface.h" 26 #include "QTerminalInterface.h"
27 class QFocusEvent; 27 class QFocusEvent;
28 class QKeyEvent; 28 class QKeyEvent;
29 class QPainter;
29 class QPaintEvent; 30 class QPaintEvent;
30 class QResizeEvent; 31 class QResizeEvent;
31 class QWheelEvent; 32 class QWheelEvent;
32 33
33 class QConsolePrivate; 34 class QConsolePrivate;
49 ~QWinTerminalImpl (void); 50 ~QWinTerminalImpl (void);
50 51
51 void setTerminalFont (const QFont& font); 52 void setTerminalFont (const QFont& font);
52 void setSize (int columns, int lines); 53 void setSize (int columns, int lines);
53 void sendText (const QString& s); 54 void sendText (const QString& s);
55 void setCursorType (CursorType type, bool blinking);
54 56
55 public slots: 57 public slots:
56 void copyClipboard (void); 58 void copyClipboard (void);
57 void pasteClipboard (void); 59 void pasteClipboard (void);
60 void blinkCursorEvent (void);
58 61
59 signals: 62 signals:
60 void terminated (void); 63 void terminated (void);
61 void titleChanged (const QString&); 64 void titleChanged (const QString&);
62 65
63 protected: 66 protected:
64 void viewPaintEvent (QConsoleView*, QPaintEvent*); 67 void viewPaintEvent (QConsoleView*, QPaintEvent*);
68 void setBlinkingCursor (bool blink);
69 void setBlinkingCursorState (bool blink);
65 void viewResizeEvent (QConsoleView*, QResizeEvent*); 70 void viewResizeEvent (QConsoleView*, QResizeEvent*);
66 void wheelEvent (QWheelEvent*); 71 void wheelEvent (QWheelEvent*);
67 void focusInEvent (QFocusEvent*); 72 void focusInEvent (QFocusEvent*);
73 void focusOutEvent (QFocusEvent*);
74 void keyPressEvent (QKeyEvent*);
68 bool winEvent (MSG*, long*); 75 bool winEvent (MSG*, long*);
69 virtual void start (void); 76 virtual void start (void);
70 77
71 private slots: 78 private slots:
72 void scrollValueChanged (int value); 79 void scrollValueChanged (int value);