NeuroscopeApp Class Reference

The Neuroscope main window and central class. More...

#include <neuroscope.h>

Collaboration diagram for NeuroscopeApp:

Collaboration graph
[legend]
List of all members.

Public Slots

void slotEventModified (QString providerName, int selectedEventId, double time, double newTime)
 Called when an event has been modified.
void removeEvent ()
 Deletes the selected event.
void slotEventRemoved (QString providerName, int selectedEventId, double time)
 Called when an event has been removed.
void addEvent ()
 Adds an event.
void slotEventGroupSelected (QString eventGroupName)
 Called when an event file has been selected in the event palette.
void slotEventAdded (QString providerName, QString addedEventDescription, double time)
 Called when an event has been added.
void positionViewClosed ()
 Update the positions menu due to the closing of the current position view.
void slotNoClustersToBrowse ()
 Disables clusters browsing as no clusters have been selected for browsing.
void slotClustersToBrowse ()
 Enables clusters browsing as some clusters have been selected for browsing.
void slotNoEventsToBrowse ()
 Disables events browsing as no events have been selected for browsing.
void slotEventsToBrowse ()
 Enables events browsing as some events have been selected for browsing.
void slotEventModified (QString providerName, int selectedEventId, double time, double newTime)
 Called when an event has been modified.
void removeEvent ()
 Deletes the selected event.
void slotEventRemoved (QString providerName, int selectedEventId, double time)
 Called when an event has been removed.
void addEvent ()
 Adds an event.
void slotEventGroupSelected (QString eventGroupName)
 Called when an event file has been selected in the event palette.
void slotEventAdded (QString providerName, QString addedEventDescription, double time)
 Called when an event has been added.
void positionViewClosed ()
 Update the positions menu due to the closing of the current position view.
void slotNoClustersToBrowse ()
 Disables clusters browsing as no clusters have been selected for browsing.
void slotClustersToBrowse ()
 Enables clusters browsing as some clusters have been selected for browsing.
void slotNoEventsToBrowse ()
 Disables events browsing as no events have been selected for browsing.
void slotEventsToBrowse ()
 Enables events browsing as some events have been selected for browsing.

Public Member Functions

 NeuroscopeApp ()
 Construtor of NeuroscopeApp, calls all init functions to create the application.
void openDocumentFile (const KURL &url=0)
 Opens a file, only one document at the time is allowed.
NeuroscopeDocgetDocument () const
 Returns a pointer to the current document connected to the NeuroscopeApp instance and is used by the View class to access the document object's methods.
NeuroscopeViewactiveView ()
 Returns the view contains in the active display.
void setFileProperties (QString channelNb, QString SR, QString resolution, QString offset, QString voltageRange, QString amplification, QString screenGain, QString timeWindow)
 Sets the current file properties.
void displayFileProperties (int channelNb, double SR, int resolution, int offset, int voltageRange, int amplification, float screenGain, int currentNbSamples, int currentPeakIndex, double videoSamplingRate, int width, int height, QString backgroundImage, int rotation, int flip, double acquisitionSystemSamplingRate, bool isaDatFile, bool positionsBackground, QString traceBackgroundImage)
 Displays the properties which will be used for the current file (number of channels, sampling rate of the dat file and eeg file).
void resizePalettePanel ()
 Resize the panel containing the palettes.
void createDisplay (QValueList< int > *channelsToDisplay, bool verticalLines, bool raster, bool waveforms, bool showLabels, bool multipleColumns, bool greyMode, QValueList< int > offsets, QValueList< int > channelGains, QValueList< int > selectedChannels, long startTime, long duration, int rasterHeight, QString tabLabel="")
 Creates a new display.
void createClusterPalette (QString clusterFileId)
 Creates a cluster palette and adds a group corresponding to the cluster file identified by clusterFileId.
void addClusterFile (QString clusterFileId)
 Adds a group corresponding to the cluster file identified by clusterFileId to the existing cluster palette.
void createEventPalette (QString eventFileId)
 Creates a event palette and adds a group corresponding to the event file identified by eventFileId.
void addEventFile (QString eventFileId)
 Adds a group corresponding to the event file identified by eventFileId to the existing event palette.
