Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 596

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QDeclarativeItem Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QDeclarativeItem Class Reference<br /><sup><sup>[<a href="qtdeclarative.html">QtDeclarative</a> module]</sup></sup></h1><p>The QDeclarativeItem class provides the most basic of all visual
items in QML. <a href="#details">More...</a></p>

<p>Inherits <a href="qgraphicsobject.html">QGraphicsObject</a> and <a href="qdeclarativeparserstatus.html">QDeclarativeParserStatus</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qdeclarativeitem.html#TransformOrigin-enum">TransformOrigin</a></b> { TopLeft, Top, TopRight, Left, ..., BottomRight }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qdeclarativeitem.html#QDeclarativeItem">__init__</a></b> (<i>self</i>, QDeclarativeItem&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />float <b><a href="qdeclarativeitem.html#baselineOffset">baselineOffset</a></b> (<i>self</i>)</li><li><div class="fn" />QRectF <b><a href="qdeclarativeitem.html#boundingRect">boundingRect</a></b> (<i>self</i>)</li><li><div class="fn" />QRectF <b><a href="qdeclarativeitem.html#childrenRect">childrenRect</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#classBegin">classBegin</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdeclarativeitem.html#clip">clip</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#componentComplete">componentComplete</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdeclarativeitem.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#geometryChanged">geometryChanged</a></b> (<i>self</i>, QRectF&#160;<i>newGeometry</i>, QRectF&#160;<i>oldGeometry</i>)</li><li><div class="fn" />bool <b><a href="qdeclarativeitem.html#hasFocus">hasFocus</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdeclarativeitem.html#heightValid">heightValid</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qdeclarativeitem.html#implicitHeight">implicitHeight</a></b> (<i>self</i>)</li><li><div class="fn" />float <b><a href="qdeclarativeitem.html#implicitWidth">implicitWidth</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#inputMethodEvent">inputMethodEvent</a></b> (<i>self</i>, QInputMethodEvent)</li><li><div class="fn" />QVariant <b><a href="qdeclarativeitem.html#inputMethodQuery">inputMethodQuery</a></b> (<i>self</i>, Qt.InputMethodQuery&#160;<i>query</i>)</li><li><div class="fn" />bool <b><a href="qdeclarativeitem.html#isComponentComplete">isComponentComplete</a></b> (<i>self</i>)</li><li><div class="fn" />QVariant <b><a href="qdeclarativeitem.html#itemChange">itemChange</a></b> (<i>self</i>, QGraphicsItem.GraphicsItemChange, QVariant)</li><li><div class="fn" />bool <b><a href="qdeclarativeitem.html#keepMouseGrab">keepMouseGrab</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#keyPressEvent">keyPressEvent</a></b> (<i>self</i>, QKeyEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#keyReleaseEvent">keyReleaseEvent</a></b> (<i>self</i>, QKeyEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#paint">paint</a></b> (<i>self</i>, QPainter, QStyleOptionGraphicsItem, QWidget)</li><li><div class="fn" />QDeclarativeItem <b><a href="qdeclarativeitem.html#parentItem">parentItem</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdeclarativeitem.html#sceneEvent">sceneEvent</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#setBaselineOffset">setBaselineOffset</a></b> (<i>self</i>, float)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#setClip">setClip</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#setHeight">setHeight</a></b> (<i>self</i>, float)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#setImplicitHeight">setImplicitHeight</a></b> (<i>self</i>, float)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#setImplicitWidth">setImplicitWidth</a></b> (<i>self</i>, float)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#setKeepMouseGrab">setKeepMouseGrab</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#setParentItem">setParentItem</a></b> (<i>self</i>, QDeclarativeItem&#160;<i>parent</i>)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#setSmooth">setSmooth</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#setTransformOrigin">setTransformOrigin</a></b> (<i>self</i>, TransformOrigin)</li><li><div class="fn" /><b><a href="qdeclarativeitem.html#setWidth">setWidth</a></b> (<i>self</i>, float)</li><li><div class="fn" />bool <b><a href="qdeclarativeitem.html#smooth">smooth</a></b> (<i>self</i>)</li><li><div class="fn" />TransformOrigin <b><a href="qdeclarativeitem.html#transformOrigin">transformOrigin</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qdeclarativeitem.html#widthValid">widthValid</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QDeclarativeItem class provides the most basic of all visual
items in QML.</p>
<p>All visual items in Qt Declarative inherit from
QDeclarativeItem. Although QDeclarativeItem 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,
<a href="qml-anchor-layout.html#anchor-layout">anchoring</a> and
key handling.</p>
<p>You can subclass QDeclarativeItem to provide your own custom
visual item that inherits these features. Note that, because it
does not draw anything, QDeclarativeItem sets the <a href="qgraphicsitem.html#GraphicsItemFlag-enum">QGraphicsItem.ItemHasNoContents</a>
flag. If you subclass QDeclarativeItem to create a visual item, you
will need to unset this flag.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="TransformOrigin-enum" />QDeclarativeItem.TransformOrigin</h3><p>Controls the point about which simple transforms like scale
apply.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QDeclarativeItem.TopLeft</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The top-left corner of the item.</td>
</tr>
<tr>
<td class="topAlign"><tt>QDeclarativeItem.Top</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The center point of the top of the item.</td>
</tr>
<tr>
<td class="topAlign"><tt>QDeclarativeItem.TopRight</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The top-right corner of the item.</td>
</tr>
<tr>
<td class="topAlign"><tt>QDeclarativeItem.Left</tt></td>
<td class="topAlign"><tt>3</tt></td>
<td class="topAlign">The left most point of the vertical
middle.</td>
</tr>
<tr>
<td class="topAlign"><tt>QDeclarativeItem.Center</tt></td>
<td class="topAlign"><tt>4</tt></td>
<td class="topAlign">The center of the item.</td>
</tr>
<tr>
<td class="topAlign"><tt>QDeclarativeItem.Right</tt></td>
<td class="topAlign"><tt>5</tt></td>
<td class="topAlign">The right most point of the vertical
middle.</td>
</tr>
<tr>
<td class="topAlign"><tt>QDeclarativeItem.BottomLeft</tt></td>
<td class="topAlign"><tt>6</tt></td>
<td class="topAlign">The bottom-left corner of the item.</td>
</tr>
<tr>
<td class="topAlign"><tt>QDeclarativeItem.Bottom</tt></td>
<td class="topAlign"><tt>7</tt></td>
<td class="topAlign">The center point of the bottom of the
item.</td>
</tr>
<tr>
<td class="topAlign"><tt>QDeclarativeItem.BottomRight</tt></td>
<td class="topAlign"><tt>8</tt></td>
<td class="topAlign">The bottom-right corner of the item.</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QDeclarativeItem" />QDeclarativeItem.__init__ (<i>self</i>, <a href="qdeclarativeitem.html">QDeclarativeItem</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qdeclarativeitem.html">QDeclarativeItem</a> with the given
<i>parent</i>.</p>


