<div dir="ltr"><div><div><div>I didn't know the selection data type, this is cool, thanks Victor!<br><br></div>and thanks Alexander, the example provider is really useful<br><br></div>All the best<br><br></div>s.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-28 19:09 GMT+01:00 Victor Olaya <span dir="ltr"><<a href="mailto:volayaf@gmail.com" target="_blank">volayaf@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">you can add a combo box in a script, using "selection" as data type,<br>
followed by the possible values separated by semicolons<br>
<br>
For instance<br>
<br>
method=selection First method;Another method;The last method<br>
<br>
Hope this helps<br>
<div class="HOEnZb"><div class="h5"><br>
2015-02-28 18:34 GMT+01:00 Alexander Bruy <<a href="mailto:alexander.bruy@gmail.com">alexander.bruy@gmail.com</a>>:<br>
> Hi Sergio,<br>
><br>
> look at the Example Provider code [0]. This is example developed specially<br>
> as tutorial how to implement own provider plugins for Processing.<br>
><br>
> [0] <a href="https://github.com/qgis/QGIS/tree/master/python/plugins/processing/algs/exampleprovider" target="_blank">https://github.com/qgis/QGIS/tree/master/python/plugins/processing/algs/exampleprovider</a><br>
><br>
> 2015-02-28 19:21 GMT+02:00 Sergio Vignali <<a href="mailto:vignalisergio30@gmail.com">vignalisergio30@gmail.com</a>>:<br>
>> Thank you Victor and Anita,<br>
>> maybe my message was not so clear. Yes I know how to write a simple script,<br>
>> but I would like to transform it in a plugin.<br>
>> The simple script, for that I know, does not allow to insert a combobox<br>
>> while in some plugin like LECOS there is one.<br>
>> It is difficult for me reading the plugin code and understand which part is<br>
>> for a normal plugin and which one for the processing toolbox, if you have<br>
>> any suggestion please let me know.<br>
>><br>
>> Best<br>
>><br>
>> Sergio<br>
>><br>
>> 2015-02-28 18:05 GMT+01:00 Anita Graser <<a href="mailto:anitagraser@gmx.at">anitagraser@gmx.at</a>>:<br>
>>><br>
>>> On Sat, Feb 28, 2015 at 5:47 PM, Sergio Vignali<br>
>>> <<a href="mailto:vignalisergio30@gmail.com">vignalisergio30@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Dear all,<br>
>>>> I would like to know if there is a tutorial or text that explains how to<br>
>>>> write a plugin for the processing toolbox. The QGis documentation explains<br>
>>>> how to write a plugin but I didn't find anything about the processing<br>
>>>> toolbox... So I would like to know the structure and the code necessary to<br>
>>>> add some script to the toolbox.<br>
>>><br>
>>><br>
>>> Hi Sergio,<br>
>>><br>
>>> If you just want to add a simple script to the Processing toolbox, you<br>
>>> don't need a plugin at all. All you need to do is go to Scripts | Tools |<br>
>>> Create new script in the toolbox. You can find many examples of how these<br>
>>> scripts have to look like in the following repository:<br>
>>><br>
>>> <a href="https://github.com/qgis/QGIS-Processing/tree/master/scripts" target="_blank">https://github.com/qgis/QGIS-Processing/tree/master/scripts</a><br>
>>><br>
>>> Best wishes<br>
>>> Anita<br>
>>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Sergio Vignali<br>
>><br>
>><br>
>> _______________________________________________<br>
>> Qgis-developer mailing list<br>
>> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
><br>
><br>
><br>
> --<br>
> Alexander Bruy<br>
> _______________________________________________<br>
> Qgis-developer mailing list<br>
> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Sergio Vignali<div><br></div></div></div>
</div>