ItemPalettegetEventPalette ()
 Returns the event palette.
QColor getBackgroundColor () const
 Returns the current background color.
void positionFileLoaded ()
 Informs the application that a position file has been loaded from the session file.
bool isClusterFilesLoaded () const
 Tells if there are cluster files loaded.
bool isApositionFileLoaded () const
 Tells if there is a position file loaded.
 NeuroscopeApp ()
 Construtor of NeuroscopeApp, calls all init functions to create the application.
void openDocumentFile (const KURL &url=0)
 Opens a file, only one document at the time is allowed.
NeuroscopeDocgetDocument () const
 Returns a pointer to the current document connected to the NeuroscopeApp instance and is used by the View class to access the document object's methods.
NeuroscopeViewactiveView ()
 Returns the view contains in the active display.
void setFileProperties (QString channelNb, QString SR, QString resolution, QString offset, QString voltageRange, QString amplification, QString screenGain, QString timeWindow)
 Sets the current file properties.
void displayFileProperties (int channelNb, double SR, int resolution, int offset, int voltageRange, int amplification, float screenGain, int currentNbSamples, int currentPeakIndex, double videoSamplingRate, int width, int height, QString backgroundImage, int rotation, int flip, double acquisitionSystemSamplingRate, bool isaDatFile, bool positionsBackground, QString traceBackgroundImage)
 Displays the properties which will be used for the current file (number of channels, sampling rate of the dat file and eeg file).
void resizePalettePanel ()
 Resize the panel containing the palettes.
void createDisplay (QValueList< int > *channelsToDisplay, bool verticalLines, bool raster, bool waveforms, bool showLabels, bool multipleColumns, bool greyMode, QValueList< int > offsets, QValueList< int > channelGains, QValueList< int > selectedChannels, long startTime, long duration, int rasterHeight, QString tabLabel="")
 Creates a new display.
void createClusterPalette (QString clusterFileId)
 Creates a cluster palette and adds a group corresponding to the cluster file identified by clusterFileId.
void addClusterFile (QString clusterFileId)
 Adds a group corresponding to the cluster file identified by clusterFileId to the existing cluster palette.
void createEventPalette (QString eventFileId)
 Creates a event palette and adds a group corresponding to the event file identified by eventFileId.
void addEventFile (QString eventFileId)
 Adds a group corresponding to the event file identified by eventFileId to the existing event palette.
ItemPalettegetEventPalette ()
 Returns the event palette.
QColor getBackgroundColor () const
 Returns the current background color.
void positionFileLoaded ()
 Informs the application that a position file has been loaded from the session file.
bool isClusterFilesLoaded () const
 Tells if there are cluster files loaded.
bool isApositionFileLoaded () const
 Tells if there is a position file loaded.

Protected Member Functions

void initActions ()
 initializes the KActions of the application
void initStatusBar ()
 sets up the statusbar for the main window by initialzing a statuslabel.
void initDisplay (QValueList< int > *channelsToDisplay, QValueList< int > offsets, QValueList< int > channelGains, QValueList< int > selectedChannels, QMap< int, bool > &skipStatus, int rasterHeight=-1, long duration=1000, long startTime=0, QString tabLabel="")
 Initialize the first display (create the mainDockWidget).
virtual bool queryClose ()
 queryClose is called by KDocMainWindow call just before being closed.
virtual bool queryExit ()
 queryExit is called by KDocMainWindow when the last window of the application is going to be closed during the closeEvent().
virtual void saveProperties (KConfig *config)
 This function is called when it is time for Neuroscope to save its properties for session management purposes.
virtual void readProperties (KConfig *config)
 This function is called when this Neuroscope is restored.
void customEvent (QCustomEvent *event)
void initActions ()
 initializes the KActions of the application
void initStatusBar ()
 sets up the statusbar for the main window by initialzing a statuslabel.
void initDisplay (QValueList< int > *channelsToDisplay, QValueList< int > offsets, QValueList< int > channelGains, QValueList< int > selectedChannels, QMap< int, bool > &skipStatus, int rasterHeight=-1, long duration=1000, long startTime=0, QString tabLabel="")
 Initialize the first display (create the mainDockWidget).
