5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.CodeFormatting.IsortConfigurationDialog</h1> |
9 <h1>eric7.CodeFormatting.IsortConfigurationDialog</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing a dialog to enter the parameters for an isort formatting run. |
11 Module implementing a dialog to enter the parameters for an isort formatting run. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
15 <table> |
16 <table> |
16 <tr><td>None</td></tr> |
17 <tr><td>None</td></tr> |
17 </table> |
18 </table> |
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
20 <table> |
21 <table> |
|
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#IsortConfigurationDialog">IsortConfigurationDialog</a></td> |
22 <td><a href="#IsortConfigurationDialog">IsortConfigurationDialog</a></td> |
25 <td>Class implementing a dialog to enter the parameters for an isort formatting run.</td> |
23 <td>Class implementing a dialog to enter the parameters for an isort formatting run.</td> |
26 </tr> |
24 </tr> |
27 </table> |
25 </table> |
|
26 |
28 <h3>Functions</h3> |
27 <h3>Functions</h3> |
29 |
28 <table> |
30 <table> |
29 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
30 </table> |
32 </table> |
31 |
33 <hr /> |
32 <hr /> |
34 <hr /> |
33 <hr /> |
35 <a NAME="IsortConfigurationDialog" ID="IsortConfigurationDialog"></a> |
34 <a NAME="IsortConfigurationDialog" ID="IsortConfigurationDialog"></a> |
36 <h2>IsortConfigurationDialog</h2> |
35 <h2>IsortConfigurationDialog</h2> |
37 |
|
38 <p> |
36 <p> |
39 Class implementing a dialog to enter the parameters for an isort formatting run. |
37 Class implementing a dialog to enter the parameters for an isort formatting run. |
40 </p> |
38 </p> |
|
39 |
41 <h3>Derived from</h3> |
40 <h3>Derived from</h3> |
42 QDialog, Ui_IsortConfigurationDialog |
41 QDialog, Ui_IsortConfigurationDialog |
43 <h3>Class Attributes</h3> |
42 <h3>Class Attributes</h3> |
44 |
43 <table> |
45 <table> |
44 <tr><td>None</td></tr> |
46 <tr><td>None</td></tr> |
45 </table> |
47 </table> |
46 |
48 <h3>Class Methods</h3> |
47 <h3>Class Methods</h3> |
49 |
48 <table> |
50 <table> |
49 <tr><td>None</td></tr> |
51 <tr><td>None</td></tr> |
50 </table> |
52 </table> |
51 |
53 <h3>Methods</h3> |
52 <h3>Methods</h3> |
54 |
53 <table> |
55 <table> |
|
56 |
|
57 <tr> |
54 <tr> |
58 <td><a href="#IsortConfigurationDialog.__init__">IsortConfigurationDialog</a></td> |
55 <td><a href="#IsortConfigurationDialog.__init__">IsortConfigurationDialog</a></td> |
59 <td>Constructor</td> |
56 <td>Constructor</td> |
60 </tr> |
57 </tr> |
61 <tr> |
58 <tr> |
85 <tr> |
82 <tr> |
86 <td><a href="#IsortConfigurationDialog.on_sourceComboBox_currentTextChanged">on_sourceComboBox_currentTextChanged</a></td> |
83 <td><a href="#IsortConfigurationDialog.on_sourceComboBox_currentTextChanged">on_sourceComboBox_currentTextChanged</a></td> |
87 <td>Private slot to handle the selection of a configuration source.</td> |
84 <td>Private slot to handle the selection of a configuration source.</td> |
88 </tr> |
85 </tr> |
89 </table> |
86 </table> |
|
87 |
90 <h3>Static Methods</h3> |
88 <h3>Static Methods</h3> |
91 |
89 <table> |
92 <table> |
90 <tr><td>None</td></tr> |
93 <tr><td>None</td></tr> |
91 </table> |
94 </table> |
92 |
95 |
93 |
96 <a NAME="IsortConfigurationDialog.__init__" ID="IsortConfigurationDialog.__init__"></a> |
94 <a NAME="IsortConfigurationDialog.__init__" ID="IsortConfigurationDialog.__init__"></a> |
97 <h4>IsortConfigurationDialog (Constructor)</h4> |
95 <h4>IsortConfigurationDialog (Constructor)</h4> |
98 <b>IsortConfigurationDialog</b>(<i>withProject=True, onlyProject=False, parent=None</i>) |
96 <b>IsortConfigurationDialog</b>(<i>withProject=True, onlyProject=False, parent=None</i>) |
99 |
|
100 <p> |
97 <p> |
101 Constructor |
98 Constructor |
102 </p> |
99 </p> |
|
100 |
103 <dl> |
101 <dl> |
104 |
102 |
105 <dt><i>withProject</i> (bool (optional))</dt> |
103 <dt><i>withProject</i> (bool (optional))</dt> |
106 <dd> |
104 <dd> |
107 flag indicating to look for project configurations |
105 flag indicating to look for project configurations |
118 </dd> |
116 </dd> |
119 </dl> |
117 </dl> |
120 <a NAME="IsortConfigurationDialog.__createTomlSnippet" ID="IsortConfigurationDialog.__createTomlSnippet"></a> |
118 <a NAME="IsortConfigurationDialog.__createTomlSnippet" ID="IsortConfigurationDialog.__createTomlSnippet"></a> |
121 <h4>IsortConfigurationDialog.__createTomlSnippet</h4> |
119 <h4>IsortConfigurationDialog.__createTomlSnippet</h4> |
122 <b>__createTomlSnippet</b>(<i></i>) |
120 <b>__createTomlSnippet</b>(<i></i>) |
123 |
|
124 <p> |
121 <p> |
125 Private slot to generate a TOML snippet of the current configuration. |
122 Private slot to generate a TOML snippet of the current configuration. |
126 </p> |
123 </p> |
127 <p> |
124 <p> |
128 Note: Only non-default values are included in this snippet. |
125 Note: Only non-default values are included in this snippet. |
129 </p> |
126 </p> |
130 <p> |
127 <p> |
131 The code snippet is copied to the clipboard and may be placed inside the |
128 The code snippet is copied to the clipboard and may be placed inside the |
132 'pyproject.toml' file. |
129 'pyproject.toml' file. |
133 </p> |
130 </p> |
|
131 |
134 <a NAME="IsortConfigurationDialog.__getConfigurationDict" ID="IsortConfigurationDialog.__getConfigurationDict"></a> |
132 <a NAME="IsortConfigurationDialog.__getConfigurationDict" ID="IsortConfigurationDialog.__getConfigurationDict"></a> |
135 <h4>IsortConfigurationDialog.__getConfigurationDict</h4> |
133 <h4>IsortConfigurationDialog.__getConfigurationDict</h4> |
136 <b>__getConfigurationDict</b>(<i></i>) |
134 <b>__getConfigurationDict</b>(<i></i>) |
137 |
|
138 <p> |
135 <p> |
139 Private method to assemble and return a dictionary containing the entered |
136 Private method to assemble and return a dictionary containing the entered |
140 non-default configuration parameters. |
137 non-default configuration parameters. |
141 </p> |
138 </p> |
|
139 |
142 <dl> |
140 <dl> |
143 <dt>Return:</dt> |
141 <dt>Return:</dt> |
144 <dd> |
142 <dd> |
145 dictionary containing the non-default configuration parameters |
143 dictionary containing the non-default configuration parameters |
146 </dd> |
144 </dd> |
152 </dd> |
150 </dd> |
153 </dl> |
151 </dl> |
154 <a NAME="IsortConfigurationDialog.__loadConfiguration" ID="IsortConfigurationDialog.__loadConfiguration"></a> |
152 <a NAME="IsortConfigurationDialog.__loadConfiguration" ID="IsortConfigurationDialog.__loadConfiguration"></a> |
155 <h4>IsortConfigurationDialog.__loadConfiguration</h4> |
153 <h4>IsortConfigurationDialog.__loadConfiguration</h4> |
156 <b>__loadConfiguration</b>(<i>confDict</i>) |
154 <b>__loadConfiguration</b>(<i>confDict</i>) |
157 |
|
158 <p> |
155 <p> |
159 Private method to load the configuration section with data of the given |
156 Private method to load the configuration section with data of the given |
160 dictionary. |
157 dictionary. |
161 </p> |
158 </p> |
162 <p> |
159 <p> |
163 Note: Default values will be loaded for missing parameters. |
160 Note: Default values will be loaded for missing parameters. |
164 </p> |
161 </p> |
|
162 |
165 <dl> |
163 <dl> |
166 |
164 |
167 <dt><i>confDict</i> (dict)</dt> |
165 <dt><i>confDict</i> (dict)</dt> |
168 <dd> |
166 <dd> |
169 reference to the data to be loaded |
167 reference to the data to be loaded |
170 </dd> |
168 </dd> |
171 </dl> |
169 </dl> |
172 <a NAME="IsortConfigurationDialog.__populateMultiLineComboBox" ID="IsortConfigurationDialog.__populateMultiLineComboBox"></a> |
170 <a NAME="IsortConfigurationDialog.__populateMultiLineComboBox" ID="IsortConfigurationDialog.__populateMultiLineComboBox"></a> |
173 <h4>IsortConfigurationDialog.__populateMultiLineComboBox</h4> |
171 <h4>IsortConfigurationDialog.__populateMultiLineComboBox</h4> |
174 <b>__populateMultiLineComboBox</b>(<i></i>) |
172 <b>__populateMultiLineComboBox</b>(<i></i>) |
175 |
|
176 <p> |
173 <p> |
177 Private method to populate the multi line output selector. |
174 Private method to populate the multi line output selector. |
178 </p> |
175 </p> |
|
176 |
179 <a NAME="IsortConfigurationDialog.getConfiguration" ID="IsortConfigurationDialog.getConfiguration"></a> |
177 <a NAME="IsortConfigurationDialog.getConfiguration" ID="IsortConfigurationDialog.getConfiguration"></a> |
180 <h4>IsortConfigurationDialog.getConfiguration</h4> |
178 <h4>IsortConfigurationDialog.getConfiguration</h4> |
181 <b>getConfiguration</b>(<i>saveToProject=False</i>) |
179 <b>getConfiguration</b>(<i>saveToProject=False</i>) |
182 |
|
183 <p> |
180 <p> |
184 Public method to get the current configuration parameters. |
181 Public method to get the current configuration parameters. |
185 </p> |
182 </p> |
|
183 |
186 <dl> |
184 <dl> |
187 |
185 |
188 <dt><i>saveToProject</i> (bool (optional))</dt> |
186 <dt><i>saveToProject</i> (bool (optional))</dt> |
189 <dd> |
187 <dd> |
190 flag indicating to save the configuration data in the |
188 flag indicating to save the configuration data in the |
204 </dd> |
202 </dd> |
205 </dl> |
203 </dl> |
206 <a NAME="IsortConfigurationDialog.on_profileComboBox_editTextChanged" ID="IsortConfigurationDialog.on_profileComboBox_editTextChanged"></a> |
204 <a NAME="IsortConfigurationDialog.on_profileComboBox_editTextChanged" ID="IsortConfigurationDialog.on_profileComboBox_editTextChanged"></a> |
207 <h4>IsortConfigurationDialog.on_profileComboBox_editTextChanged</h4> |
205 <h4>IsortConfigurationDialog.on_profileComboBox_editTextChanged</h4> |
208 <b>on_profileComboBox_editTextChanged</b>(<i>profileName</i>) |
206 <b>on_profileComboBox_editTextChanged</b>(<i>profileName</i>) |
209 |
|
210 <p> |
207 <p> |
211 Private slot to react upon changes of the selected/entered profile. |
208 Private slot to react upon changes of the selected/entered profile. |
212 </p> |
209 </p> |
|
210 |
213 <dl> |
211 <dl> |
214 |
212 |
215 <dt><i>profileName</i> (str)</dt> |
213 <dt><i>profileName</i> (str)</dt> |
216 <dd> |
214 <dd> |
217 name of the current profile |
215 name of the current profile |
218 </dd> |
216 </dd> |
219 </dl> |
217 </dl> |
220 <a NAME="IsortConfigurationDialog.on_sourceComboBox_currentTextChanged" ID="IsortConfigurationDialog.on_sourceComboBox_currentTextChanged"></a> |
218 <a NAME="IsortConfigurationDialog.on_sourceComboBox_currentTextChanged" ID="IsortConfigurationDialog.on_sourceComboBox_currentTextChanged"></a> |
221 <h4>IsortConfigurationDialog.on_sourceComboBox_currentTextChanged</h4> |
219 <h4>IsortConfigurationDialog.on_sourceComboBox_currentTextChanged</h4> |
222 <b>on_sourceComboBox_currentTextChanged</b>(<i>selection</i>) |
220 <b>on_sourceComboBox_currentTextChanged</b>(<i>selection</i>) |
223 |
|
224 <p> |
221 <p> |
225 Private slot to handle the selection of a configuration source. |
222 Private slot to handle the selection of a configuration source. |
226 </p> |
223 </p> |
|
224 |
227 <dl> |
225 <dl> |
228 |
226 |
229 <dt><i>selection</i> (str)</dt> |
227 <dt><i>selection</i> (str)</dt> |
230 <dd> |
228 <dd> |
231 text of the currently selected item |
229 text of the currently selected item |