ItemPalette Class Reference

This class is used to create the cluster and event palettes of the application. More...

#include <itempalette.h>

List of all members.

Public Types

enum  PaletteType { CLUSTER = 0, EVENT = 1, CLUSTER = 0, EVENT = 1 }
enum  PaletteType { CLUSTER = 0, EVENT = 1, CLUSTER = 0, EVENT = 1 }

Public Slots

void slotMousePressWoModificators (QString sourceGroup)
void slotMousePressWAltButton (QString sourceGroup, int index)
void slotMousePressWoModificators (QString sourceGroup)
void slotMousePressWAltButton (QString sourceGroup, int index)

Signals

void colorChanged (int item, QString groupName)
void updateShownItems (const QMap< QString, QValueList< int > > &selectedItems)
void paletteResized (int parentWidth, int labelSize)
void selectedGroupChanged (QString eventGroupName)
void updateItemsToSkip (QString groupName, const QValueList< int > &itemsToSkip)
void noClustersToBrowse ()
void noEventsToBrowse ()
void clustersToBrowse ()
void eventsToBrowse ()
void colorChanged (int item, QString groupName)
void updateShownItems (const QMap< QString, QValueList< int > > &selectedItems)
void paletteResized (int parentWidth, int labelSize)
void selectedGroupChanged (QString eventGroupName)
void updateItemsToSkip (QString groupName, const QValueList< int > &itemsToSkip)
void noClustersToBrowse ()
void noEventsToBrowse ()
void clustersToBrowse ()
void eventsToBrowse ()

Public Member Functions

 ItemPalette (PaletteType type, QColor backgroundColor, QWidget *parent=0, const char *name=0, WFlags fl=0)
 Constructor.
void createItemList (ItemColors *itemColors, QString groupName, int descriptionLength)
 Creates a list of the items of the group groupName.
void selectItems (QString groupName, QValueList< int > itemsToSelect, QValueList< int > itemsToSkip)
 Selects the items specified in the map selection.
void reset ()
 Resets the internal variables.
const QMap< QString, QValueList<
int > > 
selectedItems ()
 Returns the list of selected items by group.
void changeBackgroundColor (QColor color)
 Updates the background color of the palette.
QString selectedGroup ()
 Returns the currently selected group.
void removeGroup (QString groupName)
 Removes a group from the palette.
void selectGroup (QString groupName)
 Selects a group.
void selectAllItems ()
 Selects all the items.
void deselectAllItems ()
 Deselects all the items.
bool isBrowsingEnable ()
 Checks if browsing on items of the palette can be down.
 ItemPalette (PaletteType type, QColor backgroundColor, QWidget *parent=0, const char *name=0, WFlags fl=0)
 Constructor.
void createItemList (ItemColors *itemColors, QString groupName, int descriptionLength)
 Creates a list of the items of the group groupName.
void selectItems (QString groupName, QValueList< int > itemsToSelect, QValueList< int > itemsToSkip)
 Selects the items specified in the map selection.
void reset ()
 Resets the internal variables.
const QMap< QString, QValueList<
int > > 
selectedItems ()
 Returns the list of selected items by group.
void changeBackgroundColor (QColor color)
 Updates the background color of the palette.
QString selectedGroup ()
 Returns the currently selected group.
void removeGroup (QString groupName)
 Removes a group from the palette.
void selectGroup (QString groupName)
 Selects a group.
void selectAllItems ()
 Selects all the items.
void deselectAllItems ()
 Deselects all the items.
bool isBrowsingEnable ()
 Checks if browsing on items of the palette can be down.

Protected Slots

void slotRightPressed (QIconViewItem *item)
void slotMousePressed (int button, QIconViewItem *item, QString sourceGroupName)
void slotMousePressed (QString sourceGroupName, bool shiftKey=false, bool ctrlAlt=false)
void slotMidButtonPressed (QString sourceGroupName)
void slotClickRedraw ()
void languageChange ()
void resizeEvent (QResizeEvent *event)
void drawContents (QPainter *painter)
void slotMouseReleased (QString sourceGroupName)
void slotRightPressed (QIconViewItem *item)
void slotMousePressed (int button, QIconViewItem *item, QString sourceGroupName)
void slotMousePressed (QString sourceGroupName, bool shiftKey=false, bool ctrlAlt=false)
void slotMidButtonPressed (QString sourceGroupName)
void slotClickRedraw ()
void languageChange ()
void resizeEvent (QResizeEvent *event)
void drawContents (QPainter *painter)
void slotMouseReleased (QString sourceGroupName)