virtual bool queryClose ()
 queryClose is called by KDocMainWindow call just before being closed.
virtual bool queryExit ()
 queryExit is called by KDocMainWindow when the last window of the application is going to be closed during the closeEvent().
virtual void saveProperties (KConfig *config)
 This function is called when it is time for Neuroscope to save its properties for session management purposes.
virtual void readProperties (KConfig *config)
 This function is called when this Neuroscope is restored.
void customEvent (QCustomEvent *event)

Friends

class NeuroscopeView

Classes

class  printDialogPage

Detailed Description

The Neuroscope main window and central class.

It sets up the main window and reads the config file as well as providing a menubar, toolbar and statusbar. There is only one document open by application.

Author:
Lynn Hazan


Member Function Documentation

void NeuroscopeApp::openDocumentFile ( const KURL &  url = 0  ) 

Opens a file, only one document at the time is allowed.

Asking for a new one will open a new instance of the application with it.

NeuroscopeView * NeuroscopeApp::activeView (  ) 

Returns the view contains in the active display.

Returns:
active view.

void NeuroscopeApp::setFileProperties ( QString  channelNb,
QString  SR,
QString  resolution,
QString  offset,
QString  voltageRange,
QString  amplification,
QString  screenGain,
QString  timeWindow 
)

Sets the current file properties.

(number of channels, sampling rate of the dat file and eeg file).

Parameters:
channelNb number of channels.
SR sampling rate.
resolution resolution of the acquisition system.
offset initial offset for all the traces.
voltageRange voltage range of the acquisition system in volts.oltage range of the acquisition system in volts.
amplification amplification of the acquisition system.
screenGain screen gain in milivolts by centimeters used to display the field potentiels.
timeWindow initial time window in miliseconds.

void NeuroscopeApp::displayFileProperties ( int  channelNb,
double  SR,
int  resolution,
int  offset,
int  voltageRange,
int  amplification,
float  screenGain,
int  currentNbSamples,
int  currentPeakIndex,
double  videoSamplingRate,
int  width,
int  height,
QString  backgroundImage,
int  rotation,
int  flip,
double  acquisitionSystemSamplingRate,
bool  isaDatFile,
bool  positionsBackground,
QString  traceBackgroundImage 
)

Displays the properties which will be used for the current file (number of channels, sampling rate of the dat file and eeg file).

This dialog is only presented at the opening of a file if there is no parameter or session file.

Parameters:
channelNb number of channels.
SR sampling rate of the current file.
resolution resolution of the acquisition system.
offset initial offset for all the traces.
voltageRange voltage range of the acquisition system in volts.oltage range of the acquisition system in volts.
amplification amplification of the acquisition system.
screenGain screen gain in milivolts by centimeters used to display the field potentiels.
currentNbSamples number of samples per spike waveform.
currentPeakIndex sample index corresponding to the peak of a spike waveform.
videoSamplingRate video acquisition sampling rate.
width video image width.
height video image height.
backgroundImage image used as a background for the position view.
rotation video image rotation angle.
flip video image flip orientation, 0 stands for none, 1 for vertical and 2 for horizontal.
acquisitionSystemSamplingRate acquisition system sampling.
isaDatFile true if the file being opened is a dat file (intial recorded file).
positionsBackground true if the all the positions contain in the position file have to be drawn on the background, false otherwise.
traceBackgroundImage image used as a background for the trace view.

void NeuroscopeApp::createDisplay ( QValueList< int > *  channelsToDisplay,
bool  verticalLines,
bool  raster,
bool  waveforms,
bool  showLabels,
bool  multipleColumns,
bool  greyMode,
QValueList< int >  offsets,
QValueList< int >  channelGains,
QValueList< int >  selectedChannels,
long  startTime,
long  duration,
int  rasterHeight,
QString  tabLabel = "" 
)

Creates a new display.

