<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Many thanks Larry !<br>
      <br>
      I eventually installed the weekly build. I used the test script
      you mentionned and it works great ! I had struggled for two days.<br>
      <br>
      Thank you again.<br>
      <br>
      Benoît <br>
    </div>
    <blockquote
cite="mid:CA+nQOR_Qva-AuZt3j=5SCaGjy+bS9yP1ATa_SzW_7VSHFVbG9A@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Benoît ,<br>
        <br>
        <div>
          <div class="gmail_extra">
            <div class="gmail_quote">On Tue, May 14, 2013 at 3:18 AM,
              Benoît Laurent <span dir="ltr"><<a
                  moz-do-not-send="true"
                  href="mailto:blaurent@heurisis.eu" target="_blank">blaurent@heurisis.eu</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex">
                <div text="#000000" bgcolor="#FFFFFF">
                  <div>Hello,<br>
                    <br>
                    Did I ask my question in the right place ? Can
                    someone help me ? Thank you in advance.<br>
                  </div>
                </div>
              </blockquote>
              <div><br>
              </div>
              <div>If you are using a master branch build, you can
                script the new labeling engine via Python. The following
                test script has some sample code [1].<br>
                <br>
                [1] <a moz-do-not-send="true"
href="https://github.com/qgis/Quantum-GIS/blob/master/tests/src/python/test_qgspallabeling.py">https://github.com/qgis/Quantum-GIS/blob/master/tests/src/python/test_qgspallabeling.py</a><br>
                <br>
              </div>
              <div>Regards,<br>
                <br>
              </div>
              <div>Larry<br>
              </div>
              <div> </div>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex">
                <div text="#000000" bgcolor="#FFFFFF">
                  <div> Regards,<br>
                    <br>
                    Benoît<br>
                    <br>
                    <br>
                  </div>
                  <blockquote type="cite">Hello, <br>
                    <br>
                    I am not sure to be on the right place to ask my
                    question. If not, I beg your pardon. <br>
                    <br>
                    I am trying the write a Python script that : <br>
                    - load a set of shapefile ; <br>
                    - automatically add labels based on a field ; <br>
                    - set the color, the size, etc. of my points. <br>
                    <br>
                    For the moment, I can load the shapefiles. I also
                    succeded in labeling but I am not able to move the
                    labels manually once created. Here is my piece of
                    code for labeling : <br>
                            def add_label(self, layer): <br>
                                    layer.enableLabels(1) <br>
                                    myLabel = layer.label() <br>
                                    myLabel.setLabelField(
                    QgsLabel.Text, 17) <br>
                                   
                    myLabel.layerAttributes().setAlignment(4) <br>
                    <br>
                    Is there an other way of doing this ? Is there
                    samples of code ? <br>
                    <br>
                    Thank you in advance. <br>
                    <br>
                    Benoît <br>
                    <br>
                    _______________________________________________ <br>
                    Qgis-developer mailing list <br>
                    <a moz-do-not-send="true"
                      href="mailto:Qgis-developer@lists.osgeo.org"
                      target="_blank">Qgis-developer@lists.osgeo.org</a>
                    <br>
                    <a moz-do-not-send="true"
                      href="http://lists.osgeo.org/mailman/listinfo/qgis-developer"
                      target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a>
                    <br>
                  </blockquote>
                  <br>
                  <br>
                  <div>-- <br>
                    <table style="" border="0" cellpadding="0"
                      cellspacing="0">
                      <tbody>
                        <tr>
                          <td style="padding-right:10px" valign="top"><a
                              moz-do-not-send="true"
                              href="http://www.heurisis.eu"
                              target="_blank"><img
                                moz-do-not-send="true" alt="Heurisis"
                                title="Heurisis" height="91" width="100"
                                border="0"></a><br>
                          </td>
                          <td style="border-left:1px solid
                            rgb(245,245,245);font-family:Trebuchet
                            MS;font-size:10pt;padding-right:10px;padding-left:10px"
                            valign="top"> <font face="Trebuchet ms"
                              size="1" color="#32312d">
                              <p
                                style="margin:0px;font-size:10pt;font-weight:bold">Benoît

                                LAURENT <span
                                  style="color:rgb(68,85,140)">Consultant
                                  Optimisation</span></p>
                              9, rue Alexandre Fleming, 49066 Angers
                              CEDEX<br>
                              <br>
                              <img moz-do-not-send="true" style="width:
                                17px; min-height: 15px;" alt="Portable">
                              +33 (0)6 28 03 81 32       </font><font
                              face="Trebuchet ms" size="1"
                              color="#32312d"><a moz-do-not-send="true"
                                href="mailto:blaurent@heurisis.eu"
                                target="_blank"><img
                                  moz-do-not-send="true" alt="e-mail :"
                                  align="top" border="0"> blaurent@heurisis.eu</a></font><br>
                            <font face="Trebuchet ms" size="1"
                              color="#32312d"> <img
                                moz-do-not-send="true" alt="tel :"
                                align="top"> <a moz-do-not-send="true"
                                href="tel:%2B33%20%280%299%2054%2030%2041%2014"
                                value="+33954304114" target="_blank">+33
                                (0)9 54 30 41 14</a>     </font><font
                              face="Trebuchet ms" size="1"
                              color="#32312d"><a moz-do-not-send="true"
                                href="http://www.heurisis.eu/"
                                target="_blank"><img
                                  moz-do-not-send="true" alt="site :"
                                  align="top" border="0"> www.heurisis.eu</a><br>
                            </font><font face="Trebuchet ms" size="1"
                              color="#32312d"><br>
                              <table style="font-family:Trebuchet MS"
                                border="0" cellpadding="3"
                                cellspacing="0">
                                <tbody>
                                  <tr>
                                    <td><br>
                                    </td>
                                    <td> <font face="Trebuchet ms"
                                        size="1" color="#32312d">
                                        Visitez le site <span
                                          style="font-family:Trebuchet
                                          ms;font-size:10pt;font-weight:bold"><a
                                            moz-do-not-send="true"
                                            href="http://www.optiscolaire.fr"
                                            target="_blank">www.optiscolaire.fr</a></span>
                                      </font> </td>
                                  </tr>
                                </tbody>
                              </table>
                            </font> </td>
                        </tr>
                        <tr>
                          <td colspan="2"> <font face="Trebuchet ms"
                              size="1" color="#c99716">
                              <p
                                style="color:rgb(201,151,22);text-align:center"><img
                                  moz-do-not-send="true" alt="éco :"> Avant
                                d’imprimer ce mail, pensez à
                                l’environnement</p>
                            </font> </td>
                        </tr>
                      </tbody>
                    </table>
                    <br style="clear:both" clear="all">
                  </div>
                </div>
                <br>
                _______________________________________________<br>
                Qgis-developer mailing list<br>
                <a moz-do-not-send="true"
                  href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
                <a moz-do-not-send="true"
                  href="http://lists.osgeo.org/mailman/listinfo/qgis-developer"
                  target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
                <br>
              </blockquote>
            </div>
            <br>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <style type="text/css">
