<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>Plasma.Extender</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <link rel="stylesheet" type="text/css" href="../common/doxygen.css" /> <link rel="stylesheet" media="screen" type="text/css" title="KDE Colors" href="../common/kde.css" /> </head> <body> <div id="container"> <div id="header"> <div id="header_top"> <div> <div> <img alt ="" src="../common/top-kde.jpg"/> KDE 4.4 PyKDE API Reference </div> </div> </div> <div id="header_bottom"> <div id="location"> <ul> <li>KDE's Python API</li> </ul> </div> <div id="menu"> <ul> <li><a href="../modules.html">Overview</a></li> <li><a href="http://techbase.kde.org/Development/Languages/Python">PyKDE Home</a></li> <li><a href="http://kde.org/family/">Sitemap</a></li> <li><a href="http://kde.org/contact/">Contact Us</a></li> </ul> </div> </div> </div> <div id="body_wrapper"> <div id="body"> <div id="right"> <div class="content"> <div id="main"> <div class="clearer"> </div> <h1>Extender Class Reference</h1> <code>from PyKDE4.plasma import *</code> <p> Inherits: <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicswidget.html">QGraphicsWidget</a> → <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qobject.html">QObject</a><br /> Namespace: Plasma.Extender<br /> <h2>Detailed Description</h2> <p>Extender plasma/extender.h <Plasma/Extender> </p> <p> Extends applets to allow detachable parts </p> <p> An Extender is a widget that visually extends the normal contents of an applet with additional dynamic widgets called ExtenderItems. These ExtenderItems can be detached by the user and dropped either on another Extender or on the canvas directly. </p> <p> This widget allows using ExtenderItems in your applet. Extender takes care of the presentation of a collection of ExtenderItems and keeps track of ExtenderItems that originate in it. </p> <p> The default Extender implementation displays extender items in a vertical layout with spacers that appear when dropping an ExtenderItem over it. </p> <p> If you wish to have a different presentation of extender items, you can choose to subclass Extender and reimplement the extenderItem* events and, optionally, the saveState function. </p> <p> To use an Extender in you applet, you'll have to instantiate one. A call to extender() in your applet will create an extender on your applet if you haven't got one already. Every applet can contain only one extender. Think of it as a decorator that adds some functionality to applets that require it. Never instantiate an Extender before init() in your applet. This won't work correctly since a scene is required when an Extender is instantiated. </p> <p> As soon as an Extender is instantiated, ExtenderItems contained previously in this Extender are restored using the initExtenderItem function from the applet the items originally came from. For more information on how this works and how to use ExtenderItems in general, see the ExtenderItem API documentation. </p> <table border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><br><h2>Enumerations</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="#Appearance">Appearance</a> </td><td class="memItemRight" valign="bottom">{ NoBorders, BottomUpStacked, TopDownStacked }</td></tr> <tr><td colspan="2"><br><h2>Signals</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#geometryChanged">geometryChanged</a> ()</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemAttached">itemAttached</a> (, <a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> a0)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemDetached">itemDetached</a> (, <a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> a0)</td></tr> <tr><td colspan="2"><br><h2>Methods</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#Extender">__init__</a> (self, <a href="../plasma/Plasma.Applet.html">Plasma.Applet</a> applet)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../plasma/Plasma.Extender.html#Appearance">Plasma.Extender.Appearance</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#appearance">appearance</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../plasma/Plasma.Applet.html">Plasma.Applet</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#applet">applet</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">[<a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a>] </td><td class="memItemRight" valign="bottom"><a class="el" href="#attachedItems">attachedItems</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">[<a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a>] </td><td class="memItemRight" valign="bottom"><a class="el" href="#detachedItems">detachedItems</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#dragEnterEvent">dragEnterEvent</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> event)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#dragLeaveEvent">dragLeaveEvent</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> event)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#dragMoveEvent">dragMoveEvent</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> event)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#dropEvent">dropEvent</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> event)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#emptyExtenderMessage">emptyExtenderMessage</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../plasma/Plasma.FrameSvg.EnabledBorders.html">Plasma.FrameSvg.EnabledBorders</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#enabledBordersForItem">enabledBordersForItem</a> (self, <a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> item)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#geometryChanged">geometryChanged</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../plasma/Plasma.ExtenderGroup.html">Plasma.ExtenderGroup</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#group">group</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> name)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">[<a href="../plasma/Plasma.ExtenderGroup.html">Plasma.ExtenderGroup</a>] </td><td class="memItemRight" valign="bottom"><a class="el" href="#groups">groups</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#hasItem">hasItem</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> name)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#isEmpty">isEmpty</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#item">item</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> name)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemAddedEvent">itemAddedEvent</a> (self, <a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> item, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qpointf.html">QPointF</a> pos=QPointF(-1,-1))</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemAttached">itemAttached</a> (self, <a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> a0)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qvariant.html">QVariant</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemChange">itemChange</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsitem::graphicsitemchange.html">QGraphicsItem.GraphicsItemChange</a> change, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qvariant.html">QVariant</a> value)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemDetached">itemDetached</a> (self, <a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> a0)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemHoverEnterEvent">itemHoverEnterEvent</a> (self, <a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> item)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemHoverLeaveEvent">itemHoverLeaveEvent</a> (self, <a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> item)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemHoverMoveEvent">itemHoverMoveEvent</a> (self, <a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> item, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qpointf.html">QPointF</a> pos)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#itemRemovedEvent">itemRemovedEvent</a> (self, <a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> item)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">[<a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a>] </td><td class="memItemRight" valign="bottom"><a class="el" href="#items">items</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#mousePressEvent">mousePressEvent</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a> event)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#resizeEvent">resizeEvent</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicssceneresizeevent.html">QGraphicsSceneResizeEvent</a> event)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#saveState">saveState</a> (self)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setAppearance">setAppearance</a> (self, <a href="../plasma/Plasma.Extender.html#Appearance">Plasma.Extender.Appearance</a> appearance)</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#setEmptyExtenderMessage">setEmptyExtenderMessage</a> (self, <a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> message)</td></tr> </table> <hr><h2>Method Documentation</h2><a class="anchor" name="Extender"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname">__init__</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="../plasma/Plasma.Applet.html">Plasma.Applet</a> </td> <td class="paramname"><em>applet</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Creates an extender. Note that extender expects applet to have a config(), and needs a scene because of that. So you should only instantiate an extender in init() or later, not in an applet's constructor. The constructor also takes care of restoring ExtenderItems that were contained in this extender before, so ExtenderItems are persistent between sessions. Note that a call to extender() in an applet will instantiate an Extender for you if one isn't already associated with your applet. </p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign="top"><em>applet</em> </td><td> The applet this extender is part of. Null is not allowed here. </td></tr> </table></dl> <p> </p></div></div><a class="anchor" name="appearance"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"><a href="../plasma/Plasma.Extender.html#Appearance">Plasma.Extender.Appearance</a> appearance</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> the current way of rendering extender items that is used. </dd></dl> </p></div></div><a class="anchor" name="applet"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"><a href="../plasma/Plasma.Applet.html">Plasma.Applet</a> applet</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> the Applet this Extender is associated with </dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.4 </dd></dl> </p></div></div><a class="anchor" name="attachedItems"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname">[<a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a>] attachedItems</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> a list of all attached extender items. </dd></dl> </p></div></div><a class="anchor" name="detachedItems"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname">[<a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a>] detachedItems</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> a list of all detached extender items. </dd></dl> </p></div></div><a class="anchor" name="dragEnterEvent"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> dragEnterEvent</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> </td> <td class="paramname"><em>event</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Reimplemented from QGraphicsWidget </p></div></div><a class="anchor" name="dragLeaveEvent"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> dragLeaveEvent</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> </td> <td class="paramname"><em>event</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Reimplemented from QGraphicsWidget </p></div></div><a class="anchor" name="dragMoveEvent"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> dragMoveEvent</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> </td> <td class="paramname"><em>event</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Reimplemented from QGraphicsWidget </p></div></div><a class="anchor" name="dropEvent"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> dropEvent</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsscenedragdropevent.html">QGraphicsSceneDragDropEvent</a> </td> <td class="paramname"><em>event</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Reimplemented from QGraphicsWidget </p></div></div><a class="anchor" name="emptyExtenderMessage"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> emptyExtenderMessage</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> The text to be shown whenever the applet's layout is empty. </dd></dl> </p></div></div><a class="anchor" name="enabledBordersForItem"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"><a href="../plasma/Plasma.FrameSvg.EnabledBorders.html">Plasma.FrameSvg.EnabledBorders</a> enabledBordersForItem</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> </td> <td class="paramname"><em>item</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>This function get's called on every item to determine which background border's to render. </p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign="top"><em>item</em> </td><td> the item for which its position or extender has changed. </td></tr> </table></dl> <p> <dl class="return" compact><dt><b>Returns:</b></dt><dd> the borders that have to be enabled on its background. </dd></dl> </p></div></div><a class="anchor" name="geometryChanged"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> geometryChanged</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p>Fires when an extender's preferred size changes. </p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("geometryChanged()"), target_slot)</code></dd></dl></div></div><a class="anchor" name="group"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"><a href="../plasma/Plasma.ExtenderGroup.html">Plasma.ExtenderGroup</a> group</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> </td> <td class="paramname"><em>name</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Extra convenience function for obtaining groups specified by name. This will avoid needed to call item and casting to ExtenderGroup, which is otherwise quite common. <dl class="return" compact><dt><b>Returns:</b></dt><dd> the requested group </dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.3 </dd></dl> </p></div></div><a class="anchor" name="groups"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname">[<a href="../plasma/Plasma.ExtenderGroup.html">Plasma.ExtenderGroup</a>] groups</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> a list of groups that are contained in this extender. </dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.3 </dd></dl> </p></div></div><a class="anchor" name="hasItem"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname">bool hasItem</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> </td> <td class="paramname"><em>name</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>This function can be used for easily determining if a certain item is already displayed in an extender item somewhere, so your applet doesn't duplicate this item. This is needed because ExtenderItems are persistent, so you can't blindly add new extender items in all cases. <dl class="return" compact><dt><b>Returns:</b></dt><dd> whether or not this item already exists. </dd></dl> <dl class="since" compact><dt><b>Since:</b></dt><dd> 4.3 </dd></dl> </p></div></div><a class="anchor" name="isEmpty"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname">bool isEmpty</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> true if the Extender is visually empty (though it may have items such as empty groups or detached items associatd with it) </dd></dl> </p></div></div><a class="anchor" name="item"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"><a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> item</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> </td> <td class="paramname"><em>name</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>This function can be used for obtaining the extender item specified by name. For checking whether or not an item already exists, you should use hasItem instead: while plasma is starting up, not all detached items might have been instantiated yet. hasItem returns true even if the requested item isn't instantiated yet. <dl class="return" compact><dt><b>Returns:</b></dt><dd> the requested item </dd></dl> </p></div></div><a class="anchor" name="itemAddedEvent"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> itemAddedEvent</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> </td> <td class="paramname"><em>item</em>, </td> </tr> <tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qpointf.html">QPointF</a> </td> <td class="paramname"><em>pos=QPointF(-1,-1)</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Get's called after an item has been added to this extender. The bookkeeping has already been done when this function get's called. The only thing left to do is put it somewhere appropriate. The default implementation adds the extenderItem to the appropriate place in a QGraphicsLinearLayout. </p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign="top"><em>item</em> </td><td> The item that has just been added. <tr><td></td><td valign="top"><em>pos</em> </td><td> The location the item has been dropped in local coordinates. </td></tr> </table></dl> <p> </p></div></div><a class="anchor" name="itemAttached"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> itemAttached</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> </td> <td class="paramname"><em>a0</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Fires when an extender item is added to this extender. </p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("itemAttached(Plasma::ExtenderItem*)"), target_slot)</code></dd></dl></div></div><a class="anchor" name="itemChange"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qvariant.html">QVariant</a> itemChange</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsitem::graphicsitemchange.html">QGraphicsItem.GraphicsItemChange</a> </td> <td class="paramname"><em>change</em>, </td> </tr> <tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qvariant.html">QVariant</a> </td> <td class="paramname"><em>value</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Reimplemented from QGraphicsWidget </p></div></div><a class="anchor" name="itemDetached"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> itemDetached</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> </td> <td class="paramname"><em>a0</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Fires when an extender item is removed from this extender. </p><dl compact><dt><b>Signal syntax:</b></dt><dd><code>QObject.connect(source, SIGNAL("itemDetached(Plasma::ExtenderItem*)"), target_slot)</code></dd></dl></div></div><a class="anchor" name="itemHoverEnterEvent"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> itemHoverEnterEvent</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> </td> <td class="paramname"><em>item</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Get's called when an ExtenderItem that get's dragged enters this extender. Default implementation does nothing. </p></div></div><a class="anchor" name="itemHoverLeaveEvent"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> itemHoverLeaveEvent</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> </td> <td class="paramname"><em>item</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Get's called when an ExtenderItem that was previously hovering over this extender moves away from this extender. The default implementation removes any spacer from the layout. </p></div></div><a class="anchor" name="itemHoverMoveEvent"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> itemHoverMoveEvent</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> </td> <td class="paramname"><em>item</em>, </td> </tr> <tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qpointf.html">QPointF</a> </td> <td class="paramname"><em>pos</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Gets called when an ExtenderItem is hovering over this extender. Implement this function to give some visual feedback about what will happen when the mouse button is released at that position. The default implementation shows a spacer at the appropriate location in the layout. </p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign="top"><em>item</em> </td><td> The item that's hovering over this extender. Most useful for obtaining the size of the spacer. <tr><td></td><td valign="top"><em>pos</em> </td><td> The location the item is hovering. </td></tr> </table></dl> <p> </p></div></div><a class="anchor" name="itemRemovedEvent"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> itemRemovedEvent</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a> </td> <td class="paramname"><em>item</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Get's called after an item has been removed from this extender. All bookkeeping has already been done when this function get's called. </p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign="top"><em>item</em> </td><td> The item that has just been removed. </td></tr> </table></dl> <p> </p></div></div><a class="anchor" name="items"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname">[<a href="../plasma/Plasma.ExtenderItem.html">Plasma.ExtenderItem</a>] items</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p><dl class="return" compact><dt><b>Returns:</b></dt><dd> a list of all extender items (attached AND detached) where the source applet is this applet. </dd></dl> </p></div></div><a class="anchor" name="mousePressEvent"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> mousePressEvent</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicsscenemouseevent.html">QGraphicsSceneMouseEvent</a> </td> <td class="paramname"><em>event</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Reimplemented from QGraphicsWidget </p></div></div><a class="anchor" name="resizeEvent"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> resizeEvent</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qgraphicssceneresizeevent.html">QGraphicsSceneResizeEvent</a> </td> <td class="paramname"><em>event</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Reimplemented from QGraphicsWidget </p></div></div><a class="anchor" name="saveState"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> saveState</td> <td>(</td> <td class="paramtype"> </td> <td class="paramname"><em>self</em> )</td> <td width="100%"> </td> </tr> </table> </div> <div class="memdoc"><p>This function get's called for every extender when plasma exits. Implement this function to store the current state of this extender (position in a layout for example), so this can be restored when applet starts again. The default implementation stores the y coordinate of every extender item in the config field extenderItemPos. </p></div></div><a class="anchor" name="setAppearance"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> setAppearance</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="../plasma/Plasma.Extender.html#Appearance">Plasma.Extender.Appearance</a> </td> <td class="paramname"><em>appearance</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p>Use this function to instruct the extender on how to render its items. Usually you will want to call this function in your applet's constraintsEvent, allthough this is already done for you when using PopupApplet as base class for your applet. Defaults to NoBorders. </p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign="top"><em>appearance</em> </td><td> the way this extender should look. </td></tr> </table></dl> <p> </p></div></div><a class="anchor" name="setEmptyExtenderMessage"></a> <div class="memitem"> <div class="memproto"> <table class="memname"><tr> <td class="memname"> setEmptyExtenderMessage</td> <td>(</td> <td class="paramtype"> <em>self</em>, </td> <td class="paramname"></td> </tr><tr> <td class="memname"></td> <td></td> <td class="paramtype"><a href="http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html">QString</a> </td> <td class="paramname"><em>message</em></td> </tr> <tr> <td></td> <td>)</td> <td></td> <td></td> <td width="100%"> </td> </tr></table> </div> <div class="memdoc"><p></p><dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td></td><td valign="top"><em>message</em> </td><td> The text to be shown whenever the applet's extender is empty. </td></tr> </table></dl> <p> </p></div></div><hr><h2>Enumeration Documentation</h2><a class="anchor" name="Appearance"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr><td class="memname">Appearance</td> </tr> </table> </div> <div class="memdoc"><p>Description on how to render the extender's items. </p><dl compact><dt><b>Enumerator: </b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"><tr><td valign="top"><em>NoBorders</em> = 0</td><td><tr><td valign="top"><em>BottomUpStacked</em> = 1</td><td><tr><td valign="top"><em>TopDownStacked</em> = 2</td><td></table> </dl> </div></div><p> </div> </div> </div> <div id="left"> <div class="menu_box"> <div class="nav_list"> <ul> <li><a href="../allclasses.html">Full Index</a></li> </ul> </div> <a name="cp-menu" /><div class="menutitle"><div> <h2 id="cp-menu-project">Modules</h2> </div></div> <div class="nav_list"> <ul><li><a href="../akonadi/index.html">akonadi</a></li> <li><a href="../dnssd/index.html">dnssd</a></li> <li><a href="../kdecore/index.html">kdecore</a></li> <li><a href="../kdeui/index.html">kdeui</a></li> <li><a href="../khtml/index.html">khtml</a></li> <li><a href="../kio/index.html">kio</a></li> <li><a href="../knewstuff/index.html">knewstuff</a></li> <li><a href="../kparts/index.html">kparts</a></li> <li><a href="../kutils/index.html">kutils</a></li> <li><a href="../nepomuk/index.html">nepomuk</a></li> <li><a href="../phonon/index.html">phonon</a></li> <li><a href="../plasma/index.html">plasma</a></li> <li><a href="../polkitqt/index.html">polkitqt</a></li> <li><a href="../solid/index.html">solid</a></li> <li><a href="../soprano/index.html">soprano</a></li> </ul></div></div> </div> </div> <div class="clearer"/> </div> <div id="end_body"></div> </div> <div id="footer"><div id="footer_text"> This documentation is maintained by <a href="mailto:simon@simonzone.com">Simon Edwards</a>.<br /> KDE<sup>®</sup> and <a href="../images/kde_gear_black.png">the K Desktop Environment<sup>®</sup> logo</a> are registered trademarks of <a href="http://ev.kde.org/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> | <a href="http://www.kde.org/contact/impressum.php">Legal</a> </div></div> </body> </html>