--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/eric7/Documentation/Source/eric7.Graphics.ModuleItem.html Thu Jul 07 11:23:56 2022 +0200 @@ -0,0 +1,365 @@ +<!DOCTYPE html> +<html><head> +<title>eric7.Graphics.ModuleItem</title> +<meta charset="UTF-8"> +<link rel="stylesheet" href="styles.css"> +</head> +<body> +<a NAME="top" ID="top"></a> +<h1>eric7.Graphics.ModuleItem</h1> + +<p> +Module implementing a module item. +</p> +<h3>Global Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> + +<table> + +<tr> +<td><a href="#ModuleItem">ModuleItem</a></td> +<td>Class implementing a module item.</td> +</tr> +<tr> +<td><a href="#ModuleModel">ModuleModel</a></td> +<td>Class implementing the module model.</td> +</tr> +</table> +<h3>Functions</h3> + +<table> +<tr><td>None</td></tr> +</table> +<hr /> +<hr /> +<a NAME="ModuleItem" ID="ModuleItem"></a> +<h2>ModuleItem</h2> + +<p> + Class implementing a module 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="#ModuleItem.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="#ModuleItem.__init__">ModuleItem</a></td> +<td>Constructor</td> +</tr> +<tr> +<td><a href="#ModuleItem.__calculateSize">__calculateSize</a></td> +<td>Private method to calculate the size of the module item.</td> +</tr> +<tr> +<td><a href="#ModuleItem.__createTexts">__createTexts</a></td> +<td>Private method to create the text items of the module item.</td> +</tr> +<tr> +<td><a href="#ModuleItem.paint">paint</a></td> +<td>Public method to paint the item in local coordinates.</td> +</tr> +<tr> +<td><a href="#ModuleItem.parseItemDataString">parseItemDataString</a></td> +<td>Public method to parse the given persistence data.</td> +</tr> +<tr> +<td><a href="#ModuleItem.setModel">setModel</a></td> +<td>Public method to set the module model.</td> +</tr> +<tr> +<td><a href="#ModuleItem.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="ModuleItem.fromDict" ID="ModuleItem.fromDict"></a> +<h4>ModuleItem.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="ModuleItem.__init__" ID="ModuleItem.__init__"></a> +<h4>ModuleItem (Constructor)</h4> +<b>ModuleItem</b>(<i>model=None, x=0, y=0, rounded=False, colors=None, parent=None, scene=None</i>) + +<p> + Constructor +</p> +<dl> + +<dt><i>model</i> (ModuleModel)</dt> +<dd> +module model containing the module 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>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="ModuleItem.__calculateSize" ID="ModuleItem.__calculateSize"></a> +<h4>ModuleItem.__calculateSize</h4> +<b>__calculateSize</b>(<i></i>) + +<p> + Private method to calculate the size of the module item. +</p> +<a NAME="ModuleItem.__createTexts" ID="ModuleItem.__createTexts"></a> +<h4>ModuleItem.__createTexts</h4> +<b>__createTexts</b>(<i></i>) + +<p> + Private method to create the text items of the module item. +</p> +<a NAME="ModuleItem.paint" ID="ModuleItem.paint"></a> +<h4>ModuleItem.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="ModuleItem.parseItemDataString" ID="ModuleItem.parseItemDataString"></a> +<h4>ModuleItem.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="ModuleItem.setModel" ID="ModuleItem.setModel"></a> +<h4>ModuleItem.setModel</h4> +<b>setModel</b>(<i>model</i>) + +<p> + Public method to set the module model. +</p> +<dl> + +<dt><i>model</i> (ModuleModel)</dt> +<dd> +module model containing the module data +</dd> +</dl> +<a NAME="ModuleItem.toDict" ID="ModuleItem.toDict"></a> +<h4>ModuleItem.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="ModuleModel" ID="ModuleModel"></a> +<h2>ModuleModel</h2> + +<p> + Class implementing the module 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="#ModuleModel.__init__">ModuleModel</a></td> +<td>Constructor</td> +</tr> +<tr> +<td><a href="#ModuleModel.addClass">addClass</a></td> +<td>Public method to add a class to the module model.</td> +</tr> +<tr> +<td><a href="#ModuleModel.getClasses">getClasses</a></td> +<td>Public method to retrieve the classes of the module.</td> +</tr> +</table> +<h3>Static Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> + +<a NAME="ModuleModel.__init__" ID="ModuleModel.__init__"></a> +<h4>ModuleModel (Constructor)</h4> +<b>ModuleModel</b>(<i>name, classlist=None</i>) + +<p> + Constructor +</p> +<dl> + +<dt><i>name</i> (str)</dt> +<dd> +the module name +</dd> +<dt><i>classlist</i> (list of str)</dt> +<dd> +list of class names +</dd> +</dl> +<a NAME="ModuleModel.addClass" ID="ModuleModel.addClass"></a> +<h4>ModuleModel.addClass</h4> +<b>addClass</b>(<i>classname</i>) + +<p> + Public method to add a class to the module model. +</p> +<dl> + +<dt><i>classname</i> (str)</dt> +<dd> +class name to be added +</dd> +</dl> +<a NAME="ModuleModel.getClasses" ID="ModuleModel.getClasses"></a> +<h4>ModuleModel.getClasses</h4> +<b>getClasses</b>(<i></i>) + +<p> + Public method to retrieve the classes of the module. +</p> +<dl> +<dt>Return:</dt> +<dd> +list of class 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> \ No newline at end of file