]> git.lyx.org Git - features.git/commitdiff
stop/start the blinking cursor when the WorkArea get a focusInEvent or focusOutEvent.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 27 Oct 2006 23:26:52 +0000 (23:26 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 27 Oct 2006 23:26:52 +0000 (23:26 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15586 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiWorkArea.C
src/frontends/qt4/GuiWorkArea.h

index 9aa1ba5630dcb5566490e016fd4829be7f92b338..74e29346159cbdcc1af42334a68c9ef5cba62dff 100644 (file)
@@ -285,6 +285,18 @@ void GuiWorkArea::dropEvent(QDropEvent* event)
 }
 
 
+void GuiWorkArea::focusInEvent(QFocusEvent * /*event*/)
+{
+       startBlinkingCursor();
+}
+
+
+void GuiWorkArea::focusOutEvent(QFocusEvent * /*event*/)
+{
+       stopBlinkingCursor();
+}
+
+
 void GuiWorkArea::mousePressEvent(QMouseEvent * e)
 {
        if (dc_event_.active && dc_event_ == *e) {
index 2824d43e8281f9521b4fadcad81c515ae078b6e1..b81e48d06bdda9a49f0bd832fd7c02d68022aa2a 100644 (file)
@@ -118,6 +118,10 @@ private:
        void dragEnterEvent(QDragEnterEvent * ev);
        ///
        void dropEvent(QDropEvent * ev);
+       ///
+       void focusInEvent(QFocusEvent *);
+       ///
+       void focusOutEvent(QFocusEvent *);
        /// repaint part of the widget
        void paintEvent(QPaintEvent * ev);
        /// widget has been resized