Detailed Description

This class is used to create the cluster and event palettes of the application.

It receives the user selections and triggers the actions which have to be done.

Author:
Lynn Hazan


Constructor & Destructor Documentation

ItemPalette::ItemPalette ( PaletteType  type,
QColor  backgroundColor,
QWidget *  parent = 0,
const char *  name = 0,
WFlags  fl = 0 
)

Constructor.

Parameters:
type type of palette (clusters or events).
backgroundColor background color.
parent parent widget.
name internal name of the palette.
fl widget flags.

ItemPalette::ItemPalette ( PaletteType  type,
QColor  backgroundColor,
QWidget *  parent = 0,
const char *  name = 0,
WFlags  fl = 0 
)

Constructor.

Parameters:
type type of palette (clusters or events).
backgroundColor background color.
parent parent widget.
name internal name of the palette.
fl widget flags.


Member Function Documentation

void ItemPalette::createItemList ( ItemColors itemColors,
QString  groupName,
int  descriptionLength 
)

Creates a list of the items of the group groupName.

Parameters:
itemColors list of colors for the given group.
groupName name of the group of items.
descriptionLength value to use as the length for the event descriptions.

void ItemPalette::selectItems ( QString  groupName,
QValueList< int >  itemsToSelect,
QValueList< int >  itemsToSkip 
)

Selects the items specified in the map selection.

Parameters:
groupName name of the group containing the items to be selected.
itemsToSelect list of items to be selected.
itemsToSkip list of items to be marked as skiped while browsing.

const QMap< QString, QValueList< int > > ItemPalette::selectedItems (  ) 

Returns the list of selected items by group.

Returns:
map given the list of selected items for a given group.

QString ItemPalette::selectedGroup (  )  [inline]

Returns the currently selected group.

Returns:
the name of the selected group.

void ItemPalette::removeGroup ( QString  groupName  ) 

Removes a group from the palette.

Parameters:
groupName name of the group to be removed.

void ItemPalette::selectGroup ( QString  groupName  ) 

Selects a group.

Parameters:
groupName name of the group to be selected.

bool ItemPalette::isBrowsingEnable (  ) 

Checks if browsing on items of the palette can be down.

Returns:
true if at least one item can be use for browsing, false otherwise.

void ItemPalette::createItemList ( ItemColors itemColors,
QString  groupName,
int  descriptionLength 
)

Creates a list of the items of the group groupName.

Parameters:
itemColors list of colors for the given group.
groupName name of the group of items.
descriptionLength value to use as the length for the event descriptions.

void ItemPalette::selectItems ( QString  groupName,
QValueList< int >  itemsToSelect,
QValueList< int >  itemsToSkip 
)

Selects the items specified in the map selection.

Parameters:
groupName name of the group containing the items to be selected.
itemsToSelect list of items to be selected.
itemsToSkip list of items to be marked as skiped while browsing.

const QMap<QString,QValueList<int> > ItemPalette::selectedItems (  ) 

Returns the list of selected items by group.

Returns:
map given the list of selected items for a given group.

QString ItemPalette::selectedGroup (  )  [inline]

Returns the currently selected group.

Returns:
the name of the selected group.

void ItemPalette::removeGroup ( QString  groupName  ) 

Removes a group from the palette.

Parameters:
groupName name of the group to be removed.

void ItemPalette::selectGroup ( QString  groupName  ) 

Selects a group.

Parameters:
groupName name of the group to be selected.

bool ItemPalette::isBrowsingEnable (  ) 

Checks if browsing on items of the palette can be down.

Returns:
true if at least one item can be use for browsing, false otherwise.


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