src/eric7/Documentation/Source/eric7.Graphics.PackageItem.html

Fri, 27 Oct 2023 14:09:40 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 27 Oct 2023 14:09:40 +0200
branch
eric7
changeset 10259
b51dfacef37f
parent 10070
9f5758c0fec1
child 10479
856476537696
permissions
-rw-r--r--

Regenerated the source documentation with the corrected module parser.

<!DOCTYPE html>
<html><head>
<title>eric7.Graphics.PackageItem</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<a NAME="top" ID="top"></a>
<h1>eric7.Graphics.PackageItem</h1>

<p>
Module implementing a package item.
</p>
<h3>Global Attributes</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>

<table>

<tr>
<td><a href="#PackageItem">PackageItem</a></td>
<td>Class implementing a package item.</td>
</tr>
<tr>
<td><a href="#PackageModel">PackageModel</a></td>
<td>Class implementing the package model.</td>
</tr>
</table>
<h3>Functions</h3>

<table>
<tr><td>None</td></tr>
</table>
<hr />
<hr />
<a NAME="PackageItem" ID="PackageItem"></a>
<h2>PackageItem</h2>

<p>
    Class implementing a package item.
</p>
<h3>Derived from</h3>
UMLItem
<h3>Class Attributes</h3>

<table>
<tr><td>ItemType</td></tr>
</table>
<h3>Class Methods</h3>

<table>

<tr>
<td><a href="#PackageItem.fromDict">fromDict</a></td>
<td>Class method to create a class item from persisted data.</td>
</tr>
</table>
<h3>Methods</h3>

<table>

<tr>
<td><a href="#PackageItem.__init__">PackageItem</a></td>
<td>Constructor</td>
</tr>
<tr>
<td><a href="#PackageItem.__calculateSize">__calculateSize</a></td>
<td>Private method to calculate the size of the package widget.</td>
</tr>
<tr>
<td><a href="#PackageItem.__createTexts">__createTexts</a></td>
<td>Private method to create the text items of the class item.</td>
</tr>
<tr>
<td><a href="#PackageItem.paint">paint</a></td>
<td>Public method to paint the item in local coordinates.</td>
</tr>
<tr>
<td><a href="#PackageItem.parseItemDataString">parseItemDataString</a></td>
<td>Public method to parse the given persistence data.</td>
</tr>
<tr>
<td><a href="#PackageItem.setModel">setModel</a></td>
<td>Public method to set the package model.</td>
</tr>
<tr>
<td><a href="#PackageItem.toDict">toDict</a></td>
<td>Public method to collect data to be persisted.</td>
</tr>
</table>
<h3>Static Methods</h3>

<table>
<tr><td>None</td></tr>
</table>

<a NAME="PackageItem.fromDict" ID="PackageItem.fromDict"></a>
<h4>PackageItem.fromDict (class method)</h4>
<b>fromDict</b>(<i>data, colors=None</i>)

<p>
        Class method to create a class item from persisted data.
</p>
<dl>

<dt><i>data</i> (dict)</dt>
<dd>
dictionary containing the persisted data as generated
            by toDict()
</dd>
<dt><i>colors</i> (tuple of (QColor, QColor))</dt>
<dd>
tuple containing the foreground and background colors
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
created class item
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
ClassItem
</dd>
</dl>
<a NAME="PackageItem.__init__" ID="PackageItem.__init__"></a>
<h4>PackageItem (Constructor)</h4>
<b>PackageItem</b>(<i>model=None, x=0, y=0, rounded=False, noModules=False, colors=None, parent=None, scene=None, </i>)

<p>
        Constructor
</p>
<dl>

<dt><i>model</i> (PackageModel)</dt>
<dd>
package model containing the package data
</dd>
<dt><i>x</i> (int)</dt>
<dd>
x-coordinate
</dd>
<dt><i>y</i> (int)</dt>
<dd>
y-coordinate
</dd>
<dt><i>rounded</i> (bool)</dt>
<dd>
flag indicating a rounded corner
</dd>
<dt><i>noModules</i> (bool)</dt>
<dd>
flag indicating, that no module names should be
            shown
