8#include <QtCore/qmetaobject.h>
10#include <QtGui/qguiapplication.h>
11#include <QtGui/private/qcoregraphics_p.h>
13#include <QtQml/qqmlengine.h>
14#include <QtQml/qqmlcontext.h>
15#include <QtQml/qqmlcomponent.h>
17#include <QtQuick/qquickitem.h>
18#include <QtQuick/private/qquicktextinput_p.h>
19#include <QtQuick/private/qquicktextedit_p.h>
20#include <QtQuick/private/qquickflickable_p.h>
22#include <QtQuickTemplates2/private/qquickframe_p.h>
23#include <QtQuickTemplates2/private/qquickbutton_p.h>
24#include <QtQuickTemplates2/private/qquickscrollview_p.h>
25#include <QtQuickTemplates2/private/qquickslider_p.h>
26#include <QtQuickTemplates2/private/qquickcombobox_p.h>
27#include <QtQuickTemplates2/private/qquickcheckbox_p.h>
28#include <QtQuickTemplates2/private/qquickradiobutton_p.h>
29#include <QtQuickTemplates2/private/qquickspinbox_p.h>
30#include <QtQuickTemplates2/private/qquicktextfield_p.h>
31#include <QtQuickTemplates2/private/qquicktextarea_p.h>
72 "qrc:/qt-project.org/imports/QtQuick/NativeStyle/util/FocusFrame.qml")));
75 auto indicatorColor =
qt_mac_toQColor(NSColor.keyboardFocusIndicatorColor.CGColor);
76 indicatorColor.setAlpha(255);
77 m_focusFrame->
setProperty(
"systemFrameColor", indicatorColor);
82 qCDebug(lcFocusFrame) <<
"new focusobject:" << focusItem;
83 const auto parentItem = focusItem->
parentItem();
90 const auto control =
proxy ?
proxy : focusItem;
93 qCDebug(lcFocusFrame) <<
"control:" << control;
114 const auto styleItemProperty = control->
property(
"__focusFrameStyleItem");
117 const auto styleItemProperty = control->
property(
"background");
128 if (
item->property(
"__isDefaultDelegate").toBool() ==
true) {
129 qCDebug(lcFocusFrame) <<
"'__isDefaultDelegate' property found, showing a default focus frame";
137 qCDebug(lcFocusFrame) <<
"custom delegates in use, skip showing focus frame";
void focusObjectChanged(QObject *focusObject)
This signal is emitted when final receiver of events tied to focus is changed.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
QVariant property(const char *name) const
Returns the value of the object's name property.
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr) const =0
The QQmlComponent class encapsulates a QML component definition.
The QQmlContext class defines a context within a QML engine.
static QQmlContext * contextForObject(const QObject *)
Returns the QQmlContext for the object, or nullptr if no context has been set.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
QQuickItem * parentItem() const
T * data() const noexcept
Returns the value of the pointer referenced by this object.
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
Deletes the existing object it is pointing to (if any), and sets its pointer to other.
The QStyleOption class stores the parameters used by QStyle functions.
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
Combined button and popup list for selecting options.
QColor qt_mac_toQColor(CGColorRef color)
#define Q_LOGGING_CATEGORY(name,...)
#define qCDebug(category,...)
#define Q_ARG(Type, data)
static qreal component(const QPointF &point, unsigned int i)
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
#define QStringLiteral(str)
static QQuickFocusFrameDescription Invalid