Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QQuickItem Class

Provides the most basic of all visual items in QML More...

 #include <QQuickItem>

Inherits: QObject and QQmlParserStatus.

Inherited by: QQuickPaintedItem.

QQuickItem is instantiated by QML element Item

Public Types

class ItemChangeData
class UpdatePaintNodeData
enum Flag { ItemClipsChildrenToShape, ItemAcceptsInputMethod, ItemIsFocusScope, ItemHasContents, ItemAcceptsDrops }
flags Flags
enum ItemChange { ItemChildAddedChange, ItemChildRemovedChange, ItemSceneChange, ItemVisibleHasChanged, ..., ItemRotationHasChanged }
enum TransformOrigin { TopLeft, Top, TopRight, Left, ..., BottomRight }

Properties

  • 1 property inherited from QObject

Public Functions

QQuickItem(QQuickItem * parent = 0)
virtual ~QQuickItem()
bool acceptHoverEvents() const
Qt::MouseButtons acceptedMouseButtons() const
qreal baselineOffset() const
QQuickCanvas * canvas() const
QQuickItem * childAt(qreal x, qreal y) const
QList<QQuickItem *> childItems() const
QRectF childrenRect()
virtual void classBegin() = 0
bool clip() const
virtual void componentComplete() = 0
virtual bool contains(const QPointF & point) const
bool filtersChildMouseEvents() const
Flags flags() const
void forceActiveFocus()
void grabMouse()
void grabTouchPoints(const QList<int> & ids)
bool hasActiveFocus() const
bool hasFocus() const
qreal height() const
qreal implicitHeight() const
qreal implicitWidth() const
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const
bool isEnabled() const
bool isFocusScope() const
virtual bool isTextureProvider() const
bool isUnderMouse() const
bool isVisible() const
QTransform itemTransform(QQuickItem *, bool *) const
bool keepMouseGrab() const
bool keepTouchGrab() const
QPointF mapFromItem(const QQuickItem * item, const QPointF & point) const
void mapFromItem(QQmlV8Function *) const
QPointF mapFromScene(const QPointF & point) const
QRectF mapRectFromItem(const QQuickItem * item, const QRectF & rect) const
QRectF mapRectFromScene(const QRectF & rect) const
QRectF mapRectToItem(const QQuickItem * item, const QRectF & rect) const
QRectF mapRectToScene(const QRectF & rect) const
QPointF mapToItem(const QQuickItem * item, const QPointF & point) const
void mapToItem(QQmlV8Function *) const
QPointF mapToScene(const QPointF & point) const
qreal opacity() const
QQuickItem * parentItem() const
void polish()
QPointF pos() const
void resetHeight()
void resetWidth()
qreal rotation() const
qreal scale() const
QQuickItem * scopedFocusItem() const
void setAcceptHoverEvents(bool enabled)
void setAcceptedMouseButtons(Qt::MouseButtons buttons)
void setBaselineOffset(qreal)
void setClip(bool)
void setEnabled(bool)
void setFiltersChildMouseEvents(bool filter)
void setFlag(Flag flag, bool enabled = true)
void setFlags(Flags flags)
void setFocus(bool)
void setHeight(qreal)
void setKeepMouseGrab(bool keep)
void setKeepTouchGrab(bool keep)
void setOpacity(qreal)
void setParentItem(QQuickItem * parent)
void setPos(const QPointF &)
void setRotation(qreal)
void setScale(qreal)
void setSize(const QSizeF & size)
void setSmooth(bool smooth)
void setState(const QString &)
void setTransformOrigin(TransformOrigin)
void setTransformOriginPoint(const QPointF &)
void setVisible(bool)
void setWidth(qreal)
void setX(qreal)
void setY(qreal)
void setZ(qreal)
bool smooth() const
void stackAfter(const QQuickItem *)
void stackBefore(const QQuickItem *)
QString state() const
virtual QSGTextureProvider * textureProvider() const
QQmlListProperty<QQuickTransform> transform()
TransformOrigin transformOrigin() const
QPointF transformOriginPoint() const
void ungrabMouse()
void ungrabTouchPoints()
qreal width() const
qreal x() const
qreal y() const
qreal z() const
  • 31 public functions inherited from QObject