Parameters:
channelsToDisplay list of the channels to be display in the new display.
verticalLines true if vertical lines will be drawn if clusters are selected.
raster true if a raster will be drawn if clusters are selected.
waveforms true if the spike waveforms will be drawn if clusters are selected.
showLabels true if labels are displayed next to the traces, false otherwise.
multipleColumns true if the traces are diplay on several columns,false otherwise.
greyMode true if the channels are displayed in grey-scale, false otherwise.
offsets list containing the offset for each channel.
channelGains list of the exponents used to compute the drawing gain for each channel.
selectedChannels list of the selected channels.
startTime starting time in miliseconds.
duration time window in miliseconds.
rasterHeight height of the rasters in the world coordinate system.
tabLabel label for the display when in tab page mode.

void NeuroscopeApp::createClusterPalette ( QString  clusterFileId  ) 

Creates a cluster palette and adds a group corresponding to the cluster file identified by clusterFileId.

Parameters:
clusterFileId identifier of the cluster file providing the data accessible through the future palette.

void NeuroscopeApp::addClusterFile ( QString  clusterFileId  ) 

Adds a group corresponding to the cluster file identified by clusterFileId to the existing cluster palette.

Parameters:
clusterFileId identifier of the cluster file providing the data accessible through the future palette.

void NeuroscopeApp::createEventPalette ( QString  eventFileId  ) 

Creates a event palette and adds a group corresponding to the event file identified by eventFileId.

Parameters:
eventFileId identifier of the event file providing the data accessible through the future palette.

void NeuroscopeApp::addEventFile ( QString  eventFileId  ) 

Adds a group corresponding to the event file identified by eventFileId to the existing event palette.

Parameters:
eventFileId identifier of the event file providing the data accessible through the future palette.

ItemPalette * NeuroscopeApp::getEventPalette (  ) 

Returns the event palette.

Returns:
pointer on the event palette.

QColor NeuroscopeApp::getBackgroundColor (  )  const [inline]

Returns the current background color.

Returns:
the current background color.

bool NeuroscopeApp::isClusterFilesLoaded (  )  const [inline]

Tells if there are cluster files loaded.

Returns:
true if at least one cluster file is loaded, false otherwise.

bool NeuroscopeApp::isApositionFileLoaded (  )  const [inline]

Tells if there is a position file loaded.

Returns:
true a position file is loaded, false otherwise.

void NeuroscopeApp::slotEventModified ( QString  providerName,
int  selectedEventId,
double  time,
double  newTime 
) [slot]

Called when an event has been modified.

Parameters:
providerName name use to identified the event provider containing the modified event.
selectedEventId id of the modified event.
time initial time of the modified event.
newTime new time of the modified event.

void NeuroscopeApp::slotEventRemoved ( QString  providerName,
int  selectedEventId,
double  time 
) [slot]

Called when an event has been removed.

Parameters:
providerName name use to identified the event provider containing the removed event.
selectedEventId id of the removed event.
time initial time of the removed event.

void NeuroscopeApp::slotEventGroupSelected ( QString  eventGroupName  )  [slot]

Called when an event file has been selected in the event palette.

Parameters:
eventGroupName name use to identified the selected event file.

void NeuroscopeApp::slotEventAdded ( QString  providerName,
QString  addedEventDescription,
double  time 
) [slot]

Called when an event has been added.

Parameters:
providerName name use to identified the event provider containing the added event.
addedEventDescription description of the added event.
time time of the added event.

void NeuroscopeApp::initDisplay ( QValueList< int > *  channelsToDisplay,
QValueList< int >  offsets,
QValueList< int >  channelGains,
QValueList< int >  selectedChannels,
QMap< int, bool > &  skipStatus,
int  rasterHeight = -1,
long  duration = 1000,
long  startTime = 0,
QString  tabLabel = "" 
) [protected]

Initialize the first display (create the mainDockWidget).

Parameters:
channelsToDisplay list of the channels to be display in the main display at start up.
offsets list containing the offset for each channel.
channelGains list of the exponents used to compute the drawing gain for each channel.
selectedChannels list of the selected channels.
skipStatus map given the skip status of the channels.
rasterHeight height of the rasters in the world coordinate system.
duration time window in miliseconds, the default is 1000.
startTime starting time in miliseconds.
tabLabel label for the display when in tab page mode.

bool NeuroscopeApp::queryExit (  )  [protected, virtual]

