<div>Some ideas inline below</div><div><br></div><img width="0" height="0" class="mailtrack-img" alt="" style="display:flex" src="https://mailtrack.io/trace/mail/w/cWdpcy1kZXZlbG9wZXJAbGlzdHMub3NnZW8ub3Jn/3a9011160c2382650037011906bb352186946f4d.png?u=8747767" ><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 23, 2023 at 4:33 PM Bo Victor Thomsen via QGIS-Developer <<a href="mailto:qgis-developer@lists.osgeo.org" target="_blank">qgis-developer@lists.osgeo.<wbr>org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u>

  

    
  
  <div>
    <p>Hi list -<br>
    </p>
    <p>I apologize for the cross-posting to this mailing list from
      qgis-user. But I hope, that somebody has the answers to the
      questions...  <br>
    </p>
    <div>I have a couple of (probably
      dumb) questions on how to use the "QgsProcessingAlgorithm" class.
      <br>
      <ul>
        <li>A have a lot parameter inputs placed in the "advanced"
          section af the processing input dialog. It's parameters that
          seldom has to be changed.<br>
          How do I present the "Avanced" section <i>not</i> unfolded?
          The default is to unfold this section and thus possibly
          confuse users by showing a lot of seldom changed parameters. <br>
          <br></li></ul></div></div></blockquote><div>This behavior seems to be controlled on the user side and is sticky. In my QGIS install, when I collapse the 'Advanced' section in an algorithm, all subsequent algorithms have that section collapsed.  There must be a setting that you can probably toggle via PyQGIS. Maybe someone else here knows.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><ul><li>
        </li>
        <li>One of my input parameters is a
          "QgsProcessingParameterString" parameter that will contain a
          password. <br>
          Can I obfuscate the parameter input, i.e showing '*******'
          instead of the password ?<br>
          <br></li></ul></div></div></blockquote><div>This is generally discouraged in favor of using the Auth manager. Could you store the password there and retrieve it in your script? </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><ul><li>
        </li>
        <li>the "<wbr>QgsProcessingParameterFeatureS<wbr>ource" method creates a
          drop-down with names of layers in the map <i>and</i> a
          checkbox with the label "Selected features only". Is it
          possible to set the checkmark automatically when showing the
          processing userdialog ? And how ??</li></ul></div></div></blockquote><div><br></div><div>I don't think this is possible. As a workaround, if you always want to use selected features when available, you can use QgsProcessingParameterVectorLa<wbr>yer input instead, check if there are selected layers when processing it and get only selected features.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><ul><li> <br>
        </li>
      </ul>
      <pre cols="72">-- 
Med venlig hilsen / Best regards

Bo Victor Thomsen</pre>
    </div>
  </div>

______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank" data-saferedirecturl="https://www.google.com/url?q=https://lists.osgeo.org/mailman/listinfo/qgis-developer&source=gmail&ust=1700908214626000&usg=AOvVaw2lO2nzS9hwzCatjDaOlzwH"><span id="m_971071582789742298mt-tracked-link_0_1700817139195" style="color:red"></span>https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank" data-saferedirecturl="https://www.google.com/url?q=https://lists.osgeo.org/mailman/listinfo/qgis-developer&source=gmail&ust=1700908214626000&usg=AOvVaw2lO2nzS9hwzCatjDaOlzwH"><span id="m_971071582789742298mt-tracked-link_0_1700817139196" style="color:red"></span>https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
</blockquote></div>