Mercurial > hg > octave-nkf
comparison libgui/qterminal/libqterminal/unix/TerminalView.h @ 16609:6f7940e36322
improve handling of cursor blinking for unix GUI terminal window
* QUnixTerminalImpl.h, QUnixTerminalImpl.cpp
(QUnixTerminalImpl::focusInEvent): Delete.
* TerminalView.h, TerminalView.cpp (TerminalView::drawCursor):
Don't check focus.
(TerminalView::setBlinkingCursorState): New function.
(TerminalView::setBlinkingCursor): Use it.
(TerminalView::focusInEvent, TerminalView::focusOutEvent):
New functions.
(TerminalView::blinkCursorEvent): Only toggle state if
_hasBlinkingCursor is true.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 04 May 2013 01:01:44 -0400 |
parents | 018c46ef8a0c |
children | 1d1f02e0f6b4 |
comparison
equal
deleted
inserted
replaced
16608:739d7eb97b85 | 16609:6f7940e36322 |
---|---|
148 | 148 |
149 /** Returns true if the cursor is set to blink or false otherwise. */ | 149 /** Returns true if the cursor is set to blink or false otherwise. */ |
150 bool blinkingCursor() { return _hasBlinkingCursor; } | 150 bool blinkingCursor() { return _hasBlinkingCursor; } |
151 /** Specifies whether or not the cursor blinks. */ | 151 /** Specifies whether or not the cursor blinks. */ |
152 void setBlinkingCursor(bool blink); | 152 void setBlinkingCursor(bool blink); |
153 void setBlinkingCursorState(bool blink); | |
153 | 154 |
154 void setCtrlDrag(bool enable) { _ctrlDrag=enable; } | 155 void setCtrlDrag(bool enable) { _ctrlDrag=enable; } |
155 bool ctrlDrag() { return _ctrlDrag; } | 156 bool ctrlDrag() { return _ctrlDrag; } |
156 | 157 |
157 /** | 158 /** |
475 | 476 |
476 protected: | 477 protected: |
477 virtual bool event( QEvent * ); | 478 virtual bool event( QEvent * ); |
478 | 479 |
479 virtual void paintEvent( QPaintEvent * ); | 480 virtual void paintEvent( QPaintEvent * ); |
481 | |
482 void focusInEvent(QFocusEvent *focusEvent); | |
483 void focusOutEvent(QFocusEvent *focusEvent); | |
480 | 484 |
481 virtual void showEvent(QShowEvent*); | 485 virtual void showEvent(QShowEvent*); |
482 virtual void hideEvent(QHideEvent*); | 486 virtual void hideEvent(QHideEvent*); |
483 virtual void resizeEvent(QResizeEvent*); | 487 virtual void resizeEvent(QResizeEvent*); |
484 | 488 |