queryExit is called by KDocMainWindow when the last window of the application is going to be closed during the closeEvent().

Its purpose is purely to prepare the application (with possible user interaction) so it can safely be closed later (without user interaction).

void NeuroscopeApp::readProperties ( KConfig *  config  )  [protected, virtual]

This function is called when this Neuroscope is restored.

The KConfig object points to the session management config file that was saved. with saveProperties

void NeuroscopeApp::openDocumentFile ( const KURL &  url = 0  ) 

Opens a file, only one document at the time is allowed.

Asking for a new one will open a new instance of the application with it.

NeuroscopeView* NeuroscopeApp::activeView (  ) 

Returns the view contains in the active display.

Returns:
active view.

void NeuroscopeApp::setFileProperties ( QString  channelNb,
QString  SR,
QString  resolution,
QString  offset,
QString  voltageRange,
QString  amplification,
QString  screenGain,
QString  timeWindow 
)

Sets the current file properties.

(number of channels, sampling rate of the dat file and eeg file).

Parameters:
channelNb number of channels.
SR sampling rate.
resolution resolution of the acquisition system.
offset initial offset for all the traces.
voltageRange voltage range of the acquisition system in volts.oltage range of the acquisition system in volts.
amplification amplification of the acquisition system.
screenGain screen gain in milivolts by centimeters used to display the field potentiels.
timeWindow initial time window in miliseconds.

void NeuroscopeApp::displayFileProperties ( int  channelNb,
double  SR,
int  resolution,
int  offset,
int  voltageRange,
int  amplification,
float  screenGain,
int  currentNbSamples,
int  currentPeakIndex,
double  videoSamplingRate,
int  width,
int  height,
QString  backgroundImage,
int  rotation,
int  flip,
double  acquisitionSystemSamplingRate,
bool  isaDatFile,
bool  positionsBackground,
QString  traceBackgroundImage 
)

Displays the properties which will be used for the current file (number of channels, sampling rate of the dat file and eeg file).

This dialog is only presented at the opening of a file if there is no parameter or session file.

Parameters:
channelNb number of channels.
SR sampling rate of the current file.
resolution resolution of the acquisition system.
offset initial offset for all the traces.
voltageRange voltage range of the acquisition system in volts.oltage range of the acquisition system in volts.
amplification amplification of the acquisition system.
screenGain screen gain in milivolts by centimeters used to display the field potentiels.
currentNbSamples number of samples per spike waveform.
currentPeakIndex sample index corresponding to the peak of a spike waveform.
videoSamplingRate video acquisition sampling rate.
width video image width.
height video image height.
backgroundImage image used as a background for the position view.
rotation video image rotation angle.
flip video image flip orientation, 0 stands for none, 1 for vertical and 2 for horizontal.
acquisitionSystemSamplingRate acquisition system sampling.
isaDatFile true if the file being opened is a dat file (intial recorded file).
positionsBackground true if the all the positions contain in the position file have to be drawn on the background, false otherwise.
traceBackgroundImage image used as a background for the trace view.

void NeuroscopeApp::createDisplay ( QValueList< int > *  channelsToDisplay,
bool  verticalLines,
bool  raster,
bool  waveforms,
bool  showLabels,
bool  multipleColumns,
bool  greyMode,
QValueList< int >  offsets,
QValueList< int >  channelGains,
QValueList< int >  selectedChannels,
long  startTime,
long  duration,
int  rasterHeight,
QString  tabLabel = "" 
)

Creates a new display.

Parameters:
channelsToDisplay list of the channels to be display in the new display.
verticalLines true if vertical lines will be drawn if clusters are selected.
raster true if a raster will be drawn if clusters are selected.
waveforms true if the spike waveforms will be drawn if clusters are selected.
showLabels true if labels are displayed next to the traces, false otherwise.
multipleColumns true if the traces are diplay on several columns,false otherwise.
greyMode true if the channels are displayed in grey-scale, false otherwise.
offsets list containing the offset for each channel.
channelGains list of the exponents used to compute the drawing gain for each channel.
selectedChannels list of the selected channels.
startTime starting time in miliseconds.
duration time window in miliseconds.
rasterHeight height of the rasters in the world coordinate system.
tabLabel label for the display when in tab page mode.

