diff options
Diffstat (limited to 'src/platformheaders/doc')
-rw-r--r-- | src/platformheaders/doc/qtplatformheaders.qdocconf | 38 | ||||
-rw-r--r-- | src/platformheaders/doc/snippets/qxcbwindowfunctions/main.cpp | 61 | ||||
-rw-r--r-- | src/platformheaders/doc/src/qtplatformheaders.qdoc | 87 |
3 files changed, 186 insertions, 0 deletions
diff --git a/src/platformheaders/doc/qtplatformheaders.qdocconf b/src/platformheaders/doc/qtplatformheaders.qdocconf new file mode 100644 index 0000000000..1c09971e23 --- /dev/null +++ b/src/platformheaders/doc/qtplatformheaders.qdocconf @@ -0,0 +1,38 @@ +include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) + +project = QtPlatformHeaders +description = Qt Platform Headers Reference Documentation +version = $QT_VERSION + +examplesinstallpath = qtplatformheaders + +qhp.projects = QtPlatformHeaders + +qhp.QtPlatformHeaders.file = qtplatformheaders.qhp +qhp.QtPlatformHeaders.namespace = org.qt-project.qtplatformheaders.$QT_VERSION_TAG +qhp.QtPlatformHeaders.virtualFolder = qtplatformheaders +qhp.QtPlatformHeaders.indexTitle = Qt Platform Headers +qhp.QtPlatformHeaders.indexRoot = + +qhp.QtPlatformHeaders.filterAttributes = qtplatformheaders $QT_VERSION qtrefdoc +qhp.QtPlatformHeaders.customFilters.Qt.name = QtPlatformHeaders $QT_VERSION +qhp.QtPlatformHeaders.customFilters.Qt.filterAttributes = qtplatformheaders $QT_VERSION + +qhp.QtPlatformHeaders.subprojects = classes +qhp.QtPlatformHeaders.subprojects.classes.title = C++ Classes +qhp.QtPlatformHeaders.subprojects.classes.indexTitle = Qt Platform Headers C++ Classes +qhp.QtPlatformHeaders.subprojects.classes.selectors = class fake:headerfile +qhp.QtPlatformHeaders.subprojects.classes.sortPages = true + +depends += \ + qtcore \ + qtgui \ + qtdoc + +headerdirs += .. +sourcedirs += .. +exampledirs += snippets +imagedirs += images + +navigation.landingpage = "Qt Platform Headers" +navigation.cppclassespage = "Qt Platform Headers C++ Classes" diff --git a/src/platformheaders/doc/snippets/qxcbwindowfunctions/main.cpp b/src/platformheaders/doc/snippets/qxcbwindowfunctions/main.cpp new file mode 100644 index 0000000000..d4cb965bda --- /dev/null +++ b/src/platformheaders/doc/snippets/qxcbwindowfunctions/main.cpp @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QtWidgets> +#include <QtPlatformHeaders/qxcbwindowfunctions.h> + +//! [0] +int main(int argc, char **argv) +{ + QApplication app(argc, argv); + + QPushButton topLevelWidget("Hello World!"); + topLevelWidget.winId(); //have to create the QWindow + + QWindow *tlwWindow = topLevelWidget.windowHandle(); + + QXcbWindowFunctions::setWmWindowType(tlwWindow, QXcbWindowFunctions::Dock); + + topLevelWidget.show(); + + return app.exec(); +} +//! [0] + diff --git a/src/platformheaders/doc/src/qtplatformheaders.qdoc b/src/platformheaders/doc/src/qtplatformheaders.qdoc new file mode 100644 index 0000000000..94059e5508 --- /dev/null +++ b/src/platformheaders/doc/src/qtplatformheaders.qdoc @@ -0,0 +1,87 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** 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 Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \module QtPlatformHeaders + \title Qt Platform Headers C++ Classes + \ingroup modules + + \brief The Qt Platform Headers module offers header-only inline classes that + encapsulate platform-specific information that is tied to a given runtime + configuration of a platform plugin. +*/ + +/*! + \page qtplatformheaders-index.html + \title Qt Platform Headers + + \brief The Qt Platform Headers module offers header-only inline classes that + encapsulate platform-specific information that is tied to a given runtime + configuration of a platform plugin. + + Some applications may need to interface Qt with other frameworks. This often + means using graphics contexts or other types of native handles created by + one framework with another. For example, on some platforms, QOpenGLContext + offers the ability to wrap an existing native OpenGL context, instead of + creating a new one. This existing native context can be created by some + other third-party code. + + The type of such native handles is highly platform specific and in some + cases the platform plugin will need more information to adopt a handle, just + the handle in itself will not be sufficient. Therefore the public API + consists of functions taking or returning a QVariant that contains a + platform-specific value type. See for example + QOpenGLContext::setNativeHandle() and QOpenGLContext::nativeHandle(). When + running on Linux/X11, using the xcb platform plugin and the GLX windowing + system interface, the variant contains a QGLXNativeContext. On other + platforms a different class will be used. These classes are all placed in + the Qt Platform Headers module. + + Platform headers can be used in conjunction with + QGuiApplication::platformFunction() to give a type safe interface to + platform specific functionality. It is possible for headers defined in + QtPlatformHeaders to define typedefs for functions that can be returned by + a platform plugin from QGuiApplication::platformFunction(). Headers in + QtPlatformHeaders can also implement wrapper functions for the function + pointer, giving a static function that can be called from any context after + the platform integration has been created. An implementation of this + pattern is QXcbWindowFunctions::setWmWindowType(). This function retrieves + a function pointer from QGuiApplication::platformFunction, and executes + that function if the requested function was returned. + + \note Similar to the other QPA APIs, there are no binary compatibility + guarantees for these classes, meaning that an application using these + classes is only guaranteed to work with the Qt version it was developed + against. Unlike QPA however, source compatibility is guaranteed. + + \sa QXcbWindowFunctions + + \section1 API Reference + \list + \li \l{Qt Platform Headers C++ Classes}{C++ Classes} + \endlist + */ |