<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi all,<br>
      <br>
      I need to add graphs generated by a plugin to compositions. I'm
      considering to develop a PluginComposerItem in the same spirit as
      PluginLayers, adding/removing a button in the toolbar when the
      plugin is registered/removed.<br>
      <br>
      Is that what was needed in your cases, or was a more general
      approach required (like the qgis plugin mechanism, being able to
      access the interface) ?<br>
      <br>
      V.<br>
      <br>
      Le 22/06/2015 18:05, G. Allegri a écrit :<br>
    </div>
    <blockquote
cite="mid:CAB4g1=wXOTSdM_YYq8PurmESiyk6A4g93nFPT2atqETc5t4cXQ@mail.gmail.com"
      type="cite">
      <p dir="ltr">The suggestion from John is exactly what we did too.
        And we also built a chart composer...</p>
      <p dir="ltr">It would be great to have the means to know what
        other teams are working to. It would save a lor of time and
        money and, probably, get better software from a shared effort ;)</p>
      <p dir="ltr">giovanni</p>
      <div class="gmail_quote">Il 22/giu/2015 19:31, "John Gitau" <<a
          moz-do-not-send="true" href="mailto:gkahiu@gmail.com">gkahiu@gmail.com</a>>
        ha scritto:<br type="attribution">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div dir="ltr">Hi Jakob,
            <div><br>
            </div>
            <div>A workaround would be to have a plugin that creates a
              new composer view object: </div>
            <div><br>
            </div>
            <div><i>custom_composer = self.iface.createNewComposer("My
                Composer")</i><br>
            </div>
            <div><br>
            </div>
            <div>Then get a reference to the main window in the composer
              view:</div>
            <div><br>
            </div>
            <div><i>main_window = custom_composer.composerWindow()</i><br>
            </div>
            <div><br>
            </div>
            <div>Then you can either add a new toolbar (and required
              actions) or append an action to the main toolbar. Have a
              look at the ComposerWrapper class for something similar we
              implemented for designing charts in the composer: <a
                moz-do-not-send="true">https://gist.github.com/gkahiu/06a43a589f9441736397</a></div>
            <div><br>
            </div>
            <div>Hope this is helpful.</div>
            <div><br>
            </div>
            <div>Cheers,</div>
            <div><br>
            </div>
            <div>John</div>
            <div><br>
            </div>
            <div class="gmail_extra">
              <div class="gmail_quote">On Mon, Jun 22, 2015 at 2:07 PM,
                G. Allegri <span dir="ltr"><<a
                    moz-do-not-send="true">giohappy@gmail.com</a>></span>
                wrote:<br>
                <blockquote class="gmail_quote" style="margin:0px 0px
                  0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                  <p dir="ltr">You can act on it but you can't custom
                    gui widgets to the Composer interface.<br>
                    I cannot check the code right know. I listen to a
                    specific (existing) composition opening but if I
                    remember correctly you can watch the Composer
                    opening too. </p>
                  <div>
                    <div>
                      <div class="gmail_quote">Il 22/giu/2015 17:19,
                        "Jakob Lanstorp" <<a moz-do-not-send="true">jlanstorp@gmail.com</a>>
                        ha scritto:<br type="attribution">
                        <blockquote class="gmail_quote"
                          style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi
                          Giovanni, thanks for the update. Another
                          solution would be to catch the<br>
                          event when a user starts an existing print
                          composer. Cannot in doc for the<br>
                          pyqgis API find anything for this. Anyone who
                          know is one can listens for a<br>
                          print composer to startup by the user and act
                          on it.<br>
                          <br>
                          <br>
                          <br>
                          -----<br>
                          Jakob Lanstorp<br>
                          --<br>
                          View this message in context: <a
                            moz-do-not-send="true" rel="noreferrer">http://osgeo-org.1560.x6.nabble.com/Building-plugin-for-Print-Composer-tp5212187p5212221.html</a><br>
                          Sent from the Quantum GIS - Developer mailing
                          list archive at Nabble.com.<br>
_______________________________________________<br>
                          Qgis-developer mailing list<br>
                          <a moz-do-not-send="true">Qgis-developer@lists.osgeo.org</a><br>
                          <a moz-do-not-send="true" rel="noreferrer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
                        </blockquote>
                      </div>
                    </div>
                  </div>
                  <br>
                  _______________________________________________<br>
                  Qgis-developer mailing list<br>
                  <a moz-do-not-send="true">Qgis-developer@lists.osgeo.org</a><br>
                  <a moz-do-not-send="true" rel="noreferrer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
                </blockquote>
              </div>
              <br>
            </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">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Qgis-developer mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/qgis-developer">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a></pre>
    </blockquote>
    <br>
  </body>
</html>