quote start The beta is the seed of something huge quote end

Example plugins


Let me show you some plugin examples, this is the Home plugin: (slide-6a)

As you can see it's really simple, just extends the PluginLauncher class, set its attributes, like name, author, in witch menu will be displayed, help menu in this case, label in GetText format, and icon. Then we must define what is the action to do when the plugin is launched, this time, open the nathive website in the default web browser using the Python webbrowser module.

Another example, this is an empty template for the tool plugins: (slide-6b)

Extends, name, author, icon (this time file based)... load state from user config if you want... this are enable and disable optional methods, are called when the tool is selected or unselected... mouse input optional methods, button press, in this method usually the programmer manipulates the document (main.documents...), the same for motion and release... and keyboard input optional method... and finally the interface to be displayed in the sidebar.

As you can see (slide-6c) make plugins for Nathive is not a aeronautical science, it's just set a few methods, in addition you can access others objects data with the main object, so it's really simple, I hope you enjoy it.

Previous page | Next page