Avogadro  1.1.0
Public Types | Public Member Functions
Avogadro::Plugin Class Reference

Interface for plugins. More...

#include <avogadro/plugin.h>

Inheritance diagram for Avogadro::Plugin:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Type {
  EngineType = 0, ToolType, ExtensionType, ColorType,
  OtherType, TypeCount
}

Public Member Functions

 Plugin (QObject *parent=NULL)
virtual ~Plugin ()
virtual Plugin::Type type () const =0
virtual QString identifier () const =0
virtual QString name () const =0
virtual QString description () const
virtual QString license () const
virtual QWidgetsettingsWidget ()
virtual void writeSettings (QSettings &settings) const
virtual void readSettings (QSettings &settings)

Detailed Description

Interface for plugins.

Author:
Tim Vandermeersch

This is a template class for plugins like tools, engines, extensions, colors, ...


Constructor & Destructor Documentation

Avogadro::Plugin::Plugin ( QObject parent = NULL)

Constructor

Destructor


Member Function Documentation

Returns:
A description of the plugin.

Reimplemented in Avogadro::Engine, Avogadro::PythonExtension, Avogadro::PythonEngine, and Avogadro::PythonTool.

References QObject::tr().

Referenced by Avogadro::Tool::activateAction().

virtual QString Avogadro::Plugin::identifier ( ) const [pure virtual]
QString Avogadro::Plugin::license ( ) const [virtual]
Returns:
The license applied to the plugin.
Note:
This defaults to GPL2+, and must be a license compatible with a GPL2 only library, as all plugins link to Avogadro and OpenBabel.

References QObject::tr().

virtual QString Avogadro::Plugin::name ( ) const [pure virtual]
Returns:
The translated name of the plugin.

Reimplemented from QObject.

Implemented in Avogadro::Color, Avogadro::Engine, Avogadro::PythonExtension, Avogadro::PythonEngine, and Avogadro::PythonTool.

Referenced by Avogadro::Tool::activateAction().

void Avogadro::Plugin::readSettings ( QSettings settings) [virtual]

Read in the settings that have been saved for the plugin instance.

Reimplemented in Avogadro::Engine, Avogadro::Tool, Avogadro::Extension, Avogadro::PythonExtension, Avogadro::PythonTool, and Avogadro::PythonEngine.

Returns:
a QWidget containing the engine settings or 0 if no settings widget is available.

Reimplemented in Avogadro::Engine, Avogadro::Tool, Avogadro::PythonTool, and Avogadro::PythonEngine.

virtual Plugin::Type Avogadro::Plugin::type ( ) const [pure virtual]
Returns:
The type of the plugin.

Implemented in Avogadro::Color, Avogadro::Engine, Avogadro::Extension, and Avogadro::Tool.

void Avogadro::Plugin::writeSettings ( QSettings settings) const [virtual]

Write the plugin settings so that they can be saved between sessions.

Reimplemented in Avogadro::Engine, Avogadro::Tool, Avogadro::Extension, Avogadro::PythonExtension, Avogadro::PythonTool, and Avogadro::PythonEngine.


The documentation for this class was generated from the following files: