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>
15#include <qpa/qplatformtheme.h>
16#include <qpa/qplatformdialoghelper.h>
21using QOhosSupplier = std::function<T()>;
39 const QFont *
font(Font type)
const override;
44 QIcon fileIcon(
const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions)
const override;
48 void refreshPalettes();
50 QHash<Palette, QPalette> m_themePalette;
51 QHash<Font, QFont> m_fonts;
52 int m_wheelScrollLines;
53 QOhosSupplier<std::optional<
bool>> m_ohosConfigDarkModeFlagSupplier;
54 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