PositionView Class Reference

Class which draws the positions. More...

#include <positionview.h>

Inheritance diagram for PositionView:

Inheritance graph
[legend]
Collaboration diagram for PositionView:

Collaboration graph
[legend]
List of all members.

Public Slots

void updatePositionInformation (int width, int height, QImage backgroundImage, bool newOrientation, bool active)
 Updates the information needed to draw the position of the animal.
void displayTimeFrame (long start, long timeFrameWidth)
 Updates the postions to show between start and start + timeFrameWidth.
void dataAvailable (Array< dataType > &data, QObject *initiator)
 Displays the data that has been retrieved.
void print (QPainter &printPainter, QPaintDeviceMetrics &metrics, bool whiteBackground, QImage backgroundForPrinting=QImage())
 Prints the currently display information on a printer via the painter printPainter.
void changeBackgroundColor (QColor color)
 Changes the color of the background.
void dataAvailable (QDict< EventData > &eventsData, QMap< QString, QValueList< int > > &selectedEvents, QDict< ItemColors > &providerItemColors, QObject *initiator, double samplingRate)
 Displays the event data that has been retrieved.
void updateEventDisplay ()
 Updates the event display if any event are available.
void eventColorUpdate (QString name, int eventId, bool active)
 Changes the color of an event.
void updateDrawing ()
 Update the information presented in the view.
void addEventProvider ()
void removeEventProvider (QString name, bool active, bool lastFile)
 Removes a provider of event data.
void setEventsInPositionView (bool shown)
 Sets if events are displayed in the view.
void updatePositionInformation (int width, int height, QImage backgroundImage, bool newOrientation, bool active)
 Updates the information needed to draw the position of the animal.
void displayTimeFrame (long start, long timeFrameWidth)
 Updates the postions to show between start and start + timeFrameWidth.
void dataAvailable (Array< dataType > &data, QObject *initiator)
 Displays the data that has been retrieved.
void print (QPainter &printPainter, QPaintDeviceMetrics &metrics, bool whiteBackground, QImage backgroundForPrinting=QImage())
 Prints the currently display information on a printer via the painter printPainter.
void changeBackgroundColor (QColor color)
 Changes the color of the background.
void dataAvailable (QDict< EventData > &eventsData, QMap< QString, QValueList< int > > &selectedEvents, QDict< ItemColors > &providerItemColors, QObject *initiator, double samplingRate)
 Displays the event data that has been retrieved.
void updateEventDisplay ()
 Updates the event display if any event are available.
void eventColorUpdate (QString name, int eventId, bool active)
 Changes the color of an event.
void updateDrawing ()
 Update the information presented in the view.
void addEventProvider ()
void removeEventProvider (QString name, bool active, bool lastFile)
 Removes a provider of event data.
void setEventsInPositionView (bool shown)
 Sets if events are displayed in the view.

Public Member Functions

 PositionView (PositionsProvider &provider, GlobalEventsProvider &globalEventProvider, QImage backgroundImage, long start, long timeFrameWidth, bool showEvents, int windowTopLeft=-500, int windowBottomRight=1001, QWidget *parent=0, const char *name=0, QColor backgroundColor=Qt::black, int minSize=100, int maxSize=4000, int border=0)
 Constructor.
 PositionView (PositionsProvider &provider, GlobalEventsProvider &globalEventProvider, QImage backgroundImage, long start, long timeFrameWidth, bool showEvents, int windowTopLeft=-500, int windowBottomRight=1001, QWidget *parent=0, const char *name=0, QColor backgroundColor=Qt::black, int minSize=100, int maxSize=4000, int border=0)
 Constructor.

Protected Member Functions

void drawContents (QPainter *p)
 Draws the contents of the frame.
void resizeEvent (QResizeEvent *event)
 The view responds to a resize event.
void drawContents (QPainter *p)
 Draws the contents of the frame.
void resizeEvent (QResizeEvent *event)
 The view responds to a resize event.

Detailed Description

Class which draws the positions.

Author:
Lynn Hazan


Constructor & Destructor Documentation

PositionView::PositionView ( PositionsProvider provider,
GlobalEventsProvider globalEventProvider,
QImage  backgroundImage,
long  start,
long  timeFrameWidth,
bool  showEvents,
int  windowTopLeft = -500,
int  windowBottomRight = 1001,
QWidget *  parent = 0,
const char *  name = 0,
QColor  backgroundColor = Qt::black,
int  minSize = 100,
int  maxSize = 4000,
int  border = 0 
)

