Developer Documentation
Plugin Interfaces

Introduction

OpenFlipper provides a flexible plugin interface. Plugins can implement various interfaces.
Each interface provides special signals/slots or functions to communicate with the core or to react on special events. The most important interface is the BaseInterface. This Interface provides the core functionality for the plugin. E.g. loading the plugin, specifying its name and basic communication regarding object changes or view updates ( See BaseInterface for further details).
Additional functionality is provided by the other interfaces. For user interaction one typically uses the MouseInterface or KeyInterface which will provide events based on mouse or keyboard interaction.
The user interface of OpenFlipper can also be used by plugins. The MenubarInterface provides functions to add additional icons to the menubar while the ToolboxInterface can add widgets to the toolbox on the right of the OpenFlipper screen.

Usage of plugin interfaces

To use functions from one of the interfaces you have to do the following steps:

  • Include the interface header file in your plugins header file
  • derive your plugin from the Interface class defined in the interface header file
  • add Q_INTERFACES( InterfaceName ) macro to your plugin class containing only the name of the interface to be used
  • Add the signature of the signals you want to use to the signals of your class definition.
  • Add the signature of a slot you want to implement to the private slots of your class definition.

It is not necessary to implement all signals or slots from one of the interfaces (Except some functions from BaseInterface). The core application will only use the slots you define in the plugins header file and ignore all other functions.
If you recognize that an interface function of your plugin is not called, check if it is defined correctly in your plugin class and the signature is the same as in the interface.

OpenFlipper Base Interface

Base Interface

All plugins in OpenFlipper have to implement some basic functions from BaseInterface. They are used to integrate and manage the plugins by the core application. See Base Interface for details.

Interfaces

The following groups of Interfaces are available:

User Interface control

Object and Data Handling

Input Devices

Rendering Interface

Other Interfaces

Interfaces TODO for documentation:

Texture Interface

TextureInterface.png

Allows your plugin to provide a texture. ( TextureInterface )

View Interface

ViewInterface.png

This interface is used to add additional view widgets ( ViewInterface ).

Use Inifiles to store information

INIInterface.png

Receive an event if an ini file is opened by the application. ( INIInterface )