Public Slots

void update()
  • 1 public slot inherited from QObject

Signals

void childrenChanged()
void enabledChanged()
void heightChanged()
void implicitHeightChanged()
void implicitWidthChanged()
void opacityChanged()
void rotationChanged()
void scaleChanged()
void visibleChanged()
void visibleChildrenChanged()
void widthChanged()
void xChanged()
void yChanged()
void zChanged()

Protected Functions

virtual bool childMouseEventFilter(QQuickItem *, QEvent *)
virtual void dragEnterEvent(QDragEnterEvent *)
virtual void dragLeaveEvent(QDragLeaveEvent *)
virtual void dragMoveEvent(QDragMoveEvent *)
virtual void dropEvent(QDropEvent *)
virtual void focusInEvent(QFocusEvent *)
virtual void focusOutEvent(QFocusEvent *)
virtual void geometryChanged(const QRectF & newGeometry, const QRectF & oldGeometry)
bool heightValid() const
virtual void hoverEnterEvent(QHoverEvent * event)
virtual void hoverLeaveEvent(QHoverEvent * event)
virtual void hoverMoveEvent(QHoverEvent * event)
virtual void inputMethodEvent(QInputMethodEvent *)
bool isComponentComplete() const
virtual void itemChange(ItemChange, const ItemChangeData &)
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()
void setImplicitHeight(qreal h)
void setImplicitSize(qreal, qreal)
void setImplicitWidth(qreal w)
virtual void touchEvent(QTouchEvent * event)
virtual void touchUngrabEvent()
void updateInputMethod(Qt::InputMethodQueries queries = Qt::ImQueryInput)
virtual QSGNode * updatePaintNode(QSGNode * oldNode, UpdatePaintNodeData *)
virtual void updatePolish()
virtual void wheelEvent(QWheelEvent * event)
bool widthValid() const
virtual void windowDeactivateEvent()

Reimplemented Protected Functions

virtual void classBegin()
virtual void componentComplete()
virtual bool event(QEvent *)
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 11 static public members inherited from QObject

Detailed Description

Provides the most basic of all visual items in QML

All visual items in Qt Quick inherit from QQuickItem. Although QQuickItem has no visual appearance, it defines all the properties that are common across visual items - such as the x and y position, the width and height, anchoring and key handling.

You can subclass QQuickItem to provide your own custom visual item that inherits these features.

Custom Items using Scene Graph

All visual QML items are rendered using the scene graph, a low-level, high-performance rendering stack, closely tied to OpenGL. It is possible for subclasses of QQuickItem to add their own custom content into the scene graph by setting the QQuickItem::ItemHasContents flag and reimplementing the QQuickItem::updatePaintNode() function.

Warning: It is crucial that OpenGL operations and interaction with the scene graph happens exclusively on the rendering thread, primarily during the updatePaintNode() call. The best rule of thumb is to only use classes with the "QSG" prefix inside the QQuickItem::updatePaintNode() function.

To read more about how the scene graph rendering works, see Scene Graph and Rendering

Custom Items using QPainter

The QQuickItem provides a subclass, QQuickPaintedItem, which allows the users to render content using QPainter.

Warning: Using QQuickPaintedItem uses an indirect 2D surface to render its content, either using software rasterization or using an OpenGL framebuffer object (FBO), so the rendering is a two-step operation. First rasterize the surface, then draw the surface. Using scene graph API directly is always significantly faster.

See also QQuickCanvas and QQuickPaintedItem.

Member Type Documentation

enum QQuickItem::Flag
flags QQuickItem::Flags

The Flags type is a typedef for QFlags<Flag>. It stores an OR combination of Flag values.

enum QQuickItem::ItemChange

enum QQuickItem::TransformOrigin

