src/eric7/Documentation/Source/eric7.Project.CreateDialogCodeDialog.html

Fri, 18 Apr 2025 17:25:18 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 18 Apr 2025 17:25:18 +0200
branch
eric7
changeset 11227
023943c77c42
parent 10692
9becf9ca115c
permissions
-rw-r--r--

IRC
- Removed the IRC interface and changed it to a plug-in available via the plug-in repository.

<!DOCTYPE html>
<html><head>
<title>eric7.Project.CreateDialogCodeDialog</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<a NAME="top" ID="top"></a>
<h1>eric7.Project.CreateDialogCodeDialog</h1>
<p>
Module implementing a dialog to generate code for a Qt dialog.
</p>

<h3>Global Attributes</h3>
<table>
<tr><td>parameterNamesListRole</td></tr>
<tr><td>parameterTypesListRole</td></tr>
<tr><td>pyqtSignatureRole</td></tr>
<tr><td>pythonSignatureRole</td></tr>
<tr><td>returnTypeRole</td></tr>
</table>

<h3>Classes</h3>
<table>
<tr>
<td><a href="#CreateDialogCodeDialog">CreateDialogCodeDialog</a></td>
<td>Class implementing a dialog to generate code for a Qt dialog.</td>
</tr>
</table>

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

<hr />
<hr />
<a NAME="CreateDialogCodeDialog" ID="CreateDialogCodeDialog"></a>
<h2>CreateDialogCodeDialog</h2>
<p>
    Class implementing a dialog to generate code for a Qt dialog.
</p>

<h3>Derived from</h3>
QDialog, Ui_CreateDialogCodeDialog
<h3>Class Attributes</h3>
<table>
<tr><td>DialogClasses</td></tr>
</table>

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

<h3>Methods</h3>
<table>
<tr>
<td><a href="#CreateDialogCodeDialog.__init__">CreateDialogCodeDialog</a></td>
<td>Constructor</td>
</tr>
<tr>
<td><a href="#CreateDialogCodeDialog.__className">__className</a></td>
<td>Private method to get the class name of a form.</td>
</tr>
<tr>
<td><a href="#CreateDialogCodeDialog.__generateCode">__generateCode</a></td>
<td>Private slot to generate Python code as requested by the user.</td>
</tr>
<tr>
<td><a href="#CreateDialogCodeDialog.__mapType">__mapType</a></td>
<td>Private method to map a type as reported by Qt's meta object to the correct Python type.</td>
</tr>
<tr>
<td><a href="#CreateDialogCodeDialog.__objectName">__objectName</a></td>
<td>Private method to get the object name of a form.</td>
</tr>
<tr>
<td><a href="#CreateDialogCodeDialog.__runUicLoadUi">__runUicLoadUi</a></td>
<td>Private method to run the UicLoadUi.py script with the given command and return the output.</td>
</tr>
<tr>
<td><a href="#CreateDialogCodeDialog.__signatures">__signatures</a></td>
<td>Private slot to get the signatures.</td>
</tr>
<tr>
<td><a href="#CreateDialogCodeDialog.__updateSlotsModel">__updateSlotsModel</a></td>
<td>Private slot to update the slots tree display.</td>
</tr>
<tr>
<td><a href="#CreateDialogCodeDialog.initError">initError</a></td>
<td>Public method to determine, if there was an initialzation error.</td>
</tr>
<tr>
<td><a href="#CreateDialogCodeDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
<td>Private slot to handle the buttonBox clicked signal.</td>
</tr>
<tr>
<td><a href="#CreateDialogCodeDialog.on_classNameCombo_activated">on_classNameCombo_activated</a></td>
<td>Private slot to handle the activated signal of the classname combo.</td>
</tr>
<tr>
<td><a href="#CreateDialogCodeDialog.on_filterEdit_textChanged">on_filterEdit_textChanged</a></td>
<td>Private slot called, when thext of the filter edit has changed.</td>
</tr>
<tr>
<td><a href="#CreateDialogCodeDialog.on_newButton_clicked">on_newButton_clicked</a></td>
<td>Private slot called to enter the data for a new dialog class.</td>
</tr>
</table>

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


<a NAME="CreateDialogCodeDialog.__init__" ID="CreateDialogCodeDialog.__init__"></a>
<h4>CreateDialogCodeDialog (Constructor)</h4>
<b>CreateDialogCodeDialog</b>(<i>formName, project, parent=None</i>)
<p>
        Constructor
</p>

<dl>

<dt><i>formName</i> (str)</dt>
<dd>
name of the file containing the form
</dd>
<dt><i>project</i> (Project)</dt>
<dd>
reference to the project object
</dd>
<dt><i>parent</i> (QWidget)</dt>
<dd>
parent widget if the dialog
</dd>
</dl>
<a NAME="CreateDialogCodeDialog.__className" ID="CreateDialogCodeDialog.__className"></a>
<h4>CreateDialogCodeDialog.__className</h4>
<b>__className</b>(<i></i>)
<p>
        Private method to get the class name of a form.
</p>

