diff libqterminal/unix/QUnixTerminalImpl.cpp @ 15677:f620ecde2566

Added support for changing the cursor.
author Jacob Dawid <jacob.dawid@gmail.com>
date Sat, 21 Jul 2012 01:36:45 -0400
parents 22bd268429d3
children 6b1369106141
line wrap: on
line diff
--- a/libqterminal/unix/QUnixTerminalImpl.cpp	Fri Jul 20 16:35:17 2012 -0400
+++ b/libqterminal/unix/QUnixTerminalImpl.cpp	Sat Jul 21 01:36:45 2012 -0400
@@ -118,6 +118,16 @@
     m_terminalModel->sendText(text);
 }
 
+void QUnixTerminalImpl::setCursorType(CursorType type, bool blinking)
+{
+    switch(type) {
+        case UnderlineCursor: m_terminalView->setKeyboardCursorShape(TerminalView::UnderlineCursor);
+        case BlockCursor: m_terminalView->setKeyboardCursorShape(TerminalView::BlockCursor);
+        case IBeamCursor: m_terminalView->setKeyboardCursorShape(TerminalView::IBeamCursor);
+    }
+    m_terminalView->setBlinkingCursor(blinking);
+}
+
 void QUnixTerminalImpl::focusInEvent(QFocusEvent *focusEvent)
 {
     Q_UNUSED(focusEvent);