Outdated version of the documentation. Find the latest one here.

Scrierea unui plugin Processing

În funcție de tipul de plugin avut în vedere, adăugarea funcționalității acestuia ca algoritm (sau ca set) pentru Processing, ar putea fi o opțiune mai bună. Acest lucru ar consta într-o mai bună integrare în cadrul QGIS, o funcționalitate suplimentară (din moment ce poate fi rulat din cadrul componentelor Processing, cum ar fi modelatorul sau interfața de prelucrare în serie), precum și un timp de dezvoltare mai rapid (atât timp cât Processing vă va scuti de o mare parte din muncă).

This document describes how to create a new plugin that adds its functionality as Processing algorithms.

There are two main mechanisms for doing that:

  • Creating a plugin that adds an algorithm provider: This options is more complex, but provides more flexibility
  • Creating a plugin that contains a set of processing scripts: The simplest solution, you just need a set of Processing script files.

Creating a plugin that adds an algorithm provider

To create an algorithm provider, follow these steps:

  • Instalarea Plugin Builder

  • Creați un plugin nou, utilizând Plugin Builder. În cazul în care Plugin Builder vă cere șablonul de utilizat, selectați “Furnizor Processing”.

  • Plugin-ul creat conține un furnizor cu un singur algoritm. Atât fișierul furnizorului cât și cel al algoritmului sunt complet comentate și conțin informații cu privire la modul de modificare a furnizorului și de adăugare a algoritmilor suplimentari.

Creating a plugin that contains a set of processing scripts

To create a set of processing scripts, follow these steps:

  • Create your scripts as described in the PyQGIS cookbook. All the scripts that you want to add, you should have them available in the Processing toolbox.
  • In the Scripts/Tools group in the Processing toolbox, double-click on the Create script collection plugin item. You will see a window where you should select the scripts to add to the plugin (from the set of available ones in the toolbox), and some additional information needed for the plugin metadata.
  • Click on OK and the plugin will be created.
  • You can add additional scripts to the plugin by adding scripts python files to the scripts folder in the resulting plugin folder.