Space Comps
 All Classes Files Functions Variables
Public Slots | Signals | Public Member Functions | List of all members
QAlgorithm Class Reference

The QAlgorithm class is a QT wrapper for Algorithm. More...

#include <qalgorithm.h>

Inheritance diagram for QAlgorithm:

Public Slots

void run ()
 runs the Algorithm algs and emits the signal finished() once algs is done.
 
void stop ()
 stops the Algorithm algs.
 

Signals

void finished ()
 finished signal emited to begin the process of terminating the visualization and simulation.
 

Public Member Functions

 QAlgorithm (Algorithm *a, QObject *parent=0)
 QAlgorithm constructor calls the QObject constructor on its parent if it has one. It also initializes the Algorithm it is to interact with to the one given. More...
 
void setAlgorithm (Algorithm *a)
 setAlgorithm setter for the Algorithm it is wrapping and interacting with. More...
 
AlgorithmgetAlgorithm ()
 getAlgorithm getter for Algorithm currently wrapping. More...
 
std::vector< Particle * > getParticles ()
 getParticles getter for the list of Particle's in the environment, which the Algorithm algs knows about. More...
 
ParticlegetCenterOfGravity ()
 getCenterOfGravity getter for the Particle that represetns the center of gravity, which the Algorithm algs knows about. More...
 
double getSystemKE ()
 getSystemKE goes to the Algorithm algs to get the system kinetic energy. More...
 
double getSystemPE ()
 getSystemPE goes to the Algorithm algs to get the system potential energy. More...
 

Detailed Description

The QAlgorithm class is a QT wrapper for Algorithm.

It provides an interface for the visualization related (Q*) components to interact with the non-visualization related components.

Constructor & Destructor Documentation

QAlgorithm::QAlgorithm ( Algorithm a,
QObject *  parent = 0 
)
explicit

QAlgorithm constructor calls the QObject constructor on its parent if it has one. It also initializes the Algorithm it is to interact with to the one given.

Parameters
aAlgorithm to wrap and interact with.
parentQObject parent if there is one.

Member Function Documentation

Algorithm * QAlgorithm::getAlgorithm ( )

getAlgorithm getter for Algorithm currently wrapping.

Returns
Algorithm
Particle * QAlgorithm::getCenterOfGravity ( )

getCenterOfGravity getter for the Particle that represetns the center of gravity, which the Algorithm algs knows about.

Returns
Particle* saved in Algorithm algs.
std::vector< Particle * > QAlgorithm::getParticles ( )

getParticles getter for the list of Particle's in the environment, which the Algorithm algs knows about.

Returns
vector<Particle*> saved in Algorithm algs.
double QAlgorithm::getSystemKE ( )

getSystemKE goes to the Algorithm algs to get the system kinetic energy.

Returns
double, the kinetic energy which is calculated by Algorithm algs.
double QAlgorithm::getSystemPE ( )

getSystemPE goes to the Algorithm algs to get the system potential energy.

Returns
double, the potential energy which is calculated by Algorithm algs.
void QAlgorithm::setAlgorithm ( Algorithm a)

setAlgorithm setter for the Algorithm it is wrapping and interacting with.

Parameters
anew Algorithm to set.

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