44 #include "private/qdeclarativeevents_p_p.h" 45 #include <private/qdeclarativeengine_p.h> 46 #include <private/qgraphicsitem_p.h> 47 #include <QtDeclarative/private/qdeclarativeitem_p.h> 60 #include <QGraphicsSceneMouseEvent> 61 #include <QtCore/qnumeric.h> 62 #include <QtScript/qscriptengine.h> 63 #include <QtGui/qgraphicstransform.h> 277 for (
int i = 0; i < children.
count(); ++i) {
297 qreal bottom = oldy + oldheight;
299 if (y + changed->
height() > bottom)
300 bottom = y + changed->
height();
309 for (
int i = 0; i < children.
count(); ++i) {
314 if (y + child->
height() > bottom)
315 bottom = y + child->
height();
338 right = x + changed->
width();
347 for (
int i = 0; i < children.
count(); ++i) {
353 right = x + child->
width();
369 for (
int i = 0; i < children.
count(); ++i) {
384 if (newGeometry.
width() != oldGeometry.
width() || newGeometry.
x() != oldGeometry.
x())
386 if (newGeometry.
height() != oldGeometry.
height() || newGeometry.
y() != oldGeometry.
y())
413 : m_processPost(false), m_next(0)
667 switch(event->
key()) {
730 switch(event->
key()) {
734 if (mirror ?
d->right :
d->left)
740 if (mirror ?
d->left :
d->right)
773 bool isNextItem =
false;
780 qmlAttachedPropertiesObject<QDeclarativeKeyNavigationAttached>(currentItem,
false);
784 currentItem = tempItem;
790 while (currentItem != initialItem && isNextItem);
871 qmlInfo(parent) <<
tr(
"LayoutDirection attached property only works with Items");
925 setImplicitLayoutMirror(isMirrorImplicit ?
false : effectiveLayoutMirror, inheritMirrorFromItem);
931 inherit = inherit || inheritMirrorFromItem;
932 if (!isMirrorImplicit && inheritMirrorFromItem)
933 mirror = effectiveLayoutMirror;
934 if (mirror == inheritedLayoutMirror && inherit == inheritMirrorFromParent)
937 inheritMirrorFromParent = inherit;
938 inheritedLayoutMirror = inheritMirrorFromParent ? mirror :
false;
940 if (isMirrorImplicit)
941 setLayoutMirror(inherit ? inheritedLayoutMirror :
false);
952 if (mirror != effectiveLayoutMirror) {
953 effectiveLayoutMirror = mirror;
955 _anchors->d_func()->fillChanged();
956 _anchors->d_func()->centerInChanged();
957 _anchors->d_func()->updateHorizontalAnchors();
960 if (attachedLayoutDirection) {
961 emit attachedLayoutDirection->enabledChanged();
1513 return isSignalConnected(signalIndex(signalName));
1547 for (
int ii = 0; ii <
d->targets.count(); ++ii) {
1567 if (
d->item &&
d->item->scene()) {
1569 for (
int ii = 0; ii <
d->targets.count(); ++ii) {
1572 d->item->scene()->sendEvent(i, event);
1585 keySignal +=
"(QDeclarativeKeyEvent*)";
1586 if (
d->isConnected(keySignal)) {
1609 if (
d->item &&
d->item->scene()) {
1610 d->inRelease =
true;
1611 for (
int ii = 0; ii <
d->targets.count(); ++ii) {
1614 d->item->scene()->sendEvent(i, event);
1616 d->inRelease =
false;
1621 d->inRelease =
false;
1636 for (
int ii = 0; ii <
d->targets.count(); ++ii) {
1639 d->item->scene()->sendEvent(i, event);
1664 for (
int ii = 0; ii <
d->targets.count(); ++ii) {
1669 v =
d->item->mapRectFromItem(i, v.
toRectF());
1819 qRegisterMetaType<QDeclarativeAnchorLine>(
"QDeclarativeAnchorLine");
1852 for (
int ii = 0; ii <
d->changeListeners.count(); ++ii) {
1858 for (
int ii = 0; ii <
d->changeListeners.count(); ++ii) {
1864 for(
int ii = 0; ii <
d->changeListeners.count(); ++ii) {
1869 d->changeListeners.clear();
1870 delete d->_anchorLines;
d->_anchorLines = 0;
1871 delete d->_anchors;
d->_anchors = 0;
1872 delete d->_stateGroup;
d->_stateGroup = 0;
1873 delete d->_contents;
d->_contents = 0;
2049 int resourcesCount = resources_count(prop);
2050 if (i < resourcesCount)
2051 return resources_at(prop, i);
2052 const int j = i - resourcesCount;
2060 resources_clear(prop);
2067 if (index < children.
count())
2068 return children.
at(index);
2136 e->
connect(&item->d_func()->parentNotifier);
2198 if (!
d->_contents) {
2201 d->_contents->complete();
2203 return d->_contents->rectF();
2351 const QRectF &oldGeometry)
2356 d->_anchors->d_func()->updateMe();
2360 if (
d->transformData) {
2361 QPointF origin =
d->computeTransformOrigin();
2365 d->transformOriginDirty =
true;
2369 for(
int ii = 0; ii <
d->changeListeners.count(); ++ii) {
2375 if (newGeometry.
width() != oldGeometry.
width())
2384 changeListeners.removeOne(change);
2395 d->keyHandler->keyPressed(event,
true);
2408 d->keyHandler->keyReleased(event,
true);
2421 d->keyHandler->inputMethodEvent(event,
true);
2432 v =
d->keyHandler->inputMethodQuery(query);
2446 if (
d->keyHandler && !
d->doneEventPreHandler)
2447 d->keyHandler->keyPressed(event,
false);
2450 d->doneEventPreHandler =
true;
2459 if (
d->keyHandler && !
d->doneEventPreHandler)
2460 d->keyHandler->keyReleased(event,
false);
2463 d->doneEventPreHandler =
true;
2472 if (
d->keyHandler && !
d->doneEventPreHandler)
2473 d->keyHandler->inputMethodEvent(event,
false);
2476 d->doneEventPreHandler =
true;
2484 return anchorLines()->left;
2492 return anchorLines()->right;
2500 return anchorLines()->hCenter;
2508 return anchorLines()->top;
2516 return anchorLines()->bottom;
2524 return anchorLines()->vCenter;
2533 return anchorLines()->baseline;
2641 if (!
d->baselineOffset.isValid()) {
2644 return d->baselineOffset;
2650 if (offset ==
d->baselineOffset)
2653 d->baselineOffset = offset;
2655 for(
int ii = 0; ii <
d->changeListeners.count(); ++ii) {
2799 return d->keepMouse;
2823 d->keepMouse = keep;
2853 if (!itemObj && !item.
isNull()) {
2854 qmlInfo(
this) <<
"mapFromItem() given argument \"" << item.
toString() <<
"\" which is neither null nor an Item";
2901 if (!itemObj && !item.
isNull()) {
2902 qmlInfo(
this) <<
"mapToItem() given argument \"" << item.
toString() <<
"\" which is neither null nor an Item";
2969 for (
int i = children.
count()-1; i >= 0; --i) {
2971 if (child->isVisible() && child->x() <= x
2972 && child->x() + child->width() >= x
2974 && child->y() + child->height() >=
y)
2985 if (hadActiveFocus != flag) {
2986 hadActiveFocus = flag;
2987 emit q->activeFocusChanged(flag);
2995 if (p->d_func()->hadActiveFocus != flag) {
2996 p->d_func()->hadActiveFocus = flag;
2997 emit p->activeFocusChanged(flag);
3004 focusItem->d_func()->focusScopeItemChange(flag);
3042 return _states()->statesProperty();
3072 return _states()->transitionsProperty();
3160 return _stateGroup->state();
3165 _states()->setState(state);
3183 d->transform_at,
d->transform_clear);
3220 d->_anchors->d_func()->updateOnComplete();
3225 d->_contents->complete();
3264 QRectF br = q->boundingRect();
3332 d->resolveLayoutMirror();
3334 d->parentNotifier.notify();
3337 for(
int ii = 0; ii <
d->changeListeners.count(); ++ii) {
3346 for(
int ii = 0; ii <
d->changeListeners.count(); ++ii) {
3356 d->_contents->childAdded(qobject_cast<QDeclarativeItem*>(
3361 d->_contents->childRemoved(qobject_cast<QDeclarativeItem*>(
3375 return QRectF(0, 0,
d->mWidth,
d->mHeight);
3412 if (origin !=
d->origin) {
3414 if (
d->transformData)
3417 d->transformOriginDirty =
true;
3425 if (transformOriginDirty) {
3426 q->QGraphicsItem::setTransformOriginPoint(computeTransformOrigin());
3427 transformOriginDirty =
false;
3468 if (
d->smooth == smooth)
3617 qreal oldWidth = mWidth;
3619 q->prepareGeometryChange();
3633 q->setImplicitWidth(q->implicitWidth());
3639 emit q->implicitWidthChanged();
3644 return mImplicitWidth;
3653 return d->implicitWidth();
3663 bool changed = w !=
d->mImplicitWidth;
3664 d->mImplicitWidth = w;
3667 d->implicitWidthChanged();
3671 qreal oldWidth =
d->mWidth;
3680 d->implicitWidthChanged();
3689 return d->widthValid;
3743 qreal oldHeight = mHeight;
3745 q->prepareGeometryChange();
3759 q->setImplicitHeight(q->implicitHeight());
3765 emit q->implicitHeightChanged();
3770 return mImplicitHeight;
3779 return d->implicitHeight();
3829 bool changed = h !=
d->mImplicitHeight;
3830 d->mImplicitHeight = h;
3833 d->implicitHeightChanged();
3837 qreal oldHeight =
d->mHeight;
3846 d->implicitHeightChanged();
3855 return d->heightValid;
3862 d->heightValid =
true;
3863 d->widthValid =
true;
3865 if (
d->height() == size.
height() &&
d->width() == size.
width())
3868 qreal oldHeight =
d->height();
3869 qreal oldWidth =
d->width();
3873 d->setWidth(size.
width());
3876 QRectF(
x(),
y(), oldWidth, oldHeight));
3915 return hasOrWillGainFocus && isOrIsScopeOfFocusItem;
3990 switch (ev->
type()) {
3994 d->doneEventPreHandler =
false;
4003 #ifndef QT_NO_DEBUG_STREAM 4007 debug <<
"QDeclarativeItem(0)";
4012 <<
", parent =" << ((
void*)item->
parentItem())
4014 <<
", z =" << item->
zValue() <<
')';
4073 #include <moc_qdeclarativeitem.cpp> The QVariant class acts like a union for the most common Qt data types.
static int resources_count(QDeclarativeListProperty< QObject > *)
T qobject_cast(QObject *object)
static void data_append(QDeclarativeListProperty< QObject > *, QObject *)
The QPainter class performs low-level painting on widgets and other paint devices.
The QDebug class provides an output stream for debugging information.
static QScriptEngine * getScriptEngine(QDeclarativeEngine *e)
bool childrenInherit() const
qreal implicitHeight() const
void released(QDeclarativeKeyEvent *event)
QPointF transformOriginPoint() const
Returns the origin point for the transformation in item coordinates.
void setParentItemHelper(QGraphicsItem *parent, const QVariant *newParentVariant, const QVariant *thisPointerVariant)
Make sure not to trigger any pure virtual function calls (e.
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items...
qreal y() const
Returns the y-coordinate of the rectangle's top edge.
bool isNull() const
Returns true if this QScriptValue is of the primitive type Null; otherwise returns false...
QDeclarativeStateGroup * _states()
The QKeyEvent class describes a key event.
virtual bool sceneEvent(QEvent *event)
This virtual function receives events to this item.
QGraphicsItem * focusScopeItem() const
Returns this item's focus scope item.
virtual ~QDeclarativeItem()
Destroys the QDeclarativeItem.
qreal implicitWidth() const
void setLeft(QDeclarativeItem *)
QGraphicsItem * focusItem() const
If this item, a child or descendant of this item currently has input focus, this function will return...
virtual void implicitHeightChanged()
#define QT_END_NAMESPACE
This macro expands to.
static qint64 elapsed(QElapsedTimer &)
void calcHeight(QDeclarativeItem *changed=0)
QDeclarativeParserStatus ** d
~QDeclarativeKeysAttached()
QList< QGraphicsItem * > childItems() const
Returns a list of this item's children.
QDeclarativeItemKeyFilter * m_next
QScopedPointer< QGraphicsItemPrivate > d_ptr
QDeclarativeListProperty< QObject > resources()
QDeclarativeKeysAttached(QObject *parent=0)
void setTab(QDeclarativeItem *)
Q_INVOKABLE QScriptValue mapFromItem(const QScriptValue &item, qreal x, qreal y) const
Maps the point (x, y), which is in item's coordinate system, to this item's coordinate system...
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const
Priority priority() const
bool widthValid() const
Returns whether the width property has been set explicitly.
virtual void keyReleased(QKeyEvent *event, bool post)
bool inheritedLayoutMirror
bool isComponentComplete() const
Returns true if construction of the QML component is complete; otherwise returns false.
void setChildrenInherit(bool)
qreal width() const
Returns the width.
virtual void keyPressed(QKeyEvent *event, bool post)
virtual bool event(QEvent *)
void clearFocus()
Takes keyboard input focus from the item.
The QByteArray class provides an array of bytes.
QDeclarativeItem(QDeclarativeItem *parent=0)
Constructs a QDeclarativeItem with the given parent.
static QGraphicsTransform * transform_at(QDeclarativeListProperty< QGraphicsTransform > *list, int)
void setParentItem(QGraphicsItem *parent)
Sets this item's parent item to newParent.
QDebug operator<<(QDebug debug, QDeclarativeItem *item)
void setBaselineOffset(qreal)
static QObject * resources_at(QDeclarativeListProperty< QObject > *, int)
QVariant doInputMethodQuery(Qt::InputMethodQuery query) const
The QPointF class defines a point in the plane using floating point precision.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
qreal height() const
Returns the height.
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)
This virtual function is called by QGraphicsItem to notify custom items that some part of the item's ...
static void children_clear_helper(QDeclarativeListProperty< QObject > *prop)
QDeclarativeItem * m_item
static QDeclarativeKeysAttached * qmlAttachedProperties(QObject *)
virtual qreal implicitHeight() const
bool isVisible() const
Returns true if the item is visible; otherwise, false is returned.
QString toString() const
Returns the string value of this QScriptValue, as defined in ECMA-262 section 9.8, "ToString".
void setSmooth(bool)
Sets whether the item should be drawn with antialiasing and smooth pixmap filtering to smooth...
static QObject * data_at(QDeclarativeListProperty< QObject > *, int)
static void transform_append(QDeclarativeListProperty< QGraphicsTransform > *list, QGraphicsTransform *)
bool heightValid() const
Returns whether the height property has been set explicitly.
virtual void implicitWidthChanged()
static const QMetaObject staticMetaObject
This variable stores the meta-object for the class.
QDeclarativeListProperty< QDeclarativeState > states()
virtual void keyPressEvent(QKeyEvent *event)
QDeclarativeAnchorLine right() const
bool inheritMirrorFromParent
#define Q_ARG(type, data)
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
void setSize(const QSizeF &size)
virtual void itemOpacityChanged(QDeclarativeItem *)
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
static QDeclarativeLayoutMirroringAttached * qmlAttachedProperties(QObject *)
QPointF pos() const
Returns the position of the item in parent coordinates.
void childAdded(QDeclarativeItem *item)
void updateVerticalAnchors()
int count(const T &t) const
Returns the number of occurrences of value in the list.
GraphicsItemChange
This enum describes the state changes that are notified by QGraphicsItem::itemChange().
QDeclarativeAnchorLine baseline() const
static int children_count_helper(QDeclarativeListProperty< QObject > *prop)
void setPriority(Priority)
QObject * toQObject() const
If this QScriptValue is a QObject, returns the QObject pointer that the QScriptValue represents; othe...
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const
This method is only relevant for input items.
The QString class provides a Unicode character string.
QDeclarativeItemPrivate * itemPrivate
T * qobject_cast(QObject *object)
QRectF toRectF() const
Returns the variant as a QRectF if the variant has type() Rect or RectF ; otherwise returns an invali...
bool isEnabled() const
Returns true if the item is enabled; otherwise, false is returned.
void update(const QRectF &rect=QRectF())
Schedules a redraw of the area covered by rect in this item.
void connect(QObject *source, int sourceSignal)
The QObject class is the base class of all Qt objects.
virtual bool event(QEvent *)
This virtual function receives events to an object and should return true if the event e was recogniz...
void setFocusNavigation(QDeclarativeItem *currentItem, const char *dir)
Priority priority() const
The QElapsedTimer class provides a fast way to calculate elapsed times.
QDeclarativeAnchorLine left() const
The QSizeF class defines the size of a two-dimensional object using floating point precision...
virtual void inputMethodEvent(QInputMethodEvent *event, bool post)
virtual void keyPressed(QKeyEvent *event, bool post)
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
qint64 elapsed() const
Returns the number of milliseconds since this QElapsedTimer was last started.
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
void setImplicitLayoutMirror(bool mirror, bool inherit)
TransformOrigin transformOrigin() const
QDeclarativeContents(QDeclarativeItem *item)
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
qreal x() const
Returns the x-coordinate of this point.
void pressed(QDeclarativeKeyEvent *event)
void setParent(QObject *)
Makes the object a child of parent.
void childrenInheritChanged()
bool inheritMirrorFromItem
qreal zValue() const
Returns the Z-value of the item.
QRectF boundingRect() const
virtual void keyPressed(QKeyEvent *event, bool post)
bool isConnected(const char *signalName)
static void resources_clear(QDeclarativeListProperty< QObject > *)
virtual void componentComplete()=0
Invoked after the root component that caused this instantiation has completed construction.
QGraphicsObject * toGraphicsObject()
Return the graphics item cast to a QGraphicsObject, if the class is actually a graphics object...
void setParentItem(QDeclarativeItem *parent)
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifier flags that existed immediately after the event occurred.
int key() const
Returns the code of the key that was pressed or released.
The QScriptEngine class provides an environment for evaluating Qt Script code.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QDeclarativeItemPrivate::ChangeTypes types
The QRectF class defines a rectangle in the plane using floating point precision. ...
qint64 restart()
Restarts the timer and returns the time elapsed since the previous start.
QGraphicsItem * focusItem() const
When the scene is active, this functions returns the scene's current focus item, or 0 if no item curr...
void setRight(QDeclarativeItem *)
static void resources_append(QDeclarativeListProperty< QObject > *, QObject *)
The QDeclarativeItem class provides the most basic of all visual items in QML.
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
void addItemChangeListener(QDeclarativeItemChangeListener *listener, ChangeTypes types)
void setBacktab(QDeclarativeItem *)
void parentChanged()
This signal gets emitted whenever the parent of the item changes.
QDeclarativeItem * backtab() const
qreal height() const
Returns the height of the rectangle.
void transformOriginChanged(TransformOrigin)
void calcWidth(QDeclarativeItem *changed=0)
const T & at(int i) const
Returns the item at index position i in the list.
QScriptEngine * engine() const
Returns the QScriptEngine that created this QScriptValue, or 0 if this QScriptValue is invalid or the...
bool hasActiveFocus() const
static QDeclarativeItemPrivate * get(QDeclarativeItem *item)
void inputMethodPreHandler(QInputMethodEvent *)
AnchorLines(QGraphicsObject *)
void setTransformOrigin(TransformOrigin)
Set the transform origin.
static void data_clear(QDeclarativeListProperty< QObject > *)
void childRemoved(QDeclarativeItem *item)
static int data_count(QDeclarativeListProperty< QObject > *)
QDeclarativeLayoutMirroringAttached * attachedLayoutDirection
virtual qreal implicitWidth() const
QScriptValue newObject()
Creates a QtScript object of class Object.
qreal width() const
Returns the width of the rectangle.
void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry)
virtual void inputMethodEvent(QInputMethodEvent *, bool post)
void clearItem(QGraphicsObject *)
static QDeclarativeKeyNavigationAttached * qmlAttachedProperties(QObject *)
qreal baselineOffset() const
QDeclarativeKeyNavigationAttached(QObject *=0)
GraphicsItemFlags flags() const
Returns this item's flags.
void keyReleasePreHandler(QKeyEvent *)
void setImplicitWidth(qreal)
Sets the implied width of the item to w.
virtual void itemGeometryChanged(QDeclarativeItem *, const QRectF &, const QRectF &)
QDeclarativeListProperty< QDeclarativeTransition > transitions()
static QObject * children_at_helper(QDeclarativeListProperty< QObject > *prop, int index)
virtual void geometryChanged(const QRectF &newGeometry, const QRectF &oldGeometry)
This function is called to handle this item's changes in geometry from oldGeometry to newGeometry...
virtual ~QDeclarativeItemKeyFilter()
RegisterAnchorLineAtStartup()
Q_CORE_EXPORT bool qIsNaN(double d)
Returns true if the double {d} is not a number (NaN).
QDeclarativeAnchorLine verticalCenter() const
bool effectiveLayoutMirror
QDeclarativeItemKeyFilter(QDeclarativeItem *=0)
void setPriority(Priority)
void setTransformOriginPoint(const QPointF &origin)
Sets the origin point for the transformation in item coordinates.
virtual void focusChanged(bool)
static void parentProperty(QObject *o, void *rv, QDeclarativeNotifierEndpoint *e)
virtual void keyReleaseEvent(QKeyEvent *event)
void setUp(QDeclarativeItem *)
void setState(const QString &)
virtual void itemDestroyed(QDeclarativeItem *)
QDeclarativeItem * down() const
void removeItemChangeListener(QDeclarativeItemChangeListener *, ChangeTypes types)
Q_INVOKABLE QScriptValue mapToItem(const QScriptValue &item, qreal x, qreal y) const
Maps the point (x, y), which is in this item's coordinate system, to item's coordinate system...
QGraphicsItem * parentItem() const
Returns a pointer to this item's parent item.
void setProperty(const QString &name, const QScriptValue &value, const PropertyFlags &flags=KeepExistingFlags)
Sets the value of this QScriptValue's property with the given name to the given value.
TransformOrigin
Controls the point about which simple transforms like scale apply.
int userType() const
Returns the storage type of the value stored in the variant.
static void start(QElapsedTimer &)
virtual void keyReleased(QKeyEvent *event, bool post)
virtual void componentComplete()
qreal y() const
This convenience function is equivalent to calling pos().
virtual void inputMethodEvent(QInputMethodEvent *)
virtual void classBegin()=0
Invoked after class creation, but before any properties have been set.
QDeclarativeItem * parentItem() const
Returns the QDeclarativeItem parent of this item.
Q_DECLARATIVE_EXPORT QDeclarativeEngine * qmlEngine(const QObject *)
virtual QVariant itemChange(GraphicsItemChange, const QVariant &)
Note that unlike QGraphicsItems, QDeclarativeItem::itemChange() is not called during initial widget p...
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const
void prepareGeometryChange()
Prepares the item for a geometry change.
static qint64 restart(QElapsedTimer &)
QDeclarativeAnchorLine bottom() const
QDeclarativeLayoutMirroringAttached(QObject *parent=0)
qreal x() const
Returns the x-coordinate of the rectangle's left edge.
static void setConsistentTime(qint64 t)
static int transform_count(QDeclarativeListProperty< QGraphicsTransform > *list)
virtual void itemVisibilityChanged(QDeclarativeItem *)
void prependGraphicsTransform(QGraphicsTransform *t)
QGraphicsItem * focusScopeItem
QObject * parent() const
Returns a pointer to the parent object.
qreal x() const
This convenience function is equivalent to calling pos().
virtual void componentComplete()
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
QDeclarativeItem * left() const
int size() const
Returns the number of items in the list.
QDeclarativeItem * tab() const
QDeclarativeItem * up() const
virtual void componentComplete()
static RegisterAnchorLineAtStartup registerAnchorLineAtStartup
const QObjectList & children() const
Returns a list of child objects.
T qvariant_cast(const QVariant &)
virtual bool sceneEvent(QEvent *)
Q_INVOKABLE QDeclarativeItem * childAt(qreal x, qreal y) const
Returns the visible child item at point (x, y), which is in this item's coordinate system...
QPointF computeTransformOrigin() const
static const QGraphicsItemPrivate * get(const QGraphicsItem *item)
qreal y() const
Returns the y-coordinate of this point.
QVariant property(const char *name) const
Returns the value of the object's name property.
void setAccepted(bool accepted)
QDeclarativeListProperty< QGraphicsTransform > transform()
bool keepMouseGrab() const
Returns a value indicating whether mouse input should remain with this item exclusively.
virtual void keyReleased(QKeyEvent *event, bool post)
QDeclarativeItemKeyFilter * keyHandler
TransformData * transformData
void setLayoutMirror(bool mirror)
static qint64 consistentTime
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
QGraphicsScene * scene() const
Returns the current scene for the item, or 0 if the item is not stored in a scene.
void baselineOffsetChanged(qreal)
static const SigMap sigMap[]
This handler is called when a key has been pressed.
void resolveLayoutMirror()
static QNSListener * listener
QList< QGraphicsItem * > children
const QByteArray keyToSignal(int key)
QDeclarativeInfo qmlInfo(const QObject *me)
virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const
void setImplicitHeight(qreal)
Sets the implied height of the item to h.
T value() const
Returns the stored value converted to the template type T.
void setDown(QDeclarativeItem *)
bool isValid() const
Returns true if the storage type of this variant is not QVariant::Invalid; otherwise returns false...
The QGraphicsObject class provides a base class for all graphics items that require signals...
void setFlag(GraphicsItemFlag flag, bool enabled=true)
If enabled is true, the item flag flag is enabled; otherwise, it is disabled.
The QEvent class is the base class of all event classes.
Type type() const
Returns the event type.
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
static void transform_clear(QDeclarativeListProperty< QGraphicsTransform > *list)
The QScriptValue class acts as a container for the Qt Script data types.
virtual QDeclarativeAnchorsPrivate * anchorPrivate()
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem...
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
virtual void classBegin()
Invoked after class creation, but before any properties have been set.
void itemDestroyed(QDeclarativeItem *item)
void start()
Starts this timer.
QDeclarativeListProperty< QObject > data()
Q_INVOKABLE void forceActiveFocus()
Forces active focus on the item.
QDeclarativeAnchorLine top() const
QDeclarativeItemChangeListener * listener
virtual void transformChanged()
QDeclarativeAnchorLine horizontalCenter() const
virtual const QMetaObject * metaObject() const
Returns a pointer to the meta-object of this object.
QDeclarativeItem * right() const
void stateChanged(const QString &)
void setKeepMouseGrab(bool)
The flag indicating whether the mouse should remain with this item is set to keep.
The QList class is a template class that provides lists.
void keyPressPreHandler(QKeyEvent *)
virtual void classBegin()
void setFocus(Qt::FocusReason focusReason=Qt::OtherFocusReason)
Gives keyboard input focus to this item.