Documentation/Source/eric5.E5Gui.E5MapWidget.html

Sun, 18 May 2014 14:13:09 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 18 May 2014 14:13:09 +0200
changeset 3591
2f2a4a76dd22
parent 3339
d0a603f1bfcd
permissions
-rw-r--r--

Corrected a bunch of source docu issues.

<!DOCTYPE html>
<html><head>
<title>eric5.E5Gui.E5MapWidget</title>
<meta charset="UTF-8">
<style>
body {
    background: #EDECE6;
    margin: 0em 1em 10em 1em;
    color: black;
}

h1 { color: white; background: #85774A; }
h2 { color: white; background: #85774A; }
h3 { color: white; background: #9D936E; }
h4 { color: white; background: #9D936E; }
    
a { color: #BA6D36; }

</style>
</head>
<body><a NAME="top" ID="top"></a>
<h1>eric5.E5Gui.E5MapWidget</h1>
<p>
Module implementing a base class for showing a document map.
</p>
<h3>Global Attributes</h3>
<table>
<tr><td>None</td></tr>
</table>
<h3>Classes</h3>
<table>
<tr>
<td><a href="#E5MapWidget">E5MapWidget</a></td>
<td>Class implementing a base class for showing a document map.</td>
</tr>
</table>
<h3>Functions</h3>
<table>
<tr><td>None</td></tr>
</table>
<hr /><hr />
<a NAME="E5MapWidget" ID="E5MapWidget"></a>
<h2>E5MapWidget</h2>
<p>
    Class implementing a base class for showing a document map.
</p>
<h3>Derived from</h3>
QWidget
<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="#E5MapWidget.__init__">E5MapWidget</a></td>
<td>Constructor</td>
</tr><tr>
<td><a href="#E5MapWidget.__generateSliderRange">__generateSliderRange</a></td>
<td>Private method to generate the slider rectangle.</td>
</tr><tr>
<td><a href="#E5MapWidget.__setSliderColor">__setSliderColor</a></td>
<td>Private method to set the slider color depending upon the background color.</td>
</tr><tr>
<td><a href="#E5MapWidget.__updateMasterViewportWidth">__updateMasterViewportWidth</a></td>
<td>Private method to update the master's viewport width.</td>
</tr><tr>
<td><a href="#E5MapWidget._paintIt">_paintIt</a></td>
<td>Protected method for painting the widget's indicators.</td>
</tr><tr>
<td><a href="#E5MapWidget.backgroundColor">backgroundColor</a></td>
<td>Public method to get the background color.</td>
</tr><tr>
<td><a href="#E5MapWidget.calculateGeometry">calculateGeometry</a></td>
<td>Public method to recalculate the map widget's geometry.</td>
</tr><tr>
<td><a href="#E5MapWidget.generateIndicatorRect">generateIndicatorRect</a></td>
<td>Public method to generate an indicator rectangle.</td>
</tr><tr>
<td><a href="#E5MapWidget.isEnabled">isEnabled</a></td>
<td>Public method to check the enabled state.</td>
</tr><tr>
<td><a href="#E5MapWidget.lineDimensions">lineDimensions</a></td>
<td>Public method to get the line (indicator) dimensions.</td>
</tr><tr>
<td><a href="#E5MapWidget.mouseMoveEvent">mouseMoveEvent</a></td>
<td>Protected method to handle a mouse moves.</td>
</tr><tr>
<td><a href="#E5MapWidget.mousePressEvent">mousePressEvent</a></td>
<td>Protected method to handle a mouse button press.</td>
</tr><tr>
<td><a href="#E5MapWidget.paintEvent">paintEvent</a></td>
<td>Protected method to handle a paint event.</td>
</tr><tr>
<td><a href="#E5MapWidget.position2Value">position2Value</a></td>
<td>Public method to convert a position into a scrollbar value.</td>
</tr><tr>
<td><a href="#E5MapWidget.scaleFactor">scaleFactor</a></td>
<td>Public method to determine the scrollbar's scale factor.</td>
</tr><tr>
<td><a href="#E5MapWidget.setBackgroundColor">setBackgroundColor</a></td>
<td>Public method to set the widget background color.</td>
</tr><tr>
<td><a href="#E5MapWidget.setEnabled">setEnabled</a></td>
<td>Public method to set the enabled state.</td>
</tr><tr>
<td><a href="#E5MapWidget.setLineDimensions">setLineDimensions</a></td>
<td>Public method to set the line (indicator) dimensions.</td>
</tr><tr>
<td><a href="#E5MapWidget.setMaster">setMaster</a></td>
<td>Public method to set the map master widget.</td>
</tr><tr>
<td><a href="#E5MapWidget.setWidth">setWidth</a></td>
<td>Public method to set the widget width.</td>
</tr><tr>
<td><a href="#E5MapWidget.sizeHint">sizeHint</a></td>
<td>Public method to give an indication about the preferred size.</td>
</tr><tr>
<td><a href="#E5MapWidget.value2Position">value2Position</a></td>
<td>Public method to convert a scrollbar value into a position.</td>
</tr><tr>
<td><a href="#E5MapWidget.wheelEvent">wheelEvent</a></td>
<td>Protected slot handling mouse wheel events.</td>
</tr><tr>
<td><a href="#E5MapWidget.width">width</a></td>
<td>Public method to get the widget's width.</td>
</tr>
</table>
<h3>Static Methods</h3>
<table>
<tr><td>None</td></tr>
</table>
<a NAME="E5MapWidget.__init__" ID="E5MapWidget.__init__"></a>
<h4>E5MapWidget (Constructor)</h4>
<b>E5MapWidget</b>(<i>parent=None</i>)
<p>
        Constructor
</p><dl>
<dt><i>parent</i></dt>
<dd>
reference to the parent widget (QWidget)
</dd>
</dl><a NAME="E5MapWidget.__generateSliderRange" ID="E5MapWidget.__generateSliderRange"></a>
<h4>E5MapWidget.__generateSliderRange</h4>
<b>__generateSliderRange</b>(<i>scrollbar</i>)
<p>
        Private method to generate the slider rectangle.
</p><dl>
<dt><i>scrollbar</i></dt>
<dd>
reference to the vertical scrollbar (QScrollBar)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
slider rectangle (QRect)
</dd>
</dl><a NAME="E5MapWidget.__setSliderColor" ID="E5MapWidget.__setSliderColor"></a>
<h4>E5MapWidget.__setSliderColor</h4>
<b>__setSliderColor</b>(<i></i>)
<p>
        Private method to set the slider color depending upon the background
        color.
</p><a NAME="E5MapWidget.__updateMasterViewportWidth" ID="E5MapWidget.__updateMasterViewportWidth"></a>
<h4>E5MapWidget.__updateMasterViewportWidth</h4>
<b>__updateMasterViewportWidth</b>(<i></i>)
<p>
        Private method to update the master's viewport width.
</p><a NAME="E5MapWidget._paintIt" ID="E5MapWidget._paintIt"></a>
<h4>E5MapWidget._paintIt</h4>
<b>_paintIt</b>(<i>painter</i>)
<p>
        Protected method for painting the widget's indicators.
</p><p>
        Note: This method should be implemented by subclasses.
</p><dl>
<dt><i>painter</i></dt>
<dd>
reference to the painter object (QPainter)
</dd>
</dl><a NAME="E5MapWidget.backgroundColor" ID="E5MapWidget.backgroundColor"></a>
<h4>E5MapWidget.backgroundColor</h4>
<b>backgroundColor</b>(<i></i>)
<p>
        Public method to get the background color.
</p><dl>
<dt>Returns:</dt>
<dd>
background color (QColor)
</dd>
</dl><a NAME="E5MapWidget.calculateGeometry" ID="E5MapWidget.calculateGeometry"></a>
<h4>E5MapWidget.calculateGeometry</h4>
<b>calculateGeometry</b>(<i></i>)
<p>
        Public method to recalculate the map widget's geometry.
</p><a NAME="E5MapWidget.generateIndicatorRect" ID="E5MapWidget.generateIndicatorRect"></a>
<h4>E5MapWidget.generateIndicatorRect</h4>
<b>generateIndicatorRect</b>(<i>position</i>)
<p>
        Public method to generate an indicator rectangle.
</p><dl>
<dt><i>position</i></dt>
<dd>
indicator position (integer)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
indicator rectangle (QRect)
</dd>
</dl><a NAME="E5MapWidget.isEnabled" ID="E5MapWidget.isEnabled"></a>
<h4>E5MapWidget.isEnabled</h4>
<b>isEnabled</b>(<i></i>)
<p>
        Public method to check the enabled state.
</p><dl>
<dt>Returns:</dt>
<dd>
flag indicating the enabled state (boolean)
</dd>
</dl><a NAME="E5MapWidget.lineDimensions" ID="E5MapWidget.lineDimensions"></a>
<h4>E5MapWidget.lineDimensions</h4>
<b>lineDimensions</b>(<i></i>)
<p>
        Public method to get the line (indicator) dimensions.
</p><dl>
<dt>Returns:</dt>
<dd>
tuple with border width (integer) and line height (integer)
</dd>
</dl><a NAME="E5MapWidget.mouseMoveEvent" ID="E5MapWidget.mouseMoveEvent"></a>
<h4>E5MapWidget.mouseMoveEvent</h4>
<b>mouseMoveEvent</b>(<i>event</i>)
<p>
        Protected method to handle a mouse moves.
</p><dl>
<dt><i>event</i></dt>
<dd>
reference to the mouse event (QMouseEvent)
</dd>
</dl><a NAME="E5MapWidget.mousePressEvent" ID="E5MapWidget.mousePressEvent"></a>
<h4>E5MapWidget.mousePressEvent</h4>
<b>mousePressEvent</b>(<i>event</i>)
<p>
        Protected method to handle a mouse button press.
</p><dl>
<dt><i>event</i></dt>
<dd>
reference to the mouse event (QMouseEvent)
</dd>
</dl><a NAME="E5MapWidget.paintEvent" ID="E5MapWidget.paintEvent"></a>
<h4>E5MapWidget.paintEvent</h4>
<b>paintEvent</b>(<i>event</i>)
<p>
        Protected method to handle a paint event.
</p><dl>
<dt><i>event</i></dt>
<dd>
paint event (QPaintEvent)
</dd>
</dl><a NAME="E5MapWidget.position2Value" ID="E5MapWidget.position2Value"></a>
<h4>E5MapWidget.position2Value</h4>
<b>position2Value</b>(<i>position, slider=False</i>)
<p>
        Public method to convert a position into a scrollbar value.
</p><dl>
<dt><i>position</i></dt>
<dd>
scrollbar position to convert (integer)
</dd><dt><i>slider</i></dt>
<dd>
flag indicating to calculate the result for the slider
            (boolean)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
scrollbar value (integer)
</dd>
</dl><a NAME="E5MapWidget.scaleFactor" ID="E5MapWidget.scaleFactor"></a>
<h4>E5MapWidget.scaleFactor</h4>
<b>scaleFactor</b>(<i>slider=False</i>)
<p>
        Public method to determine the scrollbar's scale factor.
</p><dl>
<dt><i>slider</i></dt>
<dd>
flag indicating to calculate the result for the slider
            (boolean)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
scale factor (float)
</dd>
</dl><a NAME="E5MapWidget.setBackgroundColor" ID="E5MapWidget.setBackgroundColor"></a>
<h4>E5MapWidget.setBackgroundColor</h4>
<b>setBackgroundColor</b>(<i>color</i>)
<p>
        Public method to set the widget background color.
</p><dl>
<dt><i>color</i></dt>
<dd>
color for the background (QColor)
</dd>
</dl><a NAME="E5MapWidget.setEnabled" ID="E5MapWidget.setEnabled"></a>
<h4>E5MapWidget.setEnabled</h4>
<b>setEnabled</b>(<i>enable</i>)
<p>
        Public method to set the enabled state.
</p><dl>
<dt><i>enable</i></dt>
<dd>
flag indicating the enabled state (boolean)
</dd>
</dl><a NAME="E5MapWidget.setLineDimensions" ID="E5MapWidget.setLineDimensions"></a>
<h4>E5MapWidget.setLineDimensions</h4>
<b>setLineDimensions</b>(<i>border, height</i>)
<p>
        Public method to set the line (indicator) dimensions.
</p><dl>
<dt><i>border</i></dt>
<dd>
border width on each side in x-direction (integer)
</dd><dt><i>height</i></dt>
<dd>
height of the line in pixels (integer)
</dd>
</dl><a NAME="E5MapWidget.setMaster" ID="E5MapWidget.setMaster"></a>
<h4>E5MapWidget.setMaster</h4>
<b>setMaster</b>(<i>master</i>)
<p>
        Public method to set the map master widget.
</p><dl>
<dt><i>master</i></dt>
<dd>
map master widget (QAbstractScrollArea)
</dd>
</dl><a NAME="E5MapWidget.setWidth" ID="E5MapWidget.setWidth"></a>
<h4>E5MapWidget.setWidth</h4>
<b>setWidth</b>(<i>width</i>)
<p>
        Public method to set the widget width.
</p><dl>
<dt><i>width</i></dt>
<dd>
widget width (integer)
</dd>
</dl><a NAME="E5MapWidget.sizeHint" ID="E5MapWidget.sizeHint"></a>
<h4>E5MapWidget.sizeHint</h4>
<b>sizeHint</b>(<i></i>)
<p>
        Public method to give an indication about the preferred size.
</p><dl>
<dt>Returns:</dt>
<dd>
preferred size (QSize)
</dd>
</dl><a NAME="E5MapWidget.value2Position" ID="E5MapWidget.value2Position"></a>
<h4>E5MapWidget.value2Position</h4>
<b>value2Position</b>(<i>value, slider=False</i>)
<p>
        Public method to convert a scrollbar value into a position.
</p><dl>
<dt><i>value</i></dt>
<dd>
value to convert (integer)
</dd><dt><i>slider</i></dt>
<dd>
flag indicating to calculate the result for the slider
            (boolean)
</dd>
</dl><dl>
<dt>Returns:</dt>
<dd>
position (integer)
</dd>
</dl><a NAME="E5MapWidget.wheelEvent" ID="E5MapWidget.wheelEvent"></a>
<h4>E5MapWidget.wheelEvent</h4>
<b>wheelEvent</b>(<i>event</i>)
<p>
        Protected slot handling mouse wheel events.
</p><dl>
<dt><i>event</i></dt>
<dd>
reference to the wheel event (QWheelEvent)
</dd>
</dl><a NAME="E5MapWidget.width" ID="E5MapWidget.width"></a>
<h4>E5MapWidget.width</h4>
<b>width</b>(<i></i>)
<p>
        Public method to get the widget's width.
</p><dl>
<dt>Returns:</dt>
<dd>
widget width (integer)
</dd>
</dl>
<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial