#include <channelpalette.h>
Collaboration diagram for ChannelPalette:
Public Types | |
enum | PaletteType { DISPLAY = 0, SPIKE = 1, DISPLAY = 0, SPIKE = 1 } |
enum | PaletteType { DISPLAY = 0, SPIKE = 1, DISPLAY = 0, SPIKE = 1 } |
Public Slots | |
virtual void | changeColor (QIconViewItem *item, bool single=true) |
void | createGroup () |
Creates a new group and fill it with the selected channels. | |
void | setGreyScale (bool grey) |
void | deleteEmptyGroups () |
Deletes the empty groups. | |
void | selectAllChannels () |
void | deselectAllChannels () |
void | slotChannelsMoved (QString targetGroup, QIconViewItem *after) |
Channels moved to an existing group in a specific location. | |
void | slotChannelsMoved (const QValueList< int > &channelIds, QString sourceGroup, QIconViewItem *after) |
Channels moved around in a group. | |
void | trashChannelsMovedAround (const QValueList< int > &channelIds, QString afterId, bool beforeFirst) |
void | discardChannels () |
void | discardChannels (const QValueList< int > &channelsToDiscard) |
void | discardChannels (const QValueList< int > &channelsToDiscard, QString afterId, bool beforeFirst) |
void | discardSpikeChannels () |
void | showChannels () |
void | hideChannels () |
void | hideUnselectAllChannels () |
void | updateShowHideStatus (const QValueList< int > &channelIds, bool showStatus) |
void | updateSkipStatus (const QMap< int, bool > &skipStatus) |
void | updateSkipStatus (const QValueList< int > &channelIds, bool skipStatus) |
void | updateColor (const QValueList< int > &channelIds) |
void | updateColor (int channelId) |
void | updateGroupColor (int channelId) |
Sets the channel color to the group color for all the channels in the same group has channelId. | |
void | applyGroupColor (PaletteType paletteType) |
void | applyCustomColor () |
void | setEditMode (bool edition) |
void | groupToMove (int sourceId, int targetId, int start, int destination) |
void | removeChannelsFromTrash (const QValueList< int > &channelIds) |
void | slotMousePressWoModificators (QString sourceGroup) |
void | selectionTool () |
virtual void | changeColor (QIconViewItem *item, bool single=true) |
void | createGroup () |
Creates a new group and fill it with the selected channels. | |
void | setGreyScale (bool grey) |
void | deleteEmptyGroups () |
Deletes the empty groups. | |
void | selectAllChannels () |
void | deselectAllChannels () |
void | slotChannelsMoved (QString targetGroup, QIconViewItem *after) |
Channels moved to an existing group in a specific location. | |
void | slotChannelsMoved (const QValueList< int > &channelIds, QString sourceGroup, QIconViewItem *after) |
Channels moved around in a group. | |
void | trashChannelsMovedAround (const QValueList< int > &channelIds, QString afterId, bool beforeFirst) |
void | discardChannels () |
void | discardChannels (const QValueList< int > &channelsToDiscard) |
void | discardChannels (const QValueList< int > &channelsToDiscard, QString afterId, bool beforeFirst) |
void | discardSpikeChannels () |
void | showChannels () |
void | hideChannels () |
void | hideUnselectAllChannels () |
void | updateShowHideStatus (const QValueList< int > &channelIds, bool showStatus) |
void | updateSkipStatus (const QMap< int, bool > &skipStatus) |
void | updateSkipStatus (const QValueList< int > &channelIds, bool skipStatus) |
void | updateColor (const QValueList< int > &channelIds) |
void | updateColor (int channelId) |
void | updateGroupColor (int channelId) |
Sets the channel color to the group color for all the channels in the same group has channelId. | |
void | applyGroupColor (PaletteType paletteType) |
void | applyCustomColor () |
void | setEditMode (bool edition) |
void | groupToMove (int sourceId, int targetId, int start, int destination) |
void | removeChannelsFromTrash (const QValueList< int > &channelIds) |
void | slotMousePressWoModificators (QString sourceGroup) |
void | selectionTool () |
Signals | |
void | singleChangeColor (int selectedChannel) |
void | groupChangeColor (int groupId) |
void | updateShownChannels (const QValueList< int > &shownChannels) |
void | updateHideChannels (const QValueList< int > &hiddenChannels) |
void | paletteResized (int parentWidth, int labelSize) |
void | channelsDiscarded (const QValueList< int > &discarded) |
void | setDragAndDrop (bool dragAndDrop) |
void | groupModified () |
void | channelsMovedToTrash (const QValueList< int > &channelIds, QString afterId, bool beforeFirst) |
void | channelsMovedAroundInTrash (const QValueList< int > &channelsToDiscard, QString afterId, bool beforeFirst) |
void | channelsRemovedFromTrash (const QValueList< int > &channelIds) |
void | channelsSelected (const QValueList< int > &selectedChannels) |
void | singleChangeColor (int selectedChannel) |
void | groupChangeColor (int groupId) |
void | updateShownChannels (const QValueList< int > &shownChannels) |
void | updateHideChannels (const QValueList< int > &hiddenChannels) |
void | paletteResized (int parentWidth, int labelSize) |
void | channelsDiscarded (const QValueList< int > &discarded) |
void | setDragAndDrop (bool dragAndDrop) |
void | groupModified () |
void | channelsMovedToTrash (const QValueList< int > &channelIds, QString afterId, bool beforeFirst) |
void | channelsMovedAroundInTrash (const QValueList< int > &channelsToDiscard, QString afterId, bool beforeFirst) |
void | channelsRemovedFromTrash (const QValueList< int > &channelIds) |
void | channelsSelected (const QValueList< int > &selectedChannels) |
Public Member Functions | |
ChannelPalette (PaletteType type, QColor backgroundColor, bool edition, QWidget *parent=0, const char *name=0, WFlags fl=0) | |
Constructor. | |
void | createChannelLists (ChannelColors *channelColors, QMap< int, QValueList< int > > *groupsChannels, QMap< int, int > *channelsGroups) |
Dispatchs the channels in several iconviews to represent the different groups of channels. | |
void | selectChannels (const QValueList< int > &selectedChannels) |
Selects the channels contain in selectedChannels . | |
void | reset () |
Resets the internal information of the palette. | |
const QValueList< int > | selectedChannels () |
Returns the list of selected channels. | |
void | changeBackgroundColor (QColor color) |
updates the background color of the palette. | |
const QValueList< int > | getShowHideChannels (bool showStatus) |
Gets the channels with the showStatus show/hide status. | |
const QMap< int, bool > | getSkipStatus () |
Gets the skip status for each channel. | |
ChannelPalette (PaletteType type, QColor backgroundColor, bool edition, QWidget *parent=0, const char *name=0, WFlags fl=0) | |
Constructor. | |
void | createChannelLists (ChannelColors *channelColors, QMap< int, QValueList< int > > *groupsChannels, QMap< int, int > *channelsGroups) |
Dispatchs the channels in several iconviews to represent the different groups of channels. | |
void | selectChannels (const QValueList< int > &selectedChannels) |
Selects the channels contain in selectedChannels . | |
void | reset () |
Resets the internal information of the palette. | |
const QValueList< int > | selectedChannels () |
Returns the list of selected channels. | |
void | changeBackgroundColor (QColor color) |
updates the background color of the palette. | |
const QValueList< int > | getShowHideChannels (bool showStatus) |
Gets the channels with the showStatus show/hide status. | |
const QMap< int, bool > | getSkipStatus () |
Gets the skip status for each channel. | |
Protected Slots | |
virtual void | slotRightPressed (QIconViewItem *item) |
virtual void | slotMousePressed (int button, QIconViewItem *item) |
void | slotMousePressed (QString sourceGroupName) |
virtual void | slotMidButtonPressed (QString sourceGroupId) |
virtual void | slotClickRedraw () |
virtual void | languageChange () |
virtual void | createGroup (int id) |
virtual void | setChannelLists () |
virtual void | resizeEvent (QResizeEvent *event) |
virtual void | drawContents (QPainter *painter) |
void | slotDragLabeltMoved (QPoint position) |
virtual void | slotRightPressed (QIconViewItem *item) |
virtual void | slotMousePressed (int button, QIconViewItem *item) |
void | slotMousePressed (QString sourceGroupName) |
virtual void | slotMidButtonPressed (QString sourceGroupId) |
virtual void | slotClickRedraw () |
virtual void | languageChange () |
virtual void | createGroup (int id) |
virtual void | setChannelLists () |
virtual void | resizeEvent (QResizeEvent *event) |
virtual void | drawContents (QPainter *painter) |
void | slotDragLabeltMoved (QPoint position) |
Classes | |
class | ChannelIconItem |
Interal class to represent an item in the palette. More... |
It receives the user selections and triggers the actions which have to be done.
ChannelPalette::ChannelPalette | ( | PaletteType | type, | |
QColor | backgroundColor, | |||
bool | edition, | |||
QWidget * | parent = 0 , |
|||
const char * | name = 0 , |
|||
WFlags | fl = 0 | |||
) |
Constructor.
type | type of palette (anatomical or spike). | |
backgroundColor | background color. | |
edition | true if the item of the palette are movable, falsse otherwise. | |
parent | parent widget. | |
name | internal name of the palette. | |
fl | widget flags. |
ChannelPalette::ChannelPalette | ( | PaletteType | type, | |
QColor | backgroundColor, | |||
bool | edition, | |||
QWidget * | parent = 0 , |
|||
const char * | name = 0 , |
|||
WFlags | fl = 0 | |||
) |
Constructor.
type | type of palette (anatomical or spike). | |
backgroundColor | background color. | |
edition | true if the item of the palette are movable, falsse otherwise. | |
parent | parent widget. | |
name | internal name of the palette. | |
fl | widget flags. |
void ChannelPalette::createChannelLists | ( | ChannelColors * | channelColors, | |
QMap< int, QValueList< int > > * | groupsChannels, | |||
QMap< int, int > * | channelsGroups | |||
) |
Dispatchs the channels in several iconviews to represent the different groups of channels.
channelColors | list of colors for the channels. | |
groupsChannels | map given the list of channels for each group. | |
channelsGroups | map given to which group each channel belongs. |
void ChannelPalette::selectChannels | ( | const QValueList< int > & | selectedChannels | ) |
Selects the channels contain in selectedChannels
.
selectedChannels | list of channels to select. |
const QValueList< int > ChannelPalette::getShowHideChannels | ( | bool | showStatus | ) |
Gets the channels with the showStatus
show/hide status.
const QMap<int,bool> ChannelPalette::getSkipStatus | ( | ) | [inline] |
Gets the skip status for each channel.
void ChannelPalette::updateGroupColor | ( | int | channelId | ) | [slot] |
Sets the channel color to the group color for all the channels in the same group has channelId.
The group to used is determine with the palette type.
channelId | id of the reference channel. |
void ChannelPalette::createChannelLists | ( | ChannelColors * | channelColors, | |
QMap< int, QValueList< int > > * | groupsChannels, | |||
QMap< int, int > * | channelsGroups | |||
) |
Dispatchs the channels in several iconviews to represent the different groups of channels.
channelColors | list of colors for the channels. | |
groupsChannels | map given the list of channels for each group. | |
channelsGroups | map given to which group each channel belongs. |
void ChannelPalette::selectChannels | ( | const QValueList< int > & | selectedChannels | ) |
Selects the channels contain in selectedChannels
.
selectedChannels | list of channels to select. |
const QValueList<int> ChannelPalette::getShowHideChannels | ( | bool | showStatus | ) |
Gets the channels with the showStatus
show/hide status.
const QMap<int,bool> ChannelPalette::getSkipStatus | ( | ) | [inline] |
Gets the skip status for each channel.
void ChannelPalette::updateGroupColor | ( | int | channelId | ) | [slot] |
Sets the channel color to the group color for all the channels in the same group has channelId.
The group to used is determine with the palette type.
channelId | id of the reference channel. |