</dd>
<dt><i>colors</i> (tuple of (QColor, QColor))</dt>
<dd>
tuple containing the foreground and background colors
</dd>
<dt><i>parent</i> (QGraphicsItem)</dt>
<dd>
reference to the parent object
</dd>
<dt><i>scene</i> (QGraphicsScene)</dt>
<dd>
reference to the scene object
</dd>
</dl>
<a NAME="PackageItem.__calculateSize" ID="PackageItem.__calculateSize"></a>
<h4>PackageItem.__calculateSize</h4>
<b>__calculateSize</b>(<i></i>)

<p>
        Private method to calculate the size of the package widget.
</p>
<a NAME="PackageItem.__createTexts" ID="PackageItem.__createTexts"></a>
<h4>PackageItem.__createTexts</h4>
<b>__createTexts</b>(<i></i>)

<p>
        Private method to create the text items of the class item.
</p>
<a NAME="PackageItem.paint" ID="PackageItem.paint"></a>
<h4>PackageItem.paint</h4>
<b>paint</b>(<i>painter, option, widget=None</i>)

<p>
        Public method to paint the item in local coordinates.
</p>
<dl>

<dt><i>painter</i> (QPainter)</dt>
<dd>
reference to the painter object
</dd>
<dt><i>option</i> (QStyleOptionGraphicsItem)</dt>
<dd>
style options
</dd>
<dt><i>widget</i> (QWidget)</dt>
<dd>
optional reference to the widget painted on
</dd>
</dl>
<a NAME="PackageItem.parseItemDataString" ID="PackageItem.parseItemDataString"></a>
<h4>PackageItem.parseItemDataString</h4>
<b>parseItemDataString</b>(<i>version, data</i>)

<p>
        Public method to parse the given persistence data.
</p>
<dl>

<dt><i>version</i> (str)</dt>
<dd>
version of the data
</dd>
<dt><i>data</i> (str)</dt>
<dd>
persisted data to be parsed
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
flag indicating success
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<a NAME="PackageItem.setModel" ID="PackageItem.setModel"></a>
<h4>PackageItem.setModel</h4>
<b>setModel</b>(<i>model</i>)

<p>
        Public method to set the package model.
</p>
<dl>

<dt><i>model</i> (PackageModel)</dt>
<dd>
package model containing the package data
</dd>
</dl>
<a NAME="PackageItem.toDict" ID="PackageItem.toDict"></a>
<h4>PackageItem.toDict</h4>
<b>toDict</b>(<i></i>)

<p>
        Public method to collect data to be persisted.
</p>
<dl>
<dt>Return:</dt>
<dd>
dictionary containing data to be persisted
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
dict
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
<hr />
<a NAME="PackageModel" ID="PackageModel"></a>
<h2>PackageModel</h2>

<p>
    Class implementing the package model.
</p>
<h3>Derived from</h3>
UMLModel
<h3>Class Attributes</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Class Methods</h3>

<table>
<tr><td>None</td></tr>
</table>
<h3>Methods</h3>

<table>

<tr>
<td><a href="#PackageModel.__init__">PackageModel</a></td>
<td>Constructor</td>
</tr>
<tr>
<td><a href="#PackageModel.addModule">addModule</a></td>
<td>Public method to add a module to the package model.</td>
</tr>
<tr>
<td><a href="#PackageModel.getModules">getModules</a></td>
<td>Public method to retrieve the modules of the package.</td>
</tr>
</table>
<h3>Static Methods</h3>

<table>
<tr><td>None</td></tr>
</table>

<a NAME="PackageModel.__init__" ID="PackageModel.__init__"></a>
<h4>PackageModel (Constructor)</h4>
<b>PackageModel</b>(<i>name, moduleslist=None</i>)

<p>
        Constructor
</p>
<dl>

<dt><i>name</i> (str)</dt>
<dd>
package name
</dd>
<dt><i>moduleslist</i> (list of str)</dt>
<dd>
list of module names
</dd>
</dl>
<a NAME="PackageModel.addModule" ID="PackageModel.addModule"></a>
<h4>PackageModel.addModule</h4>
<b>addModule</b>(<i>modulename</i>)

<p>
        Public method to add a module to the package model.
</p>
<dl>

<dt><i>modulename</i> (str)</dt>
<dd>
module name to be added
</dd>
</dl>
<a NAME="PackageModel.getModules" ID="PackageModel.getModules"></a>
<h4>PackageModel.getModules</h4>
<b>getModules</b>(<i></i>)

<p>
        Public method to retrieve the modules of the package.
</p>
<dl>
<dt>Return:</dt>
<dd>
list of module names
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
list of str
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial