Manual/Plugins

From Knotter
< Manual
Revision as of 09:13, 22 May 2013 by Mattia Basaglia (talk | contribs) (Created page with "==Available Plugins== There are no available plugins as of now. ==Plugin Structure== A plugin is described by a JSON file containing the metadata for the given plugin. The J...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Available Plugins

There are no available plugins as of now.

Plugin Structure

A plugin is described by a JSON file containing the metadata for the given plugin.

The JSON contains an object with the following fields:

name
Recommended, an unique string that identifies the plugin.
If missing is deduced from the file name.
type
Mandatory. Plugin type, see below for valid values.
If missing or with an invalid value the plugin won't be loaded.
description
Recommended. A textual description of the use of the plugin.
author
Suggested, name of the author of the plugin.
version
Suggested, plugin version.
license
Suggested, short identifier of the software license covering the plugin.
icon
Optional, a named icon form the theme or a file name.
How this is used can change depending on the plugin type.

The following fields are added at runtime and will be overwritten if present in the JSON file:

plugin_file
Absolute path to the plugin JSON file.
plugin_dir
Directory containing the JSON file.

Plugin Locations

Plugins are searched in the available data directories, the following directories are always searched:

  • datadir as per configure.sh.
  • current working directory/data
  • executable directory/data

Other directories depend on the system and Qt version. Check Help → About → Plugins for details

Plugin Types

test
A plugin for testing has no other use.
cusp
A new cusp style.

Planned Plugin Types

insert
Inserts new shapes
transform
Operates on the selection
edge
A new edge type;