--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MqttMonitor/Documentation/source/Plugin_Mqtt_Monitor.MqttMonitor.MqttConnectionProfilesDialog.html Sun Sep 09 18:31:38 2018 +0200 @@ -0,0 +1,466 @@ +<!DOCTYPE html> +<html><head> +<title>Plugin_Mqtt_Monitor.MqttMonitor.MqttConnectionProfilesDialog</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>Plugin_Mqtt_Monitor.MqttMonitor.MqttConnectionProfilesDialog</h1> +<p> +Module implementing a dialog to edit the MQTT connection profiles. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#MqttConnectionProfilesDialog">MqttConnectionProfilesDialog</a></td> +<td>Class implementing a dialog to edit the MQTT connection profiles.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> +<hr /><hr /> +<a NAME="MqttConnectionProfilesDialog" ID="MqttConnectionProfilesDialog"></a> +<h2>MqttConnectionProfilesDialog</h2> +<p> + Class implementing a dialog to edit the MQTT connection profiles. +</p> +<h3>Derived from</h3> +QDialog, Ui_MqttConnectionProfilesDialog +<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="#MqttConnectionProfilesDialog.__init__">MqttConnectionProfilesDialog</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.__applyProfile">__applyProfile</a></td> +<td>Private method to apply the entered data to the list of profiles.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.__clearProfile">__clearProfile</a></td> +<td>Private method to clear the profile data entry fields.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.__defaultProfile">__defaultProfile</a></td> +<td>Private method to populate non-existing profile items.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.__isChangedProfile">__isChangedProfile</a></td> +<td>Private method to check, if the currently shown profile contains some changed data.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.__populateProfile">__populateProfile</a></td> +<td>Private method to populate the profile data entry fields.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.__populateProfileDefault">__populateProfileDefault</a></td> +<td>Private method to populate the profile data entry fields with default profile values.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.__populateProfilesList">__populateProfilesList</a></td> +<td>Private method to populate the list of defined profiles.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.__resetProfile">__resetProfile</a></td> +<td>Private method to reset the profile data entry fields to their stored values.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.__updateApplyButton">__updateApplyButton</a></td> +<td>Private method to set the state of the Apply button.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.accept">accept</a></td> +<td>Public slot to accept the dialog.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.getProfiles">getProfiles</a></td> +<td>Public method to return a dictionary of profiles.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_brokerAddressEdit_textChanged">on_brokerAddressEdit_textChanged</a></td> +<td>Private slot handling a change of the broker address.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_cleanSessionCheckBox_clicked">on_cleanSessionCheckBox_clicked</a></td> +<td>Private slot to handle a change of the clean session selection.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_clientIdEdit_textChanged">on_clientIdEdit_textChanged</a></td> +<td>Private slot handling a change of the client ID string.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_copyButton_clicked">on_copyButton_clicked</a></td> +<td>Private slot to copy the selected profile entry.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_generateIdButton_clicked">on_generateIdButton_clicked</a></td> +<td>Private slot to generate a client ID.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_minusButton_clicked">on_minusButton_clicked</a></td> +<td>Private slot to delete the selected entry.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_plusButton_clicked">on_plusButton_clicked</a></td> +<td>Private slot to add a new empty profile entry.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_profileButtonBox_clicked">on_profileButtonBox_clicked</a></td> +<td>Private slot handling presses of the profile buttons.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_profileEdit_textChanged">on_profileEdit_textChanged</a></td> +<td>Private slot to handle changes of the profile name.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_profilesList_currentItemChanged">on_profilesList_currentItemChanged</a></td> +<td>Private slot to handle a change of the current profile.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_tlsCertsFileButton_toggled">on_tlsCertsFileButton_toggled</a></td> +<td>Private slot handling the selection of using a non-default certificates file.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_tlsCertsFilePicker_textChanged">on_tlsCertsFilePicker_textChanged</a></td> +<td>Private slot handling a change of the TLS CA certificates file.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_tlsDefaultCertsButton_toggled">on_tlsDefaultCertsButton_toggled</a></td> +<td>Private slot handling the selection of using the default certificates file.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_tlsGroupBox_toggled">on_tlsGroupBox_toggled</a></td> +<td>Private slot handling the selection of TLS mode.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_tlsSelfSignedCertsButton_toggled">on_tlsSelfSignedCertsButton_toggled</a></td> +<td>Private slot handling the selection of using self signed client certificate and key files.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_tlsSelfSignedCertsFilePicker_textChanged">on_tlsSelfSignedCertsFilePicker_textChanged</a></td> +<td>Private slot handling a change of the TLS CA certificates file.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_tlsSelfSignedClientCertFilePicker_textChanged">on_tlsSelfSignedClientCertFilePicker_textChanged</a></td> +<td>Private slot handling a change of the TLS client certificate file.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.on_tlsSelfSignedClientKeyFilePicker_textChanged">on_tlsSelfSignedClientKeyFilePicker_textChanged</a></td> +<td>Private slot handling a change of the TLS client key file.</td> +</tr><tr> +<td><a href="#MqttConnectionProfilesDialog.reject">reject</a></td> +<td>Public slot to reject the dialog changes.</td> +</tr> +</table> +<h3>Static Methods</h3> +<table> +<tr><td>None</td></tr> +</table> +<a NAME="MqttConnectionProfilesDialog.__init__" ID="MqttConnectionProfilesDialog.__init__"></a> +<h4>MqttConnectionProfilesDialog (Constructor)</h4> +<b>MqttConnectionProfilesDialog</b>(<i>client, profiles, parent=None</i>) +<p> + Constructor +</p><dl> +<dt><i>client</i> (MqttClient)</dt> +<dd> +reference to the MQTT client object +</dd><dt><i>profiles</i> (dict)</dt> +<dd> +dictionary containing dictionaries containing the + connection parameters. Each entry must have the keys + "BrokerAddress", "BrokerPort", "ClientId", + "Keepalive", "CleanSession", "Username", "Password", "WillTopic", + "WillMessage", "WillQos", "WillRetain", "TlsEnable", "TlsCaCert", + "TlsClientCert", "TlsClientKey", "ConnectionTimeout". +</dd><dt><i>parent</i> (QWidget)</dt> +<dd> +reference to the parent widget +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.__applyProfile" ID="MqttConnectionProfilesDialog.__applyProfile"></a> +<h4>MqttConnectionProfilesDialog.__applyProfile</h4> +<b>__applyProfile</b>(<i></i>) +<p> + Private method to apply the entered data to the list of profiles. +</p><dl> +<dt>Returns:</dt> +<dd> +name of the applied profile +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +str +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.__clearProfile" ID="MqttConnectionProfilesDialog.__clearProfile"></a> +<h4>MqttConnectionProfilesDialog.__clearProfile</h4> +<b>__clearProfile</b>(<i></i>) +<p> + Private method to clear the profile data entry fields. +</p><a NAME="MqttConnectionProfilesDialog.__defaultProfile" ID="MqttConnectionProfilesDialog.__defaultProfile"></a> +<h4>MqttConnectionProfilesDialog.__defaultProfile</h4> +<b>__defaultProfile</b>(<i></i>) +<p> + Private method to populate non-existing profile items. +</p><dl> +<dt>Returns:</dt> +<dd> +default dictionary entry +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +dict +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.__isChangedProfile" ID="MqttConnectionProfilesDialog.__isChangedProfile"></a> +<h4>MqttConnectionProfilesDialog.__isChangedProfile</h4> +<b>__isChangedProfile</b>(<i></i>) +<p> + Private method to check, if the currently shown profile contains some + changed data. +</p><dl> +<dt>Returns:</dt> +<dd> +flag indicating changed data +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +bool +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.__populateProfile" ID="MqttConnectionProfilesDialog.__populateProfile"></a> +<h4>MqttConnectionProfilesDialog.__populateProfile</h4> +<b>__populateProfile</b>(<i>profileName</i>) +<p> + Private method to populate the profile data entry fields. +</p><dl> +<dt><i>profileName</i> (str)</dt> +<dd> +name of the profile to get data from +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.__populateProfileDefault" ID="MqttConnectionProfilesDialog.__populateProfileDefault"></a> +<h4>MqttConnectionProfilesDialog.__populateProfileDefault</h4> +<b>__populateProfileDefault</b>(<i></i>) +<p> + Private method to populate the profile data entry fields with default + profile values. +</p><a NAME="MqttConnectionProfilesDialog.__populateProfilesList" ID="MqttConnectionProfilesDialog.__populateProfilesList"></a> +<h4>MqttConnectionProfilesDialog.__populateProfilesList</h4> +<b>__populateProfilesList</b>(<i>currentProfile=""</i>) +<p> + Private method to populate the list of defined profiles. +</p><dl> +<dt><i>currentProfile</i> (str)</dt> +<dd> +name of the current profile +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.__resetProfile" ID="MqttConnectionProfilesDialog.__resetProfile"></a> +<h4>MqttConnectionProfilesDialog.__resetProfile</h4> +<b>__resetProfile</b>(<i></i>) +<p> + Private method to reset the profile data entry fields to their stored + values. +</p><a NAME="MqttConnectionProfilesDialog.__updateApplyButton" ID="MqttConnectionProfilesDialog.__updateApplyButton"></a> +<h4>MqttConnectionProfilesDialog.__updateApplyButton</h4> +<b>__updateApplyButton</b>(<i></i>) +<p> + Private method to set the state of the Apply button. +</p><a NAME="MqttConnectionProfilesDialog.accept" ID="MqttConnectionProfilesDialog.accept"></a> +<h4>MqttConnectionProfilesDialog.accept</h4> +<b>accept</b>(<i></i>) +<p> + Public slot to accept the dialog. +</p><a NAME="MqttConnectionProfilesDialog.getProfiles" ID="MqttConnectionProfilesDialog.getProfiles"></a> +<h4>MqttConnectionProfilesDialog.getProfiles</h4> +<b>getProfiles</b>(<i></i>) +<p> + Public method to return a dictionary of profiles. +</p><dl> +<dt>Returns:</dt> +<dd> +dictionary containing dictionaries containing the defined + connection profiles. Each entry have the keys "BrokerAddress", + "BrokerPort", "ClientId", "Keepalive", "CleanSession", "Username", + "Password", "WillTopic", "WillMessage", "WillQos", "WillRetain", + "TlsEnable", "TlsCaCert", "TlsClientCert", "TlsClientKey", + "ConnectionTimeout". +</dd> +</dl><dl> +<dt>Return Type:</dt> +<dd> +dict +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_brokerAddressEdit_textChanged" ID="MqttConnectionProfilesDialog.on_brokerAddressEdit_textChanged"></a> +<h4>MqttConnectionProfilesDialog.on_brokerAddressEdit_textChanged</h4> +<b>on_brokerAddressEdit_textChanged</b>(<i>address</i>) +<p> + Private slot handling a change of the broker address. +</p><dl> +<dt><i>address</i> (str)</dt> +<dd> +broker address +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_cleanSessionCheckBox_clicked" ID="MqttConnectionProfilesDialog.on_cleanSessionCheckBox_clicked"></a> +<h4>MqttConnectionProfilesDialog.on_cleanSessionCheckBox_clicked</h4> +<b>on_cleanSessionCheckBox_clicked</b>(<i>checked</i>) +<p> + Private slot to handle a change of the clean session selection. +</p><dl> +<dt><i>checked</i> (bool)</dt> +<dd> +current state of the clean session selection +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_clientIdEdit_textChanged" ID="MqttConnectionProfilesDialog.on_clientIdEdit_textChanged"></a> +<h4>MqttConnectionProfilesDialog.on_clientIdEdit_textChanged</h4> +<b>on_clientIdEdit_textChanged</b>(<i>clientId</i>) +<p> + Private slot handling a change of the client ID string. +</p><dl> +<dt><i>clientId</i> (str)</dt> +<dd> +client ID +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_copyButton_clicked" ID="MqttConnectionProfilesDialog.on_copyButton_clicked"></a> +<h4>MqttConnectionProfilesDialog.on_copyButton_clicked</h4> +<b>on_copyButton_clicked</b>(<i></i>) +<p> + Private slot to copy the selected profile entry. +</p><a NAME="MqttConnectionProfilesDialog.on_generateIdButton_clicked" ID="MqttConnectionProfilesDialog.on_generateIdButton_clicked"></a> +<h4>MqttConnectionProfilesDialog.on_generateIdButton_clicked</h4> +<b>on_generateIdButton_clicked</b>(<i></i>) +<p> + Private slot to generate a client ID. +</p><a NAME="MqttConnectionProfilesDialog.on_minusButton_clicked" ID="MqttConnectionProfilesDialog.on_minusButton_clicked"></a> +<h4>MqttConnectionProfilesDialog.on_minusButton_clicked</h4> +<b>on_minusButton_clicked</b>(<i></i>) +<p> + Private slot to delete the selected entry. +</p><a NAME="MqttConnectionProfilesDialog.on_plusButton_clicked" ID="MqttConnectionProfilesDialog.on_plusButton_clicked"></a> +<h4>MqttConnectionProfilesDialog.on_plusButton_clicked</h4> +<b>on_plusButton_clicked</b>(<i></i>) +<p> + Private slot to add a new empty profile entry. +</p><a NAME="MqttConnectionProfilesDialog.on_profileButtonBox_clicked" ID="MqttConnectionProfilesDialog.on_profileButtonBox_clicked"></a> +<h4>MqttConnectionProfilesDialog.on_profileButtonBox_clicked</h4> +<b>on_profileButtonBox_clicked</b>(<i>button</i>) +<p> + Private slot handling presses of the profile buttons. +</p><dl> +<dt><i>button</i> (QAbstractButton)</dt> +<dd> +reference to the pressed button +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_profileEdit_textChanged" ID="MqttConnectionProfilesDialog.on_profileEdit_textChanged"></a> +<h4>MqttConnectionProfilesDialog.on_profileEdit_textChanged</h4> +<b>on_profileEdit_textChanged</b>(<i>name</i>) +<p> + Private slot to handle changes of the profile name. +</p><dl> +<dt><i>name</i> (str)</dt> +<dd> +name of the profile +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_profilesList_currentItemChanged" ID="MqttConnectionProfilesDialog.on_profilesList_currentItemChanged"></a> +<h4>MqttConnectionProfilesDialog.on_profilesList_currentItemChanged</h4> +<b>on_profilesList_currentItemChanged</b>(<i>current, previous</i>) +<p> + Private slot to handle a change of the current profile. +</p><dl> +<dt><i>current</i> (QListWidgetItem)</dt> +<dd> +new current item +</dd><dt><i>previous</i> (QListWidgetItem)</dt> +<dd> +previous current item +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_tlsCertsFileButton_toggled" ID="MqttConnectionProfilesDialog.on_tlsCertsFileButton_toggled"></a> +<h4>MqttConnectionProfilesDialog.on_tlsCertsFileButton_toggled</h4> +<b>on_tlsCertsFileButton_toggled</b>(<i>checked</i>) +<p> + Private slot handling the selection of using a non-default + certificates file. +</p><dl> +<dt><i>checked</i> (bool)</dt> +<dd> +state of the selection +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_tlsCertsFilePicker_textChanged" ID="MqttConnectionProfilesDialog.on_tlsCertsFilePicker_textChanged"></a> +<h4>MqttConnectionProfilesDialog.on_tlsCertsFilePicker_textChanged</h4> +<b>on_tlsCertsFilePicker_textChanged</b>(<i>path</i>) +<p> + Private slot handling a change of the TLS CA certificates file. +</p><dl> +<dt><i>path</i> (str)</dt> +<dd> +file path +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_tlsDefaultCertsButton_toggled" ID="MqttConnectionProfilesDialog.on_tlsDefaultCertsButton_toggled"></a> +<h4>MqttConnectionProfilesDialog.on_tlsDefaultCertsButton_toggled</h4> +<b>on_tlsDefaultCertsButton_toggled</b>(<i>checked</i>) +<p> + Private slot handling the selection of using the default + certificates file. +</p><dl> +<dt><i>checked</i> (bool)</dt> +<dd> +state of the selection +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_tlsGroupBox_toggled" ID="MqttConnectionProfilesDialog.on_tlsGroupBox_toggled"></a> +<h4>MqttConnectionProfilesDialog.on_tlsGroupBox_toggled</h4> +<b>on_tlsGroupBox_toggled</b>(<i>checked</i>) +<p> + Private slot handling the selection of TLS mode. +</p><dl> +<dt><i>checked</i> (bool)</dt> +<dd> +state of the selection +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_tlsSelfSignedCertsButton_toggled" ID="MqttConnectionProfilesDialog.on_tlsSelfSignedCertsButton_toggled"></a> +<h4>MqttConnectionProfilesDialog.on_tlsSelfSignedCertsButton_toggled</h4> +<b>on_tlsSelfSignedCertsButton_toggled</b>(<i>checked</i>) +<p> + Private slot handling the selection of using self signed + client certificate and key files. +</p><dl> +<dt><i>checked</i> (bool)</dt> +<dd> +state of the selection +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_tlsSelfSignedCertsFilePicker_textChanged" ID="MqttConnectionProfilesDialog.on_tlsSelfSignedCertsFilePicker_textChanged"></a> +<h4>MqttConnectionProfilesDialog.on_tlsSelfSignedCertsFilePicker_textChanged</h4> +<b>on_tlsSelfSignedCertsFilePicker_textChanged</b>(<i>path</i>) +<p> + Private slot handling a change of the TLS CA certificates file. +</p><dl> +<dt><i>path</i> (str)</dt> +<dd> +file path +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_tlsSelfSignedClientCertFilePicker_textChanged" ID="MqttConnectionProfilesDialog.on_tlsSelfSignedClientCertFilePicker_textChanged"></a> +<h4>MqttConnectionProfilesDialog.on_tlsSelfSignedClientCertFilePicker_textChanged</h4> +<b>on_tlsSelfSignedClientCertFilePicker_textChanged</b>(<i>path</i>) +<p> + Private slot handling a change of the TLS client certificate file. +</p><dl> +<dt><i>path</i> (str)</dt> +<dd> +file path +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.on_tlsSelfSignedClientKeyFilePicker_textChanged" ID="MqttConnectionProfilesDialog.on_tlsSelfSignedClientKeyFilePicker_textChanged"></a> +<h4>MqttConnectionProfilesDialog.on_tlsSelfSignedClientKeyFilePicker_textChanged</h4> +<b>on_tlsSelfSignedClientKeyFilePicker_textChanged</b>(<i>path</i>) +<p> + Private slot handling a change of the TLS client key file. +</p><dl> +<dt><i>path</i> (str)</dt> +<dd> +file path +</dd> +</dl><a NAME="MqttConnectionProfilesDialog.reject" ID="MqttConnectionProfilesDialog.reject"></a> +<h4>MqttConnectionProfilesDialog.reject</h4> +<b>reject</b>(<i></i>) +<p> + Public slot to reject the dialog changes. +</p> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file