Controls the point about which simple transforms like scale apply.

ConstantValueDescription
QQuickItem::TopLeft0The top-left corner of the item.
QQuickItem::Top1The center point of the top of the item.
QQuickItem::TopRight2The top-right corner of the item.
QQuickItem::Left3The left most point of the vertical middle.
QQuickItem::Center4The center of the item.
QQuickItem::Right5The right most point of the vertical middle.
QQuickItem::BottomLeft6The bottom-left corner of the item.
QQuickItem::Bottom7The center point of the bottom of the item.
QQuickItem::BottomRight8The bottom-right corner of the item.

Property Documentation

baselineOffset : qreal

This property holds speciifies the position of the item's baseline in local coordinates.

The baseline of a Text item is the imaginary line on which the text sits. Controls containing text usually set their baseline to the baseline of their text.

For non-text items, a default baseline offset of 0 is used.

Access functions:

qreal baselineOffset() const
void setBaselineOffset(qreal)

children : const QQmlListProperty<QQuickItem>

Notifier signal:

void childrenChanged()

childrenRect : const QRectF

This property specifies the geometry of an item's children.

This property holds the (collective) position and size of the item's children.

Access functions:

QRectF childrenRect()

clip : bool

This property holds whether clipping is enabled. The default clip value is false.

If clipping is enabled, an item will clip its own painting, as well as the painting of its children, to its bounding rectangle. If you set clipping during an item's paint operation, remember to re-set it to prevent clipping the rest of your scene.

Non-rectangular clipping regions are not supported for performance reasons.

Access functions:

bool clip() const
void setClip(bool)

enabled : bool

Access functions:

bool isEnabled() const
void setEnabled(bool)

Notifier signal:

void enabledChanged()

height : qreal

Access functions:

qreal height() const
void setHeight(qreal)
void resetHeight()

Notifier signal:

void heightChanged()

implicitHeight : const qreal

Access functions:

qreal implicitHeight() const

Notifier signal:

void implicitHeightChanged()

implicitWidth : const qreal

Access functions:

qreal implicitWidth() const

Notifier signal:

void implicitWidthChanged()

layer : QQuickItemLayer * const

opacity : qreal

Access functions:

qreal opacity() const
void setOpacity(qreal)

Notifier signal:

void opacityChanged()

parent : QQuickItem *

This property holds the parent of the item.

Access functions:

QQuickItem * parentItem() const
void setParentItem(QQuickItem * parent)

pos : const QPointF

Access functions:

QPointF pos() const

rotation : qreal

Access functions:

qreal rotation() const
void setRotation(qreal)

Notifier signal:

void rotationChanged()

scale : qreal

Access functions:

qreal scale() const
void setScale(qreal)

Notifier signal:

void scaleChanged()

smooth : bool

This property specifies whether the item is smoothed or not.

Primarily used in image based elements to decide if the item should use smooth sampling or not. Smooth sampling is performed using linear interpolation, while non-smooth is performed using nearest neighbor.

In Qt Quick 2.0, this property has minimal impact on performance.

By default is true.

Access functions:

bool smooth() const
void setSmooth(bool smooth)

visible : bool

Access functions:

bool isVisible() const
void setVisible(bool)

Notifier signal:

void visibleChanged()

visibleChildren : const QQmlListProperty<QQuickItem>

Notifier signal:

void visibleChildrenChanged()

width : qreal

Access functions:

qreal width() const
void setWidth(qreal)
void resetWidth()

Notifier signal:

void widthChanged()

x : qreal

Access functions:

qreal x() const
void setX(qreal)

Notifier signal:

void xChanged()

y : qreal

Access functions:

qreal y() const
void setY(qreal)

Notifier signal:

void yChanged()

z : qreal

Access functions:

qreal z() const
void setZ(qreal)

Notifier signal:

void zChanged()

Member Function Documentation

QQuickItem::QQuickItem(QQuickItem * parent = 0)

Constructs a QQuickItem with the given parent.

QQuickItem::~QQuickItem() [virtual]

