4#ifndef QQUICKSTYLEITEM_H 
    5#define QQUICKSTYLEITEM_H 
    7#include <QtCore/qdebug.h> 
    9#include <QtQml/qqmlinfo.h> 
   10#include <QtQuick/private/qquickitem_p.h> 
   11#include <QtQuickTemplates2/private/qquickcontrol_p.h> 
   14#include "qquickstyle.h" 
   20#ifndef QML_NAMED_ELEMENT 
   21#define QML_NAMED_ELEMENT(NAME) 
   22#define QML_UNCREATABLE(NAME) 
   26#define qqc2Debug() if (m_debugFlags.testFlag(Debug)) qDebug() << __FUNCTION__ << ":" 
   27#define qqc2Info() if (m_debugFlags.testFlag(Info)) qDebug() << __FUNCTION__ << ":" 
   28#define qqc2InfoHeading(HEADING) if (m_debugFlags.testFlag(Info)) qDebug() << "--------" << HEADING << "--------"
 
   30#define qqc2Debug() if (false) qDebug() 
   31#define qqc2Info() if (false) qDebug() 
   32#define qqc2InfoHeading(HEADING) if (false) qDebug() 
   58        const int top = inner.
top() - outer.
top();
 
  170        InputContentSize = 0x040,
 
  171        DontUseNinePatchImage = 0x080,
 
  172        NinePatchMargins = 0x100,
 
  222    template <
class T> 
inline const T* 
control()
 const {
 
  224        if (!
dynamic_cast<T *
>(m_control.
data())) {
 
  225            qmlWarning(
this) << 
"control property is not of correct type";
 
  229        return static_cast<T *
>(m_control.
data());
 
  233    DebugFlags m_debugFlags = NoDebug;
 
  239    inline void updateGeometry();
 
  240    inline void paintControlToImage();
 
  242    int dprAlignedSize(
const int size) 
const;
 
  255    bool m_useNinePatchImage = 
true;
 
  256    bool m_polishing = 
false;
 
  260    int m_transitionDuration = 150;
 
  262    int m_transitionDuration = 400;
 
constexpr int bottom() const noexcept
Returns the bottom margin.
 
constexpr int left() const noexcept
Returns the left margin.
 
constexpr int right() const noexcept
Returns the right margin.
 
constexpr int top() const noexcept
Returns the top margin.
 
The QPainter class performs low-level painting on widgets and other paint devices.
 
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
 
QQuickItem * parent
\qmlproperty Item QtQuick::Item::parent This property holds the visual parent of the item.
 
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
 
virtual void connectToControl() const
 
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
 
void layoutMarginsChanged()
 
QQuickStyleMargins contentPadding
 
qreal focusFrameRadius() const
 
virtual StyleItemGeometry calculateGeometry()=0
 
OverrideState m_overrideState
 
virtual void paintEvent(QPainter *painter) const =0
 
void itemChange(ItemChange change, const ItemChangeData &data) override
Called when change occurs for this item.
 
const T * control() const
 
void minimumSizeChanged()
 
virtual Q_INVOKABLE QFont styleFont(QQuickItem *control) const
 
OverrideState overrideState
 
minimumSizeChangedint transitionDuration
 
layoutMarginsChangedQSize minimumSize
 
QSize contentSize() const
 
void updatePolish() override
This function should perform any layout as required for this item.
 
void setContentHeight(qreal contentHeight)
 
~QQuickStyleItem() override
 
void contentPaddingChanged()
 
static QStyle::State controlSize(QQuickItem *item)
 
contentPaddingChangedQQuickStyleMargins layoutMargins
 
void setContentWidth(qreal contentWidth)
 
void initStyleOptionBase(QStyleOption &styleOption) const
 
QSGNode * updatePaintNode(QSGNode *oldNode, QQuickItem::UpdatePaintNodeData *updatePaintNodeData) override
Called on the render thread when it is time to sync the state of the item with the scene graph.
 
void componentComplete() override
\reimp Derived classes should call the base class method before adding their own actions to perform a...
 
QQuickStyleMargins(const QMargins &margins)
 
bool operator!=(const QQuickStyleMargins &other) const
 
void operator=(const QQuickStyleMargins &other)
 
QQuickStyleMargins(const QQuickStyleMargins &other)
 
bool operator==(const QQuickStyleMargins &other) const
 
QQuickStyleMargins(const QRect &outer, const QRect &inner)
 
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
 
\inmodule QtCore\reentrant
 
\inmodule QtCore\reentrant
 
constexpr int bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
 
constexpr int top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
 
constexpr int left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
 
constexpr int right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
 
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
 
constexpr qreal width() const noexcept
Returns the width.
 
constexpr qreal height() const noexcept
Returns the height.
 
Combined button and popup list for selecting options.
 
#define Q_DECLARE_FLAGS(Flags, Enum)
 
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
 
GLenum GLuint GLintptr GLsizeiptr size
[1]
 
GLdouble GLdouble GLdouble GLdouble top
 
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
 
#define QML_DECLARE_TYPE(TYPE)
 
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
 
#define QML_UNCREATABLE(NAME)
 
QDebug operator<<(QDebug debug, const QQuickStyleMargins &padding)
 
#define QML_NAMED_ELEMENT(NAME)
 
QMargins ninePatchMargins