<h3 class="fn"><a name="baselineOffset" />float QDeclarativeItem.baselineOffset (<i>self</i>)</h3><h3 class="fn"><a name="boundingRect" /><a href="qrectf.html">QRectF</a> QDeclarativeItem.boundingRect (<i>self</i>)</h3><h3 class="fn"><a name="childrenRect" /><a href="qrectf.html">QRectF</a> QDeclarativeItem.childrenRect (<i>self</i>)</h3><h3 class="fn"><a name="classBegin" />QDeclarativeItem.classBegin (<i>self</i>)</h3><h3 class="fn"><a name="clip" />bool QDeclarativeItem.clip (<i>self</i>)</h3><h3 class="fn"><a name="componentComplete" />QDeclarativeItem.componentComplete (<i>self</i>)</h3><h3 class="fn"><a name="event" />bool QDeclarativeItem.event (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><h3 class="fn"><a name="geometryChanged" />QDeclarativeItem.geometryChanged (<i>self</i>, <a href="qrectf.html">QRectF</a>&#160;<i>newGeometry</i>, <a href="qrectf.html">QRectF</a>&#160;<i>oldGeometry</i>)</h3><p>This function is called to handle this item's changes in
geometry from <i>oldGeometry</i> to <i>newGeometry</i>. If the two
geometries are the same, it doesn't do anything.</p>


<h3 class="fn"><a name="hasFocus" />bool QDeclarativeItem.hasFocus (<i>self</i>)</h3><h3 class="fn"><a name="heightValid" />bool QDeclarativeItem.heightValid (<i>self</i>)</h3><p>Returns whether the height property has been set explicitly.</p>


<h3 class="fn"><a name="implicitHeight" />float QDeclarativeItem.implicitHeight (<i>self</i>)</h3><h3 class="fn"><a name="implicitWidth" />float QDeclarativeItem.implicitWidth (<i>self</i>)</h3><h3 class="fn"><a name="inputMethodEvent" />QDeclarativeItem.inputMethodEvent (<i>self</i>, <a href="qinputmethodevent.html">QInputMethodEvent</a>)</h3><h3 class="fn"><a name="inputMethodQuery" />QVariant QDeclarativeItem.inputMethodQuery (<i>self</i>, <a href="qt.html#InputMethodQuery-enum">Qt.InputMethodQuery</a>&#160;<i>query</i>)</h3><h3 class="fn"><a name="isComponentComplete" />bool QDeclarativeItem.isComponentComplete (<i>self</i>)</h3><p>Returns true if construction of the QML component is complete;
otherwise returns false.</p>
<p>It is often desirable to delay some processing until the
component is completed.</p>
<p><b>See also</b> <a href="qdeclarativeparserstatus.html#componentComplete">componentComplete</a>().</p>


<h3 class="fn"><a name="itemChange" />QVariant QDeclarativeItem.itemChange (<i>self</i>, <a href="qgraphicsitem.html#GraphicsItemChange-enum">QGraphicsItem.GraphicsItemChange</a>, QVariant)</h3><h3 class="fn"><a name="keepMouseGrab" />bool QDeclarativeItem.keepMouseGrab (<i>self</i>)</h3><p>Returns a value indicating whether mouse input should remain
with this item exclusively.</p>
<p><b>See also</b> <a href="qdeclarativeitem.html#setKeepMouseGrab">setKeepMouseGrab</a>().</p>


<h3 class="fn"><a name="keyPressEvent" />QDeclarativeItem.keyPressEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>&#160;<i>event</i>)</h3><h3 class="fn"><a name="keyReleaseEvent" />QDeclarativeItem.keyReleaseEvent (<i>self</i>, <a href="qkeyevent.html">QKeyEvent</a>&#160;<i>event</i>)</h3><h3 class="fn"><a name="paint" />QDeclarativeItem.paint (<i>self</i>, <a href="qpainter.html">QPainter</a>, <a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a>, <a href="qwidget.html">QWidget</a>)</h3><h3 class="fn"><a name="parentItem" /><a href="qdeclarativeitem.html">QDeclarativeItem</a> QDeclarativeItem.parentItem (<i>self</i>)</h3><h3 class="fn"><a name="sceneEvent" />bool QDeclarativeItem.sceneEvent (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><h3 class="fn"><a name="setBaselineOffset" />QDeclarativeItem.setBaselineOffset (<i>self</i>, float)</h3><h3 class="fn"><a name="setClip" />QDeclarativeItem.setClip (<i>self</i>, bool)</h3><h3 class="fn"><a name="setHeight" />QDeclarativeItem.setHeight (<i>self</i>, float)</h3><h3 class="fn"><a name="setImplicitHeight" />QDeclarativeItem.setImplicitHeight (<i>self</i>, float)</h3><p>Sets the implied height of the item to <i>h</i>. This is the
height implied by other properties that determine the content.</p>
<p><b>See also</b> <a href="qdeclarativeitem.html#implicitHeight-prop">implicitHeight</a>().</p>


<h3 class="fn"><a name="setImplicitWidth" />QDeclarativeItem.setImplicitWidth (<i>self</i>, float)</h3><p>Sets the implied width of the item to <i>w</i>. This is the
width implied by other properties that determine the content.</p>
<p><b>See also</b> <a href="qdeclarativeitem.html#implicitWidth-prop">implicitWidth</a>().</p>


<h3 class="fn"><a name="setKeepMouseGrab" />QDeclarativeItem.setKeepMouseGrab (<i>self</i>, bool)</h3><p>The flag indicating whether the mouse should remain with this
item is set to <i>keep</i>.</p>
<p>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.</p>
<p>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.</p>
<p><b>See also</b> <a href="qdeclarativeitem.html#keepMouseGrab">keepMouseGrab</a>().</p>


<h3 class="fn"><a name="setParentItem" />QDeclarativeItem.setParentItem (<i>self</i>, <a href="qdeclarativeitem.html">QDeclarativeItem</a>&#160;<i>parent</i>)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><h3 class="fn"><a name="setSmooth" />QDeclarativeItem.setSmooth (<i>self</i>, bool)</h3><h3 class="fn"><a name="setTransformOrigin" />QDeclarativeItem.setTransformOrigin (<i>self</i>, <a href="qdeclarativeitem.html#TransformOrigin-enum">TransformOrigin</a>)</h3><p>Set the transform <i>origin</i>.</p>
<p><b>See also</b> <a href="qdeclarativeitem.html#transformOrigin">transformOrigin</a>().</p>


<h3 class="fn"><a name="setWidth" />QDeclarativeItem.setWidth (<i>self</i>, float)</h3><h3 class="fn"><a name="smooth" />bool QDeclarativeItem.smooth (<i>self</i>)</h3><h3 class="fn"><a name="transformOrigin" /><a href="qdeclarativeitem.html#TransformOrigin-enum">TransformOrigin</a> QDeclarativeItem.transformOrigin (<i>self</i>)</h3><p>Returns the current transform origin.</p>
<p><b>See also</b> <a href="qdeclarativeitem.html#setTransformOrigin">setTransformOrigin</a>().</p>


<h3 class="fn"><a name="widthValid" />bool QDeclarativeItem.widthValid (<i>self</i>)</h3><p>Returns whether the width property has been set explicitly.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>