summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxscreen.h
diff options
context:
space:
mode:
authorKevin Krammer <kevin.krammer.qnx@kdab.com>2012-03-23 12:50:22 +0100
committerQt by Nokia <qt-info@nokia.com>2012-03-28 19:34:42 +0200
commit5d117fd427e3e727df5d3f417a2b91366f2a31c1 (patch)
tree7ab2f4bffabd8af212e481c3563c2b8ecb48d12a /src/plugins/platforms/qnx/qqnxscreen.h
parenta80a2c6da241dac77f533bc702a1c7d94349a812 (diff)
Refactoring virtual keyboard class into non-singleton
Getting rid of the singleton gives us better control over when the virtual keyboard handling class is instantiated and configured. Also notify screens about keyboard height changes and let them notify through QWindowSystemInterface instead of "guessing" the screen in QQnxVirtualKeyboard. Change-Id: I71a7f6b5e9d5455563404f6abe7a0daec567a12d Reviewed-by: Sean Harmer <sh@theharmers.co.uk> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxscreen.h')
-rw-r--r--src/plugins/platforms/qnx/qqnxscreen.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreen.h b/src/plugins/platforms/qnx/qqnxscreen.h
index 5749a66f5d..4d1590349b 100644
--- a/src/plugins/platforms/qnx/qqnxscreen.h
+++ b/src/plugins/platforms/qnx/qqnxscreen.h
@@ -47,6 +47,7 @@
#include "qqnxrootwindow.h"
#include <QtCore/QByteArray>
+#include <QtCore/QObject>
#include <QtCore/QScopedPointer>
#include <screen/screen.h>
@@ -55,8 +56,9 @@ QT_BEGIN_NAMESPACE
class QQnxWindow;
-class QQnxScreen : public QPlatformScreen
+class QQnxScreen : public QObject, public QPlatformScreen
{
+ Q_OBJECT
public:
static QList<QPlatformScreen *> screens() { return ms_screens; }
static void createDisplays(screen_context_t context);
@@ -91,6 +93,9 @@ public:
QSharedPointer<QQnxRootWindow> rootWindow() const { return m_rootWindow; }
+private Q_SLOTS:
+ void keyboardHeightChanged(int height);
+
private:
QQnxScreen(screen_context_t context, screen_display_t display, bool primaryScreen);
virtual ~QQnxScreen();
@@ -102,10 +107,10 @@ private:
QSharedPointer<QQnxRootWindow> m_rootWindow;
bool m_primaryScreen;
bool m_posted;
- bool m_usingOpenGL;
int m_initialRotation;
int m_currentRotation;
+ int m_keyboardHeight;
QSize m_initialPhysicalSize;
QSize m_currentPhysicalSize;
QRect m_initialGeometry;