• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

kalzium

Avogadro::Extension

Avogadro::Extension Class Reference

#include <extension.h>

Inheritance diagram for Avogadro::Extension:

Inheritance graph
[legend]

List of all members.


Detailed Description

Interface for adding extensions.

Author:
Donald Ephraim Curtis
This is a template class used for adding extensions to Avogadro. Implementing the pure virutal functions provides a mechanism for more functionality. Extensions work by allowing each extension to have an unlimited number of possible actions (each represented by a QAction). To perform an action the extension should implement performAction and perform the correct action based on the action it receives. The actual action should will be performed by the parent object (usually MainWindow) as a result of a redo call on the returned QUndoCommand from the performAction function. Thus, to implement functionality you should subclass QUndoCommand accordingly based on the required functionality of the extension and return the command based on the action being peformed.

Definition at line 58 of file src/extension.h.


Public Slots

virtual void setMolecule (Molecule *m)

Signals

void message (const QString &m)

Public Member Functions

virtual QList< QAction * > actions () const =0
virtual QString description () const
virtual QDockWidget * dockWidget ()
 Extension (QObject *parent)
virtual QString menuPath (QAction *action) const
virtual QString name () const
virtual QUndoCommand * performAction (QAction *action, GLWidget *widget)=0
virtual void readSettings (QSettings &settings)
virtual void writeSettings (QSettings &settings) const
virtual ~Extension ()

Constructor & Destructor Documentation

Avogadro::Extension::Extension ( QObject *  parent  )  [inline]

Definition at line 63 of file src/extension.h.

virtual Avogadro::Extension::~Extension (  )  [inline, virtual]

Definition at line 64 of file src/extension.h.


Member Function Documentation

virtual QList<QAction *> Avogadro::Extension::actions (  )  const [pure virtual]

Returns:
a list of actions which this widget can perform

QString Avogadro::Extension::description (  )  const [virtual]

Returns:
a brief description of what the extension does (e.g., tooltip)

Definition at line 34 of file extension.cpp.

QDockWidget * Avogadro::Extension::dockWidget (  )  [virtual]

Returns:
a list of dock widgets associated with this extensions

Definition at line 44 of file extension.cpp.

QString Avogadro::Extension::menuPath ( QAction *  action  )  const [virtual]

Returns:
the menu path for the specified action

Definition at line 39 of file extension.cpp.

void Avogadro::Extension::message ( const QString &  m  )  [signal]

Can be used to add messages to the message pane.

Parameters:
m the message to add to the message pane.

QString Avogadro::Extension::name (  )  const [virtual]

Returns:
the name of the extension

Definition at line 29 of file extension.cpp.

virtual QUndoCommand* Avogadro::Extension::performAction ( QAction *  action,
GLWidget *  widget 
) [pure virtual]

Parameters:
action the action that triggered the calls

Parameters:
molecule the molecule to perform the action on
widget the currently active GLWidget
messages a QTextEdit to push information too (allowing feedback to the user)
Returns:
an undo command for this action

void Avogadro::Extension::readSettings ( QSettings &  settings  )  [virtual]

read settings for this extension

Parameters:
settings settings variable to read settings from

Definition at line 59 of file extension.cpp.

void Avogadro::Extension::setMolecule ( Molecule *  m  )  [virtual, slot]

Definition at line 49 of file extension.cpp.

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

save settings for this extension

Parameters:
settings settings variable to write settings to

Definition at line 54 of file extension.cpp.


The documentation for this class was generated from the following files:
  • src/extension.h
  • extension.cpp

kalzium

Skip menu "kalzium"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal