Пример #1
0
Screen::Screen(QWidget* parent, Qt::WindowFlags f) : QWidget(parent, f ) 
{
	setMouseTracking(TRUE);
	setFocusPolicy( Qt::NoFocus );
	setMinimumSize( QSize(0,0) );

#if NEW_MOUSE_CHECK_POS
	mouse_last_position = QPoint(0,0);
#else
	cursor_pos = QPoint(0,0);
	last_cursor_pos = QPoint(0,0);
#endif

	check_mouse_timer = new QTimer(this);
	connect( check_mouse_timer, SIGNAL(timeout()), this, SLOT(checkMousePos()) );
#if !NEW_MOUSE_CHECK_POS
	check_mouse_timer->start(2000);
#endif

	// Change attributes
	setAttribute(Qt::WA_NoSystemBackground);
	//setAttribute(Qt::WA_StaticContents);
    //setAttribute( Qt::WA_OpaquePaintEvent );
	setAttribute(Qt::WA_PaintOnScreen);
	setAttribute(Qt::WA_PaintUnclipped);
	//setAttribute(Qt::WA_PaintOutsidePaintEvent);

#if NEW_MOUSE_CHECK_POS
	setAutoHideInterval(1000);
	setAutoHideCursor(false);
#endif
}
Пример #2
0
void Screen::playingStarted() {
#if NEW_MOUSE_CHECK_POS
	setAutoHideCursor(true);
#endif
}
Пример #3
0
void Screen::playingStopped() {
#if NEW_MOUSE_CHECK_POS
	setAutoHideCursor(false);
#endif
}
Пример #4
0
void KCursor::setAutoHideCursor( QWidget *w, bool enable )
{
    setAutoHideCursor( w, enable, false );
}