Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Related Pages  

Improv Class Reference

A Singleton class that is used to track the global state of the application. More...

#include <Improv.h>

Collaboration diagram for Improv:

Collaboration graph
[legend]

Public Methods

 ~Improv ()
 Destructor. More...

bool isPlaying (void)
 Check if the sequence is currently playing. More...

bool isReady (void)
 Check if the application is ready to play. More...

void setPlaying (bool opt)
 Start/stop the sequence from playing. More...

void addSrcWidget (SrcWidget *sw)
 Add a source widget to the application. More...

SrcWidgetgetSrcWidget (int sourceId)
 Return a pointer to the requested source widget. More...

int getWidgetCount (int sourceId, int position)
 Return the number of widgets at a given position, with a given sourceId. More...

QValueList< SrcWidget * > getSrcWidgetList (void)
 Return the doubly linked list containing all the source widgets. More...

void addSeqWidget (SeqWidget *sw)
 Add a sequence widget to the list This class keeps track of all the sequence widgets in the application through this function. More...

QValueList< SeqWidget * > getSeqWidgetList (void)
 Return the doubly linked list containing all the sequence widgets. More...

QPopupMenu * getPluginMenu (void)
 Return a pointer to the plugin menu. More...

void setFPS (int fps)
 Set the frame rate of playback. More...

void setUnlimitedFPS (bool toggle)
 Toggle unlimited frames per second. More...

void copyPictures (Picture *pic)
 Copies a picture to the internal buffers of all the app's sequence widgets When the source image is changed, this clears all the sequence widget internal buffers which are displayed and replaces them with one of matching format and attributes of the source picture. More...

void tick (int frames=1)
 Iterates through one cycle of animation/processing/display. More...

void process (Picture **in, Picture *out, int menuId, int inCount=1, int bufferId=-1, float *params=NULL)
 Perform image processing operation on a picture, given a selected menu Id. More...

QString * getPluginName (int id)
 Return the name of the plugin given a menu id. More...

int getPluginNumParams (int id)
 Return the number of input input paramters of the plugin operation given a menu id. More...


Static Public Methods

Improv * Instance (int argc, char **argv)
 Returns the instance of the class, or if one does not exist, creates an instance and then returns it. More...


Friends

class PluginMenu
class SeqWidget
class SrcWidget

Detailed Description

A Singleton class that is used to track the global state of the application.

This class is used to track the global state of the application and provide communications between the classes. This class is the guts of the whole app.


Constructor & Destructor Documentation

Improv::~Improv  
 

Destructor.

Deletes the instance of the class.


Member Function Documentation

void Improv::addSeqWidget SeqWidget   sw
 

Add a sequence widget to the list This class keeps track of all the sequence widgets in the application through this function.

Once a sequence is added it becomes available to display the result of image processing operations.

Parameters:
sw  pointer to SeqWidget to add
See also:
SeqWidget

void Improv::addSrcWidget SrcWidget   sw
 

Add a source widget to the application.

The source widgets provide the animation sequence or camera images, which are then processed by the sequence widgets.

See also:
getSrcWidget

void Improv::copyPictures Picture *    pic
 

Copies a picture to the internal buffers of all the app's sequence widgets When the source image is changed, this clears all the sequence widget internal buffers which are displayed and replaces them with one of matching format and attributes of the source picture.

Parameters:
pic  pointer to source picture

QPopupMenu * Improv::getPluginMenu void   
 

Return a pointer to the plugin menu.

Only one copy of the plugin menu is instantiated. It is tracked by this class, and can be referenced through this function

Returns:
pointer to the popup menu

QString * Improv::getPluginName int    id
 

Return the name of the plugin given a menu id.

Parameters:
id  menu id of plugin
Returns:
string of plugin name

int Improv::getPluginNumParams int    id
 

Return the number of input input paramters of the plugin operation given a menu id.

Parameters:
id  menu id of plugin
Returns:
string of plugin name

QValueList< SeqWidget * > Improv::getSeqWidgetList void   
 

Return the doubly linked list containing all the sequence widgets.

Returns:
the list of sequence widgets

SrcWidget * Improv::getSrcWidget int    sourceId
 

Return a pointer to the requested source widget.

Returns:
Pointer to the requested source widget.
Parameters:
sourceId  Id of the source widget.
See also:
addSrcWidget

QValueList< SrcWidget * > Improv::getSrcWidgetList void   
 

Return the doubly linked list containing all the source widgets.

Returns:
The list of source widgets.

int Improv::getWidgetCount int    sourceId,
int    position
 

Return the number of widgets at a given position, with a given sourceId.

In the application, all source widgets are at position 0 and sequence widgets are at subsequent positions.

Parameters:
sourceId  Id of the processing thread that the widget belongs to. -1 signifies all threads.
position  Position of the widget with in that thread.
Returns:
The number of widgets.

Improv * Improv::Instance int    argc,
char **    argv
[static]
 

Returns the instance of the class, or if one does not exist, creates an instance and then returns it.

Parameters:
argc  The number of command line arguments.
argv  The command line arguments.

bool Improv::isPlaying void   
 

Check if the sequence is currently playing.

Returns:
True if the sequence is playing, false otherwise.
See also:
setPlaying

bool Improv::isReady void   
 

Check if the application is ready to play.

Returns:
True if the all required widgets and variables have been initialised, false otherwise.

void Improv::process Picture **    in,
Picture *    out,
int    menuId,
int    inCount = 1,
int    bufferId = -1,
float *    params = NULL
 

Perform image processing operation on a picture, given a selected menu Id.

Parameters:
in  input pictures
out  output picture
menuId  menu Id selected
inCount  number of input pictures
bufferId  Id of the frame buffer to use (for functions that require multiple images). Default is -1, meaning no buffer is used.
params  array of floating point parameters

void Improv::setFPS int    fps
 

Set the frame rate of playback.

Sets the desired rate of playback. If possible, the source and sequence widgets will update synchronously to this rate unless the CPU is overloaded, in which case it will update as fast as possible.

Parameters:
fps  desired frame rate

void Improv::setPlaying bool    opt
 

Start/stop the sequence from playing.

Parameters:
opt  True to begin playback, false to stop it.
See also:
isPlaying

void Improv::setUnlimitedFPS bool    toggle
 

Toggle unlimited frames per second.

Parameters:
toggle 

void Improv::tick int    frames = 1
 

Iterates through one cycle of animation/processing/display.

Parameters:
frames  number of frames to jump (default is 1)


The documentation for this class was generated from the following files:
Generated on Tue Apr 1 11:01:17 2003 for ImprovQT by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002