diff -r 31463df17fd5 -r b5c84934de9c Documentation/Source/eric5.E4Gui.E4ModelMenu.html --- a/Documentation/Source/eric5.E4Gui.E4ModelMenu.html Tue Jan 12 18:39:15 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,459 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' -'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> -<html><head> -<title>eric5.E4Gui.E4ModelMenu</title> -<style> -body { - background:white; - margin: 0em 1em 10em 1em; - color: black; -} - -h1 { color: white; background: #4FA4FF; } -h2 { color: white; background: #4FA4FF; } -h3 { color: white; background: #00557F; } -h4 { color: white; background: #00557F; } - -a { color: #AA5500; } - -</style> -</head> -<body><a NAME="top" ID="top"></a> -<h1>eric5.E4Gui.E4ModelMenu</h1> -<p> -Module implementing a menu populated from a QAbstractItemModel. -</p> -<h3>Global Attributes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Classes</h3> -<table> -<tr> -<td><a href="#E4ModelMenu">E4ModelMenu</a></td> -<td>Class implementing a menu populated from a QAbstractItemModel.</td> -</tr> -</table> -<h3>Functions</h3> -<table> -<tr><td>None</td></tr> -</table> -<hr /><hr /> -<a NAME="E4ModelMenu" ID="E4ModelMenu"></a> -<h2>E4ModelMenu</h2> -<p> - Class implementing a menu populated from a QAbstractItemModel. -</p><h4>Signals</h4> -<dl> -<dt>activated(const QModelIndex&)</dt> -<dd> -emitted when an action has been triggered -</dd> -</dl> -<h3>Derived from</h3> -QMenu -<h3>Class Attributes</h3> -<table> -<tr><td>None</td></tr> -</table> -<h3>Methods</h3> -<table> -<tr> -<td><a href="#E4ModelMenu.__init__">E4ModelMenu</a></td> -<td>Constructor</td> -</tr><tr> -<td><a href="#E4ModelMenu.__aboutToShow">__aboutToShow</a></td> -<td>Private slot to show the menu.</td> -</tr><tr> -<td><a href="#E4ModelMenu.__actionTriggered">__actionTriggered</a></td> -<td>Private slot to handle the triggering of an action.</td> -</tr><tr> -<td><a href="#E4ModelMenu.__makeAction">__makeAction</a></td> -<td>Private method to create an action.</td> -</tr><tr> -<td><a href="#E4ModelMenu.createBaseMenu">createBaseMenu</a></td> -<td>Public method to get the menu that is used to populate sub menu's.</td> -</tr><tr> -<td><a href="#E4ModelMenu.createMenu">createMenu</a></td> -<td>Public method to put all the children of a parent into a menu of a given length.</td> -</tr><tr> -<td><a href="#E4ModelMenu.dragEnterEvent">dragEnterEvent</a></td> -<td>Protected method to handle drag enter events.</td> -</tr><tr> -<td><a href="#E4ModelMenu.dropEvent">dropEvent</a></td> -<td>Protected method to handle drop events.</td> -</tr><tr> -<td><a href="#E4ModelMenu.firstSeparator">firstSeparator</a></td> -<td>Public method to get the first separator.</td> -</tr><tr> -<td><a href="#E4ModelMenu.index">index</a></td> -<td>Public method to get the index of an action.</td> -</tr><tr> -<td><a href="#E4ModelMenu.makeAction">makeAction</a></td> -<td>Public method to create an action.</td> -</tr><tr> -<td><a href="#E4ModelMenu.maxRows">maxRows</a></td> -<td>Public method to get the maximum number of entries to show.</td> -</tr><tr> -<td><a href="#E4ModelMenu.model">model</a></td> -<td>Public method to get a reference to the model.</td> -</tr><tr> -<td><a href="#E4ModelMenu.mouseMoveEvent">mouseMoveEvent</a></td> -<td>Protected method to handle mouse move events.</td> -</tr><tr> -<td><a href="#E4ModelMenu.mousePressEvent">mousePressEvent</a></td> -<td>Protected method handling mouse press events.</td> -</tr><tr> -<td><a href="#E4ModelMenu.mouseReleaseEvent">mouseReleaseEvent</a></td> -<td>Protected method handling mouse release events.</td> -</tr><tr> -<td><a href="#E4ModelMenu.postPopulated">postPopulated</a></td> -<td>Public method to add any actions after the tree.</td> -</tr><tr> -<td><a href="#E4ModelMenu.prePopulated">prePopulated</a></td> -<td>Public method to add any actions before the tree.</td> -</tr><tr> -<td><a href="#E4ModelMenu.removeEntry">removeEntry</a></td> -<td>Public method to remove a menu entry.</td> -</tr><tr> -<td><a href="#E4ModelMenu.resetFlags">resetFlags</a></td> -<td>Public method to reset the saved internal state.</td> -</tr><tr> -<td><a href="#E4ModelMenu.rootIndex">rootIndex</a></td> -<td>Public method to get the index of the root item.</td> -</tr><tr> -<td><a href="#E4ModelMenu.separatorRole">separatorRole</a></td> -<td>Public method to get the role of the separator.</td> -</tr><tr> -<td><a href="#E4ModelMenu.setFirstSeparator">setFirstSeparator</a></td> -<td>Public method to set the first separator.</td> -</tr><tr> -<td><a href="#E4ModelMenu.setMaxRows">setMaxRows</a></td> -<td>Public method to set the maximum number of entries to show.</td> -</tr><tr> -<td><a href="#E4ModelMenu.setModel">setModel</a></td> -<td>Public method to set the model for the menu.</td> -</tr><tr> -<td><a href="#E4ModelMenu.setRootIndex">setRootIndex</a></td> -<td>Public method to set the index of the root item.</td> -</tr><tr> -<td><a href="#E4ModelMenu.setSeparatorRole">setSeparatorRole</a></td> -<td>Public method to set the role of the separator.</td> -</tr><tr> -<td><a href="#E4ModelMenu.setStatusBarTextRole">setStatusBarTextRole</a></td> -<td>Public method to set the role of the status bar text.</td> -</tr><tr> -<td><a href="#E4ModelMenu.statusBarTextRole">statusBarTextRole</a></td> -<td>Public method to get the role of the status bar text.</td> -</tr> -</table> -<a NAME="E4ModelMenu.__init__" ID="E4ModelMenu.__init__"></a> -<h4>E4ModelMenu (Constructor)</h4> -<b>E4ModelMenu</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="E4ModelMenu.__aboutToShow" ID="E4ModelMenu.__aboutToShow"></a> -<h4>E4ModelMenu.__aboutToShow</h4> -<b>__aboutToShow</b>(<i></i>) -<p> - Private slot to show the menu. -</p><a NAME="E4ModelMenu.__actionTriggered" ID="E4ModelMenu.__actionTriggered"></a> -<h4>E4ModelMenu.__actionTriggered</h4> -<b>__actionTriggered</b>(<i>action</i>) -<p> - Private slot to handle the triggering of an action. -</p><dl> -<dt><i>action</i></dt> -<dd> -reference to the action that was triggered (QAction) -</dd> -</dl><a NAME="E4ModelMenu.__makeAction" ID="E4ModelMenu.__makeAction"></a> -<h4>E4ModelMenu.__makeAction</h4> -<b>__makeAction</b>(<i>idx</i>) -<p> - Private method to create an action. -</p><dl> -<dt><i>idx</i></dt> -<dd> -index of the item to create an action for (QModelIndex) -</dd> -</dl><dl> -<dt>Returns:</dt> -<dd> -reference to the created action (QAction) -</dd> -</dl><a NAME="E4ModelMenu.createBaseMenu" ID="E4ModelMenu.createBaseMenu"></a> -<h4>E4ModelMenu.createBaseMenu</h4> -<b>createBaseMenu</b>(<i></i>) -<p> - Public method to get the menu that is used to populate sub menu's. -</p><dl> -<dt>Returns:</dt> -<dd> -reference to the menu (E4ModelMenu) -</dd> -</dl><a NAME="E4ModelMenu.createMenu" ID="E4ModelMenu.createMenu"></a> -<h4>E4ModelMenu.createMenu</h4> -<b>createMenu</b>(<i>parent, max_, parentMenu = None, menu = None</i>) -<p> - Public method to put all the children of a parent into a menu of a given length. -</p><dl> -<dt><i>parent</i></dt> -<dd> -index of the parent item (QModelIndex) -</dd><dt><i>max_</i></dt> -<dd> -maximum number of entries (integer) -</dd><dt><i>parentMenu</i></dt> -<dd> -reference to the parent menu (QMenu) -</dd><dt><i>menu</i></dt> -<dd> -reference to the menu to be populated (QMenu) -</dd> -</dl><a NAME="E4ModelMenu.dragEnterEvent" ID="E4ModelMenu.dragEnterEvent"></a> -<h4>E4ModelMenu.dragEnterEvent</h4> -<b>dragEnterEvent</b>(<i>evt</i>) -<p> - Protected method to handle drag enter events. -</p><dl> -<dt><i>evt</i></dt> -<dd> -reference to the event (QDragEnterEvent) -</dd> -</dl><a NAME="E4ModelMenu.dropEvent" ID="E4ModelMenu.dropEvent"></a> -<h4>E4ModelMenu.dropEvent</h4> -<b>dropEvent</b>(<i>evt</i>) -<p> - Protected method to handle drop events. -</p><dl> -<dt><i>evt</i></dt> -<dd> -reference to the event (QDropEvent) -</dd> -</dl><a NAME="E4ModelMenu.firstSeparator" ID="E4ModelMenu.firstSeparator"></a> -<h4>E4ModelMenu.firstSeparator</h4> -<b>firstSeparator</b>(<i></i>) -<p> - Public method to get the first separator. -</p><dl> -<dt>Returns:</dt> -<dd> -row number of the first separator (integer) -</dd> -</dl><a NAME="E4ModelMenu.index" ID="E4ModelMenu.index"></a> -<h4>E4ModelMenu.index</h4> -<b>index</b>(<i>action</i>) -<p> - Public method to get the index of an action. -</p><dl> -<dt><i>action</i></dt> -<dd> -reference to the action to get the index for (QAction) -</dd> -</dl><dl> -<dt>Returns:</dt> -<dd> -index of the action (QModelIndex) -</dd> -</dl><a NAME="E4ModelMenu.makeAction" ID="E4ModelMenu.makeAction"></a> -<h4>E4ModelMenu.makeAction</h4> -<b>makeAction</b>(<i>icon, text, parent</i>) -<p> - Public method to create an action. -</p><dl> -<dt><i>icon</i></dt> -<dd> -icon of the action (QIcon) -</dd><dt><i>text</i></dt> -<dd> -text of the action (string) -</dd><dt><i>reference</i></dt> -<dd> -to the parent object (QObject) -</dd> -</dl><dl> -<dt>Returns:</dt> -<dd> -reference to the created action (QAction) -</dd> -</dl><a NAME="E4ModelMenu.maxRows" ID="E4ModelMenu.maxRows"></a> -<h4>E4ModelMenu.maxRows</h4> -<b>maxRows</b>(<i></i>) -<p> - Public method to get the maximum number of entries to show. -</p><dl> -<dt>Returns:</dt> -<dd> -maximum number of entries to show (integer) -</dd> -</dl><a NAME="E4ModelMenu.model" ID="E4ModelMenu.model"></a> -<h4>E4ModelMenu.model</h4> -<b>model</b>(<i></i>) -<p> - Public method to get a reference to the model. -</p><dl> -<dt>Returns:</dt> -<dd> -reference to the model (QAbstractItemModel) -</dd> -</dl><a NAME="E4ModelMenu.mouseMoveEvent" ID="E4ModelMenu.mouseMoveEvent"></a> -<h4>E4ModelMenu.mouseMoveEvent</h4> -<b>mouseMoveEvent</b>(<i>evt</i>) -<p> - Protected method to handle mouse move events. -</p><dl> -<dt><i>evt</i></dt> -<dd> -reference to the event (QMouseEvent) -</dd> -</dl><a NAME="E4ModelMenu.mousePressEvent" ID="E4ModelMenu.mousePressEvent"></a> -<h4>E4ModelMenu.mousePressEvent</h4> -<b>mousePressEvent</b>(<i>evt</i>) -<p> - Protected method handling mouse press events. -</p><dl> -<dt><i>evt</i></dt> -<dd> -reference to the event object (QMouseEvent) -</dd> -</dl><a NAME="E4ModelMenu.mouseReleaseEvent" ID="E4ModelMenu.mouseReleaseEvent"></a> -<h4>E4ModelMenu.mouseReleaseEvent</h4> -<b>mouseReleaseEvent</b>(<i>evt</i>) -<p> - Protected method handling mouse release events. -</p><dl> -<dt><i>evt</i></dt> -<dd> -reference to the event object (QMouseEvent) -</dd> -</dl><a NAME="E4ModelMenu.postPopulated" ID="E4ModelMenu.postPopulated"></a> -<h4>E4ModelMenu.postPopulated</h4> -<b>postPopulated</b>(<i></i>) -<p> - Public method to add any actions after the tree. -</p><a NAME="E4ModelMenu.prePopulated" ID="E4ModelMenu.prePopulated"></a> -<h4>E4ModelMenu.prePopulated</h4> -<b>prePopulated</b>(<i></i>) -<p> - Public method to add any actions before the tree. -</p><dl> -<dt>Returns:</dt> -<dd> -flag indicating if any actions were added -</dd> -</dl><a NAME="E4ModelMenu.removeEntry" ID="E4ModelMenu.removeEntry"></a> -<h4>E4ModelMenu.removeEntry</h4> -<b>removeEntry</b>(<i>idx</i>) -<p> - Public method to remove a menu entry. -</p><dl> -<dt><i>idx</i></dt> -<dd> -index of the entry to be removed (QModelIndex) -</dd> -</dl><a NAME="E4ModelMenu.resetFlags" ID="E4ModelMenu.resetFlags"></a> -<h4>E4ModelMenu.resetFlags</h4> -<b>resetFlags</b>(<i></i>) -<p> - Public method to reset the saved internal state. -</p><a NAME="E4ModelMenu.rootIndex" ID="E4ModelMenu.rootIndex"></a> -<h4>E4ModelMenu.rootIndex</h4> -<b>rootIndex</b>(<i></i>) -<p> - Public method to get the index of the root item. -</p><dl> -<dt>Returns:</dt> -<dd> -index of the root item (QModelIndex) -</dd> -</dl><a NAME="E4ModelMenu.separatorRole" ID="E4ModelMenu.separatorRole"></a> -<h4>E4ModelMenu.separatorRole</h4> -<b>separatorRole</b>(<i></i>) -<p> - Public method to get the role of the separator. -</p><dl> -<dt>Returns:</dt> -<dd> -role of the separator (integer) -</dd> -</dl><a NAME="E4ModelMenu.setFirstSeparator" ID="E4ModelMenu.setFirstSeparator"></a> -<h4>E4ModelMenu.setFirstSeparator</h4> -<b>setFirstSeparator</b>(<i>offset</i>) -<p> - Public method to set the first separator. -</p><dl> -<dt><i>offset</i></dt> -<dd> -row number of the first separator (integer) -</dd> -</dl><a NAME="E4ModelMenu.setMaxRows" ID="E4ModelMenu.setMaxRows"></a> -<h4>E4ModelMenu.setMaxRows</h4> -<b>setMaxRows</b>(<i>rows</i>) -<p> - Public method to set the maximum number of entries to show. -</p><dl> -<dt><i>rows</i></dt> -<dd> -maximum number of entries to show (integer) -</dd> -</dl><a NAME="E4ModelMenu.setModel" ID="E4ModelMenu.setModel"></a> -<h4>E4ModelMenu.setModel</h4> -<b>setModel</b>(<i>model</i>) -<p> - Public method to set the model for the menu. -</p><dl> -<dt><i>model</i></dt> -<dd> -reference to the model (QAbstractItemModel) -</dd> -</dl><a NAME="E4ModelMenu.setRootIndex" ID="E4ModelMenu.setRootIndex"></a> -<h4>E4ModelMenu.setRootIndex</h4> -<b>setRootIndex</b>(<i>index</i>) -<p> - Public method to set the index of the root item. -</p><dl> -<dt><i>index</i></dt> -<dd> -index of the root item (QModelIndex) -</dd> -</dl><a NAME="E4ModelMenu.setSeparatorRole" ID="E4ModelMenu.setSeparatorRole"></a> -<h4>E4ModelMenu.setSeparatorRole</h4> -<b>setSeparatorRole</b>(<i>role</i>) -<p> - Public method to set the role of the separator. -</p><dl> -<dt><i>role</i></dt> -<dd> -role of the separator (integer) -</dd> -</dl><a NAME="E4ModelMenu.setStatusBarTextRole" ID="E4ModelMenu.setStatusBarTextRole"></a> -<h4>E4ModelMenu.setStatusBarTextRole</h4> -<b>setStatusBarTextRole</b>(<i>role</i>) -<p> - Public method to set the role of the status bar text. -</p><dl> -<dt><i>role</i></dt> -<dd> -role of the status bar text (integer) -</dd> -</dl><a NAME="E4ModelMenu.statusBarTextRole" ID="E4ModelMenu.statusBarTextRole"></a> -<h4>E4ModelMenu.statusBarTextRole</h4> -<b>statusBarTextRole</b>(<i></i>) -<p> - Public method to get the role of the status bar text. -</p><dl> -<dt>Returns:</dt> -<dd> -role of the status bar text (integer) -</dd> -</dl> -<div align="right"><a href="#top">Up</a></div> -<hr /> -</body></html> \ No newline at end of file