ShadowedRectangle

Search for usage in LXR

#include <shadowedrectangle.h>

Inheritance diagram for ShadowedRectangle:

Public Types

enum  RenderType { Auto , HighQuality , LowQuality , Software }
 
- Public Types inherited from QQuickItem
enum  Flag
 
typedef  Flags
 
enum  ItemChange
 
enum  TransformOrigin
 
- Public Types inherited from QObject
typedef  QObjectList
 

Properties

BorderGroupborder
 
QColor color
 
CornersGroupcorners
 
QML_ELEMENTqreal radius
 
RenderType renderType
 
ShadowGroupshadow
 
bool softwareRendering
 
- Properties inherited from QQuickItem
 activeFocus
 
 activeFocusOnTab
 
 antialiasing
 
 baselineOffset
 
 childrenRect
 
 clip
 
 containmentMask
 
 enabled
 
 focus
 
 height
 
 implicitHeight
 
 implicitWidth
 
 opacity
 
 parent
 
 rotation
 
 scale
 
 smooth
 
 state
 
 transformOrigin
 
 visible
 
 width
 
 x
 
 y
 
 z
 
- Properties inherited from QObject
 objectName
 

Signals

void softwareRenderingChanged ()
 

Public Member Functions

 ShadowedRectangle (QQuickItem *parent=nullptr)
 
BorderGroupborder () const
 
QColor color () const
 
Q_SIGNAL void colorChanged ()
 
void componentComplete () override
 
CornersGroupcorners () const
 
bool isSoftwareRendering () const
 
qreal radius () const
 
Q_SIGNAL void radiusChanged ()
 
RenderType renderType () const
 
Q_SIGNAL void renderTypeChanged ()
 
void setColor (const QColor &newColor)
 
void setRadius (qreal newRadius)
 
void setRenderType (RenderType renderType)
 
ShadowGroupshadow () const
 
- Public Member Functions inherited from QQuickItem
 QQuickItem (QQuickItem *parent)
 
Qt::MouseButtons acceptedMouseButtons () const const
 
bool acceptHoverEvents () const const
 
bool acceptTouchEvents () const const
 
void activeFocusChanged (bool)
 
bool activeFocusOnTab () const const
 
void activeFocusOnTabChanged (bool)
 
bool antialiasing () const const
 
void antialiasingChanged (bool)
 
qreal baselineOffset () const const
 
void baselineOffsetChanged (qreal)
 
QBindable< qreal > bindableHeight ()
 
QBindable< qreal > bindableWidth ()
 
QBindable< qreal > bindableX ()
 
QBindable< qreal > bindableY ()
 
virtual QRectF boundingRect () const const
 
QQuickItemchildAt (qreal x, qreal y) const const
 
QList< QQuickItem * > childItems () const const
 
QRectF childrenRect ()
 
void childrenRectChanged (const QRectF &)
 
bool clip () const const
 
void clipChanged (bool)
 
virtual QRectF clipRect () const const
 
QObjectcontainmentMask () const const
 
void containmentMaskChanged ()
 
virtual bool contains (const QPointF &point) const const
 
QCursor cursor () const const
 
void dumpItemTree () const const
 
void enabledChanged ()
 
void ensurePolished ()
 
bool filtersChildMouseEvents () const const
 
Flags flags () const const
 
void focusChanged (bool)
 
void forceActiveFocus ()
 
void forceActiveFocus (Qt::FocusReason reason)
 
void grabMouse ()
 
QSharedPointer< QQuickItemGrabResultgrabToImage (const QSize &targetSize)
 
void grabTouchPoints (const QList< int > &ids)
 
bool hasActiveFocus () const const
 
bool hasFocus () const const
 
qreal height () const const
 
void heightChanged ()
 
qreal implicitHeight () const const
 
void implicitHeightChanged ()
 
qreal implicitWidth () const const
 
void implicitWidthChanged ()
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const const
 
bool isAncestorOf (const QQuickItem *child) const const
 
bool isEnabled () const const
 
bool isFocusScope () const const
 
virtual bool isTextureProvider () const const
 
bool isVisible () const const
 
bool keepMouseGrab () const const
 
bool keepTouchGrab () const const
 
QPointF mapFromGlobal (const QPointF &point) const const
 
QPointF mapFromItem (const QQuickItem *item, const QPointF &point) const const
 
QPointF mapFromScene (const QPointF &point) const const
 
QRectF mapRectFromItem (const QQuickItem *item, const QRectF &rect) const const
 
QRectF mapRectFromScene (const QRectF &rect) const const
 
QRectF mapRectToItem (const QQuickItem *item, const QRectF &rect) const const
 
QRectF mapRectToScene (const QRectF &rect) const const
 
QPointF mapToGlobal (const QPointF &point) const const
 
QPointF mapToItem (const QQuickItem *item, const QPointF &point) const const
 
QPointF mapToScene (const QPointF &point) const const
 
QQuickItemnextItemInFocusChain (bool forward)
 
qreal opacity () const const
 
void opacityChanged ()
 
void parentChanged (QQuickItem *)
 
QQuickItemparentItem () const const
 
void polish ()
 
void resetAntialiasing ()
 
void resetHeight ()
 
void resetWidth ()
 
qreal rotation () const const
 
void rotationChanged ()
 
qreal scale () const const
 
void scaleChanged ()
 
QQuickItemscopedFocusItem () const const
 
void setAcceptedMouseButtons (Qt::MouseButtons buttons)
 
void setAcceptHoverEvents (bool enabled)
 
void setAcceptTouchEvents (bool enabled)
 
void setActiveFocusOnTab (bool)
 
void setAntialiasing (bool)
 
void setBaselineOffset (qreal)
 
void setClip (bool)
 
void setContainmentMask (QObject *mask)
 
void setCursor (const QCursor &cursor)
 
void setEnabled (bool)
 
void setFiltersChildMouseEvents (bool filter)
 
void setFlag (Flag flag, bool enabled)
 
void setFlags (Flags flags)
 
void setFocus (bool focus, Qt::FocusReason reason)
 
void setFocus (bool)
 
void setHeight (qreal)
 
void setImplicitHeight (qreal)
 
void setImplicitWidth (qreal)
 
void setKeepMouseGrab (bool keep)
 
void setKeepTouchGrab (bool keep)
 
void setOpacity (qreal)
 
void setParentItem (QQuickItem *parent)
 
void setRotation (qreal)
 
void setScale (qreal)
 
void setSize (const QSizeF &size)
 
void setSmooth (bool)
 
void setState (const QString &)
 
void setTransformOrigin (TransformOrigin)
 
void setVisible (bool)
 
void setWidth (qreal)
 
void setX (qreal)
 
void setY (qreal)
 
void setZ (qreal)
 
QSizeF size () const const
 
bool smooth () const const
 
void smoothChanged (bool)
 
void stackAfter (const QQuickItem *sibling)
 
void stackBefore (const QQuickItem *sibling)
 
QString state () const const
 
void stateChanged (const QString &)
 
virtual QSGTextureProvidertextureProvider () const const
 
TransformOrigin transformOrigin () const const
 
void transformOriginChanged (TransformOrigin)
 
void ungrabMouse ()
 
void ungrabTouchPoints ()
 
void unsetCursor ()
 
void update ()
 
QQuickItemviewportItem () const const
 
void visibleChanged ()
 
qreal width () const const
 
void widthChanged ()
 
QQuickWindowwindow () const const
 
void windowChanged (QQuickWindow *window)
 
qreal x () const const
 
void xChanged ()
 
qreal y () const const
 
void yChanged ()
 
qreal z () const const
 