void NeuroscopeApp::createClusterPalette ( QString  clusterFileId  ) 

Creates a cluster palette and adds a group corresponding to the cluster file identified by clusterFileId.

Parameters:
clusterFileId identifier of the cluster file providing the data accessible through the future palette.

void NeuroscopeApp::addClusterFile ( QString  clusterFileId  ) 

Adds a group corresponding to the cluster file identified by clusterFileId to the existing cluster palette.

Parameters:
clusterFileId identifier of the cluster file providing the data accessible through the future palette.

void NeuroscopeApp::createEventPalette ( QString  eventFileId  ) 

Creates a event palette and adds a group corresponding to the event file identified by eventFileId.

Parameters:
eventFileId identifier of the event file providing the data accessible through the future palette.

void NeuroscopeApp::addEventFile ( QString  eventFileId  ) 

Adds a group corresponding to the event file identified by eventFileId to the existing event palette.

Parameters:
eventFileId identifier of the event file providing the data accessible through the future palette.

ItemPalette* NeuroscopeApp::getEventPalette (  ) 

Returns the event palette.

Returns:
pointer on the event palette.

QColor NeuroscopeApp::getBackgroundColor (  )  const [inline]

Returns the current background color.

Returns:
the current background color.

bool NeuroscopeApp::isClusterFilesLoaded (  )  const [inline]

Tells if there are cluster files loaded.

Returns:
true if at least one cluster file is loaded, false otherwise.

bool NeuroscopeApp::isApositionFileLoaded (  )  const [inline]

Tells if there is a position file loaded.

Returns:
true a position file is loaded, false otherwise.

void NeuroscopeApp::slotEventModified ( QString  providerName,
int  selectedEventId,
double  time,
double  newTime 
) [slot]

Called when an event has been modified.

Parameters:
providerName name use to identified the event provider containing the modified event.
selectedEventId id of the modified event.
time initial time of the modified event.
newTime new time of the modified event.

void NeuroscopeApp::slotEventRemoved ( QString  providerName,
int  selectedEventId,
double  time 
) [slot]

Called when an event has been removed.

Parameters:
providerName name use to identified the event provider containing the removed event.
selectedEventId id of the removed event.
time initial time of the removed event.

void NeuroscopeApp::slotEventGroupSelected ( QString  eventGroupName  )  [slot]

Called when an event file has been selected in the event palette.

Parameters:
eventGroupName name use to identified the selected event file.

void NeuroscopeApp::slotEventAdded ( QString  providerName,
QString  addedEventDescription,
double  time 
) [slot]

Called when an event has been added.

Parameters:
providerName name use to identified the event provider containing the added event.
addedEventDescription description of the added event.
time time of the added event.

void NeuroscopeApp::initDisplay ( QValueList< int > *  channelsToDisplay,
QValueList< int >  offsets,
QValueList< int >  channelGains,
QValueList< int >  selectedChannels,
QMap< int, bool > &  skipStatus,
int  rasterHeight = -1,
long  duration = 1000,
long  startTime = 0,
QString  tabLabel = "" 
) [protected]

Initialize the first display (create the mainDockWidget).

Parameters:
channelsToDisplay list of the channels to be display in the main display at start up.
offsets list containing the offset for each channel.
channelGains list of the exponents used to compute the drawing gain for each channel.
selectedChannels list of the selected channels.
skipStatus map given the skip status of the channels.
rasterHeight height of the rasters in the world coordinate system.
duration time window in miliseconds, the default is 1000.
startTime starting time in miliseconds.
tabLabel label for the display when in tab page mode.

virtual bool NeuroscopeApp::queryExit (  )  [protected, virtual]

queryExit is called by KDocMainWindow when the last window of the application is going to be closed during the closeEvent().

Its purpose is purely to prepare the application (with possible user interaction) so it can safely be closed later (without user interaction).

virtual void NeuroscopeApp::readProperties ( KConfig *  config  )  [protected, virtual]

This function is called when this Neuroscope is restored.

The KConfig object points to the session management config file that was saved. with saveProperties


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