<!--
body { font-family:Trebuchet MS; color:#32312d; background-color:#FFFFFF; }
a, a:link { color:#6392af; text-decoration:none; }
a:hover, a:focus { color:#8da628; text-decoration:none; }
-->
</style>
      <title>Signature_Benoit_Laurent</title>
      <table style="background-color: rgb(255, 255, 255);" border="0"
        cellpadding="0" cellspacing="0">
        <tbody>
          <tr>
            <td style="padding-right: 10px;" valign="top"><a
                href="http://www.heurisis.eu" target="_blank"><img
                  src="cid:part18.03030104.05040608@heurisis.eu"
                  alt="Heurisis" title="Heurisis" height="91"
                  width="100" border="0"></a><br>
            </td>
            <td style="border-left: 1px solid rgb(245, 245, 245);
              font-family: Trebuchet MS; font-size: 10pt; padding-right:
              10px; padding-left: 10px;" valign="top"> <font
                face="Trebuchet ms" size="1" color="#32312d">
                <p style="margin: 0px; font-size: 10pt; font-weight:
                  bold;">Benoît
                  LAURENT <span class="sstitre" style="color: rgb(68,
                    85, 140);">Consultant Optimisation</span></p>
                9, rue Alexandre Fleming, 49066 Angers CEDEX<br>
                <br>
                <img style="width: 17px; height: 15px;" alt="Portable"
                  src="cid:part20.09090601.00020903@heurisis.eu"> +33
                (0)6 28 03 81 32  
                    </font><font face="Trebuchet ms" size="1"
                color="#32312d"><a href="mailto:blaurent@heurisis.eu"><img
                    src="cid:part21.08070507.04040903@heurisis.eu"
                    alt="e-mail :" align="top" border="0"> blaurent@heurisis.eu</a></font><br>
              <font face="Trebuchet ms" size="1" color="#32312d"> <img
                  src="cid:part23.00040005.06070404@heurisis.eu"
                  alt="tel :" align="top"> +33 (0)9 54 30 41 14     </font><font
                face="Trebuchet ms" size="1" color="#32312d"><a
                  href="http://www.heurisis.eu/"><img
                    src="cid:part24.05060307.02010300@heurisis.eu"
                    alt="site :" align="top" border="0"> www.heurisis.eu</a><br>
              </font><font face="Trebuchet ms" size="1" color="#32312d"><br>
                <table style="font-family: Trebuchet MS;" border="0"
                  cellpadding="3" cellspacing="0">
                  <tbody>
                    <tr>
                      <td><br>
                      </td>
                      <td> <font face="Trebuchet ms" size="1"
                          color="#32312d"> Visitez le site <span
                            style="font-family: Trebuchet ms; font-size:
                            10pt; font-weight: bold;"><a
                              href="http://www.optiscolaire.fr">www.optiscolaire.fr</a></span>
                        </font> </td>
                    </tr>
                  </tbody>
                </table>
              </font> </td>
          </tr>
          <tr>
            <td colspan="2"> <font face="Trebuchet ms" size="1"
                color="#c99716">
                <p style="color: rgb(201, 151, 22); text-align: center;"><img
                    src="cid:part27.05070407.06040800@heurisis.eu"
                    alt="éco :"> Avant d’imprimer ce mail, pensez à
                  l’environnement</p>
              </font> </td>
          </tr>
        </tbody>
      </table>
      <br style="clear: both;" clear="all">
    </div>
  </body>
</html>