<dl>
<dt>Return:</dt>
<dd>
class name
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<a NAME="CreateDialogCodeDialog.__generateCode" ID="CreateDialogCodeDialog.__generateCode"></a>
<h4>CreateDialogCodeDialog.__generateCode</h4>
<b>__generateCode</b>(<i></i>)
<p>
        Private slot to generate Python code as requested by the user.
</p>

<a NAME="CreateDialogCodeDialog.__mapType" ID="CreateDialogCodeDialog.__mapType"></a>
<h4>CreateDialogCodeDialog.__mapType</h4>
<b>__mapType</b>(<i>type_</i>)
<p>
        Private method to map a type as reported by Qt's meta object to the
        correct Python type.
</p>

<dl>

<dt><i>type_</i> (QByteArray)</dt>
<dd>
type as reported by Qt
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
mapped Python type
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<a NAME="CreateDialogCodeDialog.__objectName" ID="CreateDialogCodeDialog.__objectName"></a>
<h4>CreateDialogCodeDialog.__objectName</h4>
<b>__objectName</b>(<i></i>)
<p>
        Private method to get the object name of a form.
</p>

<dl>
<dt>Return:</dt>
<dd>
object name
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
str
</dd>
</dl>
<a NAME="CreateDialogCodeDialog.__runUicLoadUi" ID="CreateDialogCodeDialog.__runUicLoadUi"></a>
<h4>CreateDialogCodeDialog.__runUicLoadUi</h4>
<b>__runUicLoadUi</b>(<i>command</i>)
<p>
        Private method to run the UicLoadUi.py script with the given command
        and return the output.
</p>

<dl>

<dt><i>command</i> (str)</dt>
<dd>
uic command to be run
</dd>
</dl>
<dl>
<dt>Return:</dt>
<dd>
tuple of process output and error flag
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
tuple of (str, bool)
</dd>
</dl>
<a NAME="CreateDialogCodeDialog.__signatures" ID="CreateDialogCodeDialog.__signatures"></a>
<h4>CreateDialogCodeDialog.__signatures</h4>
<b>__signatures</b>(<i></i>)
<p>
        Private slot to get the signatures.
</p>

<dl>
<dt>Return:</dt>
<dd>
list of signatures
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
list of str
</dd>
</dl>
<a NAME="CreateDialogCodeDialog.__updateSlotsModel" ID="CreateDialogCodeDialog.__updateSlotsModel"></a>
<h4>CreateDialogCodeDialog.__updateSlotsModel</h4>
<b>__updateSlotsModel</b>(<i></i>)
<p>
        Private slot to update the slots tree display.
</p>

<a NAME="CreateDialogCodeDialog.initError" ID="CreateDialogCodeDialog.initError"></a>
<h4>CreateDialogCodeDialog.initError</h4>
<b>initError</b>(<i></i>)
<p>
        Public method to determine, if there was an initialzation error.
</p>

<dl>
<dt>Return:</dt>
<dd>
flag indicating an initialzation error
</dd>
</dl>
<dl>
<dt>Return Type:</dt>
<dd>
bool
</dd>
</dl>
<a NAME="CreateDialogCodeDialog.on_buttonBox_clicked" ID="CreateDialogCodeDialog.on_buttonBox_clicked"></a>
<h4>CreateDialogCodeDialog.on_buttonBox_clicked</h4>
<b>on_buttonBox_clicked</b>(<i>button</i>)
<p>
        Private slot to handle the buttonBox clicked signal.
</p>

<dl>

<dt><i>button</i> (QAbstractButton)</dt>
<dd>
reference to the button that was clicked
</dd>
</dl>
<a NAME="CreateDialogCodeDialog.on_classNameCombo_activated" ID="CreateDialogCodeDialog.on_classNameCombo_activated"></a>
<h4>CreateDialogCodeDialog.on_classNameCombo_activated</h4>
<b>on_classNameCombo_activated</b>(<i>_index</i>)
<p>
        Private slot to handle the activated signal of the classname combo.
</p>

<dl>

<dt><i>_index</i> (int)</dt>
<dd>
index of the activated item (unused)
</dd>
</dl>
<a NAME="CreateDialogCodeDialog.on_filterEdit_textChanged" ID="CreateDialogCodeDialog.on_filterEdit_textChanged"></a>
<h4>CreateDialogCodeDialog.on_filterEdit_textChanged</h4>
<b>on_filterEdit_textChanged</b>(<i>text</i>)
<p>
        Private slot called, when thext of the filter edit has changed.
</p>

<dl>

<dt><i>text</i> (str)</dt>
<dd>
changed text
</dd>
</dl>
<a NAME="CreateDialogCodeDialog.on_newButton_clicked" ID="CreateDialogCodeDialog.on_newButton_clicked"></a>
<h4>CreateDialogCodeDialog.on_newButton_clicked</h4>
<b>on_newButton_clicked</b>(<i></i>)
<p>
        Private slot called to enter the data for a new dialog class.
</p>

<div align="right"><a href="#top">Up</a></div>
<hr />
</body></html>

eric ide

mercurial