Constructor.

Parameters:
provider a reference on the provider of the position data.
globalEventProvider a reference on the global event provider.
backgroundImage image used as background.
start starting time in miliseconds.
timeFrameWidth time window in miliseconds.
showEvents 1 if events are displayed in the view, 0 otherwise.
windowTopLeft the top-left corner of the window (QRect corresponding to the part of the drawing which will actually be drawn onto the widget).
windowBottomRight bottom-right corner of the window (QRect corresponding to the part of the drawing which will actually be drawn onto the widget).
parent the parent QWidget.
name name of the widget (can be used for introspection).
backgroundColor color used as background.
minSize minumum size of the view.
maxSize maximum size of the view.
border size of the border between the frame and the contents.

PositionView::PositionView ( PositionsProvider provider,
GlobalEventsProvider globalEventProvider,
QImage  backgroundImage,
long  start,
long  timeFrameWidth,
bool  showEvents,
int  windowTopLeft = -500,
int  windowBottomRight = 1001,
QWidget *  parent = 0,
const char *  name = 0,
QColor  backgroundColor = Qt::black,
int  minSize = 100,
int  maxSize = 4000,
int  border = 0 
)

Constructor.

Parameters:
provider a reference on the provider of the position data.
globalEventProvider a reference on the global event provider.
backgroundImage image used as background.
start starting time in miliseconds.
timeFrameWidth time window in miliseconds.
showEvents 1 if events are displayed in the view, 0 otherwise.
windowTopLeft the top-left corner of the window (QRect corresponding to the part of the drawing which will actually be drawn onto the widget).
windowBottomRight bottom-right corner of the window (QRect corresponding to the part of the drawing which will actually be drawn onto the widget).
parent the parent QWidget.
name name of the widget (can be used for introspection).
backgroundColor color used as background.
minSize minumum size of the view.
maxSize maximum size of the view.
border size of the border between the frame and the contents.


Member Function Documentation

void PositionView::updatePositionInformation ( int  width,
int  height,
QImage  backgroundImage,
bool  newOrientation,
bool  active 
) [slot]

Updates the information needed to draw the position of the animal.

Parameters:
width video image width.
height video image height.
backgroundImage image used as a background for the position view.
newOrientation true if the image has been transformed (rotate and or flip), false otherwise.
active true if the view is the active one, false otherwise.

void PositionView::displayTimeFrame ( long  start,
long  timeFrameWidth 
) [slot]

Updates the postions to show between start and start + timeFrameWidth.

Parameters:
start starting time in miliseconds.
timeFrameWidth time window in miliseconds.

void PositionView::dataAvailable ( Array< dataType > &  data,
QObject *  initiator 
) [slot]

Displays the data that has been retrieved.

Parameters:
data n column array containing the position of the animal. The two first columns contain the position of the first spot and the following optional pair of columns contain the position of optional spots.
initiator instance requesting the data.

void PositionView::print ( QPainter &  printPainter,
QPaintDeviceMetrics &  metrics,
bool  whiteBackground,
QImage  backgroundForPrinting = QImage() 
) [slot]

Prints the currently display information on a printer via the painter printPainter.

Does not print zoomed display.

Parameters:
printPainter painter on a printer.
metrics object providing informatin about the printer.
whiteBackground true if the printed background has to be white, false otherwise.
backgroundForPrinting special background to be used for printing.

void PositionView::dataAvailable ( QDict< EventData > &  eventsData,
QMap< QString, QValueList< int > > &  selectedEvents,
QDict< ItemColors > &  providerItemColors,
QObject *  initiator,
double  samplingRate 
) [slot]

Displays the event data that has been retrieved.

Parameters:
eventsData dictionary between the event provider names and the event data and status.
selectedEvents map between the event provider names and the list of currently selected events.
providerItemColors dictionary between the provider names and the item color lists.
initiator instance requesting the data.
samplingRate sampling rate of the current open data file in Hz.

void PositionView::eventColorUpdate ( QString  name,
int  eventId,
bool  active 
) [slot]

Changes the color of an event.