void zChanged ()
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
QBindable< QStringbindableObjectName ()
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo () const const
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isQuickItemType () const const
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_GADGET_EXPORT (EXPORT_MACRO)
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_MOC_INCLUDE Q_MOC_INCLUDE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setObjectName (QAnyStringView name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool setProperty (const char *name, QVariant &&value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds interval, Qt::TimerType timerType)
 
QThreadthread () const const
 
- Public Member Functions inherited from QQmlParserStatus

Protected Member Functions

void itemChange (QQuickItem::ItemChange change, const QQuickItem::ItemChangeData &value) override
 
PaintedRectangleItemsoftwareItem () const
 
QSGNodeupdatePaintNode (QSGNode *node, QQuickItem::UpdatePaintNodeData *data) override
 
- Protected Member Functions inherited from QQuickItem
virtual bool childMouseEventFilter (QQuickItem *item, QEvent *event)
 
virtual void classBegin () override
 
virtual void dragEnterEvent (QDragEnterEvent *event)
 
virtual void dragLeaveEvent (QDragLeaveEvent *event)
 
virtual void dragMoveEvent (QDragMoveEvent *event)
 
virtual void dropEvent (QDropEvent *event)
 
virtual bool event (QEvent *ev) override
 
virtual void focusInEvent (QFocusEvent *)
 
virtual void focusOutEvent (QFocusEvent *)
 
virtual void geometryChange (const QRectF &newGeometry, const QRectF &oldGeometry)
 
bool heightValid () const const
 
virtual void hoverEnterEvent (QHoverEvent *event)
 
virtual void hoverLeaveEvent (QHoverEvent *event)
 
virtual void hoverMoveEvent (QHoverEvent *event)
 
virtual void inputMethodEvent (QInputMethodEvent *event)
 
bool isComponentComplete () const const
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
virtual void mouseDoubleClickEvent (QMouseEvent *event)
 
virtual void mouseMoveEvent (QMouseEvent *event)
 
virtual void mousePressEvent (QMouseEvent *event)
 
virtual void mouseReleaseEvent (QMouseEvent *event)
 
virtual void mouseUngrabEvent ()
 
virtual void releaseResources ()
 
virtual void touchEvent (QTouchEvent *event)
 
virtual void touchUngrabEvent ()
 
void updateInputMethod (Qt::InputMethodQueries queries)
 
virtual QSGNodeupdatePaintNode (QSGNode *oldNode, UpdatePaintNodeData *updatePaintNodeData)
 
virtual void updatePolish ()
 
virtual void wheelEvent (QWheelEvent *event)
 
bool widthValid () const const
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QQuickItem
 Bottom
 
 BottomLeft
 
 BottomRight
 
 Center
 
 ItemAcceptsDrops
 
 ItemAcceptsInputMethod
 
 ItemActiveFocusHasChanged
 
 ItemAntialiasingHasChanged
 
 ItemChildAddedChange
 
 ItemChildRemovedChange
 
 ItemClipsChildrenToShape
 
 ItemDevicePixelRatioHasChanged
 
 ItemEnabledHasChanged
 
 ItemHasContents
 
 ItemIsFocusScope
 
 ItemIsViewport
 
 ItemObservesViewport
 
 ItemOpacityHasChanged
 
 ItemParentHasChanged
 
 ItemRotationHasChanged
 
 ItemSceneChange
 
 ItemVisibleHasChanged
 
 Left
 
 Right
 
 Top
 
 TopLeft
 
 TopRight
 

Detailed Description

A rectangle with a shadow behind it.

This item will render a rectangle, with a shadow below it. The rendering is done using distance fields, which provide greatly improved performance. The shadow is rendered outside of the item's bounds, so the item's width and height are the rectangle's width and height.

Since
5.69
2.12

Definition at line 201 of file shadowedrectangle.h.

Member Enumeration Documentation

◆ RenderType

Available rendering types for ShadowedRectangle.

Enumerator
Auto 

Automatically determine the optimal rendering type.

This will use the highest rendering quality possible, falling back to lower quality if the hardware doesn't support it. It will use software rendering if the QtQuick scene graph is set to use software rendering.

HighQuality 

Use the highest rendering quality possible, even if the hardware might not be able to handle it normally.

LowQuality 

Use the lowest rendering quality, even if the hardware could handle higher quality rendering.

This might result in certain effects being omitted, like shadows.

Software 

Always use software rendering for this rectangle.

Software rendering is intended as a fallback when the QtQuick scene graph is configured to use software rendering. It will result in a number of missing features, like shadows and multiple corner radii.

Definition at line 298 of file shadowedrectangle.h.

Property Documentation

◆ border

BorderGroup * ShadowedRectangle::border
read

This property holds the border's grouped property.

Example usage:

Kirigami.ShadowedRectangle {
border.color: Kirigami.Theme.textColor
}
QML_ELEMENTqreal width
This property holds the border's width in pixels.
QColor color
This property holds the border's color.
BorderGroup * border
This property holds the border's grouped property.
See also
BorderGroup

Definition at line 238 of file shadowedrectangle.h.

◆ color

QColor ShadowedRectangle::color
readwrite

This property holds the rectangle's color.

Full RGBA colors are supported.

default: Qt::white

Definition at line 224 of file shadowedrectangle.h.

◆ corners

CornersGroup * ShadowedRectangle::corners
read

Definition at line 273 of file shadowedrectangle.h.

◆ radius

QML_ELEMENTqreal ShadowedRectangle::radius
readwrite

This property holds the radii of the rectangle's corners.

This is the amount of rounding to apply to all of the rectangle's corners, in pixels. Each corner can have a different radius.

default: 0

See also
corners

Definition at line 215 of file shadowedrectangle.h.

◆ renderType

RenderType ShadowedRectangle::renderType
readwrite

This property holds the rectangle's render mode.

default: RenderType::Auto

See also
RenderType

Definition at line 282 of file shadowedrectangle.h.

◆ shadow

ShadowGroup * ShadowedRectangle::shadow
read

This property holds the shadow's grouped property.

Example usage:

Kirigami.ShadowedRectangle {
}
qreal xOffset
This property holds the shadow's offset in pixels on the X axis.
qreal yOffset
This property holds the shadow's offset in pixels on the Y axis.
QML_ELEMENTqreal size
This property holds the shadow's approximate size in pixels.
ShadowGroup * shadow
This property holds the shadow's grouped property.
See also
ShadowGroup

Definition at line 254 of file shadowedrectangle.h.

◆ softwareRendering

bool ShadowedRectangle::softwareRendering
read

This property tells whether software rendering is being used.

default: false

Definition at line 289 of file shadowedrectangle.h.

Constructor & Destructor Documentation

◆ ShadowedRectangle()

ShadowedRectangle::ShadowedRectangle ( QQuickItem * parent = nullptr)

Definition at line 189 of file shadowedrectangle.cpp.

◆ ~ShadowedRectangle()

ShadowedRectangle::~ShadowedRectangle ( )
override

Definition at line 202 of file shadowedrectangle.cpp.

Member Function Documentation

◆ border()

BorderGroup * ShadowedRectangle::border ( ) const

Definition at line 206 of file shadowedrectangle.cpp.

◆ color()

QColor ShadowedRectangle::color ( ) const

Definition at line 239 of file shadowedrectangle.cpp.

◆ componentComplete()

void ShadowedRectangle::componentComplete ( )
overridevirtual

Reimplemented from QQuickItem.

Definition at line 272 of file shadowedrectangle.cpp.

◆ corners()

CornersGroup * ShadowedRectangle::corners ( ) const

Definition at line 216 of file shadowedrectangle.cpp.

◆ isSoftwareRendering()

bool ShadowedRectangle::isSoftwareRendering ( ) const

Definition at line 279 of file shadowedrectangle.cpp.

◆ itemChange()

void ShadowedRectangle::itemChange ( QQuickItem::ItemChange change,
const QQuickItem::ItemChangeData & value )
overrideprotectedvirtual

Reimplemented from QQuickItem.

Definition at line 289 of file shadowedrectangle.cpp.

◆ radius()

qreal ShadowedRectangle::radius ( ) const

Definition at line 221 of file shadowedrectangle.cpp.

◆ renderType()

ShadowedRectangle::RenderType ShadowedRectangle::renderType ( ) const

Definition at line 257 of file shadowedrectangle.cpp.

◆ setColor()

void ShadowedRectangle::setColor ( const QColor & newColor)

Definition at line 244 of file shadowedrectangle.cpp.

◆ setRadius()

void ShadowedRectangle::setRadius ( qreal newRadius)

Definition at line 226 of file shadowedrectangle.cpp.

◆ setRenderType()

void ShadowedRectangle::setRenderType ( RenderType renderType)

Definition at line 262 of file shadowedrectangle.cpp.

◆ shadow()

ShadowGroup * ShadowedRectangle::shadow ( ) const

Definition at line 211 of file shadowedrectangle.cpp.

◆ softwareItem()

PaintedRectangleItem * ShadowedRectangle::softwareItem ( ) const
protected

Definition at line 284 of file shadowedrectangle.cpp.

◆ updatePaintNode()

QSGNode * ShadowedRectangle::updatePaintNode ( QSGNode * node,
QQuickItem::UpdatePaintNodeData * data )
overrideprotected

Definition at line 300 of file shadowedrectangle.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 13 2024 11:48:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.