4#ifndef QOHOSPLATFORMTHEME_H
5#define QOHOSPLATFORMTHEME_H
7#include <QtCore/qfileinfo.h>
8#include <QtCore/qhash.h>
9#include <QtCore/qmap.h>
10#include <QtGui/qcolor.h>
11#include <QtGui/qicon.h>
12#include <QtGui/qpalette.h>
16#include <qpa/qplatformtheme.h>
17#include <qpa/qplatformdialoghelper.h>
22using QOhosSupplier = std::function<T()>;
40 const QFont *
font(Font type)
const override;
45 QIcon fileIcon(
const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions)
const override;
49 void refreshPalettes();
51 QHash<Palette, QPalette> m_themePalette;
52 QOhosSupplier<std::shared_ptr<
const QHash<Font, QFont>>> m_fontsSupplier;
53 int m_wheelScrollLines;
54 QOhosSupplier<std::optional<
bool>> m_ohosConfigDarkModeFlagSupplier;
55 QOhosSupplier<QColor> m_ohosAccentColorSupplier;
virtual std::optional< QOhosQtKeyEvent > tryConvertToQOhosQtKeyEvent() const =0
Combined button and popup list for selecting options.
QRectF calculateTouchPointArea(const QPointF &clickPoint)
bool windowShouldTakeFocusOnPress(QWindow *qWindow)
QPoint determineScreenGlobalDisplayOffset(QWindow *qWindow)
QPoint makeWindowLocalPosition(const QPoint &globalPosition, QWindow *qWindow)
QInputDevice * registerPointingDevice(std::unique_ptr< QPointingDevice > device)
QPointF calculateTouchPointNormalPosition(QWindow *targetWindow, const QPointF &clickPoint)
constexpr double fingerAreaWidth
std::shared_ptr< void > registerObjectDestroyedSignalHandler(QObject *object, QObject *context, std::function< void()> signalHandler)
QInputDevice * createPointingDevice(QInputDevice::DeviceType deviceType)
std::optional< QEventPoint::State > tryMapXComponentTouchEventTypeToQt(::OH_NativeXComponent_TouchEventType eventType)
constexpr double fingerAreaHeight