--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eric7/Documentation/Source/eric7.UI.EmailDialog.html Mon May 24 11:19:57 2021 +0200 @@ -0,0 +1,415 @@ +<!DOCTYPE html> +<html><head> +<title>eric7.UI.EmailDialog</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>eric7.UI.EmailDialog</h1> + +<p> +Module implementing a dialog to send bug reports or feature requests. +</p> +<h3>Global Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> + +<table> + +<tr> +<td><a href="#EmailDialog">EmailDialog</a></td> +<td>Class implementing a dialog to send bug reports or feature requests.</td> +</tr> +</table> +<h3>Functions</h3> + +<table> +<tr><td>None</td></tr> +</table> +<hr /> +<hr /> +<a NAME="EmailDialog" ID="EmailDialog"></a> +<h2>EmailDialog</h2> + +<p> + Class implementing a dialog to send bug reports or feature requests. +</p> +<h3>Derived from</h3> +QDialog, Ui_EmailDialog +<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="#EmailDialog.__init__">EmailDialog</a></td> +<td>Constructor</td> +</tr> +<tr> +<td><a href="#EmailDialog.__createMultipartMail">__createMultipartMail</a></td> +<td>Private method to create a multipart mail message.</td> +</tr> +<tr> +<td><a href="#EmailDialog.__createSimpleMail">__createSimpleMail</a></td> +<td>Private method to create a simple mail message.</td> +</tr> +<tr> +<td><a href="#EmailDialog.__deleteAttachedFiles">__deleteAttachedFiles</a></td> +<td>Private method to delete attached files.</td> +</tr> +<tr> +<td><a href="#EmailDialog.__encodedHeader">__encodedHeader</a></td> +<td>Private method to create a correctly encoded mail header.</td> +</tr> +<tr> +<td><a href="#EmailDialog.__encodedText">__encodedText</a></td> +<td>Private method to create a MIMEText message with correct encoding.</td> +</tr> +<tr> +<td><a href="#EmailDialog.__gmailSendResult">__gmailSendResult</a></td> +<td>Private slot handling the send result reported by the Google Mail interface.</td> +</tr> +<tr> +<td><a href="#EmailDialog.__sendmail">__sendmail</a></td> +<td>Private method to actually send the message.</td> +</tr> +<tr> +<td><a href="#EmailDialog.__sendmailGoogle">__sendmailGoogle</a></td> +<td>Private method to actually send the message via Google Mail.</td> +</tr> +<tr> +<td><a href="#EmailDialog.attachFile">attachFile</a></td> +<td>Public method to add an attachment.</td> +</tr> +<tr> +<td><a href="#EmailDialog.keyPressEvent">keyPressEvent</a></td> +<td>Protected method to handle the user pressing the escape key.</td> +</tr> +<tr> +<td><a href="#EmailDialog.on_addButton_clicked">on_addButton_clicked</a></td> +<td>Private slot to handle the Add...</td> +</tr> +<tr> +<td><a href="#EmailDialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> +<td>Private slot called by a button of the button box clicked.</td> +</tr> +<tr> +<td><a href="#EmailDialog.on_buttonBox_rejected">on_buttonBox_rejected</a></td> +<td>Private slot to handle the rejected signal of the button box.</td> +</tr> +<tr> +<td><a href="#EmailDialog.on_deleteButton_clicked">on_deleteButton_clicked</a></td> +<td>Private slot to handle the Delete button.</td> +</tr> +<tr> +<td><a href="#EmailDialog.on_googleHelpButton_clicked">on_googleHelpButton_clicked</a></td> +<td>Private slot to show some help text "how to turn on the Gmail API".</td> +</tr> +<tr> +<td><a href="#EmailDialog.on_message_textChanged">on_message_textChanged</a></td> +<td>Private slot to handle the textChanged signal of the message edit.</td> +</tr> +<tr> +<td><a href="#EmailDialog.on_sendButton_clicked">on_sendButton_clicked</a></td> +<td>Private slot to send the email message.</td> +</tr> +<tr> +<td><a href="#EmailDialog.on_subject_textChanged">on_subject_textChanged</a></td> +<td>Private slot to handle the textChanged signal of the subject edit.</td> +</tr> +</table> +<h3>Static Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> + +<a NAME="EmailDialog.__init__" ID="EmailDialog.__init__"></a> +<h4>EmailDialog (Constructor)</h4> +<b>EmailDialog</b>(<i>mode="bug", parent=None</i>) + +<p> + Constructor +</p> +<dl> + +<dt><i>mode</i></dt> +<dd> +mode of this dialog (string, "bug" or "feature") +</dd> +<dt><i>parent</i></dt> +<dd> +parent widget of this dialog (QWidget) +</dd> +</dl> +<a NAME="EmailDialog.__createMultipartMail" ID="EmailDialog.__createMultipartMail"></a> +<h4>EmailDialog.__createMultipartMail</h4> +<b>__createMultipartMail</b>(<i></i>) + +<p> + Private method to create a multipart mail message. +</p> +<dl> +<dt>Return:</dt> +<dd> +prepared mail message +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +email.mime.text.MIMEMultipart +</dd> +</dl> +<a NAME="EmailDialog.__createSimpleMail" ID="EmailDialog.__createSimpleMail"></a> +<h4>EmailDialog.__createSimpleMail</h4> +<b>__createSimpleMail</b>(<i></i>) + +<p> + Private method to create a simple mail message. +</p> +<dl> +<dt>Return:</dt> +<dd> +prepared mail message +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +email.mime.text.MIMEText +</dd> +</dl> +<a NAME="EmailDialog.__deleteAttachedFiles" ID="EmailDialog.__deleteAttachedFiles"></a> +<h4>EmailDialog.__deleteAttachedFiles</h4> +<b>__deleteAttachedFiles</b>(<i></i>) + +<p> + Private method to delete attached files. +</p> +<a NAME="EmailDialog.__encodedHeader" ID="EmailDialog.__encodedHeader"></a> +<h4>EmailDialog.__encodedHeader</h4> +<b>__encodedHeader</b>(<i>txt</i>) + +<p> + Private method to create a correctly encoded mail header. +</p> +<dl> + +<dt><i>txt</i></dt> +<dd> +header text to encode (string) +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +encoded header (email.header.Header) +</dd> +</dl> +<a NAME="EmailDialog.__encodedText" ID="EmailDialog.__encodedText"></a> +<h4>EmailDialog.__encodedText</h4> +<b>__encodedText</b>(<i>txt</i>) + +<p> + Private method to create a MIMEText message with correct encoding. +</p> +<dl> + +<dt><i>txt</i></dt> +<dd> +text to be put into the MIMEText object (string) +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +MIMEText object +</dd> +</dl> +<a NAME="EmailDialog.__gmailSendResult" ID="EmailDialog.__gmailSendResult"></a> +<h4>EmailDialog.__gmailSendResult</h4> +<b>__gmailSendResult</b>(<i>ok, message</i>) + +<p> + Private slot handling the send result reported by the Google Mail + interface. +</p> +<dl> + +<dt><i>ok</i> (bool)</dt> +<dd> +flag indicating success +</dd> +<dt><i>message</i> (str)</dt> +<dd> +message from the interface +</dd> +</dl> +<a NAME="EmailDialog.__sendmail" ID="EmailDialog.__sendmail"></a> +<h4>EmailDialog.__sendmail</h4> +<b>__sendmail</b>(<i>msg</i>) + +<p> + Private method to actually send the message. +</p> +<dl> + +<dt><i>msg</i></dt> +<dd> +the message to be sent (string) +</dd> +</dl> +<dl> +<dt>Return:</dt> +<dd> +flag indicating success (boolean) +</dd> +</dl> +<a NAME="EmailDialog.__sendmailGoogle" ID="EmailDialog.__sendmailGoogle"></a> +<h4>EmailDialog.__sendmailGoogle</h4> +<b>__sendmailGoogle</b>(<i>msg</i>) + +<p> + Private method to actually send the message via Google Mail. +</p> +<dl> + +<dt><i>msg</i> (email.mime.text.MIMEBase)</dt> +<dd> +email message to be sent +</dd> +</dl> +<a NAME="EmailDialog.attachFile" ID="EmailDialog.attachFile"></a> +<h4>EmailDialog.attachFile</h4> +<b>attachFile</b>(<i>fname, deleteFile</i>) + +<p> + Public method to add an attachment. +</p> +<dl> + +<dt><i>fname</i></dt> +<dd> +name of the file to be attached (string) +</dd> +<dt><i>deleteFile</i></dt> +<dd> +flag indicating to delete the file after it has + been sent (boolean) +</dd> +</dl> +<a NAME="EmailDialog.keyPressEvent" ID="EmailDialog.keyPressEvent"></a> +<h4>EmailDialog.keyPressEvent</h4> +<b>keyPressEvent</b>(<i>ev</i>) + +<p> + Protected method to handle the user pressing the escape key. +</p> +<dl> + +<dt><i>ev</i></dt> +<dd> +key event (QKeyEvent) +</dd> +</dl> +<a NAME="EmailDialog.on_addButton_clicked" ID="EmailDialog.on_addButton_clicked"></a> +<h4>EmailDialog.on_addButton_clicked</h4> +<b>on_addButton_clicked</b>(<i></i>) + +<p> + Private slot to handle the Add... button. +</p> +<a NAME="EmailDialog.on_buttonBox_clicked" ID="EmailDialog.on_buttonBox_clicked"></a> +<h4>EmailDialog.on_buttonBox_clicked</h4> +<b>on_buttonBox_clicked</b>(<i>button</i>) + +<p> + Private slot called by a button of the button box clicked. +</p> +<dl> + +<dt><i>button</i></dt> +<dd> +button that was clicked (QAbstractButton) +</dd> +</dl> +<a NAME="EmailDialog.on_buttonBox_rejected" ID="EmailDialog.on_buttonBox_rejected"></a> +<h4>EmailDialog.on_buttonBox_rejected</h4> +<b>on_buttonBox_rejected</b>(<i></i>) + +<p> + Private slot to handle the rejected signal of the button box. +</p> +<a NAME="EmailDialog.on_deleteButton_clicked" ID="EmailDialog.on_deleteButton_clicked"></a> +<h4>EmailDialog.on_deleteButton_clicked</h4> +<b>on_deleteButton_clicked</b>(<i></i>) + +<p> + Private slot to handle the Delete button. +</p> +<a NAME="EmailDialog.on_googleHelpButton_clicked" ID="EmailDialog.on_googleHelpButton_clicked"></a> +<h4>EmailDialog.on_googleHelpButton_clicked</h4> +<b>on_googleHelpButton_clicked</b>(<i></i>) + +<p> + Private slot to show some help text "how to turn on the Gmail API". +</p> +<a NAME="EmailDialog.on_message_textChanged" ID="EmailDialog.on_message_textChanged"></a> +<h4>EmailDialog.on_message_textChanged</h4> +<b>on_message_textChanged</b>(<i></i>) + +<p> + Private slot to handle the textChanged signal of the message edit. +</p> +<a NAME="EmailDialog.on_sendButton_clicked" ID="EmailDialog.on_sendButton_clicked"></a> +<h4>EmailDialog.on_sendButton_clicked</h4> +<b>on_sendButton_clicked</b>(<i></i>) + +<p> + Private slot to send the email message. +</p> +<a NAME="EmailDialog.on_subject_textChanged" ID="EmailDialog.on_subject_textChanged"></a> +<h4>EmailDialog.on_subject_textChanged</h4> +<b>on_subject_textChanged</b>(<i>txt</i>) + +<p> + Private slot to handle the textChanged signal of the subject edit. +</p> +<dl> + +<dt><i>txt</i></dt> +<dd> +changed text (string) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file