Destroys the QQuickItem.

bool QQuickItem::acceptHoverEvents() const

See also setAcceptHoverEvents().

Qt::MouseButtons QQuickItem::acceptedMouseButtons() const

See also setAcceptedMouseButtons().

QQuickCanvas * QQuickItem::canvas() const

QQuickItem * QQuickItem::childAt(qreal x, qreal y) const

QList<QQuickItem *> QQuickItem::childItems() const

bool QQuickItem::childMouseEventFilter(QQuickItem *, QEvent *) [virtual protected]

void QQuickItem::classBegin() [virtual protected]

void QQuickItem::componentComplete() [virtual protected]

bool QQuickItem::contains(const QPointF & point) const [virtual]

Returns true if this item contains point, which is in local coordinates; returns false otherwise.

This function can be overwritten in order to handle point collisions in items with custom shapes. The default implementation checks if the point is inside the item's bounding rect.

Note that it's normally used to check if the item is under the mouse cursor, and for that reason, the implementation of this function should be as light-weight as possible.

void QQuickItem::dragEnterEvent(QDragEnterEvent *) [virtual protected]

void QQuickItem::dragLeaveEvent(QDragLeaveEvent *) [virtual protected]

void QQuickItem::dragMoveEvent(QDragMoveEvent *) [virtual protected]

void QQuickItem::dropEvent(QDropEvent *) [virtual protected]

bool QQuickItem::event(QEvent *) [virtual protected]

bool QQuickItem::filtersChildMouseEvents() const

See also setFiltersChildMouseEvents().

Flags QQuickItem::flags() const

See also setFlags().

void QQuickItem::focusInEvent(QFocusEvent *) [virtual protected]

void QQuickItem::focusOutEvent(QFocusEvent *) [virtual protected]

void QQuickItem::forceActiveFocus()

void QQuickItem::geometryChanged(const QRectF & newGeometry, const QRectF & oldGeometry) [virtual protected]

This function is called to handle this item's changes in geometry from oldGeometry to newGeometry. If the two geometries are the same, it doesn't do anything.

void QQuickItem::grabMouse()

void QQuickItem::grabTouchPoints(const QList<int> & ids)

Grabs the touch points specified by ids.

These touch points will be owned by the item until they are released. Alternatively, the grab can be stolen by a filtering item like Flickable. Use setKeepTouchGrab() to prevent the grab from being stolen.

See also ungrabTouchPoints() and setKeepTouchGrab().

bool QQuickItem::hasActiveFocus() const

bool QQuickItem::hasFocus() const

bool QQuickItem::heightValid() const [protected]

Returns whether the height property has been set explicitly.

void QQuickItem::hoverEnterEvent(QHoverEvent * event) [virtual protected]

void QQuickItem::hoverLeaveEvent(QHoverEvent * event) [virtual protected]

void QQuickItem::hoverMoveEvent(QHoverEvent * event) [virtual protected]

void QQuickItem::inputMethodEvent(QInputMethodEvent *) [virtual protected]

QVariant QQuickItem::inputMethodQuery(Qt::InputMethodQuery query) const [virtual]

bool QQuickItem::isComponentComplete() const [protected]

Returns true if construction of the QML component is complete; otherwise returns false.

It is often desirable to delay some processing until the component is completed.

See also componentComplete().

bool QQuickItem::isFocusScope() const

bool QQuickItem::isTextureProvider() const [virtual]

Returns true if this item is a texture provider. The default implementation returns false.

This function can be called from any thread.

bool QQuickItem::isUnderMouse() const

void QQuickItem::itemChange(ItemChange, const ItemChangeData &) [virtual protected]

QTransform QQuickItem::itemTransform(QQuickItem *, bool *) const

bool QQuickItem::keepMouseGrab() const

See also setKeepMouseGrab().

bool QQuickItem::keepTouchGrab() const

Returns a value indicating whether the touch points grabbed by this item should remain with this item exclusively.

