Changeset View
Changeset View
Standalone View
Standalone View
kstyle/breezewindowmanager.cpp
Context not available. | |||||
79 | #include <QWindow> | 79 | #include <QWindow> | ||
---|---|---|---|---|---|
80 | #endif | 80 | #endif | ||
81 | 81 | | |||
82 | #if QT_VERSION >= 0x050000 | 82 | #if BREEZE_HAVE_QTQUICK | ||
83 | // needed to enable dragging from QQuickWindows | 83 | // needed to enable dragging from QQuickWindows | ||
84 | #include <QQuickItem> | 84 | #include <QQuickItem> | ||
85 | #include <QQuickWindow> | 85 | #include <QQuickWindow> | ||
Context not available. | |||||
319 | 319 | | |||
320 | } | 320 | } | ||
321 | 321 | | |||
322 | #if !BREEZE_USE_KDE4 | 322 | #if BREEZE_HAVE_QTQUICK | ||
323 | //_____________________________________________________________ | 323 | //_____________________________________________________________ | ||
324 | void WindowManager::registerQuickItem( QQuickItem* item ) | 324 | void WindowManager::registerQuickItem( QQuickItem* item ) | ||
325 | { | 325 | { | ||
Context not available. | |||||
390 | 390 | | |||
391 | case QEvent::MouseMove: | 391 | case QEvent::MouseMove: | ||
392 | if ( object == _target.data() | 392 | if ( object == _target.data() | ||
393 | #if !BREEZE_USE_KDE4 | 393 | #if BREEZE_HAVE_QTQUICK | ||
394 | || object == _quickTarget.data() | 394 | || object == _quickTarget.data() | ||
395 | #endif | 395 | #endif | ||
396 | ) return mouseMoveEvent( object, event ); | 396 | ) return mouseMoveEvent( object, event ); | ||
Context not available. | |||||
398 | 398 | | |||
399 | case QEvent::MouseButtonRelease: | 399 | case QEvent::MouseButtonRelease: | ||
400 | if ( _target | 400 | if ( _target | ||
401 | #if !BREEZE_USE_KDE4 | 401 | #if BREEZE_HAVE_QTQUICK | ||
402 | || _quickTarget | 402 | || _quickTarget | ||
403 | #endif | 403 | #endif | ||
404 | ) return mouseReleaseEvent( object, event ); | 404 | ) return mouseReleaseEvent( object, event ); | ||
Context not available. | |||||
426 | { startDrag( _target.data()->window(), _globalDragPoint ); } | 426 | { startDrag( _target.data()->window(), _globalDragPoint ); } | ||
427 | #else | 427 | #else | ||
428 | if( _target ) startDrag( _target.data()->window()->windowHandle(), _globalDragPoint ); | 428 | if( _target ) startDrag( _target.data()->window()->windowHandle(), _globalDragPoint ); | ||
429 | #if BREEZE_HAVE_QTQUICK | ||||
429 | else if( _quickTarget ) startDrag( _quickTarget.data()->window(), _globalDragPoint ); | 430 | else if( _quickTarget ) startDrag( _quickTarget.data()->window(), _globalDragPoint ); | ||
430 | #endif | 431 | #endif | ||
432 | #endif | ||||
431 | 433 | | |||
432 | } else { | 434 | } else { | ||
433 | 435 | | |||
Context not available. | |||||
450 | if( isLocked() ) return false; | 452 | if( isLocked() ) return false; | ||
451 | else setLocked( true ); | 453 | else setLocked( true ); | ||
452 | 454 | | |||
453 | #if !BREEZE_USE_KDE4 | 455 | #if BREEZE_HAVE_QTQUICK | ||
454 | // check QQuickItem - we can immediately start drag, because QQuickWindow's contentItem | 456 | // check QQuickItem - we can immediately start drag, because QQuickWindow's contentItem | ||
455 | // only receives mouse events that weren't handled by children | 457 | // only receives mouse events that weren't handled by children | ||
456 | if( auto item = qobject_cast<QQuickItem*>( object ) ) | 458 | if( auto item = qobject_cast<QQuickItem*>( object ) ) | ||
Context not available. | |||||
837 | } | 839 | } | ||
838 | 840 | | |||
839 | _target.clear(); | 841 | _target.clear(); | ||
840 | #if !BREEZE_USE_KDE4 | 842 | #if BREEZE_HAVE_QTQUICK | ||
841 | _quickTarget.clear(); | 843 | _quickTarget.clear(); | ||
842 | #endif | 844 | #endif | ||
843 | if( _dragTimer.isActive() ) _dragTimer.stop(); | 845 | if( _dragTimer.isActive() ) _dragTimer.stop(); | ||
Context not available. |