summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt/qwinrtplatformtheme.h
diff options
context:
space:
mode:
authorMaurice Kalinowski <maurice.kalinowski@digia.com>2014-02-11 23:54:19 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-12 09:13:28 +0100
commitff23fb6cf723bcc52a5f037ef92500c480ce5a5c (patch)
tree7b4685fb534c7051b09e2781d75cc6b60ca0d524 /src/plugins/platforms/winrt/qwinrtplatformtheme.h
parentdb98d65415b270f49e015154a37a39befc8c752e (diff)
Implement native message box for WinRT
Added a basic theme class, which creates accessors for the QPlatformMessageDialogHelper. This handles creation of the native dialog, but also spawning an event loop around it. There are some limitations shared with the Android implementation. First you cannot create custom labelled buttons and also selecting the default button is not possible. This will be added at a later point. Note that Windows Phone is not supported. Change-Id: I2dec83dcded7919835a6dcdf8dc2a56282024a7e Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtplatformtheme.h')
-rw-r--r--src/plugins/platforms/winrt/qwinrtplatformtheme.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtplatformtheme.h b/src/plugins/platforms/winrt/qwinrtplatformtheme.h
new file mode 100644
index 0000000000..f4a61982b2
--- /dev/null
+++ b/src/plugins/platforms/winrt/qwinrtplatformtheme.h
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the plugins of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QWINRTPLATFORMTHEME_H
+#define QWINRTPLATFORMTHEME_H
+
+#include <qpa/qplatformtheme.h>
+
+QT_BEGIN_NAMESPACE
+
+class QWinRTPlatformTheme : public QPlatformTheme
+{
+public:
+ QWinRTPlatformTheme();
+
+ bool usePlatformNativeDialog(DialogType type) const;
+ QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const;
+};
+
+QT_END_NAMESPACE
+
+#endif // QWINRTPLATFORMTHEME_H