See also setKeepTouchGrab() and keepMouseGrab().

void QQuickItem::keyPressEvent(QKeyEvent * event) [virtual protected]

void QQuickItem::keyReleaseEvent(QKeyEvent * event) [virtual protected]

QPointF QQuickItem::mapFromItem(const QQuickItem * item, const QPointF & point) const

void QQuickItem::mapFromItem(QQmlV8Function *) const

QPointF QQuickItem::mapFromScene(const QPointF & point) const

QRectF QQuickItem::mapRectFromItem(const QQuickItem * item, const QRectF & rect) const

QRectF QQuickItem::mapRectFromScene(const QRectF & rect) const

QRectF QQuickItem::mapRectToItem(const QQuickItem * item, const QRectF & rect) const

QRectF QQuickItem::mapRectToScene(const QRectF & rect) const

QPointF QQuickItem::mapToItem(const QQuickItem * item, const QPointF & point) const

void QQuickItem::mapToItem(QQmlV8Function *) const

QPointF QQuickItem::mapToScene(const QPointF & point) const

void QQuickItem::mouseDoubleClickEvent(QMouseEvent * event) [virtual protected]

void QQuickItem::mouseMoveEvent(QMouseEvent * event) [virtual protected]

void QQuickItem::mousePressEvent(QMouseEvent * event) [virtual protected]

void QQuickItem::mouseReleaseEvent(QMouseEvent * event) [virtual protected]

void QQuickItem::mouseUngrabEvent() [virtual protected]

void QQuickItem::polish()

void QQuickItem::releaseResources() [virtual protected]

This function is called when the item's scene graph resources are no longer needed. It allows items to free its resources, for instance textures, that are not owned by scene graph nodes. Note that scene graph nodes are managed by QQuickCanvas and should not be deleted by this function. Scene graph resources are no longer needed when the parent is set to null and the item is not used by any ShaderEffect or ShaderEffectSource.

This function is called from the main thread. Therefore, resources used by the scene graph should not be deleted directly, but by calling QObject::deleteLater().

Note: The item destructor still needs to free its scene graph resources if not already done.

QQuickItem * QQuickItem::scopedFocusItem() const

void QQuickItem::setAcceptHoverEvents(bool enabled)

See also acceptHoverEvents().

void QQuickItem::setAcceptedMouseButtons(Qt::MouseButtons buttons)

See also acceptedMouseButtons().

void QQuickItem::setFiltersChildMouseEvents(bool filter)

See also filtersChildMouseEvents().

void QQuickItem::setFlag(Flag flag, bool enabled = true)

void QQuickItem::setFlags(Flags flags)

See also flags().

void QQuickItem::setFocus(bool)

See also hasFocus().

void QQuickItem::setImplicitHeight(qreal h) [protected]

Sets the implied height of the item to h. This is the height implied by other properties that determine the content.

See also implicitHeight().

void QQuickItem::setImplicitSize(qreal, qreal) [protected]

void QQuickItem::setImplicitWidth(qreal w) [protected]

Sets the implied width of the item to w. This is the width implied by other properties that determine the content.

See also implicitWidth().

void QQuickItem::setKeepMouseGrab(bool keep)

The flag indicating whether the mouse should remain with this item is set to keep.

This is useful for items that wish to grab and keep mouse interaction following a predefined gesture. For example, an item that is interested in horizontal mouse movement may set keepMouseGrab to true once a threshold has been exceeded. Once keepMouseGrab has been set to true, filtering items will not react to mouse events.

If the item does not indicate that it wishes to retain mouse grab, a filtering item may steal the grab. For example, Flickable may attempt to steal a mouse grab if it detects that the user has begun to move the viewport.

See also keepMouseGrab().

void QQuickItem::setKeepTouchGrab(bool keep)

The flag indicating whether the touch points grabbed by this item should remain with this item is set to keep.

This is useful for items that wish to grab and keep specific touch points following a predefined gesture. For example, an item that is interested in horizontal touch point movement may set setKeepTouchGrab to true once a threshold has been exceeded. Once setKeepTouchGrab has been set to true, filtering items will not react to the relevant touch points.

