Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qminimalintegration.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QPLATFORMINTEGRATION_MINIMAL_H
6#define QPLATFORMINTEGRATION_MINIMAL_H
7
8#include <qpa/qplatformintegration.h>
9#include <qpa/qplatformscreen.h>
10
11#include <qscopedpointer.h>
12
14
16{
17public:
20
21 QRect geometry() const override { return mGeometry; }
22 int depth() const override { return mDepth; }
23 QImage::Format format() const override { return mFormat; }
24
25public:
27 int mDepth;
30};
31
33{
34public:
35 enum Options { // Options to be passed on command line or determined from environment
40 };
41
42 explicit QMinimalIntegration(const QStringList &parameters);
44
45 bool hasCapability(QPlatformIntegration::Capability cap) const override;
46 QPlatformFontDatabase *fontDatabase() const override;
47
48 QPlatformWindow *createPlatformWindow(QWindow *window) const override;
49 QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
51
53
54 unsigned options() const { return m_options; }
55
57
58private:
59 mutable QPlatformFontDatabase *m_fontDatabase;
60 mutable QScopedPointer<QPlatformNativeInterface> m_nativeInterface;
61 QMinimalScreen *m_primaryScreen;
62 unsigned m_options;
63};
64
65QT_END_NAMESPACE
66
67#endif
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
unsigned options() const
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
QMinimalIntegration(const QStringList &parameters)
QPlatformNativeInterface * nativeInterface() const override
static QMinimalIntegration * instance()
bool hasCapability(QPlatformIntegration::Capability cap) const override
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
QRect geometry() const override
Reimplement in subclass to return the pixel geometry of the screen.
int depth() const override
Reimplement in subclass to return current depth of the screen.
QImage::Format mFormat
QImage::Format format() const override
Reimplement in subclass to return the image format which corresponds to the screen format.