~ubuntu-branches/ubuntu/saucy/minitube/saucy-proposed

« back to all changes in this revision

Viewing changes to src/videowidget.cpp

  • Committer: Package Import Robot
  • Author(s): Jakob Haufe
  • Date: 2012-09-29 02:43:53 UTC
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: package-import@ubuntu.com-20120929024353-fxbrlvqxrlu6cwld
Tags: upstream-1.9
ImportĀ upstreamĀ versionĀ 1.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include "videowidget.h"
2
 
 
3
 
VideoWidget::VideoWidget(QWidget *parent) : Phonon::VideoWidget(parent) {
4
 
    // mouse autohide
5
 
    setMouseTracking(true);
6
 
    mouseTimer = new QTimer(this);
7
 
    mouseTimer->setInterval(3000);
8
 
    mouseTimer->setSingleShot(true);
9
 
    connect(mouseTimer, SIGNAL(timeout()), SLOT(hideMouse()));
10
 
}
11
 
 
12
 
void VideoWidget::mouseMoveEvent(QMouseEvent *event) {
13
 
    Phonon::VideoWidget::mouseMoveEvent(event);
14
 
 
15
 
    // qDebug() << "VideoWidget::mouseMoveEvent" << event->pos();
16
 
 
17
 
    // show the normal cursor
18
 
    unsetCursor();
19
 
 
20
 
    // then hide it again after a few seconds
21
 
    mouseTimer->start();
22
 
}
23
 
 
24
 
void VideoWidget::hideMouse() {
25
 
    // qDebug() << "hideMouse()";
26
 
    setCursor(Qt::BlankCursor);
27
 
}