If the item does not indicate that it wishes to retain touch point grab, a filtering item may steal the grab. For example, Flickable may attempt to steal a touch point grab if it detects that the user has begun to move the viewport.

See also keepTouchGrab() and setKeepMouseGrab().

void QQuickItem::setPos(const QPointF &)

See also pos().

void QQuickItem::setSize(const QSizeF & size)

void QQuickItem::setState(const QString &)

See also state().

void QQuickItem::setTransformOrigin(TransformOrigin)

See also transformOrigin().

void QQuickItem::setTransformOriginPoint(const QPointF &)

See also transformOriginPoint().

void QQuickItem::stackAfter(const QQuickItem *)

void QQuickItem::stackBefore(const QQuickItem *)

QString QQuickItem::state() const

See also setState().

QSGTextureProvider * QQuickItem::textureProvider() const [virtual]

Returns the texture provider for an item. The default implementation returns 0.

This function may only be called on the rendering thread.

void QQuickItem::touchEvent(QTouchEvent * event) [virtual protected]

void QQuickItem::touchUngrabEvent() [virtual protected]

QQmlListProperty<QQuickTransform> QQuickItem::transform()

TransformOrigin QQuickItem::transformOrigin() const

See also setTransformOrigin().

QPointF QQuickItem::transformOriginPoint() const

See also setTransformOriginPoint().

void QQuickItem::ungrabMouse()

void QQuickItem::ungrabTouchPoints()

Ungrabs the touch points owned by this item.

See also grabTouchPoints().

void QQuickItem::update() [slot]

Schedules a call to updatePaintNode() for this item.

The call to QQuickItem::updatePaintNode() will always happen if the item is showing in a QQuickCanvas.

Only items which specifies QQuickItem::ItemHasContents are allowed to call QQuickItem::update().

void QQuickItem::updateInputMethod(Qt::InputMethodQueries queries = Qt::ImQueryInput) [protected]

Notify input method on updated query values if needed. indicates changed attributes.

QSGNode * QQuickItem::updatePaintNode(QSGNode * oldNode, UpdatePaintNodeData *) [virtual protected]

Called by the rendering thread, as a result of QQuickItem::update(), when it is time to sync the state of the QML objects with the scene graph objects.

The function should return the root of the scene graph subtree for this item. Most implementations will return a single QSGGeometryNode containing the visual representation of this item. oldNode is the node that was returned the last time the function was called.

 QSGNode *MyItem::updatePaintNode(QSGNode *node, UpdatePaintNodeData *)
 {
     QSGSimpleRectNode *n = static_cast<QSGSimpleRectNode *>(node);
     if (!n) {
         n = new QSGSimpleRectNode();
         n->setColor(Qt::red);
     }
     n->setRect(boundingRect());
     return n;
 }

The main thread is blocked while this function is executed so it is safe to read values from the QQuickItem instance and other objects in the main thread.

If no call to QQuickItem::updatePaintNode() result in actual scene graph changes, like QSGNode::markDirty() or adding and removing nodes, then the underlying implementation may decide to not render the scene again as the visual outcome is identical.

Warning: It is crucial that OpenGL operations and interaction with the scene graph happens exclusively on the rendering thread, primarily during the QQuickItem::updatePaintNode() call. The best rule of thumb is to only use classes with the "QSG" prefix inside the QQuickItem::updatePaintNode() function.

See also QSGMaterial, QSGSimpleMaterial, QSGGeometryNode, QSGGeometry, QSGFlatColorMaterial, QSGTextureMaterial, and QSGNode::markDirty().

void QQuickItem::updatePolish() [virtual protected]

void QQuickItem::wheelEvent(QWheelEvent * event) [virtual protected]

bool QQuickItem::widthValid() const [protected]

Returns whether the width property has been set explicitly.

void QQuickItem::windowDeactivateEvent() [virtual protected]

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web