Skip to content

Commit

Permalink
Deployed 849f08b with MkDocs version: 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
3liz-bot committed Dec 11, 2024
1 parent 54e9659 commit d825663
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions extension-graphique/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2240,6 +2240,37 @@ <h3 id="lancer-le-dialogue-de-processing">Lancer le dialogue de Processing<a cla
<span class="p">)</span>
<span class="n">dialog</span><span class="o">.</span><span class="n">show</span><span class="p">()</span>
</code></pre></div></td></tr></table></div>
<p>Si on ne souhaite pas afficher la fenetre Processing : </p>
<div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span></span><span class="normal"> 1</span>
<span class="normal"> 2</span>
<span class="normal"> 3</span>
<span class="normal"> 4</span>
<span class="normal"> 5</span>
<span class="normal"> 6</span>
<span class="normal"> 7</span>
<span class="normal"> 8</span>
<span class="normal"> 9</span>
<span class="normal">10</span>
<span class="normal">11</span>
<span class="normal">12</span>
<span class="normal">13</span>
<span class="normal">14</span>
<span class="normal">15</span></pre></div></td><td class="code"><div><pre><span></span><code><span class="c1"># Imports en haut</span>
<span class="kn">from</span> <span class="nn">qgis.PyQt.QtCore</span> <span class="kn">import</span> <span class="n">Qt</span>
<span class="kn">from</span> <span class="nn">qgis.utils</span> <span class="kn">import</span> <span class="n">OverrideCursor</span>
<span class="kn">from</span> <span class="nn">qgis</span> <span class="kn">import</span> <span class="n">processing</span>

<span class="c1"># Dans la fonction &quot;traitement_1_clicked&quot;, pour lancer Processing sans l&#39;interface graphique, mais avec un curseur &quot;attente&quot;.</span>
<span class="k">with</span> <span class="n">OverrideCursor</span><span class="p">(</span><span class="n">Qt</span><span class="o">.</span><span class="n">WaitCursor</span><span class="p">):</span>
<span class="n">processing</span><span class="o">.</span><span class="n">runAndLoadResults</span><span class="p">(</span>
<span class="s2">&quot;native:buffer&quot;</span><span class="p">,</span>
<span class="p">{</span>
<span class="s1">&#39;INPUT&#39;</span><span class="p">:</span> <span class="n">layer</span><span class="p">,</span>
<span class="s1">&#39;DISTANCE&#39;</span><span class="p">:</span> <span class="mi">2000</span><span class="p">,</span>
<span class="s1">&#39;OUTPUT&#39;</span><span class="p">:</span> <span class="s1">&#39;TEMPORARY_OUTPUT&#39;</span><span class="p">,</span>
<span class="p">}</span>
<span class="p">)</span>
</code></pre></div></td></tr></table></div>
<p>Pour rappel, nous ne sommes pas obligé d'ouvrir la fenêtre de Processing, on peut directement faire <code>processing.run</code>,
lire le <a href="../script-processing/#utiliser-processing-en-python-avec-un-algorithme-existant">chapitre précédent</a>. Il ne
faut pas oublier de donner la variable <code>layer</code> à notre <code>INPUT</code> si vous copiez/coller le code de <code>processing.run</code> du
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json

Large diffs are not rendered by default.

0 comments on commit d825663

Please sign in to comment.