QNX: new signals for foreign windows creation/closing

Implement the foreignWindowCreated and foreignWindow closed signals, emitted when foreign windows are created and closed, respectively.

Change-Id: I72dd5380e6061f191eb8362fda5dd8fb8e9ed06b
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This commit is contained in:
MyoungSeok Song 2013-08-29 13:42:03 -07:00 committed by The Qt Project
parent fddf76f2ac
commit 30a4114e60
2 changed files with 8 additions and 1 deletions

View File

@ -562,8 +562,10 @@ void QQnxScreen::addUnderlayWindow(screen_window_t window)
void QQnxScreen::removeOverlayOrUnderlayWindow(screen_window_t window)
{
const int numRemoved = m_overlays.removeAll(window) + m_underlays.removeAll(window);
if (numRemoved > 0)
if (numRemoved > 0) {
updateHierarchy();
Q_EMIT foreignWindowClosed(window);
}
}
void QQnxScreen::newWindowCreated(void *window)
@ -597,6 +599,7 @@ void QQnxScreen::newWindowCreated(void *window)
addUnderlayWindow(windowHandle);
else
addOverlayWindow(windowHandle);
Q_EMIT foreignWindowCreated(windowHandle);
}
}
}

View File

@ -98,6 +98,10 @@ public:
QPlatformCursor *cursor() const;
Q_SIGNALS:
void foreignWindowCreated(void *window);
void foreignWindowClosed(void *window);
public Q_SLOTS:
void setRotation(int rotation);
void newWindowCreated(void *window);