Parameters:
name name use to identified the event provider containing the updated event.
eventId id of the event to redraw.
active true if the view is the active one, false otherwise.

void PositionView::removeEventProvider ( QString  name,
bool  active,
bool  lastFile 
) [slot]

Removes a provider of event data.

Parameters:
name name use to identified the event provider.
active true if the view is the active one, false otherwise.
lastFile true if the event file removed is the last event provider, false otherwise.

void PositionView::setEventsInPositionView ( bool  shown  )  [slot]

Sets if events are displayed in the view.

Parameters:
shown 1 if events are displayed in the view, 0 otherwise.

void PositionView::drawContents ( QPainter *  p  )  [protected, virtual]

Draws the contents of the frame.

Parameters:
p painter used to draw the contents

Implements BaseFrame.

void PositionView::resizeEvent ( QResizeEvent *  event  )  [inline, protected, virtual]

The view responds to a resize event.

The bachground image is recomputed.

Parameters:
event resize event.

Reimplemented from BaseFrame.

void PositionView::updatePositionInformation ( int  width,
int  height,
QImage  backgroundImage,
bool  newOrientation,
bool  active 
) [slot]

Updates the information needed to draw the position of the animal.

Parameters:
width video image width.
height video image height.
backgroundImage image used as a background for the position view.
newOrientation true if the image has been transformed (rotate and or flip), false otherwise.
active true if the view is the active one, false otherwise.

void PositionView::displayTimeFrame ( long  start,
long  timeFrameWidth 
) [slot]

Updates the postions to show between start and start + timeFrameWidth.

Parameters:
start starting time in miliseconds.
timeFrameWidth time window in miliseconds.

void PositionView::dataAvailable ( Array< dataType > &  data,
QObject *  initiator 
) [slot]

Displays the data that has been retrieved.

Parameters:
data n column array containing the position of the animal. The two first columns contain the position of the first spot and the following optional pair of columns contain the position of optional spots.
initiator instance requesting the data.

void PositionView::print ( QPainter &  printPainter,
QPaintDeviceMetrics &  metrics,
bool  whiteBackground,
QImage  backgroundForPrinting = QImage() 
) [slot]

Prints the currently display information on a printer via the painter printPainter.

Does not print zoomed display.

Parameters:
printPainter painter on a printer.
metrics object providing informatin about the printer.
whiteBackground true if the printed background has to be white, false otherwise.
backgroundForPrinting special background to be used for printing.

void PositionView::dataAvailable ( QDict< EventData > &  eventsData,
QMap< QString, QValueList< int > > &  selectedEvents,
QDict< ItemColors > &  providerItemColors,
QObject *  initiator,
double  samplingRate 
) [slot]

Displays the event data that has been retrieved.

Parameters:
eventsData dictionary between the event provider names and the event data and status.
selectedEvents map between the event provider names and the list of currently selected events.
providerItemColors dictionary between the provider names and the item color lists.
initiator instance requesting the data.
samplingRate sampling rate of the current open data file in Hz.

void PositionView::eventColorUpdate ( QString  name,
int  eventId,
bool  active 
) [slot]

Changes the color of an event.

Parameters:
name name use to identified the event provider containing the updated event.
eventId id of the event to redraw.
active true if the view is the active one, false otherwise.

void PositionView::removeEventProvider ( QString  name,
bool  active,
bool  lastFile 
) [slot]

Removes a provider of event data.

Parameters:
name name use to identified the event provider.
active true if the view is the active one, false otherwise.
lastFile true if the event file removed is the last event provider, false otherwise.

void PositionView::setEventsInPositionView ( bool  shown  )  [slot]

Sets if events are displayed in the view.

Parameters:
shown 1 if events are displayed in the view, 0 otherwise.

void PositionView::drawContents ( QPainter *  p  )  [protected, virtual]

Draws the contents of the frame.

Parameters:
p painter used to draw the contents

Implements BaseFrame.

void PositionView::resizeEvent ( QResizeEvent *  event  )  [inline, protected, virtual]

The view responds to a resize event.

The bachground image is recomputed.

Parameters:
event resize event.

Reimplemented from BaseFrame.


The documentation for this class was generated from the following files:
Generated on Mon Sep 17 20:47:34 2007 for NeuroScope by  doxygen 1.5.1